CN103744365A - 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
CN103744365A
CN103744365A CN201310692137.3A CN201310692137A CN103744365A CN 103744365 A CN103744365 A CN 103744365A CN 201310692137 A CN201310692137 A CN 201310692137A CN 103744365 A CN103744365 A CN 103744365A
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.)
Granted
Application number
CN201310692137.3A
Other languages
Chinese (zh)
Other versions
CN103744365B (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

Images

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 bridge module and the method thereof of guestroom control terminal and upper machine communication
Technical field
The invention belongs to hotel's intelligent management technical field, particularly a kind of communication bridge module for hotel's intelligent management.
Background technology
Along with the development of national economy and improving constantly of the people's material and cultural life level, the demand that is no matter various intelligent digitalized service that can provide to life or to the environment of work is increasing, hotel's intelligent management and service and home intelligence management and developing rapidly of serving have been promoted, the content of intelligent management and service is enriched constantly, and the quality of user to intelligent management and service and intelligent management and reliability of service require more and more higher.But simultaneously due to Market competition, every operation cost constantly increases, and especially human cost also makes hotel aspect the construction of every management system, have to consider when meeting respective services functional requirement also needs taking into account system construction cost.
For the situation that realizes of current guest room intelligent controller and the drawback of existence, be described below:
At present, the guest room intelligent controller of realizing on market mainly contains two kinds of patterns, 1. centralized: take a room as unit, by control terminal (as: light involved in a room, air-conditioning, door is aobvious, curtain etc.) all to focus on a control panel (RCU) upper, and it is more cost-saving that the terminal that this kind of mode only need to be controlled in a room counts that plank provides therewith control terminal counts suitable.But this situation can only be suitable for for part type hotel, due to the class in hotel and the theory of operation different, the layout of the inside and configuration all have very big-difference, so this kind of pattern reduces costs in certain situation, but but limited its dirigibility, usable range has been received limitation.
2 part of module: or a room is unit, and by the I/O reference mark in a room, temperature controller is out made separately modularization, then on RCU, provides multiple RS485 mouths to connect these modules.Although this kind of mode solved certain dirigibility, just carried out the modularization of partial function, do not support overall modularization, do not possess relative flexible combination, and the RS485 mouth of supporting many also cause certain waste, lacked and cannot expand.
Summary of the invention
The object of this invention is to provide a kind of bridge module for guestroom control terminal and upper machine communication and method thereof, to solve the very flexible existing in prior art, the modular problem of not supporting entirety.
For achieving the above object, the present invention is by the following technical solutions:
For a bridge module for guestroom control terminal and upper machine communication, comprise terminal device scheduler module, control data corporation module, Upper machine communication module;
Wherein, described terminal device scheduling comprises with control module:
The unified message queue interactive interface of communication: the message queue communication mechanism based between process, according to control data corporation module, externally provide unified communication interactive interface, parsing distribution and the encapsulation of message are sent;
The sequential scheduling that terminal device is mutual: take 1 second as one-period, be 10 milliseconds by time scale, the whole cycle is divided into 5 timeslice stages;
Establishment and transmitting-receiving with terminal device communication channel: be responsible for and the establishment of terminal device interface channel, data are encapsulated to the frame format that communication is supported, carry out the transmission of Frame;
Described control data corporation module comprises:
Equipment configuration describing document parsing module: for when program initialization moves, read xml and get configuration file, resolve xml configuration file, by every kind of device type masterplate of formation of every kind of terminal equipment type of resolving, when there being the terminal device registration of certain type, based on this type masterplate, copy, create the overall descriptor impression of this equipment;
The unified message queue interactive interface of communication: the message queue communication mechanism based between process, parsing distribution and the encapsulation of message are sent, a standard message interactive interface is externally provided;
The combination of message data with disassemble module: to the configuration issuing with control data and combine, be handed down to terminal device, to the real time data reading from terminal device, disassemble into atom variable;
Equipment adds and deletes administration module: according to the terminal equipment type of registration, copy the masterplate of relevant device type, again according to the address of devices allocation for this reason in terminal device dispatching management module, and this device registration is suspended to based on this address is on the chained list that creates of hash key; When detecting certain equipment in terminal device dispatching management module because of reasons such as fault or power down, report each management information of deleting this corresponding device, and notice is to host computer;
Device map real time data administration module: according to adding at the said equipment and deleting administration module, the management impression structure of the whole equipment of registering corresponding equipment and create, and the analysis mode of the individual variable getting from xml configuration file in equipment configuration describing document parsing module, based on this rule, will, from terminal device gets variable data and resolves, to internal memory, safeguard that the value of this variable refreshes in real time;
Device map historical data management module: based on the history data store interval of configuration, by the variable that is configured to store in xml configuration file, with interval storage time of configuration, the storing in sqlite database of timing, for the later inquiry of historical data;
Described Upper machine communication module comprises:
The unified message queue interactive interface of communication: the message queue communication mechanism based between process, according to control data corporation module, externally provide unified communication interactive interface, parsing distribution and the encapsulation of message are sent;
The decapsulation of message and message: the message of sending receiving host computer, after resolving, the unified standard message structure providing by control data corporation module, carries out message encapsulation, sends to control data corporation resume module;
Establishment and transmitting-receiving with host computer message communication channel: the passage of setting up message communication.
Between terminal device scheduler module, control data corporation module, these 3 modules of Upper machine communication module, pass through inter-process messages queue communication mechanism, fault tolerant mechanism: short message adopts replys re-transmission, and long message order adopts row retransmission mechanism.
A method for guestroom control terminal and upper machine communication, comprises the method for method, the configuration of terminal device operation logic and the control of run action that the monitoring of method, the terminal device service data of terminal device network registration management gathers,
Wherein, the method for terminal device network registration management is specially: device power initialization divides two: first terminal device power-up initializing finally enters login network access pattern, the initialization of second bridge module device power, the required all basic functions of initialization, finally move terminal device scheduling feature, transmitting apparatus probe messages, when certain terminal device that is in login network access pattern that just powered on is received this equipment probe messages, the device descriptor variable of this equipment is replied to bridge module, then wait and accept the facility registration response message that bridge module is replied, if terminal device is received facility registration response message, to oneself be designated registered networking pattern, receive again that equipment probe messages does not process below, if terminal device is not received facility registration response message, terminal device continues to be in login network access pattern, waits for treatment facility probe messages again, and terminal device scheduler module is received the device descriptor variable that terminal device is replied, for terminal device distributes communication physical address, to terminal device, reply the communication physical address wait acknowledge distributing, if do not receive and reply, maximum support sent out three times continuously again, if exceed, also do not receive that replying the physical address just distributing deletes, and leaps to next timeslice processing for 3 times, if process normal above, the physical address of distribution and device descriptor variable are packaged into message and issue control data corporation module, this message of control data corporation module parses, the device type masterplate of setting up while copying a initialization according to the device type information in device descriptor variable, be used for setting up this terminal device full impression in bridge module equipment, communication physical address based on distributing as hash key to hash table management for the impression information of this equipment, and as a record, deposit the physical address of distribution and device descriptor information in database, reply a message then to terminal device scheduler module, terminal device scheduler module is packaged into facility registration response message by this message, then wait for the confirmation message that receiving terminal apparatus is replied, terminal device scheduler module receives that the confirmation message encapsulation messages of reply issues control data corporation module, pass through again Upper machine communication module, finally be packaged into udp message and issue host computer, so far confirm the network registration success of this equipment.
The method of the monitoring collection of terminal device service data is specially: by message, all variablees of all device registrations are sent to end equipment scheduling module, in terminal device scheduler module, set up the chained list pond of all variablees, scheduler task in terminal device scheduler module is by the variable node of getting circulating successively from chained list pond above, send to corresponding terminal device, wait for replying of terminal device, if terminal device, in certain time-out time, do not reply, this variable is resend once, repeat 3 times at most, if still do not receive and reply, confirm this equipment failure, notice host computer, by the reply data of receiving, by message, send to control data corporation module, after resolving, upgrade the real-time information of each variable impression of setting up in hash table, then host computer, by the atom variable after disassembling, reads this real-time information, reaches the monitoring collection to terminal device service data.
The method of the configuration of terminal device operation logic and the control of run action is specially: configuration data and these two kinds of data of control data are put into based on processing in priority query, to control the priority setting of data higher than the priority of configuration data, make to control data and be all the time before the queue that comes configuration data, allow and control high priority data and processed; Control data corporation module resolves to control and configuration data in queue the logical variable that the equipment that is merged into is supported successively, wait for that host computer sends a complete notice message of transaction operation, the logical variable of resolving merging is packaged into message and sends to end equipment scheduling module, in end equipment scheduling module, set up transmit queue, hold in equipment scheduling module at the configuration issuing and control time sheet, by the control in this queue and configuration data, be packaged into Frame, send to terminal device; Host computer reads the executing state of configuration data or control operation, confirms whether whole configuration or control operation run succeeded.
The invention has the beneficial effects as follows:
1. whole system adopts based on modularization framework, can, according to not demand of user, combine flexibly, has accomplished to make each system to configure as required, and then makes the maximized utilization of resource.
2. the address of terminal device, carries out automatically and distributes, and installation personnel does not need perception bottom-layer network communication structure.
3. the terminal device in multiple rooms is controlled in this module support, and multiple equipment of the same type is supported in each room.
4. this module, by revising xml configuration file, without revising hardware and software code, is supported adding of new equipment, has accomplished fabulous extensibility.
Accompanying drawing explanation
Fig. 1 be the present invention in whole system residing position and with the connected mode schematic diagram of other parts of 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 whole structural drawing;
Fig. 7 is Upper machine communication module structural drawing.
Embodiment
Below in conjunction with accompanying drawing, the present invention will be further described.
Fig. 1 is that the bridge module for guestroom control terminal and upper machine communication of the present invention is in the residing position of whole system.
As shown in Figure 2, the bridge module for guestroom control terminal and upper machine communication of the present invention comprises terminal device scheduler module, control data corporation module, Upper machine communication module.
Specific as follows:
One, terminal device scheduling and control module
As shown in Figure 3, this module comprises the mutual sequential scheduling of unified message queue interactive interface, the terminal device of communication, establishment and transmitting-receiving with terminal device communication channel, is specially:
(1), the unified message queue interactive interface of communication: the message queue communication mechanism based between process, externally provides unified communication interactive interface according to control data corporation module, to the parsing distribution of message and encapsulation transmission;
(2), the mutual sequential scheduling of terminal device: incite somebody to action take 1 second as one-period, time scale is 10 milliseconds, and the whole cycle is divided into 5 timeslice stages;
Referring to Fig. 4, concrete description situation of dividing is as follows:
1. 0-30ms: whether terminal device detection time sheet, have equipment to need login network access for automatic detection;
2. 30-600ms: terminal device data read timeslice, for Real-time Obtaining equipment variable data;
3. 600-700ms point-to-point communication timeslice, needs the situation of control terminal B for lower terminal device A;
4. 700-800ms: control data distributing timeslice, the data of the control terminal issuing for host computer action;
5. 800-1000ms configuration data issues timeslice, for because of service logic control need, the data that host computer is configured terminal device;
(3), with establishment and the transmitting-receiving of terminal device communication channel: be responsible for and the establishment (opening serial equipment file as selected 485 buses) of terminal device interface channel, data are encapsulated to the frame format that communication is supported, carry out the transmission of Frame.
Fig. 5 has described the mutual situation of each timeslice data stream between bridge module and terminal device, wherein control and setup time sheet, in the situation that having data, just can take this timeslice, there is no the situation of data, leap to the execution of next time slice.
Wherein device data reads timeslice, the data that issue in timeslice, three time slices of configuration distributing timeslice of system are carried out fault-tolerant processing by three retransmission mechanism.At device data, read time slice, if certain data cannot read for three times, think and this equipment failure report this terminal equipment failure to control data corporation module.
Two, control data corporation module
As shown in Figure 6, this module comprises the combination of unified external communication interactive interface, message data and disassembles module, equipment configuration describing document parsing module, equipment interpolation and delete administration module, device map real time data administration module, device map historical data management module; Be specially:
(1), equipment configuration describing document parsing module: for when program initialization moves, read xml and get configuration file, resolve xml configuration file; Obtain following several large block message:
A. obtain mutual with host computer and with the communication interface of lower terminal equipment so that user can select with host computer flexibly, be by communication modes such as Ethernet or wireless wifi, under be also by communication modes such as zigbee by serial ports;
B. obtain the descriptor of every kind of terminal equipment type, description content comprises: in the terminal of this type, support which network variable, the pattern of disassembling of each network variable (is converted to Int type by bit position, char type is converted to Int type etc.), attribute (read-only, only write, read and write), the terminal of this type of terminal device and other which types has data interaction; Variable association attributes (whether this variable needs saves historical data) after disassembling;
By every kind of device type masterplate of formation of every kind of terminal equipment type of resolving, when there being the terminal device registration of certain type, based on this type masterplate, copy, create the overall descriptor impression of this equipment;
(2), the unified message queue interactive interface of communication: the message queue communication mechanism based between process, parsing distribution to message sends with encapsulation, a standard message interactive interface is externally provided, as long as follow the process of this standard interface, all control data corporation module is mutual therewith;
(3), the combination of message data with disassemble module: to the configuration issuing with control data and combine, be handed down to terminal device, to the real time data reading from terminal device, disassemble into atom variable, so that host computer obtains each atom variable, convenient, flexible combination.Can not be combined because of multiple atom set of variables on the one hand, between formed coupling, make the logic processed too complicated.Shielded on the other hand terminal device inter-process structure, made decoupling zero between host computer and terminal device, variation each other can not have influence on the other side;
(4), equipment adds and deletes administration module: according to the terminal equipment type of registration, copy the masterplate of relevant device type, again according to the address of devices allocation for this reason in terminal device dispatching management module, and this device registration is suspended to based on this address is on the chained list that creates of hash key; When detecting certain equipment in terminal device dispatching management module because of reasons such as fault or power down, report each management information of deleting this corresponding device, and notice is to host computer;
(5), device map real time data administration module: according to adding at the said equipment and deleting administration module, the management impression structure of the whole equipment of registering corresponding equipment and create, and the analysis mode of the individual variable getting from xml configuration file in equipment configuration describing document parsing module, based on this rule, will, from terminal device gets variable data and resolves, to internal memory, safeguard that the value of this variable refreshes in real time;
(6), device map historical data management module: based on the history data store interval of configuration, by the variable that is configured to store in xml configuration file, with interval storage time of configuration, the storing in sqlite database of timing, for the later inquiry of historical data.
Three, Upper machine communication module
As shown in Figure 7, this module comprises the decapsulation of unified message queue interactive interface, message and the message of communication, establishment and transmitting-receiving with terminal device communication channel; Be specially:
(1), the unified message queue interactive interface of communication: the message queue communication mechanism based between process, externally provides unified communication interactive interface according to control data corporation module, to the parsing distribution of message and encapsulation transmission;
(2), the decapsulation of message and message: the message of sending receiving host computer, after resolving, the unified standard message structure providing by control data corporation module, carries out message encapsulation, sends to control data corporation resume module;
(3), with establishment and the transmitting-receiving of host computer message communication channel: the passage of setting up message communication.
Between terminal device scheduler module, control data corporation module, these 3 modules of Upper machine communication module, pass through inter-process messages queue communication mechanism, fault tolerant mechanism: short message adopts replys re-transmission, and long message order adopts row retransmission mechanism.
Use above-mentioned bridge module for the method for guestroom control terminal and upper machine communication to be: the associated treatment of terminal device scheduler module, control data corporation module, these 3 modules of Upper machine communication module, is summarized as and realizes following three large functions: 1. the monitoring that terminal device network registration is managed 2. terminal device service datas gathers 3. configurations of terminal device operation logic and the control of run action.
For these three functions, be described in detail below:
1. terminal device network registration management
Device power initialization divides two:
First terminal device power-up initializing finally enters login network access pattern;
The initialization of second bridge module device power, the required all basic functions of initialization, as communication channel, connection data storehouse, resolve terminal equipment configuration file and form terminal equipment type masterplate etc., finally move terminal device scheduling feature, 30 milliseconds of timeslices initial in each 1 second period are for transmitting apparatus probe messages, when certain terminal device that is in login network access pattern that just powered on is received this equipment probe messages, the device descriptor variable of this equipment is replied to bridge module, then wait and accept the facility registration response message that bridge module is replied, if terminal device is received facility registration response message, registered networking pattern will oneself be designated.Receive again that equipment probe messages does not process below; If terminal device is not received facility registration response message, terminal device continues to be in login network access pattern, waits for treatment facility probe messages again;
And terminal device scheduler module is received the device descriptor variable that terminal device is replied, for terminal device distributes communication physical address, to terminal device, reply the communication physical address wait acknowledge distributing, if do not receive and reply, maximum support sent out three times continuously again, if exceed, also do not receive that replying the physical address just distributing deletes, and leaps to next timeslice processing for 3 times, if process normal above, the physical address of distribution and device descriptor variable are packaged into message and issue control data corporation module, this message of control data corporation module parses, the device type masterplate of setting up while copying a initialization according to the device type information in device descriptor variable, be used for setting up this terminal device full impression in bridge module equipment, communication physical address based on distributing as hash key to hash table management for the impression information of this equipment, and as a record, deposit the physical address of distribution and device descriptor information in database (to power on again after device powers down, can automatically recover the equipment of registered networking), reply a message then to terminal device scheduler module, end equipment scheduling module is packaged into facility registration response message by this message, then wait for the confirmation message that receiving terminal apparatus is replied, end equipment scheduling module receives that the confirmation message encapsulation messages of reply issues control data corporation module, pass through again Upper machine communication module, finally be packaged into udp message and issue host computer.So far confirm the network registration success of this equipment.
2. the monitoring collection of terminal device service data
This function is to be based upon in terminal device network registration module basis, only have when after certain terminal device network registration success, being about to needs the data of monitoring to show to manage by hash in this terminal device, and add respectively different hash tables to manage according to the different attribute of data (as: read-only, read-write, only write etc.), set up the full impression of all registered networking terminal devices below.By message, all variablees of all device registrations are sent to end equipment scheduling module, in terminal device scheduler module, set up the chained list pond of all variablees, scheduler task in terminal device scheduler module is by the variable node of getting circulating successively from chained list pond above, send to corresponding terminal device, wait for replying of terminal device, if terminal device, in certain time-out time, do not reply, this variable is resend once, repeat 3 times at most, if still do not receive and reply, confirm this equipment failure, notice host computer; By the reply data of receiving, by message, send to control data corporation module, after resolving, upgrade the real-time information of each variable impression of setting up in hash table; Then host computer, by the atom variable after disassembling, 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, based on treatment scheme the same, but due to both slightly a little difference of characteristic, so carried out differentiating and processing.Configuration data is because frequent operation and requirement of real-time are not very high, and the frequent and requirement of real-time of controlling data manipulation is all relatively high, so by these two kinds of data, be put into based on processing in priority query, to control the priority setting of data higher than the priority of configuration data, make to control data and be all the time before the queue that comes configuration data, allow and control high priority data and processed; Control data corporation module resolves to control and configuration data in queue the logical variable that the equipment that is merged into is supported successively, wait for that host computer sends a complete notice message of transaction operation, the logical variable of resolving merging is packaged into message and sends to end equipment scheduling module, in end equipment scheduling module, set up transmit queue, hold in equipment scheduling module at the configuration issuing and control time sheet, by the control in this queue and configuration data, be packaged into Frame, send to terminal device; Host computer reads the executing state of configuration data or control operation, confirms whether whole configuration or control operation run succeeded.
The present invention is directed to the problem that prior art exists: first aspect, adopt the consistent terminal node of each function of full modularization, be about to all IO nodes and become separately IO module, temperature controller, door is aobvious, plug-in card power taking, the relatively independent formation modules of all functions such as curtain control, unified by RS485 bus and bridge module communication, this has just solved according to different demands, and (for example 1. IO count often, just select to hang multiple IO modules, 2. there are multiple temperature controllers, can connect multiple temperature controllers, if there is no temperature controller, also can not connect), carry out flexible combination.
Second aspect, by the carrying out packing to information in each terminal module and the atom of information, split, information package is used for reducing between each terminal module and bridge module the message number of communication in bus, avoid because communication count off is many, cause bus busier, thereby affect the performance of communication.The atom of information splits the atom that is used for the information of packing to carry out in logic and splits, a variable represents a meaning, the decoupling zero of the information of carrying out, benefit is to have solved on the one hand the binding due to variable, cause the complicacy of host computer processing, shielded on the other hand the inner structure of upper understanding lower terminal module.The upper decoupling zero with terminal module in another aspect, i.e. the variation of terminal module can not have influence on host computer, is like this on the contrary yet.
The third aspect, by describing the configuration file of terminal module configuration attribute, resolve the facility information that need to add system, and the combination of each variable and fractionation mode, when there being new terminal module need to add system, bridge module does not need to revise software, only needs superincumbent configuration file, the descriptor of adding a jumping new terminal module, can complete the information processing of this new terminal module.

Claims (8)

1. for a bridge module for guestroom control terminal and upper machine communication, it is characterized in that: comprise terminal device scheduler module, control data corporation module, Upper machine communication module;
Wherein, described terminal device scheduling comprises with control module:
The unified message queue interactive interface of communication: the message queue communication mechanism based between process, according to control data corporation module, externally provide unified communication interactive interface, parsing distribution and the encapsulation of message are sent;
The sequential scheduling that terminal device is mutual: take 1 second as one-period, be 10 milliseconds by time scale, the whole cycle is divided into 5 timeslice stages;
Establishment and transmitting-receiving with terminal device communication channel: be responsible for and the establishment of terminal device interface channel, data are encapsulated to the frame format that communication is supported, carry out the transmission of Frame;
Described control data corporation module comprises:
Equipment configuration describing document parsing module: for when program initialization moves, read xml and get configuration file, resolve xml configuration file, by every kind of device type masterplate of formation of every kind of terminal equipment type of resolving, when there being the terminal device registration of certain type, based on this type masterplate, copy, create the overall descriptor impression of this equipment;
The unified message queue interactive interface of communication: the message queue communication mechanism based between process, parsing distribution and the encapsulation of message are sent, a standard message interactive interface is externally provided;
The combination of message data with disassemble module: to the configuration issuing with control data and combine, be handed down to terminal device, to the real time data reading from terminal device, disassemble into atom variable;
Equipment adds and deletes administration module: according to the terminal equipment type of registration, copy the masterplate of relevant device type, again according to the address of devices allocation for this reason in terminal device dispatching management module, and this device registration is suspended to based on this address is on the chained list that creates of hash key; When detecting certain equipment in terminal device dispatching management module because of reasons such as fault or power down, report each management information of deleting this corresponding device, and notice is to host computer;
Device map real time data administration module: according to adding at the said equipment and deleting administration module, the management impression structure of the whole equipment of registering corresponding equipment and create, and the analysis mode of the individual variable getting from xml configuration file in equipment configuration describing document parsing module, based on this rule, will, from terminal device gets variable data and resolves, to internal memory, safeguard that the value of this variable refreshes in real time;
Device map historical data management module: based on the history data store interval of configuration, by the variable that is configured to store in xml configuration file, with interval storage time of configuration, the storing in sqlite database of timing, for the later inquiry of historical data;
Described Upper machine communication module comprises:
The unified message queue interactive interface of communication: the message queue communication mechanism based between process, according to control data corporation module, externally provide unified communication interactive interface, parsing distribution and the encapsulation of message are sent;
The decapsulation of message and message: the message of sending receiving host computer, after resolving, the unified standard message structure providing by control data corporation module, carries out message encapsulation, sends to control data corporation resume module;
Establishment and transmitting-receiving with host computer message communication channel: the passage of setting up message communication.
2. the bridge module for guestroom control terminal and upper machine communication as claimed in claim 1, is characterized in that: between terminal device scheduler module, control data corporation module, these 3 modules of Upper machine communication module, pass through inter-process messages queue communication mechanism.
3. the bridge module for guestroom control terminal and upper machine communication as claimed in claim 1, it is characterized in that: the fault tolerant mechanism of terminal device scheduler module, control data corporation module, these 3 modules of Upper machine communication module is: short message adopts replys re-transmission, and long message order adopts row retransmission mechanism.
4. the bridge module for guestroom control terminal and upper machine communication as claimed in claim 1, is characterized in that: in the mutual sequential scheduling of described terminal device, the concrete division in timeslice stage is as follows:
A. 0-30ms: whether terminal device detection time sheet, have equipment to need login network access for automatic detection;
B. 30-600ms: terminal device data read timeslice, for Real-time Obtaining equipment variable data;
C. 600-700ms point-to-point communication timeslice, needs the situation of control terminal B for lower terminal device A;
D. 700-800ms: control data distributing timeslice, the data of the control terminal issuing for host computer action;
E. 800-1000ms configuration data issues timeslice, for because of service logic control need, the data that host computer is configured terminal device.
5. the bridge module for guestroom control terminal and upper machine communication as claimed in claim 1, is characterized in that: described equipment configuration describing document parsing module, when program initialization moves, obtains following information:
A. obtain mutual with host computer and with the communication interface of lower terminal equipment;
B. obtain the descriptor of every kind of terminal equipment type, describe content and comprise: in the terminal of this type, support which network variable; The pattern of disassembling of each network variable, attribute; The terminal of this type of terminal device and other which types has data interaction; Variable association attributes after disassembling.
6. a method for guestroom control terminal and upper machine communication, is characterized in that: comprise the method for terminal device network registration management, it is specially: device power initialization divides two: first terminal device power-up initializing finally enters login network access pattern, the initialization of second bridge module device power, the required all basic functions of initialization, finally move terminal device scheduling feature, transmitting apparatus probe messages, when certain terminal device that is in login network access pattern that just powered on is received this equipment probe messages, the device descriptor variable of this equipment is replied to bridge module, then wait and accept the facility registration response message that bridge module is replied, if terminal device is received facility registration response message, to oneself be designated registered networking pattern, receive again that equipment probe messages does not process below, if terminal device is not received facility registration response message, terminal device continues to be in login network access pattern, waits for treatment facility probe messages again, and terminal device scheduler module is received the device descriptor variable that terminal device is replied, for terminal device distributes communication physical address, to terminal device, reply the communication physical address wait acknowledge distributing, if do not receive and reply, maximum support sent out three times continuously again, if exceed, also do not receive that replying the physical address just distributing deletes, and leaps to next timeslice processing for 3 times, if process normal above, the physical address of distribution and device descriptor variable are packaged into message and issue control data corporation module, this message of control data corporation module parses, the device type masterplate of setting up while copying a initialization according to the device type information in device descriptor variable, be used for setting up this terminal device full impression in bridge module equipment, communication physical address based on distributing as hash key to hash table management for the impression information of this equipment, and as a record, deposit the physical address of distribution and device descriptor information in database, reply a message then to terminal device scheduler module, terminal device scheduler module is packaged into facility registration response message by this message, then wait for the confirmation message that receiving terminal apparatus is replied, terminal device scheduler module receives that the confirmation message encapsulation messages of reply issues control data corporation module, pass through again Upper machine communication module, finally be packaged into udp message and issue host computer, so far confirm 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 characterized in that: the method that also comprises the monitoring collection of terminal device service data, it is specially: by message, all variablees of all device registrations are sent to end equipment scheduling module, in terminal device scheduler module, set up the chained list pond of all variablees, scheduler task in terminal device scheduler module is by the variable node of getting circulating successively from chained list pond above, send to corresponding terminal device, wait for replying of terminal device, if terminal device, in certain time-out time, do not reply, this variable is resend once, repeat 3 times at most, if still do not receive and reply, confirm this equipment failure, notice host computer, by the reply data of receiving, by message, send to control data corporation module, after resolving, upgrade the real-time information of each variable impression of setting up in hash table, then host computer, by the atom variable after disassembling, reads this real-time information, reaches the monitoring collection to terminal device service data.
8. the method for guestroom control terminal as claimed in claim 6 and upper machine communication, it is characterized in that: the method that also comprises the configuration of terminal device operation logic and the control of run action, it is specially: configuration data and these two kinds of data of control data are put into based on processing in priority query, to control the priority setting of data higher than the priority of configuration data, make to control data and be all the time before the queue that comes configuration data, allow and control high priority data and processed; Control data corporation module resolves to control and configuration data in queue the logical variable that the equipment that is merged into is supported successively, wait for that host computer sends a complete notice message of transaction operation, the logical variable of resolving merging is packaged into message and sends to end equipment scheduling module, in end equipment scheduling module, set up transmit queue, hold in equipment scheduling module at the configuration issuing and control time sheet, by the control in this queue and configuration data, be packaged into Frame, send to terminal device; Host computer reads the executing state of configuration data or control operation, confirms 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 true CN103744365A (en) 2014-04-23
CN103744365B 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 (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105471630A (en) * 2015-11-18 2016-04-06 武汉日电光通信工业有限公司 Northbound system message distribution system and northbound system message distribution method under large-capacity packet transmission system
CN105677676A (en) * 2014-11-20 2016-06-15 广东中星电子有限公司 Management method and device for front-end equipment
CN106403168A (en) * 2016-09-05 2017-02-15 重庆美的通用制冷设备有限公司 System and method for fault diagnosis for air-conditioning system
CN113219898A (en) * 2021-07-08 2021-08-06 宜科(天津)电子有限公司 Communication system of upper computer and PLC

Families Citing this family (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

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070283396A1 (en) * 2006-06-06 2007-12-06 Kiujlaars Erik Gerardus Adriaa Device with signal generator and signal receiver for providing controlled access to information and/or communication channels
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
WO2013017681A2 (en) * 2011-08-04 2013-02-07 Somfy Sas System for controlling dosmetic appliances and method for implementing a control system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070283396A1 (en) * 2006-06-06 2007-12-06 Kiujlaars Erik Gerardus Adriaa Device with signal generator and signal receiver for providing controlled access to information and/or communication channels
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
WO2013017681A2 (en) * 2011-08-04 2013-02-07 Somfy Sas System for controlling dosmetic appliances and method for implementing a control system

Cited By (5)

* 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
CN105471630A (en) * 2015-11-18 2016-04-06 武汉日电光通信工业有限公司 Northbound system message distribution system and northbound system message distribution method under large-capacity packet transmission system
CN105471630B (en) * 2015-11-18 2019-04-19 武汉众邦领创技术有限公司 North orientation system message dissemination system and method under large capacity packet delivery system
CN106403168A (en) * 2016-09-05 2017-02-15 重庆美的通用制冷设备有限公司 System and method for fault diagnosis for air-conditioning system
CN113219898A (en) * 2021-07-08 2021-08-06 宜科(天津)电子有限公司 Communication system of upper computer and PLC

Also Published As

Publication number Publication date
CN103744365B (en) 2017-05-24

Similar Documents

Publication Publication Date Title
US10791193B2 (en) Remote access gateway configurable control system
CN106713389B (en) Monitoring method and monitoring system
CN104345717B (en) Intelligent remote data acquisition system based on Internet of Things
US9920948B2 (en) Asynchronous reporting system
CN106094534A (en) The intelligent domestic system that a kind of wearable device intelligent watch controls
US10992494B2 (en) Gateway round-robin system
CN105138409B (en) Train schedule chart workout system and method based on multi-process
CN102495910B (en) Device and method for data timing synchronization of heterogeneous system
CN102227122B (en) Platform-independent protocol modularized system
CN103744365A (en) Bridging module for communication between room control terminal and upper computer and method thereof
CN106814657B (en) Embedded real-time EtherCAT main website construction method based on ARM
CN104765341A (en) Air purifier control system based on Internet of Things technology
CN103516802A (en) Method and device for achieving seamless transference of across heterogeneous virtual switch
CN100428141C (en) Programmable controller and communication unit, and methods of solving variables and of handing data
CN109271330A (en) General BMC system based on integrated information system
CN105897574A (en) Modbus RTU/TCP gateway device supporting double-Ethernet and double-master-station redundancy
CN106375480A (en) Electric energy data real-time acquisition system and method based on distributed system
US10514713B2 (en) Mailbox data storage system
CN102236340A (en) Multi-equipment management method and device
CN104967686A (en) System and design method for constructing plane type 3S intelligent service shop
CN102932431A (en) Message-routing-based state monitoring data interface configuration method
CN102739788B (en) A kind of field device communicating method based on EIB agreement
CN109274688A (en) A kind of design and implementation methods of substation's specification conversion function
CN106527371B (en) Intelligence manufacture BC system general driving frame
Li et al. An IoT service framework for smart home: Case study on HEM

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