CN102006309A - Method for performing real-time communication between manufacturing execution system (MES) and process control system (PCS) and middleware - Google Patents

Method for performing real-time communication between manufacturing execution system (MES) and process control system (PCS) and middleware Download PDF

Info

Publication number
CN102006309A
CN102006309A CN2010105919298A CN201010591929A CN102006309A CN 102006309 A CN102006309 A CN 102006309A CN 2010105919298 A CN2010105919298 A CN 2010105919298A CN 201010591929 A CN201010591929 A CN 201010591929A CN 102006309 A CN102006309 A CN 102006309A
Authority
CN
China
Prior art keywords
communication
information
data
middleware
pcs
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.)
Pending
Application number
CN2010105919298A
Other languages
Chinese (zh)
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.)
Xinyu Iron and Steel Co Ltd
Original Assignee
Xinyu Iron and Steel 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 Xinyu Iron and Steel Co Ltd filed Critical Xinyu Iron and Steel Co Ltd
Priority to CN2010105919298A priority Critical patent/CN102006309A/en
Publication of CN102006309A publication Critical patent/CN102006309A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to data communication between application systems and particularly provides a method for performing real-time communication between a manufacturing execution system (MES) and a process control system (PCS). The MES and the PCS in a database structured query language (SQL) statement-based database communication mode and/or a transmission control protocol (TCP)/Internet protocol (IP)-based Socket communication mode communicate with each other. A receiving module of communication middleware receives information in a format agreed by a sending party from a communication module of a sending party system and encapsulates the information into information in an internal format for being written into a message queue; and a sending module of the communication middleware extracts the information, resolves the information according to the internal format, encapsulates resolved data into data in a format agreed with a receiving party and transmits encapsulated information to a communication module of a receiving party system. The communication middleware and the method for communicating by using the middleware provided by the invention transparently transmit real-time data between the MES and the PCS.

Description

