[go: up one dir, main page]

CN103744365B - Bridging module for communication between room control terminal and upper computer and method thereof - Google Patents

Bridging module for communication between room control terminal and upper computer and method thereof Download PDF

Info

Publication number
CN103744365B
CN103744365B CN201310692137.3A CN201310692137A CN103744365B CN 103744365 B CN103744365 B CN 103744365B CN 201310692137 A CN201310692137 A CN 201310692137A CN 103744365 B CN103744365 B CN 103744365B
Authority
CN
China
Prior art keywords
module
terminal device
message
equipment
communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201310692137.3A
Other languages
Chinese (zh)
Other versions
CN103744365A (en
Inventor
陆章其
马荣昌
王嘉霖
梁成楼
杨苗苗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NANJING BUILLIFE ELECTRONIC TECHNOLOGY Co Ltd
Original Assignee
NANJING BUILLIFE ELECTRONIC TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NANJING BUILLIFE ELECTRONIC TECHNOLOGY Co Ltd filed Critical NANJING BUILLIFE ELECTRONIC TECHNOLOGY Co Ltd
Priority to CN201310692137.3A priority Critical patent/CN103744365B/en
Publication of CN103744365A publication Critical patent/CN103744365A/en
Application granted granted Critical
Publication of CN103744365B publication Critical patent/CN103744365B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention provides a bridging module for communication between a room control terminal and an upper computer. The bridging module comprises a terminal equipment scheduling module, a data management center module and an upper computer communication module. The terminal equipment scheduling and control module includes a unified message queue interaction interface of communication, timing sequence scheduling of terminal equipment interaction, and terminal equipment communication channel creating and transmitting/receiving; the data management center module includes a unified external communication interaction interface, a message data combination and disassembly module, an equipment configuration description file parsing module, an equipment adding and deleting management module, an equipment mapping real-time data management module and an equipment mapping history data management module; and the upper computer communication module includes a unified message queue interaction interface of communication, message and information unpacking and upper computer message communication channel creating and transmitting/receiving. Flexible combination can be carried out based on a modular architecture and according to different needs so that each system can be configured on demand and use of resources can be maximized.

Description

For guestroom control terminal and the bridge module and its method of upper machine communication
Technical field
The invention belongs to hotel's intelligent management technical field, more particularly to a kind of communication for hotel's intelligent management Bridge module.
Background technology
With the development and the continuous improvement of the people's material and cultural life level of national economy, either to life or right The demand of the environment of the work various intelligent digitalized service to be provided is increasing, promotes the intelligent pipe in hotel What reason was managed and serviced with service and home intelligence develops rapidly, intelligent management is enriched constantly with the content of service, use Family requires more and more higher with the quality and intelligent management of service to intelligent management with reliability of service.But simultaneously because city Field dog-eat-dog, every operation cost is continuously increased, especially human cost, also causes hotel in the construction of every management system Aspect, it has to which consideration is also required to consider system Construction cost while respective services functional requirement is met.
Realizing situation and be described the drawbacks of exist below for current guest room intelligent controller:
At present, the guest room intelligent controller that in the market is realized mainly has both of which, 1. centralization:With a room It is unit, by control terminal involved in a room(Such as:Light, air-conditioning, Men Xian, curtain etc.)All focus on one On individual control panel (RCU), this kind of mode only needs the control terminal that the terminal of control is counted and this plank is provided in a room It is cost-effective comparing in the case that points are suitable.But such case can only be applicable for some types hotel, due to wine The class in shop and the theory managed are different, and the layout of the inside and configuration all have very big difference, so this kind of pattern is at certain In the case of reduces cost, but but limit its flexibility, have received limitation using scope.
2 portions modulars:Or a room is unit, and by the I/O control points in a room, temperature controller individually goes out To make modularization, RS485 mouthfuls of multiple is then provided on RCU to connect these modules.Although this kind of mode solves certain Flexibility, but the modularization of partial function simply has been carried out, overall modularization is not supported, do not possess relative flexible group Close, and certain waste is also resulted in more RS485 mouthful for supporting, to have lacked to extend.
The content of the invention
It is an object of the invention to provide a kind of bridge module and its method for guestroom control terminal and upper machine communication, To solve very flexible present in prior art, not support overall modular problem.
To achieve the above object, the present invention uses following technical scheme:
A kind of bridge module for guestroom control terminal and upper machine communication, including terminal device scheduler module, data Management center module, Upper machine communication module;
Wherein, the terminal device scheduler module includes:
The unified message queue interactive interface of communication:Based on the message queue communication mechanism between process, according to data management Center module externally provides unified communication interactive interface, and parsing distribution and the encapsulation to message send;
The sequential scheduling of terminal device interaction:It was a cycle with 1 second, is 10 milliseconds by time scale, by whole cycle It is divided into 5 timeslice stages;
Establishment and transmitting-receiving with terminal device communication channel:It is responsible for the establishment with terminal device interface channel, data is entered The frame format that row encapsulation communication is supported, carries out the transmission of data frame;
The control data corporation module includes:
Device configuration describes document analysis module:For when program initialization runs, reading xml configuration files, parsing Xml configuration files, the every kind of terminal equipment type that will have been parsed forms every kind of device type masterplate, when there is certain type of terminal Facility registration, is replicated to create the whole description information impression of this equipment based on this type masterplate;
The unified message queue interactive interface of communication:Based on the message queue communication mechanism between process, the parsing to message Distribution sends with encapsulation, externally provides a standard message interactive interface;
The combination of message data with disassemble module:Configuration and control data to issuing are combined, and are handed down to terminal and set It is standby, to the real time data read from terminal device, disassembled into atom variable;
Equipment is added and deletes management module:According to the terminal equipment type of registration, the masterplate of relevant device type is replicated, Further according to being the address of this equipment distribution in terminal device scheduler module, and this registration equipment is suspended to based on this address On the chained list created for hash key;When detecting certain equipment in terminal device dispatching management module because failure or power down are former Cause, reports each management information for deleting this corresponding device, and notify host computer;
Device map real time data releasing module:According to being added in the said equipment and deleting management module, registration is corresponding Equipment and the management impression structure of whole equipment that creates, and device configuration describes to configure text from xml in document analysis module The analysis mode of the individual variable that part gets, will be got after variable data parsed based on this rule from terminal device, Safeguard that the value of this variable is refreshed in real time to internal memory;
Device map historical data management module:History data store interval based on configuration, will be in xml configuration files The variable to be stored is configured to, is spaced with the storage time for configuring, in the storage of timing to sqlite databases, for going through later The inquiry of history data;
The Upper machine communication module includes:
The unified message queue interactive interface of communication:Based on the message queue communication mechanism between process, according to data management Center module externally provides unified communication interactive interface, and parsing distribution and the encapsulation to message send;
The decapsulation of message and message:To receiving the message that host computer is sent, after being parsed, by control data corporation The unified standard message structure that module is provided, carries out message encapsulation, is sent to control data corporation resume module;
Establishment and transmitting-receiving with host computer message communication channel:Set up the passage of message communication.
Pass through process between terminal device scheduler module, control data corporation module, Upper machine communication module this 3 modules Between message queue mechanism communication, fault tolerant mechanism:Short message is retransmitted using response, and message sequence long uses row number retransmission mechanism.
A kind of method of guestroom control terminal and upper machine communication, including method, the end that terminal device network registration is managed The method of the method, the configuration of terminal device operation logic and the control of run action of the monitoring collection of end equipment service data,
Wherein, the method for terminal device network registration management is specially:Device power initialization is divided to two pieces:First piece of terminal Device power initialization finally enters login network access pattern;Second piece of bridge module device power initialization, required for initialization All basic functions, finally run terminal device scheduling feature, send equipment probe messages, when certain just upper electricity be in register into The terminal device of net pattern receives this equipment probe messages, the device descriptor variable of this equipment is replied into bridge module, so Receive the facility registration response message of bridge module reply afterwards etc., if terminal device receives facility registration response message, by oneself Registered networking pattern is designated, equipment probe messages is received again below and is not processed;If terminal device does not receive equipment note Volume response message, terminal device continues to be in login network access pattern, waits processing equipment probe messages again;And terminal device Scheduler module receives the device descriptor variable of terminal device reply, is terminal device distribution communication physical address, is set to terminal The standby communication physical address for replying distribution etc. is to be answered, if not receiving response, maximum is supported continuously to send out again three times, if more than 3 It is secondary not receive the physical address deletion that response is just distributed also, leap to next timeslice treatment;If processing normal above, The physical address of distribution is issued into control data corporation module, control data corporation mould with device descriptor variable encapsulation into message Block parses this message, the equipment class set up when the device type information in device descriptor variable is to replicate a initialization Pattern version, for setting up this terminal device full impression in bridge module equipment, the communication physical address based on distribution is made For hash key are managed the impression information of this equipment with hash tables, and the physical address and device descriptor information that will distribute are made For a record is stored in database, then give terminal device scheduler module reply a message, terminal device scheduler module by this Message is packaged into facility registration response message, then waits the confirmation message that receiving terminal apparatus are replied, terminal device scheduling mould The confirmation message encapsulation messages that block receives reply issue control data corporation module, then pass through Upper machine communication module, finally It is packaged into udp messages and issues host computer, so far confirms the network registration success of this equipment.
The method of the monitoring collection of terminal device service data is specially:By message by all changes of all registration equipment Amount is sent to terminal device scheduler module, and the chained list pond of all variables, terminal device are established in terminal device scheduler module Scheduler task in scheduler module takes a variable node by what is circulated successively from chained list pond above, is sent to corresponding Terminal device, waits the response of terminal device, if terminal device, does not have response in certain time-out time, by this variable weight It is new to send once, at most it is repeated 3 times, if again without response is received, confirming this equipment fault, notify host computer;By what is received Reply data, control data corporation module is sent to by message, after being parsed, updates each variable set up in hash tables The real time information of impression;Then atom variable after host computer is by disassembling reads this real time information, reaches to terminal device The monitoring collection of service data.
The configuration of terminal device operation logic is specially with the method for the control of run action:By configuration data and control number It is put into based on being processed in priority query according to both data, the priority of control data is set higher than configuration data Priority, make control data be come before the queue of configuration data, allow control data preferentially to be processed;Data management Center module carries out parsing and merges the logical variable that forming apparatus are supported successively to control and configuration data in queue, waits host computer The notice message that transaction operation is finished is sent, the logical variable for merging will be parsed is packaged into message and be sent to terminal device tune Degree module, sets up transmit queue, in the configuration and control for issuing in terminal device scheduler module in terminal device scheduler module Timeslice, by the control in this queue and configuration data, is packaged into data frame, is sent to terminal device;Host computer is to configuration number According to or the execution state of control operation be read out to confirm whether whole configuration or control operation run succeeded.
The beneficial effects of the invention are as follows:
1. whole system can flexibly be combined using modularization framework is based on according to user's not demand, be accomplished Each system is configured on demand, and then make the maximized utilization of resource.
2. the address of terminal device, carries out automatic distribution, and installation personnel need not perceive bottom-layer network communication knot Structure.
3. this module supports that the terminal device in the multiple rooms of control, each room support multiple same type equipment.
4. this module, without changing hardware and software code, supports the addition of new equipment by changing xml configuration files, Fabulous scalability is accomplished.
Brief description of the drawings
Fig. 1 is present invention location and the connected mode schematic diagram with system other parts in the entire system;
Fig. 2 is bridge module system construction drawing;
Fig. 3 is terminal device scheduling and control module system construction drawing;
Fig. 4 is time shaft burst figure;
Fig. 5 is terminal scheduling and control module and terminal device data flowchart;
Fig. 6 is control data corporation module overall structure figure;
Fig. 7 is Upper machine communication module structure chart.
Specific embodiment
The present invention will be further described below in conjunction with the accompanying drawings.
Fig. 1 is that the bridge module for guestroom control terminal and upper machine communication of the invention is residing in the entire system Position.
As shown in Fig. 2 the bridge module for guestroom control terminal and upper machine communication of the invention includes terminal device Scheduler module, control data corporation module, Upper machine communication module.
It is specific as follows:
First, terminal device scheduling and control module
As shown in figure 3, the module includes that the unified message queue interactive interface of communication, the sequential of terminal device interaction are adjusted The establishment of degree and terminal device communication channel and transmitting-receiving, specially:
(1), communication unified message queue interactive interface:Based on the message queue communication mechanism between process, according to data Management center module externally provides unified communication interactive interface, and parsing distribution and the encapsulation to message send;
(2), terminal device interaction sequential scheduling:It was that a cycle is incited somebody to action with 1 second, time scale is 10 milliseconds, will be whole Cycle is divided into 5 timeslice stages;
Referring to Fig. 4, the specific description situation for dividing is as follows:
1. 0-30ms :Terminal device detection time piece, for having detected whether that equipment needs login network access automatically;
2. 30-600ms :Terminal device data read time piece, for variable data in real-time acquisition equipment;
3. 600-700ms point-to- point communications timeslice, the feelings of control terminal equipment B are needed for lower terminal device A Condition;
4. 700-800ms :Control data issues timeslice, the number of the control terminal device action issued for host computer According to;
5. 800-1000ms configuration datas issue timeslice, and for controlling to need because of service logic, host computer is to terminal The data that equipment is configured;
(3)Establishment and transmitting-receiving with terminal device communication channel:It is responsible for the establishment with terminal device interface channel(As selected Select 485 buses and open serial equipment file), data are packaged with the frame format that communication is supported, carry out the transmission of data frame.
Fig. 5 describes each timeslice data flow interaction scenario between bridge module and terminal device, wherein control and configuration Timeslice, in the case where there is data, can just take this time piece, not have the situation of data, leap to next timeslice Duan Zhihang.
Wherein device data read access time piece, system issue the number in timeslice, three time slices of configuration distributing timeslice Fault-tolerant processing is carried out according to by three retransmission mechanism.In device data read access time fragment, if certain data cannot be read for three times Take, that is, think this equipment fault, this terminal equipment failure is reported to control data corporation module.
2nd, control data corporation module
As shown in fig. 6, the module include unified external communication interactive interface, the combination of message data and disassemble module, Device configuration describes document analysis module, equipment addition and deletes management module, device map real time data releasing module, equipment Mapping historical data management module;Specially:
(1), device configuration document analysis module is described:Configuration file is taken for when program initialization runs, reading xml, Parsing xml configuration files;Obtain following several big block messages:
A. obtain and interacted with host computer and the communication interface with lower terminal equipment, so that user can flexibly select It, by the communication modes such as Ethernet or wireless wifi, is also by the communication such as zigbee by serial ports under to be with host computer Mode;
B. the description information of every kind of terminal equipment type is obtained, description content includes:Which is supported in the terminal of this type A little network variables, each network variable disassembles pattern(Int types are converted to by bit, char types are converted to Int types etc.), category Property(It is read-only, only write, read and write), the terminal of this type terminal device and other which types has data interaction;Change after disassembling Amount association attributes(Whether this variable needs saves historical data);
The every kind of terminal equipment type that will have been parsed forms every kind of device type masterplate, when there is certain type of terminal device Registration, is replicated to create the whole description information impression of this equipment based on this type masterplate;
(2), communication unified message queue interactive interface:Based on the message queue mechanism communication between process, to message Parsing distribution sends with encapsulation, externally provides a standard message interactive interface, as long as following the process of this standard interface, all may be used Interacted with this control data corporation module;
(3), message data combination with disassemble module:Configuration and control data to issuing are combined, and are handed down to end End equipment, to the real time data read from terminal device, is disassembled into atom variable, is become so that host computer obtains each atom Amount, convenient, flexible combination.On the one hand will not be combined because of multiple atom variables, between form coupling, make treatment Logic it is excessively complicated.On the other hand terminal device inter-process structure is shielded, makes to be decoupled between host computer and terminal device, Mutual change does not interfere with other side;
(4), equipment addition with delete management module:According to the terminal equipment type of registration, relevant device type is replicated Masterplate, further according to being the address of this equipment distribution in terminal device scheduler module, and this registration equipment is suspended to is based on This address is on the chained list that hash key are created;When detected in terminal device dispatching management module certain equipment because failure or The reasons such as power down, report each management information for deleting this corresponding device, and notify host computer;
(5), device map real time data releasing module:According to being added in the said equipment and deleting management module, phase is registered The equipment answered and the management impression structure of whole equipment for creating, and device configuration describe to match somebody with somebody from xml in document analysis module The analysis mode of each variable that file acquisition is arrived is put, will get variable data from terminal device based on this rule is parsed Afterwards, safeguard that the value of this variable is refreshed in real time to internal memory;
(6), device map historical data management module:History data store interval based on configuration, will configure text in xml The variable to be stored is configured in part, is spaced with the storage time for configuring, in the storage of timing to sqlite databases, for The inquiry of historical data afterwards.
3rd, Upper machine communication module
As shown in fig. 7, the module include communication unified message queue interactive interface, the decapsulation of message and message and The establishment of terminal device communication channel and transmitting-receiving;Specially:
(1), communication unified message queue interactive interface:Based on the message queue communication mechanism between process, according to data Management center module externally provides unified communication interactive interface, and parsing distribution and the encapsulation to message send;
(2), message and message decapsulation:To receiving the message that host computer is sent, after being parsed, by data management The unified standard message structure that center module is provided, carries out message encapsulation, is sent to control data corporation resume module;
(3)Establishment and transmitting-receiving with host computer message communication channel:Set up the passage of message communication.
Pass through process between terminal device scheduler module, control data corporation module, Upper machine communication module this 3 modules Between message queue communication mechanism, fault tolerant mechanism:Short message is retransmitted using response, and message sequence long uses row number retransmission mechanism.
It is with the method for upper machine communication for guestroom control terminal using above-mentioned bridge module:Terminal device dispatches mould The collaboration treatment of block, control data corporation module, Upper machine communication module this 3 modules, is summarized as realizing following three zones: 1. terminal device network registration manages the configuration of the terminal device operation logic of monitoring collection 3. of 2. terminal device service datas With the control of run action.
It is described in detail below for these three functions:
1. terminal device network registration management
Device power initialization is divided to two pieces:
First piece of terminal device power-up initializing finally enters login network access pattern;
Second piece of bridge module device power initialization, all basic functions required for initialization, such as communication channel, connection Database, parsing terminal equipment configuration file form terminal equipment type masterplate etc., finally run terminal device scheduling feature, 30 milliseconds of timeslices of starting are used to send equipment probe messages in each 1 second period, when certain just upper electricity be in register into The terminal device of net pattern receives this equipment probe messages, the device descriptor variable of this equipment is replied into bridge module, so Receive the facility registration response message of bridge module reply afterwards etc., if terminal device receives facility registration response message, by oneself It is designated registered networking pattern.Equipment probe messages are received again below not process;If terminal device does not receive equipment note Volume response message, terminal device continues to be in login network access pattern, waits processing equipment probe messages again;
It is terminal device distribution communication and terminal device scheduler module receives the device descriptor variable of terminal device reply Physical address, the communication physical address distributed to terminal device reply etc. are to be answered, if not receiving response, maximum is supported continuous Send out again three times, if not receiving the physical address deletion that response is just distributed also more than 3 times, leap at next timeslice Reason;If processing normal above, the physical address of distribution is issued into control data corporation with device descriptor variable encapsulation into message Module, control data corporation module parses this message, and device type information in device descriptor variable replicates portion The device type masterplate set up during initialization, for setting up this terminal device full impression in bridge module equipment, is based on The communication physical address of distribution is managed the impression information of this equipment as hash key with hash tables, and will be distributed physically Location and device descriptor information are stored in database as a record(So that electricity is gone up after device powers down again, can to it is registered enter The equipment of net is recovered automatically), a message then is replied to terminal device scheduler module, end equipment scheduler module disappears this Breath is packaged into facility registration response message, then waits the confirmation message that receiving terminal apparatus are replied, and end equipment scheduler module is received Control data corporation module is issued to the confirmation message encapsulation messages replied, then passes through Upper machine communication module, finally encapsulated Host computer is issued into udp messages.So far the network registration success of this equipment is confirmed.
2. the monitoring collection of terminal device service data
This function is built upon in terminal device network registration module basis, only when certain terminal device network registration into After work(, the data of monitoring will be needed to be managed by hash tables in this terminal device, and according to the different attribute of data(Such as: It is read-only, read-write, only write)It is separately added into different hash tables to be managed, sets up following all registered networking terminal devices Full impression.All variables of all registration equipment are sent to by terminal device scheduler module by message, are adjusted in terminal device The chained list pond of all variables is established in degree module, the scheduler task in terminal device scheduler module is by from chained list pond above What is circulated successively takes a variable node, is sent to corresponding terminal device, waits the response of terminal device, if terminal device, There is no response in certain time-out time, this variable is resend once, be at most repeated 3 times, if should again without receiving Answer, confirm this equipment fault, notify host computer;The reply data that will be received, control data corporation module is sent to by message, After being parsed, the real time information of each variable impression set up in hash tables is updated;Then the original after host computer is by disassembling Sub- variable reads this real time information, reaches the monitoring collection to terminal device service data.
3. the configuration of terminal device operation logic and the control of run action
Configuration and control data, the handling process being based on are the same, but due to the slightly a little difference of both characteristics, so entering Differentiation treatment is gone.Configuration data is not very high due to frequent operation and requirement of real-time, and control data operation is frequent It is all relatively high with requirement of real-time, so being put into both data based on being processed in priority query, will control The priority of data sets the priority higher than configuration data, make control data be come before the queue of configuration data, Control data is allowed preferentially to be processed;Control data corporation module carries out parsing merging successively to control and configuration data in queue The logical variable that forming apparatus are supported, the notice message for waiting host computer transaction operation of transmission to finish, will parse patrolling for merging Collect variable encapsulation and be sent to terminal device scheduler module into message, transmit queue, terminal are set up in terminal device scheduler module In the configuration and control time piece for issuing in equipment scheduling module, by the control in this queue and configuration data, data are packaged into Frame, is sent to terminal device;Host computer is read out to confirm whole configuration to the execution state of configuration data or control operation Or whether control operation runs succeeded.
The problem that the present invention exists for prior art:In a first aspect, using the full modularization consistent terminal section of each function Point, will all I/O nodes individually into I/O module, temperature controller, Men Xian, plug-in card power taking, all function opposite independents such as curtain control Module is formed, it is unified to be communicated with bridge module by RS485 buses, which solves according to different demands(Such as 1. IO Points are relatively more, and multiple I/O modules are hung in just selection, 2. have multiple temperature controllers, you can to connect multiple temperature controllers, if without temperature control Device, it is also possible to do not connect), carry out flexible combination.
Second aspect, is packed by the carrying out to information in each terminal module and the atom of information splits, information package For reducing the message number communicated in bus between each terminal module and bridge module, it is to avoid because communication count off is relatively more, Cause bus busier, so as to influence the performance of communication.The atom of information splits and is used for carrying out the information of packing in logic Atom split, i.e., one variable represents a meaning, enters the decoupling of row information, and benefit is that one side is solved due to variable On the other hand binding, the complexity for causing host computer to process shields the internal structure of upper understanding lower terminal module.Further The upper decoupling with terminal module of individual aspect, i.e. the change of terminal module does not interfere with host computer, is also conversely such.
The third aspect, the equipment for needing addition system is parsed by describing the configuration file of terminal module configuration attribute Information, and each variable combination and split mode, when there is new terminal module to need addition system, bridge module need not be changed The description information of new terminal module is jumped in software, it is only necessary to superincumbent configuration file, addition one, you can complete this new terminal module Information processing.

Claims (8)

1. a kind of bridge module for guestroom control terminal and upper machine communication, it is characterised in that:Including terminal device scheduling Module, control data corporation module, Upper machine communication module;
Wherein, the terminal device scheduler module includes:
The unified message queue interactive interface of communication:Based on the message queue communication mechanism between process, according to control data corporation Module externally provides unified communication interactive interface, and parsing distribution and the encapsulation to message send;
The sequential scheduling of terminal device interaction:It was a cycle with 1 second, is 10 milliseconds by time scale, whole cycle is divided It is 5 timeslice stages;
Establishment and transmitting-receiving with terminal device communication channel:It is responsible for the establishment with terminal device interface channel, data is sealed The frame format that dress communication is supported, carries out the transmission of data frame;
The control data corporation module includes:
Device configuration describes document analysis module:For when program initialization runs, reading xml configuration files, xml is parsed Configuration file, the every kind of terminal equipment type that will have been parsed forms every kind of device type masterplate, is set when there is certain type of terminal Remarks volume, is replicated to create the whole description information impression of this equipment based on this type masterplate;
The unified message queue interactive interface of communication:Based on the message queue communication mechanism between process, the parsing distribution to message Sent with encapsulation, a standard message interactive interface is externally provided;
The combination of message data with disassemble module:Configuration and control data to issuing are combined, and are handed down to terminal device, right From the real time data that terminal device reads, atom variable is disassembled into;
Equipment is added and deletes management module:According to the terminal equipment type of registration, the masterplate of relevant device type, then root are replicated According in terminal device scheduler module for this equipment distribute address, and by this register equipment be suspended to based on this address as On the chained list that hash key are created;When detecting certain equipment in terminal device dispatching management module because failure or power down are former Cause, reports each management information for deleting this corresponding device, and notify host computer;
Device map real time data releasing module:According to being added in the said equipment and deleting management module, corresponding equipment is registered And the management impression structure of the whole equipment for creating, and device configuration describes to be obtained from xml configuration files in document analysis module The analysis mode of each variable got, will be got after variable data parsed, internally based on this rule from terminal device Deposit and safeguard that the value of this variable is refreshed in real time;
Device map historical data management module:History data store interval based on configuration, will configure in xml configuration files It is the variable to be stored, is spaced with the storage time for configuring, in the storage of timing to sqlite databases, for later history number According to inquiry;
The Upper machine communication module includes:
The unified message queue interactive interface of communication:Based on the message queue communication mechanism between process, according to control data corporation Module externally provides unified communication interactive interface, and parsing distribution and the encapsulation to message send;
The decapsulation of message and message:To receiving the message that host computer is sent, after being parsed, by control data corporation module The unified standard message structure of offer, carries out message encapsulation, is sent to control data corporation resume module;
Establishment and transmitting-receiving with host computer message communication channel:Set up the passage of message communication.
2. the bridge module for guestroom control terminal and upper machine communication described in claim 1, it is characterised in that:Terminal sets Pass through inter-process messages queue mechanism between standby scheduler module, control data corporation module, Upper machine communication module this 3 modules Communication.
3. the bridge module of guestroom control terminal and upper machine communication is used for as claimed in claim 1, it is characterised in that:Terminal Equipment scheduling module, control data corporation module, the fault tolerant mechanism of Upper machine communication module this 3 modules are:Short message is used Response is retransmitted, and message sequence long uses row number retransmission mechanism.
4. the bridge module of guestroom control terminal and upper machine communication is used for as claimed in claim 1, it is characterised in that:It is described The specific division in timeslice stage is as follows in the sequential scheduling of terminal device interaction:
a. 0-30ms :Terminal device detection time piece, for having detected whether that equipment needs login network access automatically;
b. 30-600ms :Terminal device data read time piece, for variable data in real-time acquisition equipment;
C. 600-700ms point-to- point communications timeslice, the situation of control terminal equipment B is needed for lower terminal device A;
d. 700-800ms :Control data issues timeslice, the data of the control terminal device action issued for host computer;
E. 800-1000ms configuration datas issue timeslice, and for controlling to need because of service logic, host computer is to terminal device The data for being configured.
5. the bridge module of guestroom control terminal and upper machine communication is used for as claimed in claim 1, it is characterised in that:It is described Device configuration describes document analysis module when program initialization runs, and obtains following information:
A. obtain and interacted with host computer and the communication interface with lower terminal equipment;
B. the description information of every kind of terminal equipment type is obtained, description content includes:Which net is supported in the terminal of this type Network variable;Each network variable disassembles pattern, attribute;This type terminal device has data with the terminal of other which types Interaction;Variable association attributes after disassembling.
6. a kind of method of guestroom control terminal and upper machine communication, it is characterised in that:Including the management of terminal device network registration Method, it is specially:Device power initialization is divided to two pieces:First piece of terminal device power-up initializing finally enters login network access Pattern;Second piece of bridge module device power initialization, all basic functions required for initialization finally run terminal device and adjust Degree function, sends equipment probe messages, when the terminal device that certain firm upper electricity has been in login network access pattern receives the detection of this equipment Then etc. message, bridge module is replied to by the device descriptor variable of this equipment, receives the facility registration of bridge module reply Response message, if terminal device receives facility registration response message, oneself will be designated registered networking pattern, receive again below Equipment probe messages are not processed;If terminal device does not receive facility registration response message, terminal device continues to be in registration Networking pattern, waits processing equipment probe messages again;And the equipment that terminal device scheduler module receives terminal device reply Descriptor variable, is terminal device distribution communication physical address, and the communication physical address for replying distribution to terminal device is waited should Answer, if not receiving response, maximum is supported continuously to send out again three times, if do not receive response also more than 3 times will distribute physically Location is deleted, and leaps to next timeslice treatment;If processing normal, will to distribute physical address and device descriptor variable above It is packaged into message and issues control data corporation module, control data corporation module parses this message, according to device descriptor variable In device type information to replicate a initialization when the device type masterplate set up, exist for setting up this terminal device Full impression in bridge module equipment, the communication physical address based on distribution is used the impression information of this equipment as hash key Hash tables are managed, and the physical address of distribution and device descriptor information are stored in into database as a record, then to end End equipment scheduler module replys a message, and this message is packaged into facility registration response message by terminal device scheduler module, so The confirmation message for waiting receiving terminal apparatus to reply afterwards, terminal device scheduler module receives the confirmation message encapsulation messages hair of reply Control data corporation module is given, then passes through Upper machine communication module, be finally packaged into udp messages and issue host computer, so far really Recognize the network registration success of this equipment.
7. the method for guestroom control terminal as claimed in claim 6 and upper machine communication, it is characterised in that:Also set including terminal The method of the monitoring collection of standby service data, it is specially:All variables of all registration equipment are sent to by end by message End equipment scheduler module, establishes the chained list pond of all variables, in terminal device scheduler module in terminal device scheduler module Scheduler task take a variable node by what is circulated successively from chained list pond above, be sent to corresponding terminal device, etc. The response of terminal device is treated, if terminal device, there is no response in certain time-out time, this variable is resend once, At most it is repeated 3 times, if again without response is received, confirming this equipment fault, notifies host computer;The reply data that will be received, leads to Cross message and be sent to control data corporation module, after being parsed, each variable impression of foundation is real-time in renewal hash tables Information;Then atom variable after host computer is by disassembling reads this real time information, reaches to terminal device service data Monitoring collection.
8. the method for guestroom control terminal as claimed in claim 6 and upper machine communication, it is characterised in that:Also set including terminal The method of configuration with the control of run action of standby operation logic, it is specially:By both numbers of configuration data and control data According to being put into based on being processed in priority query, the priority of control data is set into the priority higher than configuration data, made Control data is come before the queue of configuration data all the time, allows control data preferentially to be processed;Control data corporation module Parsing is carried out successively to control and configuration data in queue and merges the logical variable that forming apparatus are supported, wait host computer to send once The notice message that transaction operation is finished, will parse the logical variable for merging and be packaged into message and be sent to terminal device scheduler module, Transmit queue is set up in terminal device scheduler module, in the configuration and control time piece for issuing in terminal device scheduler module, By the control in this queue and configuration data, data frame is packaged into, is sent to terminal device;Host computer is to configuration data or control The execution state of operation is read out to confirm whether whole configuration or control operation run succeeded.
CN201310692137.3A 2013-12-16 2013-12-16 Bridging module for communication between room control terminal and upper computer and method thereof Expired - Fee Related CN103744365B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310692137.3A CN103744365B (en) 2013-12-16 2013-12-16 Bridging module for communication between room control terminal and upper computer and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310692137.3A CN103744365B (en) 2013-12-16 2013-12-16 Bridging module for communication between room control terminal and upper computer and method thereof

Publications (2)

Publication Number Publication Date
CN103744365A CN103744365A (en) 2014-04-23
CN103744365B true CN103744365B (en) 2017-05-24

Family

ID=50501393

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310692137.3A Expired - Fee Related CN103744365B (en) 2013-12-16 2013-12-16 Bridging module for communication between room control terminal and upper computer and method thereof

Country Status (1)

Country Link
CN (1) CN103744365B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107666482A (en) * 2017-09-18 2018-02-06 上海电气分布式能源科技有限公司 A kind of means of communication and system based on SOA framework

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677676A (en) * 2014-11-20 2016-06-15 广东中星电子有限公司 Management method and device for front-end equipment
CN105471630B (en) * 2015-11-18 2019-04-19 武汉众邦领创技术有限公司 North orientation system message dissemination system and method under large capacity packet delivery system
CN106403168B (en) * 2016-09-05 2019-11-29 重庆美的通用制冷设备有限公司 Fault diagnosis system and method for air-conditioning system
CN113219898B (en) * 2021-07-08 2021-09-21 宜科(天津)电子有限公司 Communication system of upper computer and PLC
CN115328836B (en) * 2022-08-11 2025-08-15 青岛联众芯云科技有限公司 Multi-channel serial port communication management method based on time-division multiplexing mechanism
CN116389378A (en) * 2023-03-30 2023-07-04 深圳市友华通信技术有限公司 Message processing method, device, electronic equipment, chip system and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101320261A (en) * 2008-02-27 2008-12-10 成都光码智能科技有限公司 Hotel intelligent control system
CN102736565A (en) * 2011-04-02 2012-10-17 成都齐峰科技有限公司 Communication method of automatic control equipment based on upper and lower computer structures
WO2013017681A3 (en) * 2011-08-04 2013-04-04 Somfy Sas System for controlling dosmetic appliances and method for implementing a control system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7639156B2 (en) * 2006-06-06 2009-12-29 Kuijlaars Erik Gerardus Adriaa Device with signal generator and signal receiver for providing controlled access to information and/or communication channels

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101320261A (en) * 2008-02-27 2008-12-10 成都光码智能科技有限公司 Hotel intelligent control system
CN102736565A (en) * 2011-04-02 2012-10-17 成都齐峰科技有限公司 Communication method of automatic control equipment based on upper and lower computer structures
WO2013017681A3 (en) * 2011-08-04 2013-04-04 Somfy Sas System for controlling dosmetic appliances and method for implementing a control system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107666482A (en) * 2017-09-18 2018-02-06 上海电气分布式能源科技有限公司 A kind of means of communication and system based on SOA framework

Also Published As

Publication number Publication date
CN103744365A (en) 2014-04-23

Similar Documents

Publication Publication Date Title
CN103744365B (en) Bridging module for communication between room control terminal and upper computer and method thereof
US10791193B2 (en) Remote access gateway configurable control system
CN107850882B (en) Automation and control of distributed data management systems
US10992494B2 (en) Gateway round-robin system
CN106162639B (en) Floodlight-based SDN wireless network management platform and authentication method
US9705962B2 (en) Asynchronous reporting system
CN111178782A (en) Micro-service architecture of process industrial data operation platform
Cecílio et al. Wireless sensors in heterogeneous networked systems
CN101697223A (en) Passenger flow management system for comprehensive transportation hub
CN112351106B (en) Service grid platform containing event grid and communication method thereof
CN112910766A (en) Edge computing intelligent gateway for field bus control system
Diyan et al. Intelligent Internet of Things gateway supporting heterogeneous energy data management and processing
CN102932431A (en) Message-routing-based state monitoring data interface configuration method
CN103188101A (en) Distributed type collection scheduling method and device
CN106375480A (en) Electric energy data real-time acquisition system and method based on distributed system
CN109677465A (en) Distributed real-time systems framework for track traffic synthetic monitoring system
CN101834750A (en) Method for monitoring communication service
CN106027674A (en) Technology architecture of "Internet & smart manufacturing"
CN104980525A (en) Pervasive mobile computing frame based on state middleware
CN103679309B (en) A kind of electric power data warehouse business intelligence statistical analysis technique
CN112000659B (en) A basic application system suitable for intelligent terminal equipment in distribution area
CN104601378A (en) Virtual resource flexible scheduling implementation method combining application performance indicator monitoring data
CN107220515A (en) Post-abortion cares about intelligent follow-up management system
CN201892866U (en) Safely-isolated system for distributed acquisition and high-efficiency multiplexing release of industrial data
CN110046316A (en) A kind of community user family data analysis method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170524

Termination date: 20211216