The method and the middleware of real time communication between a kind of MES system and the pcs system
Technical field
The present invention relates to the data communication between the application system, be specifically related to a kind of method and middleware that is applied to carry out between production executive system (MES) and the Process Control System (PCS) real time communication.
Background technology
The MES system provides the some effective of production process high efficiency, transparence management for enterprise, and the transmission by information is optimized management to the whole process of production that is issued to product from fabrication order and finishes.
Yet, between MES system and on-the-spot pcs system, carry out in the data exchange process, because each application developers all has the communication system of oneself.The developer that part technical force is strong has own perfect communication system, and one's own communication standard is arranged; Most developers do not have to form the communication system of oneself, and the development process of communication module all is to be accompanied by process of application development to carry out simultaneously; Also have the part developer that network communicating function is not provided, directly adopt the visit of database table his-and-hers watches, the needed data of both sides are directly obtained by the tables of data mode in the storehouse that reads and writes data.
Above reason causes the communication standard disunity between MES system and the pcs system, and the communication module exploitation is complicated, is unfavorable for end user's O﹠M simultaneously.
In order to reach the intercommunication purpose better more quickly, solve the data interaction problem between MES system and the pcs system, require to develop a kind of communication middleware software, data are carried out the transparence transmission, make the system development personnel be absorbed in the realization of service logic.
Summary of the invention
Be unfavorable for the shortcoming using and safeguard in order to solve between above-mentioned different system communication, the method that the purpose of this invention is to provide a kind of communication middleware and utilize this middleware to communicate, in order to solve the real-time data communication problem between MES system and the pcs system, data can transparence be transmitted, the different data format between the different application systems is realized intelligent conversion.
To achieve these goals, the technological means that the present invention adopts is: the method for real time communication between a kind of MES system and the pcs system, this communication means makes based on the database communication pattern of database SQL statement and/or based on communicating between the MES system of the Socket communication pattern of TCP/IP and the pcs system, it is characterized in that this method may further comprise the steps:
⑴ the communication module of, transmit leg system becomes the form of arranging with communication middleware with data encapsulation, and the information after will encapsulating again sends to the receiver module of communication middleware;
⑵ after the receiver module of, communication middleware was received information, according to resolving with the form of transmit leg agreement, the internal form that the data encapsulation after resolving becomes to set, the information after will encapsulating again write in the message queue;
⑶ the sending module of, communication middleware is taking-up information from message queue, resolves according to the internal form of setting, and the data encapsulation after resolving is become the form of arranging with the recipient, and the information after will encapsulating again sends to the communication module of recipient system;
⑷ after the receiver module of, recipient system is received information,, the data after resolving are offered the recipient system use according to resolving with the form of communication middleware agreement.
The method of real time communication between described a kind of MES system and the pcs system, when the communication party adopts the database communication pattern, the form of agreement is a database format, and its form is the interface table, and the structure of interface table is " identification field, operational label field and other data item field "; When the communication party adopted the Socket communication pattern, the form of agreement was the Socket form, and its form is " [message length] [message identification] [constant field] [scope of a variable] [an ending sign] ".The definition such as the table 1 of Socket form:
Table 1 Socket form
● sequence: the order that the expression data items occurs in information;
● sign: the unique identification of expression data items, the i.e. identifier that uses when encapsulation of data or resolving information;
● type: the data type of expression data items, promptly the data of depositing in the information are any types;
● length: expression data items shared figure place in information, length be only at the data setting of character types (char), i.e. the length of designated character string.
The method of real time communication between described a kind of MES system and the pcs system, the internal form of communication middleware has two kinds: XML form and Socket form.Wherein, the XML form be "<root node〉<data item name=" data item name " value=" data items value "/...<data item name=" data item name " value=" data items value "/</root node ".The XML form is a kind of general format, its process that generates information is to obtain by the data items that obtains is transformed, each data items will generate one as "<E K=" title " V=" value "/〉 during conversion " character string, again the XML of whole generation character string add root node as "<D〉</D " just formed the information of XML form; The Socket form is used for the system the communication party, when a method, system adopts the Socket communication pattern, the communication middleware internal form also can be set at the Socket form identical with the system that adopts the Socket communication pattern, can reduce the conversion number of times of form like this, thereby improve communication efficiency; When system all adopted the Socket communication pattern in many ways, each communication party's the agreement form and the internal form of communication middleware can be set at identical Socket form, can not carry out format conversion like this, greatly improved communication efficiency.(one-to-many, the communication of many-one, multi-to-multi) internal form can be chosen flexibly according to above-mentioned rule when multi-party communication.
Communication means of the present invention is receiving process to be transferred in the reception of data bear, and the transmission process is transferred in the transmission of data born, and it is transfer that transfer of data has between the two adopted with " message queue ".Receiving process is responsible for resolving from the communication module collection information of transmit leg system and form by appointment, and the internal form that the data encapsulation after resolving becomes to set, the information after will encapsulating again writes in the specified queue of message queue; The transmission process is responsible for the information that obtains and is resolved according to the internal form of setting from the specified queue of message queue, into about fixed form, the information after will encapsulating again sends to the communication module of recipient system the data encapsulation after resolving.
In the communication means of the present invention, for the communication party system that adopts the database communication pattern, the interface database of communication middleware and communication party system agreement is regarded as the communication module of communication party system.And think that information has just sent to communication middleware after the communication party system writes information in transmission information interface table in the interface database; Think simultaneously after communication middleware writes information in reception information interface table in the interface database, then information has been sent to the communication party system.
In the communication means of the present invention, for the communication party system that adopts the Socket communication pattern, the part that communicates with communication middleware is regarded as the communication module of communication party system.
The present invention also provides the communication middleware that real-time communication method uses between above-mentioned a kind of MES system and the pcs system, comprises receiver module, message queue and sending module.The effect of receiver module is to write in the message queue after the information of receiving is transformed; The effect of sending module is to send after the information of taking out from message queue is transformed.Receiver module comprises database receiver module and Socket receiver module, and sending module comprises database sending module and Socket sending module.Wherein, database receiver module and database sending module belong to the database communication pattern based on the database SQL statement, general designation database communication module; Socket receiver module and Socket sending module belong to the Socket communication pattern based on TCP/IP, general designation Socket communication module.Each receiver module comprises one or more receiving process, and each sending module comprises one or more transmission processes.Each communication process by read separately configuration file realize with MES system (or pcs system) between communicate by letter, profile information comprises information such as the address, data transmission format of communicating pair.Receiving process and transmission process general designation communication process.
When using the Socket communication pattern, in order to guarantee the normal operation of communication middleware, guarantee the promptness of transfer of data, the mode of communicating to connect adopts long connected mode; In order to realize that growing connected mode need set the heartbeat text, communicating pair requires palmic rate and heartbeat message format are arranged.The palmic rate that communication middleware provided by the invention uses is defaulted as per minute once; The heartbeat message format also is a kind of Socket form, the form of acquiescence heartbeat message format is " [message length] [message identification] [an ending sign] ", it is the Socket form that does not have constant field and scope of a variable, content is " 0011999999 n " " n " expression carriage return character wherein, its form such as table 2:
Table 2 acquiescence heartbeat message format
Figure 181083DEST_PATH_IMAGE002
Need when sending data, the opposing party system will form man-to-man communication at a method, system.The process that communication middleware carries out transfer of data is as follows:
⑴ after the receiving process of, communication middleware (receiver module) was received information from the transmit leg system, according to resolving with the form of transmit leg agreement, the internal form that the data encapsulation after resolving becomes to set, the information after will encapsulating again write in the message queue;
⑵ transmission process (sending module) taking-up information from message queue of, communication middleware is resolved according to the internal form of setting, and the data encapsulation after resolving is become the form of arranging with the recipient, and the information after will encapsulating again sends to the recipient system.
Need when method, system is sent data, will form the communication of one-to-many to a plurality of at a method, system.The process that communication middleware carries out transfer of data is as follows:
⑴ after the receiving process of, communication middleware (receiver module) was received information from the transmit leg system, according to resolving with the form of transmit leg agreement, the internal form that the data encapsulation after resolving becomes to set, the information after will encapsulating again write in the message queue;
⑵ a plurality of transmission processes (sending module) of, communication middleware are taken out same information from message queue, resolve according to the internal form of setting, data after resolving are packaged into respectively and the corresponding to data transmission format of recipient system separately, send to recipient system separately more respectively.
Need when sending data, a method, system will form many-to-one communication in system in many ways.The process that communication middleware carries out transfer of data is as follows:
⑴ a plurality of receiving process (receiver module) of, communication middleware are after each side's information of receiving, according to resolving with the form of separately transmit leg agreement, the internal form that the data encapsulation after resolving becomes to set, the information after will encapsulating again writes in the message queue;
⑵ transmission process (sending module) taking-up information from message queue of, communication middleware is resolved according to the internal form of setting, and the data encapsulation after resolving is become the form of arranging with the recipient, and the information after will encapsulating again sends to the recipient system.
Need will form the communication of multi-to-multi when system sends data in many ways in system in many ways, such communication mode is equivalent to the stack of one-to-many communication mode and many-one communication mode.
Characteristics of the present invention and advantage imbody be in the following areas:
⑴ the intelligent conversion of different data format between, the realization different application systems;
, realize a bit to a bit, a bit to multiple spot, multiple spot to a bit, multi-multipoint data communication requirement;
⑶, communication module can independent assortments, satisfy the communication requirement of different occasions;
⑷, all programs adopt the configurable type framework, and parameters needed during program running all can dynamically be obtained by reading configuration file;
⑸, perfect system journal function will receive in the communication process and all data that send and the abnormal information of generation, and classification records in the system journal of communication middleware, is beneficial to the regular maintenance of system and the troubleshooting of communication abnormality.
Description of drawings
Fig. 1 is the traffic model figure of communication means provided by the invention.
Fig. 2 is according to case study on implementation one of the present invention, and the illustraton of model that MES system and pcs system use communication means provided by the invention and middleware to communicate is shown, and wherein, the MES system adopts the database communication pattern to communicate; Pcs system adopts the Socket communication pattern to communicate.
Fig. 3 is among Fig. 2, and the MES system sends the communications flow chart of data to pcs system.
Fig. 4 is among Fig. 2, and pcs system sends the communications flow chart of data to the MES system.
Fig. 5 is according to case study on implementation two of the present invention, and the model that MES system and pcs system both sides all adopt database communication pattern and communication middleware to communicate is shown.
Fig. 6 is according to case study on implementation three of the present invention, and the model that MES system and pcs system both sides all adopt Socket communication pattern and communication middleware to communicate is shown.
Embodiment
The method that the invention provides a kind of communication middleware and utilize this middleware to communicate, purpose is the real-time data communication problem that solves between MES system and the pcs system, data are carried out the transparence transmission, the different data format between the different application systems is realized intelligent conversion.
As shown in Figure 1, for traffic model schematic diagram provided by the invention, Principle of Communication of the present invention is shown totally.In communication means provided by the invention and the middleware, it is transfer that communication middleware has adopted with Microsoft Windows " message queue ".The receiving process of communication middleware (receiver module) is resolved from the communication module collection information of data receiver system and form by appointment, the internal form that the data encapsulation after resolving becomes to set, the information that will be packaged into internal form again writes in the message queue of appointment; The transmission process (sending module) of communication middleware obtains information and resolves according to the internal form of setting from the message queue of appointment, into about fixed form, the information after will encapsulating again sends to the communication module of Data Receiving method, system the data encapsulation after resolving.Certainly, also can adopt other message queue in different application scenarios be transfer, can use the POSIX message queue during as exploitation communication middleware under the Linux platform, and use the JMS message queue to utilize java exploitation communication middleware can realize cross-platform use.
Figure 2 shows that case study on implementation one of the present invention.Wherein, the MES system adopts database communication pattern and communication middleware to communicate, and pcs system adopts Socket communication pattern and communication middleware to communicate.
Set forth to the process that pcs system sends data at the MES system below.
At first, the data that the MES system will need to send write in the transmission information interface table of interface database, and the structure that sends the information interface table needs MES system and communication middleware to arrange.The structure such as the table 3 of a kind of typical transmission information interface table that utilizes among the present invention:
Table 3 sends the structure of information interface table
Figure 367345DEST_PATH_IMAGE003
In sending the information interface table, must comprise two fields: unique identification field " ID " and operational label field " FLAG ", the data item of other fields for needing to send.Unique identification field " ID " is used for the uniqueness of guaranteeing that the interface table writes down; Whether whether operational label field " FLAG " is used for identifying interface table record handles, promptly sent." operational label " that writes down in this interface table is provided with: transmit status is " Y ", and transmit status is not " N ".
The receiving process of database receiver module is reception information from the transmission information interface table of MES system, its configuration file comprises: the configuration information of database, upgrade statement comprising database connection string, the SQL query statement that obtains new record, renewal aforesaid operations flag state SQL; The information such as message queue that also comprise the cycle of carrying out the SQL query statement, the internal form that will generate, use.The receiving process of database receiver module is periodically carried out the SQL query statement, the transmission information interface table of inquiry MES system, judge wherein whether produce new record, in this interface table, have the operational label field and be " not sending " state, just during the record of " N " state, expression has new record to produce.At this moment, the receiving process of database receiver module takes out record from send the information interface table after, the internal form that the data encapsulation in the record becomes configuration file to set, the information after will encapsulating again writes in the message queue, upgrades the operational label of this record simultaneously.
Wherein, the receiving process of database receiver module utilizes SQL statement periodicity reading and recording from the transmission information interface table of system, if in the practical communication process, require high more to real-time, here the cycle of reading transmission information interface table that is provided with is just more little, but can cause the load of system to strengthen like this; Vice versa; Therefore in practical communication, should coordinate to consider.
Pcs system adopts the Socket communication mode based on TCP/IP to carry out the information transmission, and communication middleware and pcs system need be arranged the Socket form.The form of the Socket form that the present invention uses is " [message length] [message identification] [constant field] [scope of a variable] [an ending sign] ".
The transmission process of Socket sending module sends to the communication module of pcs system with information, and its configuration file comprises: information such as the message queue of the partner address that communicates, the Socket form that uses port, the internal form that will resolve, agreement, use, heartbeat message format, palmic rate.The transmission process of Socket sending module is obtained information from message queue, resolve according to the internal form that configuration file is set, the Socket form that data after resolving are set according to configuration file encapsulates, and the information after the encapsulation is sent to the receiver module of pcs system with ICP/IP protocol.
The transmission process of Socket sending module connects in order to ensure long when communication, in case after connecting the communication module that goes up PCS, will periodically send the heartbeat text.The palmic rate that communication middleware uses is defaulted as 1 minute once.As long as what those skilled in the art were readily appreciated that is, the continuation that the maximum magnitude of this palmic rate just can keep less than the longest connection time of Socket is communicated with.In practical communication, palmic rate can be established a little louder as far as possible, to alleviate network load.
Wherein, the transmission process of the receiving process of database receiver module and Socket sending module, " internal form " that both configuration files are set is corresponding to the same.
Set forth to the process that the MES system sends data at pcs system below.
At first, the data encapsulation that the communication module of pcs system will need to send becomes the Socket form of arranging with communication middleware, this information is sent to the receiving process of Socket receiver module with ICP/IP protocol again.And, the communication module of pcs system is after the receiving process with the Socket receiver module connects, must periodically send the heartbeat text, receiving process can be according to whether receiving text over a period to come, judge whether network is normal, think that for the connection of not receiving any text above setting duration communication is undesired, then with it disconnection, to discharge the Internet resources that it takies.
The receiving process of Socket receiver module is used for receiving the information that pcs system is sent, and its configuration file comprises: the message queue of the Socket form of listening port, agreement, the internal form that will generate, use, connect information such as overtime duration, heartbeat message format.After the receiving process of Socket receiver module is received the text that pcs system sends, from the TCP/IP packet, obtain the pcs system information transmitted, resolve according to the Socket form that configuration file is set, the internal form that the data encapsulation after resolving becomes configuration file to set, the information after will encapsulating again writes message queue.
The MES system adopts and carries out the information transmission based on the database communication pattern of database SQL statement, and its reception information is that the structure that receives the information interface table needs MES system and communication middleware to arrange by reception information interface table.This interface table is imitated with sending the information interface epiphase, also comprises unique identification field " ID " and operational label field " FLAG ", and the data item of other fields.The structure such as the table 4 of a kind of typical reception information interface table that the present invention utilizes:
Table 4 receives the structure of information interface table
Figure 293713DEST_PATH_IMAGE004
The transmission process of database sending module writes the reception information interface table of MES system with information, and its configuration file comprises: the configuration information of database, insert statement comprising database connection string, the SQL that inserts record; Also comprise the internal form that to resolve, the information such as message queue of use.The transmission process of database sending module taking-up information from message queue, resolve according to the internal form that configuration file is set, the SQL insertion statement that data after resolving are set according to configuration file generates executable statement, record is write receive the information interface table.
Wherein, the transmission process of the receiving process of Socket receiver module and database sending module, " internal form " that both configuration files are set is corresponding to the same.
From above narration as can be seen, in order to carry out transfer of data adopting respectively between two kinds of systems of database communication pattern and Socket communication pattern, communication middleware must transform the data of different-format.
Concrete application examples 1 :In conjunction with Fig. 3, Fig. 3 is the communications flow process of MES system to pcs system transmission data, is that example describes with " heating furnace is come out of the stove and indicated in proper order " assigning of instruction.
⑴, supposition MES system need send the order indication of coming out of the stove of a heating furnace, write a new record at " heating furnace come out of the stove order indication " interface table (sending the information interface table) of interface database, as table 5:
Table 5 heating furnace is come out of the stove and is indicated the interface table in proper order
The data items of this table: ID be unique identification, the FLAG of record be operational label, the SEND_CLF of record be transmit to distinguish, ROLL_UNIT_NO is that rolling scaduled number, UNIT_SLAB_CNT are inside the plan slab sums.
⑵ the receiving process of the database receiver module of, communication middleware: the receiving process of database receiver module obtains new record by periodically carrying out the SQL query statement from " heating furnace is come out of the stove and indicated in proper order " interface table of interface database.
The receiving process of database receiver module will write down taking-up, and the data in the record are encapsulated by internal form, and the information after will encapsulate again writes in the specified queue of message queue service, and the field FLAG that upgrades ID simultaneously and be 110 record is " Y ".Here the internal form of She Dinging is the XML form, its form be "<root node〉<data item name=" data item name " value=" data items value "/...<data item name=" data item name " value=" data items value "/</root node ".After encapsulating by this form, its information content:
<D>
<E?K="ID"?V="110"/>
<E?K="FLAG"?V="N"/>
<E?K="SEND_CLF"?V="1"/>
<E?K="ROLL_UNIT_NO"?V="A1044"/>
<E?K="UNIT_SLAB_CNT"?V="5"/>
</D>
Wherein, root node is set at D, and data items is set at E, and title is set at K, and value is set at V.
⑶ the transmission process of the Socket sending module of, communication middleware: the transmission process of Socket sending module is utilized the asynchronous operation function of Microsoft's message queue (MSMQ), and the specified queue of message queue service is monitored; In case monitor fresh information then information taken out.
The transmission process of Socket sending module is set the information of taking out according to configuration file internal form (XML form) is resolved, data items after obtaining resolving: ID is " 110 ", FLAG is " N ", and SEND_CLF is that " 1 ", ROLL_UNIT_NO are that " A1044 ", UNIT_SLAB_CNT are " 5 ".Data encapsulation after resolving is become " heating furnace is come out of the stove and indicated in proper order " data transmission format (Socket form) of configuration file setting.Here " heating furnace come out of the stove order indication " data transmission format of communication middleware and pcs system agreement, as table 6:
Table 6 " heating furnace is come out of the stove and indicated in proper order " data transmission format
Figure 616033DEST_PATH_IMAGE006
Above-mentioned Socket form is made up of [message length] [message identification] [constant field] [scope of a variable] [ending sign].Wherein, the 3, the 4th, constant field, these two is in order to satisfy the specific (special) requirements of pcs system, the certain content of adding, its value is fixing; 5, the 6, the 7th, scope of a variable, these three is exactly the data items of pcs system actual needs.
The information content that the transmission process of Socket sending module obtains after the data after resolving are encapsulated: " 0025L3FU10L3FU15 A1044 n ", wherein " n " expression carriage return character.Information after the transmission process of Socket sending module will encapsulate is again issued the communication module of pcs system with ICP/IP protocol.
⑷ after the communication module of, pcs system receives this text, from the TCP/IP packet, obtain information transmitted, resolve, the data after resolving are offered pcs system use according to " heating furnace is come out of the stove and indicated in proper order " data transmission format.
Finished above a series of processes, realized that just the MES system sends the communication process of " heating furnace is come out of the stove and indicated in proper order " to pcs system.
Concrete application examples 2 :In conjunction with Fig. 4, to be pcs system send the communications flow process of data to the MES system to Fig. 4, describes with " slab shove charge actual achievement " production result's the example that is returned as.
⑴, supposition need send a slab shove charge actual achievement, its data items when pcs system: SALB_NO(slab number) for " J02-05490A020 ", CHARGING_DTIME(shove charge constantly) go into stokehold weight for " 20100810232359 ", BEF_WGT() go into the stokehold temperature for " 21020 ", BEF_TEMP() be " 0030 ".Here " the slab shove charge actual achievement " data transmission format (Socket form) of pcs system and communication middleware agreement is a table 7:
Table 7 " slab shove charge actual achievement " data transmission format
Figure 289591DEST_PATH_IMAGE007
Above-mentioned Socket form is made up of [message length] [message identification] [constant field] [scope of a variable] [ending sign].Wherein, the 3, the 4th, constant field, these two is in order to satisfy the specific (special) requirements of pcs system, the certain content of adding, its value is fixing; 5, the 6,7, the 8th, scope of a variable, these four is exactly the slab shove charge actual achievement project of pcs system.
The communication module of pcs system is " slab shove charge actual achievement " data transmission format with data encapsulation, the information content that obtains after the encapsulation: " 0051FUL310FUL3J02-05490A02020100810232359210200030 n ", wherein " n " expression carriage return character.The communication module of pcs system sends to this information the receiving process of Socket receiver module with ICP/IP protocol.
⑵ the receiving process of the Socket receiver module of, communication middleware: the receiving process of Socket receiver module is opened corresponding Socket service end and is served by reading configuration file, and then the communication module of pcs system establishes a communications link with it.
After the receiving process of Socket receiver module is received this text, from the TCP/IP packet, obtain information transmitted, resolve according to the slab shove charge actual achievement data transmission format that configuration file is set, the data items after obtaining resolving: SEND_DC is that " FU ", RECV_DC are " 0030 " for " 20100810232359 ", BEF_WGT for " 21020 ", BEF_TEMP for " J02-05490A020 ", CHARGING_DTIME for " L3 ", SALB_NO.The internal form that the data encapsulation after resolving becomes to set, the information after will encapsulating again writes in the specified queue of message queue service.Here the internal form of She Dinging is the XML form, after encapsulating by this form, and its information content:
<D>
<E?K="SEND_DC"?V="FU"/>
<E?K="RECV_DC"?V="L3"/>
<E?K="SALB_NO"?V="J02-05490A020"/>
<E?K="CHARGING_DTIME"?V="20100810232359"/>
<E?K="BEF_WGT"?V="21020"/>
<E?K="BEF_TEMP"?V="0030"/>
</D>。
⑶ the transmission process of the database sending module of, communication middleware: the transmission process of database sending module is utilized the asynchronous operation function of Microsoft's message queue, and the specified queue of message queue service is monitored; In case monitor fresh information then information taken out.
The transmission process of database sending module is set the information of taking out according to configuration file internal form (XML form) is resolved, and the data items after obtaining resolving: SEND_DC is that " FU ", RECV_DC are " 0030 " for " 20100810232359 ", BEF_WGT for " 21020 ", BEF_TEMP for " J02-05490A020 ", CHARGING_DTIME for " L3 ", SALB_NO.The SQL insertion statement that data after resolving are set according to configuration file generates executable statement, record is write the slab shove charge actual achievement interface table (receiving the information interface table) of MES system.The structure of reception slab shove charge actual achievement interface table used herein and the record that writes, as table 8:
The slab shove charge actual achievement interface table that table 8 MES system receives
Figure 19650DEST_PATH_IMAGE008
⑷, MES system obtain new slab shove charge actual achievement record from above-mentioned slab shove charge actual achievement interface table, the data in the actual achievement record that obtains are offered the MES system use.
Sent to produce by the MES system like this and instruct the indication pcs system to carry out production operation, pcs system returns the production actual achievement again and has just finished for the full communication process of MES system.
In the communication process of concrete application examples 1,2, if the internal form of communication middleware is arranged to the Socket form identical with pcs system, then when communicating, can exempt the conversion of communication middleware with pcs system, the information of obtaining from pcs system when promptly the receiving message queue that writes direct, the information of obtaining from message queue during transmission directly sends to pcs system.Like this, can improve communication efficiency, repeat no more.
Figure 5 shows that case study on implementation two of the present invention, wherein, the MES system all adopts the database communication pattern to communicate by letter with communication middleware with pcs system.
The MES system is as follows to the process that pcs system sends data:
⑴ the data that, MES system will need to send write relevant transmission information interface table;
⑵ the receiving process of the database receiver module of, communication middleware: its course of work is identical with the step ⑵ of concrete application examples 1, repeats no more;
⑶ the transmission process of the database sending module of, communication middleware: its course of work is identical with the step ⑶ of concrete application examples 2, repeats no more;
⑷, MES system obtain new record from receive the information interface table, the data in the record that obtains are offered the MES system use.
Pcs system is similar to process and said process that MES system system sends data, repeats no more.
Figure 6 shows that case study on implementation three of the present invention, wherein, the MES system all adopts the Socket communication pattern to communicate by letter with communication middleware with pcs system.
In communication system,, the data transmission format of communicating pair system and communication middleware agreement and the internal form of communication middleware can be defined as same Socket form if both sides adopt Socket communication pattern and communication middleware to communicate.Just with the data transmission format of arranging between MES system and the communication middleware, be decided to be the data transmission format between pcs system and the communication middleware equally approximately, the internal form of setting communication middleware simultaneously is also consistent with it, thereby reduce the format conversion process of communication middleware, further improve communication efficiency.
The MES system is as follows to the process that pcs system sends data:
, when the MES system sends information, the communication module of MES system data transmission format by appointment is with data encapsulation, the information after will encapsulating again sends to the receiving process of the Socket receiver module of communication middleware with the ICP/IP protocol form;
⑵ after the receiving process of, Socket receiver module is received this text, from the TCP/IP packet, obtain transmission information, because the data transmission format of MES system agreement is identical with the internal form of communication middleware, therefore receiver module need not the information of obtaining is transformed, and can directly this information be write in the message queue;
⑶ the transmission process of the sending module of, communication middleware is taken out information, because the internal form of communication middleware is identical with the data transmission format of pcs system agreement, therefore the transmission process need not the information of taking out is transformed, and can directly this information be sent to the communication module of pcs system with the ICP/IP protocol form;
⑷ the communication module of, pcs system is obtained transmission information from the TCP/IP packet, and this information data transmission format is by appointment resolved, and the data after obtaining resolving provide pcs system to use.
Pcs system is similar to process and said process that MES system system sends data, repeats no more.
The method of real time communication and the middleware system based on different communication modes that makes can intercom mutually between MES provided by the invention and the pcs system, and this communication process is under the effect of communication middleware, the different communication module that only needs communication middleware according to separately and the data transmission format of arranging between the communication system separately encapsulate with resolution data just passablely, make that communication process is transparent for the communicating pair system.
All programs of communication middleware provided by the invention adopt the configurable type framework, and parameters needed during program running all can dynamically be obtained by reading configuration file.Communication module can independent assortment, satisfies the communication requirement of different occasions.Realize a bit to a bit, a bit to multiple spot, multiple spot to a bit, multi-multipoint data communication requirement.Realize the intelligent conversion of different data format between the different application systems.The perfect system journal function will receive in the communication process and all data that send and the abnormal information of generation, and classification records in the system journal of communication middleware, is beneficial to the regular maintenance of system and the troubleshooting of communication abnormality.
The explanation of nouns of the present invention's definition:
⑴, internal form: the data transmission format between inner each module of communication middleware;
⑵, database format: in the database communication pattern, by the data format that the interface table is organized, the interface sheet form is identification field, operational label field and other data item field;
⑶, Socket form: in the Socket communication pattern, by the data transmission format that the transfer of data requirement is organized, its form is [message length] [message identification] [constant field] [scope of a variable] [an ending sign];
⑷, information: the data that are packaged into certain format;
⑸, interface database: in the database communication pattern, the common database that uses of communication middleware and communication party system just, is used to deposit the interface table in this database, these interface tables should be visited by communication middleware, also can be visited by the communication party system;
⑹, interface table: in interface database, the tables of data that is used to deposit information to be sent or waits the information that receives;
⑺, transmission information interface table: the tables of data that is used for store data transmit leg information to be sent;
⑻, reception information interface table: the tables of data that is used for store data recipient information to be received;
⑼, the long connection: in case Socket client (sending module) connects with Socket server (receiver module), then connection is not between the two just closed, and withdraws from or the network just disconnection connection of breaking down up to a side of communicating pair;
⑽, heartbeat text: a kind of simplification Socket form, its form are [message length] [message identification] [ending sign]; This text is when using the Socket communication mode, sending module by the data receiver system periodically sends to the communication middleware receiver module, or periodically send to the receiver module of Data Receiving method, system by the sending module of communication middleware, preventing does not have transfer of data for a long time because of both sides, communicate to connect disconnection and make, the recipient also can by checking whether receive that over a period to come the heartbeat text comes the decision network communication line whether normal simultaneously;
⑾, palmic rate: send the frequency of heartbeat text, promptly how long send one time the heartbeat text at interval.

Claims (9)

1. the method for real time communication between MES system and the pcs system, this communication means makes based on the database communication pattern of database SQL statement and/or based on communicating between the MES system of the Socket communication pattern of TCP/IP and the pcs system, it is characterized in that this method may further comprise the steps:
⑴ the communication module of, transmit leg system becomes the form of arranging with communication middleware with data encapsulation, and the information after will encapsulating again sends to the receiver module of communication middleware;
⑵ after the receiver module of, communication middleware was received information, according to resolving with the form of transmit leg agreement, the internal form that the data encapsulation after resolving becomes to set, the information after will encapsulating again write in the message queue;
⑶ the sending module of, communication middleware is taking-up information from message queue, resolves according to the internal form of setting, and the data encapsulation after resolving is become the form of arranging with the recipient, and the information after will encapsulating again sends to the communication module of recipient system;
⑷ after the receiver module of, recipient system is received information,, the data after resolving are offered the recipient system use according to resolving with the form of communication middleware agreement.
2. the method for real time communication is characterized in that between a kind of MES system according to claim 1 and the pcs system, and when the communication party adopted the database communication pattern, the form of agreement was a database format, and its form is the interface table.
3. the method for real time communication is characterized in that between a kind of MES system according to claim 2 and the pcs system, and the structure of interface table is " identification field, operational label field and other data item field ".
4. the method for real time communication between a kind of MES system according to claim 1 and the pcs system, it is characterized in that, when the communication party adopts the Socket communication pattern, the form of agreement is the Socket form, and its form is " [message length] [message identification] [constant field] [scope of a variable] [an ending sign] ".
5. the method for real time communication is characterized in that between a kind of MES system according to claim 1 and the pcs system, and described internal form is the XML form.
6. the method for real time communication between a kind of MES system according to claim 5 and the pcs system, it is characterized in that, the XML form be "<root node〉<data item name=" data item name " value=" data items value "/...<data item name=" data item name " value=" data items value "/</root node ".
7. the method for real time communication between a kind of MES system according to claim 1 and the pcs system, it is characterized in that, as a side or when system adopts the Socket communication pattern in many ways, the communication middleware internal form also can be set at the Socket form identical with the system that adopts the Socket communication pattern.
8. the middleware that real-time communication method uses between a kind of MES system according to claim 1 and the pcs system is characterized in that this middleware comprises receiver module, message queue and sending module.
9. the middleware that real-time communication method uses between a kind of MES system according to claim 8 and the pcs system is characterized in that each receiver module comprises one or more receiving process, and each sending module comprises one or more transmission processes.
CN2010105919298A 2010-12-16 2010-12-16 Method for performing real-time communication between manufacturing execution system (MES) and process control system (PCS) and middleware Pending CN102006309A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010105919298A CN102006309A (en) 2010-12-16 2010-12-16 Method for performing real-time communication between manufacturing execution system (MES) and process control system (PCS) and middleware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010105919298A CN102006309A (en) 2010-12-16 2010-12-16 Method for performing real-time communication between manufacturing execution system (MES) and process control system (PCS) and middleware

Publications (1)

Publication Number Publication Date
CN102006309A true CN102006309A (en) 2011-04-06

Family

ID=43813381

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010105919298A Pending CN102006309A (en) 2010-12-16 2010-12-16 Method for performing real-time communication between manufacturing execution system (MES) and process control system (PCS) and middleware

Country Status (1)

Country Link
CN (1) CN102006309A (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724045A (en) * 2012-07-05 2012-10-10 甘肃银光聚银化工有限公司 Network interface adapter
CN103635886A (en) * 2011-05-24 2014-03-12 日本电气株式会社 Information processing system, data management method, information processing device, and control method and control program therefor
CN104702696A (en) * 2015-03-23 2015-06-10 北京合生共济投资咨询有限责任公司 Cross-platform instant data interaction method, device and system
CN105159929A (en) * 2015-08-05 2015-12-16 北京思特奇信息技术股份有限公司 Memory database communication method and system
CN105243002A (en) * 2015-08-28 2016-01-13 浪潮软件股份有限公司 Message middleware monitoring method and system
CN105872574A (en) * 2016-03-30 2016-08-17 乐视控股(北京)有限公司 Live broadcast message release optimization method and system
CN105871815A (en) * 2016-03-22 2016-08-17 乐视网信息技术(北京)股份有限公司 Data transmitting method and device
CN106357761A (en) * 2016-09-13 2017-01-25 中国电子科技集团公司第三十二研究所 Distributed message communication middleware implementation software system based on real-time operating system
CN107947982A (en) * 2017-11-24 2018-04-20 合肥维博自动化科技有限公司 A kind of device software management system
CN109639795A (en) * 2018-12-11 2019-04-16 广东亿迅科技有限公司 A kind of service management and device based on AcitveMQ message queue
CN110084003A (en) * 2018-01-26 2019-08-02 北大方正集团有限公司 A kind of method and system based on middleware access encryption lock
CN113254235A (en) * 2021-06-08 2021-08-13 行吟信息科技(武汉)有限公司 Message transmission method and device under multi-test environment
CN113472810A (en) * 2021-07-22 2021-10-01 广东昆仑信息科技有限公司 Method and system for SOCKET communication based on TCP/IP protocol
CN115665269A (en) * 2022-10-18 2023-01-31 哈尔滨工程大学 Communication method between distributed heterogeneous languages based on TCP communication protocol

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1764166A (en) * 2005-11-16 2006-04-26 北京金山软件有限公司 Client system with compatible multi instantaneous communication tool and instantaneous communication method
CN101212428A (en) * 2006-12-27 2008-07-02 海尔集团公司 Home gateway applied in digital home system
CN101477655A (en) * 2009-02-09 2009-07-08 江苏沙钢集团有限公司 Layered MES software system architecture

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1764166A (en) * 2005-11-16 2006-04-26 北京金山软件有限公司 Client system with compatible multi instantaneous communication tool and instantaneous communication method
CN101212428A (en) * 2006-12-27 2008-07-02 海尔集团公司 Home gateway applied in digital home system
CN101477655A (en) * 2009-02-09 2009-07-08 江苏沙钢集团有限公司 Layered MES software system architecture

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
程志伦, 范玉青: "钢铁企业基于组件的柔性制造执行系统设计", 《计算机集成制造系统》 *

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9558252B2 (en) 2011-05-24 2017-01-31 Nec Corporation Information processing system, data management method, information processing apparatus, and control method and control program therefor
CN103635886A (en) * 2011-05-24 2014-03-12 日本电气株式会社 Information processing system, data management method, information processing device, and control method and control program therefor
CN103635886B (en) * 2011-05-24 2017-02-15 日本电气株式会社 Information processing system, data management method, information processing device, and control method thereof
CN102724045A (en) * 2012-07-05 2012-10-10 甘肃银光聚银化工有限公司 Network interface adapter
CN104702696A (en) * 2015-03-23 2015-06-10 北京合生共济投资咨询有限责任公司 Cross-platform instant data interaction method, device and system
CN104702696B (en) * 2015-03-23 2018-08-28 北京合生共济投资咨询有限责任公司 The cross-platform instant data interactive method of one kind, device and system
CN105159929A (en) * 2015-08-05 2015-12-16 北京思特奇信息技术股份有限公司 Memory database communication method and system
CN105243002A (en) * 2015-08-28 2016-01-13 浪潮软件股份有限公司 Message middleware monitoring method and system
CN105871815A (en) * 2016-03-22 2016-08-17 乐视网信息技术(北京)股份有限公司 Data transmitting method and device
CN105872574A (en) * 2016-03-30 2016-08-17 乐视控股(北京)有限公司 Live broadcast message release optimization method and system
CN106357761A (en) * 2016-09-13 2017-01-25 中国电子科技集团公司第三十二研究所 Distributed message communication middleware implementation software system based on real-time operating system
CN107947982A (en) * 2017-11-24 2018-04-20 合肥维博自动化科技有限公司 A kind of device software management system
CN110084003A (en) * 2018-01-26 2019-08-02 北大方正集团有限公司 A kind of method and system based on middleware access encryption lock
CN110084003B (en) * 2018-01-26 2021-04-09 北大方正集团有限公司 Method and system for accessing encryption lock based on middleware
CN109639795A (en) * 2018-12-11 2019-04-16 广东亿迅科技有限公司 A kind of service management and device based on AcitveMQ message queue
CN109639795B (en) * 2018-12-11 2021-12-24 广东亿迅科技有限公司 Service management method and device based on AcitveMQ message queue
CN113254235A (en) * 2021-06-08 2021-08-13 行吟信息科技(武汉)有限公司 Message transmission method and device under multi-test environment
CN113472810A (en) * 2021-07-22 2021-10-01 广东昆仑信息科技有限公司 Method and system for SOCKET communication based on TCP/IP protocol
CN115665269A (en) * 2022-10-18 2023-01-31 哈尔滨工程大学 Communication method between distributed heterogeneous languages based on TCP communication protocol

Similar Documents

Publication Publication Date Title
CN102006309A (en) Method for performing real-time communication between manufacturing execution system (MES) and process control system (PCS) and middleware
Ruta et al. Enabling the Semantic Web of Things: framework and architecture
CN104753817B (en) A kind of cloud computing Message Queuing Services local analogy method and system
CN112925660A (en) Industrial interconnected information interaction system
CN108446335B (en) Heterogeneous system data extraction and unified external data exchange method based on database
CN103532975A (en) Dynamically and smoothly expandable data acquisition system and method
CN101466109B (en) Communication system and method for WiMAX network management
CN114281790B (en) Multi-type load resource aggregator access system and method
Muller et al. An aggregating discovery service for the EPCglobal network
KR102345082B1 (en) Cloud based iec61850 information processing method
CN113595806B (en) Distribution network Internet of things communication architecture method based on OPCUA and MQTT protocol
CN102932431A (en) Message-routing-based state monitoring data interface configuration method
CN101834765A (en) System and method for remote file transfer
CN106027534A (en) System for implementing financial message processing based on Netty
CN101771724B (en) Heterogeneous distributed information integration method, device and system
CN113949725A (en) Cloud edge cooperation-based manufacturing resource access platform and method
CN102438017A (en) Routing function-based conversion apparatus of Modbus protocol and BACnet Ethernet protocol and conversion method thereof
CN102904967A (en) Intelligent Internet of things data exchange platform scheme based on hardware electromechanical field
CN103677853A (en) Method for achieving HIT-TENA middleware in DM642 type DSP
CN107888682A (en) Heterogeneous system data interactive method and system based on industrial interconnection platform
CN104270432A (en) Real-time data service system and data interaction method based on drilling industry
CN110109949A (en) Social credibility information service platform
Ruzhi et al. The research and implementation of power application system integration based on enterprise service bus
Xinyu et al. Study on key technologies of MES/ERP integration based on JCA
Ji A web-based enterprise application integration solution

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20110406