CN114338361A - Communication method of communication device, communication device and distributed control system - Google Patents

Communication method of communication device, communication device and distributed control system Download PDF

Info

Publication number
CN114338361A
CN114338361A CN202210249541.2A CN202210249541A CN114338361A CN 114338361 A CN114338361 A CN 114338361A CN 202210249541 A CN202210249541 A CN 202210249541A CN 114338361 A CN114338361 A CN 114338361A
Authority
CN
China
Prior art keywords
communication device
slave
communication
master
data
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
CN202210249541.2A
Other languages
Chinese (zh)
Other versions
CN114338361B (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.)
Zhongkong Technology Co ltd
Original Assignee
Zhejiang Supcon 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 Zhejiang Supcon Technology Co Ltd filed Critical Zhejiang Supcon Technology Co Ltd
Priority to CN202210249541.2A priority Critical patent/CN114338361B/en
Publication of CN114338361A publication Critical patent/CN114338361A/en
Application granted granted Critical
Publication of CN114338361B publication Critical patent/CN114338361B/en
Active 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]

Abstract

The embodiment of the application provides a communication method of a communication device, the communication device and a distributed control system, and relates to the technical field of electronic information. The method comprises the steps that a main communication device obtains main communication data, wherein the main communication data comprises a plurality of pieces of data received by the main communication device in real time; acquiring slave communication data of the slave communication device through a master-slave redundant link between the master communication device and the slave communication device, wherein the slave communication data comprises a plurality of pieces of data received by the slave communication device in real time; generating a first communication data packet according to the master communication data and the slave communication data; the first communication data packet is sent to the control device through the switching device connected with the main communication device. The main communication device and the slave communication device are respectively connected with the corresponding exchange devices, so that the cable laying cost is saved, and the main communication device and the slave communication device are respectively arranged at different positions with long distance, and perform data synchronization and cooperative work through the main redundant link and the slave redundant link, so that each acquisition device of an industrial field can be completely covered.

Description

Communication method of communication device, communication device and distributed control system
Technical Field
The present application relates to the field of electronic information technologies, and in particular, to a communication method of a communication device, and a distributed control system.
Background
A Distributed Control System (DCS) is a new-generation instrument Control System based on a microprocessor and adopting a design principle of decentralized Control function, centralized display operation, and consideration of both sub-autonomous and comprehensive coordination, and is widely applied to industrial Control scenes. In a DCS network, in order to improve the fault tolerance, a redundant deployment mode of dual-network dual-communication devices is generally adopted, and repeated communication devices and networks are set, so as to ensure that a single point fault in the network has no influence on the system.
At present, the deployment mode of the dual-network dual-communication device is generally redundant dual-channel communication, where the redundant dual-channel communication means that only one of the main communication device and the standby communication device works normally to transmit data to the controller, and the other communication device is in a silent state, and when a problem occurs in the working communication device, the other communication device switches in real time to take over the work.
However, when the deployment method in the prior art sinks to the industrial site, since the deployment of the acquisition devices at the lower layer in the industrial site is generally dispersed, and a single communication device cannot completely cover, the redundant two-way communication method in the prior art cannot be applied to the industrial site. In addition, in the deployment mode in the prior art, the main communication device, the standby communication devices, and the main communication device and the corresponding main network switching device are generally deployed at a relatively close position, and both the main communication device and the standby communication devices can be connected to each switching device through the main network and the redundant network.
Disclosure of Invention
The communication method, the communication device and the distributed control system of the communication device are provided, for example, the master communication device and the slave communication device are respectively connected with the corresponding exchange devices, so that the cable laying cost is saved, and the master communication device and the slave communication device are respectively deployed at different positions with long distance, and perform data synchronization and cooperative work through a master-slave redundant link, so that each acquisition device of an industrial field can be completely covered.
The embodiment of the application can be realized as follows:
in a first aspect, an embodiment of the present application provides a communication method for a communication device, which is applied to a master communication device of a distributed control system, where the distributed control system includes the master communication device, a slave communication device, a plurality of switching devices, and a plurality of control devices, the master communication device and the slave communication device are deployed at different locations, and are communicatively connected via a master-slave redundant link, the master communication device and the slave communication device are communicatively connected to one switching device respectively, and each switching device is communicatively connected to each control device respectively, where the method includes:
acquiring main communication data, wherein the main communication data comprises a plurality of pieces of data received by the main communication device in real time;
acquiring slave communication data of the slave communication device through the master-slave redundant link, wherein the slave communication data comprises a plurality of pieces of data received by the slave communication device in real time;
generating a first communication data packet according to the main communication data and the slave communication data;
and sending the first communication data packet to the control device through a switching device connected with the main communication device.
In an optional embodiment, the method further comprises:
acquiring the working state of the slave communication device;
determining the working mode of the master communication device according to the working state of the slave communication device;
and generating and sending a second communication data packet to the control device according to the working mode of the main communication device.
In an optional embodiment, the obtaining the operating state of the slave communication device includes:
sending keep-alive messages to the slave communication device through the master-slave redundant link;
if the keep-alive response message sent by the slave communication device is received, confirming that the slave communication device is in a normal working state;
and if the fault message sent by the slave communication device is received and/or the keep-alive response message sent by the slave communication device is not received, confirming that the slave communication device is in an abnormal working state.
In an optional embodiment, the generating and sending a second communication data packet to the control device according to the state of the slave communication device includes:
if the slave communication device is in an abnormal working state, determining that the master communication device is in a single-machine working mode, otherwise, determining that the master communication device is in a master-slave working mode;
the generating and sending a second communication data packet to the control device according to the working mode of the main communication device includes:
and if the working mode of the main communication device is the single-machine working mode, generating a second communication data packet according to the main communication data received by the main communication device, and sending the second communication data packet to the control device through a switching device connected with the main communication device.
In an optional implementation manner, the generating the second communication data packet according to the primary communication data received by the primary communication device includes:
and numbering each piece of data in the new main communication data according to the currently accumulated data sequence number, and forming the second communication data packet according to the sequence of the numbering.
In an optional embodiment, the method further comprises:
determining the data sequence number of each piece of data in the master communication data and each piece of data in the slave communication data according to the receiving sequence of the master communication data and the slave communication data and the currently accumulated data sequence number;
sending the data serial numbers of all the data in the slave communication data to the slave communication device through the master-slave redundant link;
and combining each piece of data in the main communication data and each piece of data in the slave communication data in sequence according to a data sequence number to obtain the first communication data packet.
In an optional embodiment, the method further comprises: and sending the first communication data packet to the slave communication device through the master-slave redundant link.
In a second aspect, an embodiment of the present application provides a communication method for a communication device, which is applied to a slave communication device of a distributed control system, where the distributed control system includes a master communication device, the slave communication device, a plurality of switching devices, and a plurality of control devices, the master communication device and the slave communication device are deployed at different locations, and are communicatively connected via a master-slave redundant link, the master communication device and the slave communication device are communicatively connected to one switching device respectively, and each switching device is communicatively connected to each control device respectively, and the method includes:
under a normal working state, slave communication data are obtained, wherein the slave communication data comprise a plurality of pieces of data received by a slave communication device in real time;
sending the slave communication data to the master communication device;
and receiving a first communication data packet sent by the master communication device, and sending the first communication data packet to the control device through a switching device connected with the slave communication device.
In an optional embodiment, the method further comprises:
and if the keep-alive message sent by the main communication device is not received within the preset time length, generating a local communication data packet according to the received slave communication data, and sending the local communication data packet to the control device through an exchange device connected with the slave communication device.
In an optional embodiment, the method further comprises:
receiving an online communication data packet sent by the main communication device;
the sending the local communication data packet to the control device through the switching device connected with the slave communication device includes:
and combining the local communication data packet and the online communication data packet into a data packet to be sent according to the data serial number of each data in the local communication data packet and the data serial number of each data in the online communication data packet, and sending the data packet to be sent to the control device through a switching device connected with the slave communication device.
In an optional embodiment, the method further comprises:
receiving a keep-alive message sent by the main communication device;
determining the working state of the slave communication device according to the keep-alive message;
and sending response information to the main communication device according to the working state of the slave communication device.
In an optional implementation manner, the sending a response message to the master communication device according to the operating status of the slave communication device includes:
if the working state of the slave communication device is a normal working state, sending a keep-alive response message to the master communication device;
and if the working state of the slave communication device is an abnormal working state, sending a fault message to the master communication device.
In a third aspect, an embodiment of the present application provides a first communication device, including:
the first acquisition module is used for acquiring main communication data, and the main communication data comprises a plurality of pieces of data received by the main communication device in real time;
the first obtaining module is further used for obtaining slave communication data of the slave communication device through the master-slave redundant link, wherein the slave communication data comprises a plurality of pieces of data received by the slave communication device in real time;
the generating module is used for generating a first communication data packet according to the main communication data and the slave communication data;
and the first sending module is used for sending the first communication data packet to the control device through a switching device connected with the main communication device.
The first sending module is specifically further configured to obtain a working state of the slave communication device; determining the working mode of the master communication device according to the working state of the slave communication device; and generating and sending a second communication data packet to the control device according to the working mode of the main communication device.
The first obtaining module is further specifically configured to send a keep-alive message to the slave communication device through the master-slave redundant link; if the keep-alive response message sent by the slave communication device is received, confirming that the slave communication device is in a normal working state; and if the fault message sent by the slave communication device is received and/or the keep-alive response message sent by the slave communication device is not received, confirming that the slave communication device is in an abnormal working state.
The generating module is further specifically configured to determine that the master communication device is in a standalone working mode if the slave communication device is in an abnormal working state, and otherwise, determine that the master communication device is in a master-slave working mode; the generating and sending a second communication data packet to the control device according to the working mode of the main communication device includes: and if the working mode of the main communication device is the single-machine working mode, generating a second communication data packet according to the main communication data received by the main communication device, and sending the second communication data packet to the control device through a switching device connected with the main communication device.
The generating module is further specifically configured to number each piece of data in the new primary communication data according to the currently accumulated data sequence number, and form the second communication data packet according to the sequence of the numbers.
The first sending module is further specifically configured to determine a data sequence number of each piece of data in the master communication data and a data sequence number of each piece of data in the slave communication data according to a receiving sequence of the master communication data and the slave communication data and a currently accumulated data sequence number; sending the data serial numbers of all the data in the slave communication data to the slave communication device through the master-slave redundant link; and combining each piece of data in the main communication data and each piece of data in the slave communication data in sequence according to a data sequence number to obtain the first communication data packet.
The first sending module is further specifically configured to send the first communication data packet to the slave communication device through the master-slave redundant link.
In a fourth aspect, an embodiment of the present application provides a second communication device, including:
the second acquisition module is used for acquiring slave communication data under a normal working state, wherein the slave communication data comprises a plurality of pieces of data received by the slave communication device in real time;
the second sending module is used for sending the slave communication data to the master communication device;
and the receiving module is used for receiving a first communication data packet sent by the master communication device and sending the first communication data packet to the control device through a switching device connected with the slave communication device.
The second sending module is further specifically configured to, if the keep-alive message sent by the master communication device is not received within a preset time period, generate a local communication data packet according to the received slave communication data, and send the local communication data packet to the control device through an exchange device connected to the slave communication device.
The second sending module is specifically further configured to receive an online communication data packet sent by the main communication device; the sending the local communication data packet to the control device through the switching device connected with the slave communication device includes: and combining the local communication data packet and the online communication data packet into a data packet to be sent according to the data serial number of each data in the local communication data packet and the data serial number of each data in the online communication data packet, and sending the data packet to be sent to the control device through a switching device connected with the slave communication device.
The second sending module is further specifically configured to receive a keep-alive message sent by the main communication device; determining the working state of the slave communication device according to the keep-alive message; and sending response information to the main communication device according to the working state of the slave communication device.
The second sending module is further specifically configured to send a keep-alive response message to the master communication device if the working state of the slave communication device is a normal working state; and if the working state of the slave communication device is an abnormal working state, sending a fault message to the master communication device.
In a fifth aspect, an embodiment of the present application provides a master communication device, including: a processor and a memory, the memory storing machine-readable instructions executable by the processor, the processor executing the machine-readable instructions when the master communication device is running to perform the steps of the communication method of the communication device according to the first aspect.
In a sixth aspect, an embodiment of the present application provides a slave communication device, including: a processor and a memory, the memory storing machine-readable instructions executable by the processor, the processor executing the machine-readable instructions when the host communication device is running to perform the steps of the communication method of the communication device according to the second aspect.
In a seventh aspect, an embodiment of the present application provides a distributed control system, where the distributed control system includes:
the master communication device of the fifth aspect, the slave communication device of the sixth aspect, a plurality of switching devices, and a plurality of control devices, wherein the master communication device and the slave communication device are deployed at different locations, and are communicatively connected via a master-slave redundant link, the master communication device and the slave communication device are communicatively connected to one switching device, and each switching device is communicatively connected to each control device.
In an eighth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the communication method of the communication device according to the first aspect or the communication method of the communication device according to the second aspect are implemented.
The beneficial effects of the embodiment of the application include:
by adopting the communication method of the communication device, the communication device and the distributed control system, firstly, the master communication device and the slave communication device are respectively in communication connection with only one corresponding switching device, compared with the arrangement mode that the master communication device and the slave communication device are in communication connection with a plurality of switching devices in the prior art, the connection mode ensures the redundancy of a network and simultaneously avoids the problem of overhigh cable cost caused by the fact that the master communication device, the slave communication device and the switching devices are far away in an industrial field and the communication connection is established with each switching device. And secondly, the master communication device and the slave communication device work simultaneously, and data synchronization is realized through a master-slave redundant link, so that the master communication device and the slave communication device can be respectively deployed at different positions with long distance, and the purpose of covering a plurality of discrete acquisition devices in an industrial field is achieved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
FIG. 1 is a schematic diagram of a network topology of a dual-network dual-communication device in the prior art;
fig. 2 is a schematic diagram of a network topology of a distributed control system according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a communication method of a communication device according to an embodiment of the present disclosure;
fig. 4 is a flowchart illustrating a further step of a communication method of a communication device according to an embodiment of the present application;
fig. 5 is a flowchart illustrating a further step of a communication method of the communication device according to an embodiment of the present application;
fig. 6 is a flowchart illustrating a further step of a communication method of the communication device according to an embodiment of the present application;
fig. 7 is a flowchart illustrating a further step of a communication method of the communication device according to an embodiment of the present application;
fig. 8 is a flowchart illustrating a further step of a communication method of the communication device according to an embodiment of the present application;
fig. 9 is a flowchart illustrating a further step of a communication method of the communication device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a first communication device according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a second communication device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a master communication device and a slave communication device according to an embodiment of the present disclosure.
Icon: 101-a primary communication card; 102-preparing a communication card; 103-main network switch; 104-redundant network switches; 105-a master controller; 106-a controller; 201-a primary communication device; 202-a slave communication device; 203-primary network switching means; 204-a slave network switching device; 205-a master control device; 206-backup control means; 10-a first communication device; 1001-first obtaining module; 1002-a generation module; 1003-a first sending module; 11-a second communication device; 1101-a second acquisition module; 1102-a second sending module; 1103-a receiving module; 2001-a processor; 2002-memory.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
It should be noted that the features of the embodiments of the present application may be combined with each other without conflict.
In a DCS network, a plurality of communication devices, a plurality of control devices, and a plurality of switching devices are generally included, and redundant devices are repeatedly arranged in a dual-network dual-communication device deployment manner, so that the fault tolerance of the DCS is improved. Fig. 1 is a schematic diagram of a network topology of a dual-network dual-communication device in the prior art, in which a dotted line part represents a main network, and a black solid line part represents a redundant network. As shown in fig. 1, a main communication card 101 and a standby communication card 102 are respectively disposed in two cabinets with a short distance, the main communication card 101 and the standby communication card 102 are respectively in communication connection with a main network switch 103 through a main network, and meanwhile, the main communication card 101 and the standby communication card 102 are respectively in communication connection with a redundant network switch 104 through a redundant network. The master network switch 103 is in communication with the master controller 105 and the slave controllers 106 via the master network, and the redundant network switch 104 is in communication with the master controller 105 and the slave controllers 106 via the redundant network.
In the network topology structure shown in fig. 1, the main communication card 101 and the standby communication card 102 are generally deployed at a short distance and have the same coverage range, only one of the communication cards normally operates at the same time, and sends data to the main network switch 103 or the redundant network switch 104 through the main network or the redundant network, and if the normally operating communication card fails, the other communication card takes over the communication card and continues to send data to the main network switch 103 or the redundant network switch 104 through the main network or the redundant network.
However, when the deployment method shown in fig. 1 is applied to an industrial field, the main communication card 101 and the standby communication card 102 are disposed at a short distance, and the acquisition devices in the industrial field are distributed discretely and at a long distance, so that the main communication card 101 and the standby communication card 102 cannot completely cover all the acquisition devices. Moreover, since the industrial site is also a certain distance away from the switches, the cost of cables connected to the switches through the dual networks is high after the network topology structure in the prior art is deployed to the industrial site, and the network topology structure is difficult to be applied to the industrial site.
Based on this, through research, the applicant provides a communication method of a communication device, the communication device and a distributed control system, which can perform data synchronization and cooperative work through a master-slave redundant link, so that the master communication device and the slave communication device can be respectively arranged at different positions far away in an industrial field, and comprehensive coverage of each discrete acquisition device is realized. And the main communication device and the slave communication device are respectively connected with one corresponding exchange device, so that the cable laying cost is saved.
The communication method, the communication device and the distributed control system of the communication device provided by the embodiments of the present application are explained below with reference to a plurality of specific application examples.
Fig. 2 is a schematic diagram of a network topology of a distributed control system according to an embodiment of the present application, and as shown in fig. 2, the distributed control system includes: the communication device comprises a master communication device 201, a slave communication device 202, a plurality of switching devices and a plurality of control devices, wherein the master communication device 201 and the slave communication device 202 are arranged at different positions, the master communication device 201 and the slave communication device 202 are in communication connection through a master-slave redundant link, the master communication device 201 and the slave communication device 202 are in communication connection with one switching device respectively, and each switching device is in communication connection with each control device respectively. The master-slave redundant link is a link connected by a cable between the master communication device and the slave communication device, and is used for realizing the function of data transmission between the master communication device and the slave communication device.
The master communication device 201 is configured to obtain master communication data, obtain slave communication data of the slave communication device through the master-slave redundant link, generate a first communication data packet according to the master communication data and the slave communication data, and send the first communication data packet to the control device through the switch device connected to the master communication device 201.
The slave communication device 202 is used for acquiring slave communication data and sending the slave communication data to the master communication device 201 in a normal working state, and sending a communication data packet to the control device through the switching device connected with the slave communication device 202.
The workflow of the distributed control system will be briefly described below.
First, after two communication devices deployed at different locations are powered on, the two communication devices need to be determined to be a master communication device or a slave communication device. Specifically, it can be determined according to the online time, and generally, the communication device powered on first can be used as the master communication device 201, and the communication device powered on later can be used as the slave communication device 202.
Next, the master communication device 201 sends keep-alive messages to the slave communication device 202 at regular time through the master-slave redundant link to obtain the working state of the slave communication device 202. If the slave communication device 202 is in a normal operating state, the keep-alive response message is sent to the master communication device 201 through the master-slave redundant link, and if the slave communication device 202 is in an abnormal operating state, the failure message is sent to the master communication device 201 through the master-slave redundant link. In addition, if the master communication device 201 does not receive the keep-alive response message or the failure message sent by the slave communication device 202 within the preset time after sending the keep-alive message, the master communication device 201 also considers that the slave communication device 202 is in the abnormal working state.
When the slave communication device 202 is in a normal operating state, the master communication device 201 is in a master-slave operating mode, and receives master communication data sent by each acquisition device, and meanwhile, receives slave communication data sent by the slave communication device 202 through a master-slave redundant link. Then, the main communication data and the slave communication data are numbered according to the receiving sequence, and a first communication data packet is generated according to the numbering sequence. Finally, the first communication data packet is sent to the master switching device 203 through the master network, and the master switching device 203 further sends the first communication data packet to the master control device 205 and the standby control device 206 through the master network. Meanwhile, the first communication data packet is copied to the slave communication device 202 through the master-slave redundant link, the slave communication device 202 sends the first communication data packet to the slave network control device through the redundant network again, and the slave network control device sends the first communication data packet to the master control device 205 and the slave control device 206 through the redundant network. Optionally, the master communication device 201 may further send the data sequence number of the slave communication data to the slave communication device 202 after sending the first communication data packet, so as to implement synchronization of the data sequence number.
When the slave communication device 202 is in an abnormal operating state, the master communication device 201 is in a stand-alone operating mode, continues to number the received master communication data according to the data serial numbers accumulated by itself, then sequentially combines the data to obtain a second communication data packet, and sends the second communication data packet to the master control device 205 and the standby control device 206 through the master network via the master network switching device 203. If the working state of the slave communication device 202 is normal at this time, but the master-slave redundant link fails, so that the master communication device 201 does not receive the keep-alive response packet sent by the slave communication device 202 within the preset time duration, the slave control transpose may also continue to number the slave communication data sent by each acquisition device according to the data sequence number sent by the master communication device 201, generate a local communication data packet, send the local communication data packet to the slave network switching device 204 through the redundant network, and the slave network switching device 204 further sends the local communication data packet to the master control device 205 and the slave control device 206 through the redundant network. That is, when the master-slave redundant link fails, the master communication device 201 and the slave communication device 202 may also operate simultaneously, so as to ensure the fault tolerance of the system.
Fig. 3 is a flowchart illustrating a communication method of a communication device and steps of the communication device according to an embodiment of the present disclosure, where the method is applied to a master communication device of the distributed control system. In the embodiment of the present application, the master communication device and the slave communication device are respectively disposed at different positions of the industrial site, and are respectively connected to a plurality of different acquisition devices of the industrial site, and simultaneously receive data transmitted in real time by the acquisition devices connected thereto. As shown in fig. 3, the method includes the following steps.
S301, main communication data is obtained, and the main communication data comprises a plurality of pieces of data received by the main communication device in real time.
As described above, the main communication device is connected to one or more acquisition devices in the industrial field, and receives and stores data acquired and transmitted by the acquisition devices in real time in the reception order, and a plurality of pieces of data received in real time constitute main communication data.
S302, slave communication data of the slave communication device are obtained through the master-slave redundant link, and the slave communication data comprise a plurality of pieces of data received by the slave communication device in real time.
The mode of obtaining the slave communication data from the slave communication device is the same as the mode of obtaining the master communication data from the master communication device, and a plurality of pieces of data collected and sent in real time by each collecting device connected with the slave communication device are gathered according to the receiving sequence to form the slave communication data.
Optionally, the slave communication device may send the received slave communication data to the master communication device through the master-slave redundant link in real time, or may send the received slave communication data to the master communication device through the master-slave redundant link after packing a plurality of pieces of data when the number of the slave communication data reaches a preset number threshold. Generally, when the real-time performance of the system is required to be high, the first scheme can be selected.
In the embodiment of the present application, in order to more fully cover each acquisition device in the industrial field, as an example, the master communication device and the slave communication device may be disposed at positions distant from each other, each covering a partial area of the industrial field, and the respective coverage ranges may not overlap.
S303, generate a first communication data packet according to the master communication data and the slave communication data.
The master communication device can collect and temporarily store a plurality of pieces of received master communication data and a plurality of pieces of received slave communication data, and when the collected data quantity reaches the quantity of the preset communication data packets, the master communication device can pack the collected data into the first communication data packets.
And S304, sending the first communication data packet to the control device through the switching device connected with the main communication device.
And then, the main communication device sends the packed first communication data packet to the main network exchange transpose through the main network. The master network switching device sends the first communication data packet to the master control device or the standby control device through the master network, or sends the first communication data packet to the master control device and the standby control device at the same time, and the specific sending mode can be determined by the control device in the working state at present.
In this embodiment, the master communication device and the slave communication device are disposed at different positions of the industrial site, and operate simultaneously, and the slave communication device synchronizes the slave communication data collected in real time to the master communication device, so that a plurality of discrete collection devices in the industrial site can be comprehensively covered. In addition, the master communication device and the slave communication device are respectively in communication connection with only one corresponding switching device, so that the problem of high cable cost caused by the fact that communication connection is established between the master communication device and each switching device when the master communication device and the slave communication device are too far away from the switching devices in an industrial field is solved. In addition, the master communication device and the slave communication device realize data synchronization through the master-slave redundant link, and the data consistency of the control device end is ensured.
Optionally, as shown in fig. 4, the communication method of the communication device provided in the embodiment of the present application further includes the following steps.
S401, the working state of the slave communication device is obtained.
The working state of the slave communication device can be understood as whether the slave communication device fails or not, whether the collected data can be normally received and sent or not and whether the communication with the master communication device is normal or not.
S402, determining the working mode of the master communication device according to the working state of the slave communication device.
After the master communication device determines the communication state of the slave communication device, namely whether the slave communication data can be received or not, the working mode of the master communication device is determined according to the communication state, namely, if the slave communication device works normally, the master communication device and the slave communication device work cooperatively; if the slave communication device works abnormally, the master communication device works independently.
It should be noted that, after the master communication device is powered on, the master communication device will query the working state of the slave communication device according to a fixed time period, or the master communication device does not receive the slave communication data within the fixed time period, and accordingly, it may be determined that the slave communication device has a fault. Optionally, whether the master communication device cooperates with the slave communication device may be set according to an instruction sent by the currently operating control device.
And S403, generating and sending a second communication data packet to the control device according to the working mode of the main communication device.
The data content in the second communication data packet differs according to the working mode of the master communication device, and if the working state of the slave communication device is normal and the master communication device and the slave communication device work cooperatively, the second communication data packet may include the master communication data and the slave communication data received by the master communication device. If the working state of the slave communication device is abnormal, the master communication device works independently, and the slave communication data of the slave communication device is not received through the master-slave redundant link, the second communication data packet only contains the master communication data.
In this embodiment, according to different working states of the slave communication devices, the master communication device determines the corresponding working mode and further determines the content of the second communication data packet. The influence of the abnormal working state of the slave communication device on the working of the master communication device is avoided, and the fault tolerance rate of the system is increased.
Alternatively, as shown in fig. 5, the step S401 of acquiring the operating status of the slave communication device may be implemented by the following steps S501 to S503.
And S501, sending the keep-alive message to the slave communication device through the master-slave redundant link.
The master communication device can periodically send the keep-alive messages to the slave communication devices through the master-slave redundant link every preset time length, and the master communication device is used for confirming the working states of the slave communication devices according to the replies of the slave communication devices to the keep-alive messages.
And S502, if the keep-alive response message sent by the slave communication device is received, the slave communication device is confirmed to be in a normal working state.
And after receiving the keep-alive messages sent by the main communication device, the slave communication device generates corresponding keep-alive response messages and sends the keep-alive response messages to the main communication device through the master-slave redundant link.
If the master communication device receives the keep-alive response message in the preset communication period, the slave communication device is considered to be in a normal working state, and the master communication device continues to work in cooperation with the slave communication device.
And S503, if the fault message sent by the communication device is received and/or the keep-alive response message sent by the communication device is not received, confirming that the communication device is in an abnormal working state.
When the slave communication device fails, the slave communication device replies a failure message to the keep-alive message of the master communication device. At this time, the master communication device may send a failure alarm to the master control device or the backup control device through the master network switching device, and start to operate independently.
If the master communication device does not receive any message responded by the slave communication device in the preset communication period, the slave communication device is considered to have a fault, or the master-slave redundant link has a fault. At this time, the master communication device may send a failure alarm to the master control device or the backup control device, and start the independent operation. It will be appreciated that the fault alarms herein may be different from the fault alarms above.
Optionally, if the time interval between two times of sending the keep-alive message by the master communication device is greater than the time interval between two times of sending the slave communication data by the slave communication device, and the master communication device does not receive the slave communication data in the time interval between two times of sending the keep-alive message, it may also be considered that the slave communication device has a fault.
In this embodiment, the master communication device confirms whether the slave communication device or the master-slave redundant link fails by replying the slave communication device to the keep-alive messages sent periodically, so that the master communication device can keep real-time understanding of the working state of the slave communication device.
Alternatively, in the steps S402 to S403, the process of generating and sending the second communication packet to the control device according to the state of the slave communication device may include:
if the slave communication device is in an abnormal working state, the master communication device is determined to be in a single-machine working mode, otherwise, the master communication device is determined to be in a master-slave working mode.
If the master communication device can not establish communication with the slave communication device, the slave communication device is considered to be in an abnormal working state, at the moment, the master communication device converts the master communication device into a single-machine working mode, and generates and sends a second communication data packet according to the master communication data.
And if the master communication device confirms that the slave communication device is in a normal working state through the keep-alive message and can acquire the slave communication data through the master-slave redundant link, the working state of the slave communication device is considered to be normal, the master communication device is in a master-slave working mode and works with the slave communication device in a cooperative manner, and the received slave communication data and the master communication data are packaged together to generate a second communication data packet and are sent.
In step S403, generating and sending the second communication data packet to the control device according to the operating mode of the primary communication device may include:
and if the working mode of the main communication device is the single-machine working mode, generating a second communication data packet according to the main communication data received by the main communication device, and sending the second communication data packet to the control device through the switching device connected with the main communication device.
As described above, the content of the second communication packet is determined according to the operating mode of the primary communication device, and if the primary communication device is in the stand-alone operating mode, the primary communication data sent by each acquisition device is independently collected, and after the second communication data packet is generated by packing, the second communication data packet is sent to the primary control device or the backup control device through the primary network via the primary network switching device.
And if the master communication device is in a master-slave working mode, the master communication device packages the master communication data and the slave communication data together to generate a second communication data packet and sends the second communication data packet.
In this embodiment, when the slave communication devices are in different operating states, the operating modes of the master communication device are different, so that the contents of the second communication data packets are different, which maintains the independence between the master communication device and the slave communication devices in the system and avoids the influence of one fault on the system.
Optionally, as shown in fig. 6, the communication method of the communication device provided in the embodiment of the present application may further include the following steps.
S601, determining the data sequence number of each piece of data in the master communication data and each piece of data in the slave communication data according to the receiving sequence of the master communication data and the slave communication data and the currently accumulated data sequence number.
When the slave communication device is in a normal working state and the master communication device is in a master-slave working mode, the master communication device can receive a plurality of pieces of master communication data from each acquisition device and a plurality of pieces of slave communication data from the slave communication device, and the master communication device can continue numbering each piece of data according to the time sequence for receiving the data and the accumulated data serial number corresponding to the last piece of data after numbering each piece of data before, and determine the corresponding data serial number.
And S602, sending the data serial numbers of all the data in the slave communication data to the slave communication device through the master-slave redundant link.
After receiving the plurality of pieces of data from the slave communication device, the master communication device may optionally synchronize the data serial numbers corresponding to the respective pieces of slave communication data to the slave communication device through the master-slave redundant link, so that the slave communication device may determine the currently accumulated serial numbers under the condition that the slave communication device cannot establish a connection with the master communication device.
S603, combining each piece of data in the main communication data and each piece of data in the slave communication data in sequence according to the data sequence number to obtain a first communication data packet.
Optionally, a data packet quantity threshold and a time threshold may be set in the main communication device, and when one of the two is reached, a first communication data packet may be generated according to sequential combination of each piece of sorted data, and the first communication data packet is sent to the control device.
In this embodiment, the master communication data and the slave communication data are numbered and sequentially packed into the first communication data packet, and the data packing process is completed by the master communication device, so that the influence of redundant operation on the real-time performance of the system is avoided.
Optionally, the step of generating the second communication data packet according to the primary communication data received by the primary communication device may include:
and numbering each piece of data in the new main communication data according to the currently accumulated data sequence number, and forming a second communication data packet according to the sequence of the numbering.
When the main communication device is switched to the stand-alone working mode from the master-slave working mode, the main communication device can switch the data sequence number of the last piece of data in the last first communication packet sent before as the accumulated data sequence number, continue numbering the new main communication data sent by each acquisition device on the basis, and sequentially combine the new main communication data according to the sequence of the data sequence numbers to generate a second communication data packet.
It is understood that the first communication data packet is generated when the master communication device, the slave communication device, and the master-slave redundant link are all in normal operation, and the second communication data packet may be generated by the master communication device when the master communication device, the slave communication device, and the master-slave redundant link are all in normal operation, or may be generated by the master communication device when the slave communication device or the master-slave redundant link are in abnormal operation. Specifically, when the master communication device is in the master-slave mode, the contents of the first communication data packet and the second communication data packet are the same.
In this embodiment, after the primary communication device switches to the stand-alone operation mode, the secondary communication data packet is continuously generated according to the accumulated serial number, so that the consistency of the data serial number for each control device is maintained.
Optionally, the method provided in the embodiment of the present application may further include:
and sending the first communication data packet to the slave communication device through the master-slave redundant link.
The master communication device can synchronously copy the first communication data packet to the slave communication device through the master-slave redundant link while sending the first communication data packet to each control device. The slave communication device can acquire the data sequence number of the slave communication data sent by the slave communication device through the synchronous data sequence number of the master communication device, and can acquire the currently accumulated data sequence number through the copied first communication data packet.
In this embodiment, the master communication device synchronously copies the first communication data packet to the slave communication device, so as to maintain the consistency of the data sequence numbers and the data contents of the master communication device and the slave communication device.
Fig. 7 is a flowchart illustrating steps of a communication method of a communication device according to an embodiment of the present application, applied to a slave communication device of a distributed control system. It should be noted that, after each communication device is powered on, each communication device sends a keep-alive message to the opposite communication device through a master-slave redundant link, one side that receives the keep-alive message first considers that the communication device is a slave communication device, if the keep-alive message is not sent at this time, the sending is cancelled, if the keep-alive message is sent at this time, the opposite communication device is determined to be a master communication device and is a slave control device according to negotiation results with the opposite communication device, such as power-on time, sending timestamp of the keep-alive message, and the like. As shown in fig. 7, the method includes the following steps.
And S701, acquiring slave communication data in a normal working state, wherein the slave communication data comprises a plurality of pieces of data received by the slave communication device in real time.
When the communication between the slave communication device and each acquisition device is normal, the slave communication device is in a normal working state, and a plurality of pieces of data sent by each acquisition device are received in real time to serve as slave communication data.
S702, sending the slave communication data to the master communication device.
If the master-slave redundant link is in normal communication, the slave communication device can sequentially send the received multiple pieces of slave communication data to the master communication device through the master-slave redundant link, or send the multiple pieces of slave communication data to the master communication device together when the quantity of the data reaches a preset quantity threshold. Generally, to ensure real-time performance of the system, the first method is generally adopted.
And S703, receiving the first communication data packet sent by the master communication device, and sending the first communication data packet to the control device through the switching device connected with the slave communication device.
The master communication device sends the first communication data packet to the slave communication device through the master-slave redundant link, the slave communication device sends the first communication data packet to the slave network switching device through the redundant network in real time, and then the slave network switching device sends the first communication data packet to each control device through the redundant network in real time.
In this embodiment, the slave communication device receives the first communication data packet packaged by the master communication device and sends the first communication data packet to the control device, so that the influence of the first communication data packet sent by the master communication device on the system caused by loss in the sending process is avoided, the redundancy of the system is ensured, and the fault tolerance rate is improved.
Optionally, the communication method of the communication device provided in the embodiment of the present application may further include:
and if the keep-alive message sent by the master communication device is not received within the preset time length, generating a local communication data packet according to the received slave communication data, and sending the local communication data packet to the control device through the switching device connected with the slave communication device.
Optionally, if the slave communication device does not receive the keep-alive message within the preset time length, or does not receive the first communication data packet copied by the master communication device, or does not receive the synchronous data sequence number of the master communication device, it may be considered that the master communication device has a fault. At this time, the slave communication device is converted into the master communication device, and then, local communication data packets can be generated according to the slave communication data sent by each acquisition device in real time and sent to each control device through the redundant network.
In this embodiment, after the slave communication device fails to establish communication with the master communication device, the slave communication device may be switched to the master communication device and continue to transmit the slave communication data to each control device, so that even if the master-slave redundant link fails to establish communication between the master communication device and the slave communication device, normal operation of the system can be maintained.
Optionally, the method provided in the embodiment of the present application may further include:
and receiving the online communication data packet sent by the main communication device.
The online communication data packet may be the last first communication data packet received from the communication device before the failure of the master communication device or the master-slave redundant link.
In the above step, the sending the local communication packet to the control device via the switching device connected to the slave communication device may include:
and combining the local communication data packet and the online communication data packet into a data packet to be sent according to the data serial number of each data in the local communication data packet and the data serial number of each data in the online communication data packet, and sending the data packet to be sent to the control device through a switching device connected with the slave communication device.
Optionally, the slave communication device is switched to the master communication device after confirming that the master communication device has a fault, and at this time, the slave communication device directly sends out the last received first communication data packet.
The local communication data packet may be a plurality of pieces of slave communication data received between the slave communication data in the on-line communication data packet of the slave communication device and the master communication device.
In this embodiment, after the slave communication device is converted into the master communication device, the local communication data packet is sent again, so that data is not lost at the control device, and redundancy of the system is ensured.
Optionally, as shown in fig. 8, the method provided in the embodiment of the present application further includes the following steps.
S801, receiving the keep-alive message sent by the main communication device.
During the working period of the master communication device and the slave communication device, the master communication device sends keep-alive messages to the slave communication device at intervals of preset duration to determine whether the working state of the slave communication device is normal.
S802, according to the keep-alive message, determining the working state of the slave communication device.
After receiving the keep-alive message from the communication device, checking whether the communication between the communication device and each acquisition device is normal or not, and further determining whether the working state of the communication device is normal or not.
And S803, sending response information to the master communication device according to the working state of the slave communication device.
Furthermore, after the communication device determines the working state of the communication device, the corresponding response information is reported to the main control device according to the working state, so that the main control device confirms the working mode of the communication device.
In this embodiment, the slave communication device sends the response message to the master communication device according to its own operating status, so that the master communication packet can know the condition of the slave communication device in time, thereby avoiding data loss.
Alternatively, as shown in fig. 9, in the method S803, the response information is sent to the master communication device according to the operating status of the slave communication device, which can be implemented by the following steps S901 to S902.
S901, if the working state of the slave communication device is the normal working state, sending a keep-alive response message to the master communication device.
If the working state of the slave communication device is normal and communication connection can be established with each acquisition device, after the keep-alive message sent by the master communication device is received, a keep-alive response message is sent back to the master communication device within a preset time length, and slave communication data are sent to the master communication device.
And S902, if the working state of the slave communication device is the abnormal working state, sending a fault message to the master communication device.
If the slave communication device can not establish communication connection with each acquisition device, the slave communication device confirms that the slave communication device is in an abnormal working state, and sends a fault message to the master communication device for error reporting.
In this embodiment, the slave communication device sends a keep-alive response message or a failure message to the master communication device according to its own working status, so that the master communication device can timely obtain the working status of the slave communication device, and adjust its own working mode to maintain data consistency to the control device.
As shown in fig. 10, an embodiment of the present application provides a first communication device 10, where the first communication device 10 includes:
the first obtaining module 1001 is configured to obtain master communication data, where the master communication data includes multiple pieces of data received by a master communication device in real time.
The first obtaining module 1001 is further configured to obtain slave communication data of the slave communication device through the master-slave redundant link, where the slave communication data includes a plurality of pieces of data received by the slave communication device in real time.
The generating module 1002 is configured to generate a first communication data packet according to the master communication data and the slave communication data.
A first sending module 1003, configured to send the first communication data packet to the control device through the switching device connected to the master communication device.
The first sending module 1003 is further specifically configured to obtain an operating state of the slave communication device. And determining the working mode of the master communication device according to the working state of the slave communication device. And generating and sending a second communication data packet to the control device according to the working mode of the main communication device.
The first obtaining module 1001 is further specifically configured to send a keep-alive message to the slave communication device through the master-slave redundant link. And if the keep-alive response message sent by the slave communication device is received, confirming that the slave communication device is in a normal working state. And if the fault message sent by the communication device is received and/or the keep-alive response message sent by the communication device is not received, the slave communication device is confirmed to be in an abnormal working state.
The generating module 1002 is further configured to determine that the master communication device is in a standalone operation mode if the slave communication device is in an abnormal operation state, and otherwise, determine that the master communication device is in a master-slave operation mode. Generating and sending a second communication data packet to the control device according to the working mode of the main communication device, comprising: and if the working mode of the main communication device is the single-machine working mode, generating a second communication data packet according to the main communication data received by the main communication device, and sending the second communication data packet to the control device through the switching device connected with the main communication device.
The generating module 1002 is further specifically configured to number each piece of data in the new primary communication data according to the currently accumulated data sequence number, and form a second communication data packet according to the sequence of the numbers.
The first sending module 1003 is further specifically configured to determine a data sequence number of each of the master communication data and the slave communication data according to a receiving sequence of the master communication data and the slave communication data and a currently accumulated data sequence number. And transmitting the data serial numbers of all the data in the slave communication data to the slave communication device through the master-slave redundant link. And combining each piece of data in the main communication data and each piece of data in the slave communication data in sequence according to the data sequence number to obtain a first communication data packet.
The first sending module 1003 is further specifically configured to send the first communication data packet to the slave communication device through the master-slave redundant link.
As shown in fig. 11, an embodiment of the present application provides a second communication device 11, where the second communication device 11 includes:
a second obtaining module 1101, configured to obtain slave communication data in a normal operating state, where the slave communication data includes a plurality of pieces of data received by the slave communication device in real time;
a second sending module 1102, configured to send the slave communication data to the master communication device.
The receiving module 1103 is configured to receive a first communication packet sent by the master communication device, and send the first communication packet to the control device through the switch device connected to the slave communication device.
The second sending module 1102 is further specifically configured to, if the keep-alive message sent by the master communication device is not received within the preset time, generate a local communication data packet according to the received slave communication data, and send the local communication data packet to the control device through the switching device connected to the slave communication device.
The second sending module 1102 is further specifically configured to receive an online communication data packet sent by the main communication device. Sending the local communication data packet to the control device through the switching device connected with the slave communication device, comprising: and combining the local communication data packet and the online communication data packet into a data packet to be sent according to the data serial number of each data in the local communication data packet and the data serial number of each data in the online communication data packet, and sending the data packet to be sent to the control device through a switching device connected with the slave communication device.
The second sending module 1102 is further specifically configured to receive a keep-alive message sent by the main communication device. Determining the working state of the slave communication device according to the keep-alive message; and sending response information to the master communication device according to the working state of the slave communication device.
The second sending module 1102 is further specifically configured to send a keep-alive response message to the master communication device if the working state of the slave communication device is a normal working state; and if the working state of the slave communication device is an abnormal working state, sending a fault message to the master communication device.
The present application also provides a communication device, which may refer to the master communication device in the foregoing embodiments, and may also refer to the slave communication device in the foregoing embodiments. As shown in fig. 12, the communication device includes: the processor 2001 and the memory 2002 are respectively provided, the memory 2002 is used for storing machine readable instructions executable by the processor 2001, when the communication device runs, the machine readable instructions are executed, the processor 2001 and the memory 2002 are communicated through a bus, and the processor 2001 is used for executing the steps of the communication method applied to the communication device of the main communication device in the embodiment. Specifically, when the communication device refers to the aforementioned host communication device, the method steps executed by the memory in the host communication device in the aforementioned method embodiments are executed. When the communication device refers to the slave communication device, the steps of the method executed by the memory in the slave communication device are executed.
The memory 2002, processor 2001, and bus elements are electrically coupled to each other, directly or indirectly, to enable data transfer or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The data processing device of the solenoid valve failure detection system includes at least one software functional module which can be stored in the memory 2002 in the form of software or firmware (firmware) or solidified in an Operating System (OS) of the computer device. The processor 2001 is used to execute executable modules stored in the memory 2002, such as software functional modules and computer programs included in a data processing device of the solenoid valve failure detection system.
The Memory 2002 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
Optionally, the present application further provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program performs the steps of the above method embodiments. The specific implementation and technical effects are similar, and are not described herein again.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to corresponding processes in the method embodiments, and are not described in detail in this application. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and there may be other divisions in actual implementation, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (15)

1. A communication method of a communication device is applied to a master communication device of a distributed control system, the distributed control system comprises the master communication device, a slave communication device, a plurality of switching devices and a plurality of control devices, the master communication device and the slave communication device are deployed at different positions and are in communication connection through a master-slave redundant link, the master communication device and the slave communication device are respectively in communication connection with one switching device, and each switching device is respectively in communication connection with each control device, the method comprises the following steps:
acquiring main communication data, wherein the main communication data comprises a plurality of pieces of data received by the main communication device in real time;
acquiring slave communication data of the slave communication device through the master-slave redundant link, wherein the slave communication data comprises a plurality of pieces of data received by the slave communication device in real time;
generating a first communication data packet according to the main communication data and the slave communication data;
and sending the first communication data packet to the control device through a switching device connected with the main communication device.
2. The method of claim 1, further comprising:
acquiring the working state of the slave communication device;
determining the working mode of the master communication device according to the working state of the slave communication device;
and generating and sending a second communication data packet to the control device according to the working mode of the main communication device.
3. The communication method of claim 2, wherein the obtaining the operating status of the slave communication device comprises:
sending keep-alive messages to the slave communication device through the master-slave redundant link;
if the keep-alive response message sent by the slave communication device is received, confirming that the slave communication device is in a normal working state;
and if the fault message sent by the slave communication device is received and/or the keep-alive response message sent by the slave communication device is not received, confirming that the slave communication device is in an abnormal working state.
4. The communication method of claim 3, wherein the generating and sending a second communication packet to the control device according to the status of the slave communication device comprises:
if the slave communication device is in an abnormal working state, determining that the master communication device is in a single-machine working mode, otherwise, determining that the master communication device is in a master-slave working mode;
the generating and sending a second communication data packet to the control device according to the working mode of the main communication device includes:
and if the working mode of the main communication device is the single-machine working mode, generating a second communication data packet according to the main communication data received by the main communication device, and sending the second communication data packet to the control device through a switching device connected with the main communication device.
5. The method according to claim 4, wherein the generating a second communication data packet according to the primary communication data received by the primary communication device comprises:
and numbering each piece of data in the new main communication data according to the currently accumulated data sequence number, and forming the second communication data packet according to the sequence of the numbering.
6. The method of claim 1, further comprising:
determining the data sequence number of each piece of data in the master communication data and each piece of data in the slave communication data according to the receiving sequence of the master communication data and the slave communication data and the currently accumulated data sequence number;
sending the data serial numbers of all the data in the slave communication data to the slave communication device through the master-slave redundant link;
and combining each piece of data in the main communication data and each piece of data in the slave communication data in sequence according to a data sequence number to obtain the first communication data packet.
7. The method of claim 1, further comprising:
and sending the first communication data packet to the slave communication device through the master-slave redundant link.
8. A communication method of a communication device, applied to a slave communication device of a distributed control system, where the distributed control system includes a master communication device, the slave communication device, a plurality of switching devices, and a plurality of control devices, the master communication device and the slave communication device are deployed at different locations, and the master communication device and the slave communication device are communicatively connected via a master-slave redundant link, the master communication device and the slave communication device are communicatively connected to one switching device respectively, and each switching device is communicatively connected to each control device respectively, the method comprising:
under a normal working state, slave communication data are obtained, wherein the slave communication data comprise a plurality of pieces of data received by a slave communication device in real time;
sending the slave communication data to the master communication device;
and receiving a first communication data packet sent by the master communication device, and sending the first communication data packet to the control device through a switching device connected with the slave communication device.
9. The method of claim 8, further comprising:
and if the keep-alive message sent by the main communication device is not received within the preset time length, generating a local communication data packet according to the received slave communication data, and sending the local communication data packet to the control device through an exchange device connected with the slave communication device.
10. The method of claim 9, further comprising:
receiving an online communication data packet sent by the main communication device;
the sending the local communication data packet to the control device through the switching device connected with the slave communication device includes:
and combining the local communication data packet and the online communication data packet into a data packet to be sent according to the data serial number of each data in the local communication data packet and the data serial number of each data in the online communication data packet, and sending the data packet to be sent to the control device through a switching device connected with the slave communication device.
11. The method of claim 8, further comprising:
receiving a keep-alive message sent by the main communication device;
determining the working state of the slave communication device according to the keep-alive message;
and sending response information to the main communication device according to the working state of the slave communication device.
12. The communication method of claim 11, wherein the sending a response message to the master communication device according to the operating status of the slave communication device comprises:
if the working state of the slave communication device is a normal working state, sending a keep-alive response message to the master communication device;
and if the working state of the slave communication device is an abnormal working state, sending a fault message to the master communication device.
13. A primary communication device, comprising: a processor and a memory, the memory storing machine-readable instructions executable by the processor, the processor executing the machine-readable instructions when the host communication device is running to perform the steps of the communication method of the communication device according to any one of claims 1 to 7.
14. A slave communication device, the slave communication device comprising: a processor and a memory, the memory storing machine-readable instructions executable by the processor, the processor executing the machine-readable instructions when the host communication device is running to perform the steps of the communication method of the communication device according to any one of claims 8 to 12.
15. A distributed control system, comprising:
the master communication device of claim 13, the slave communication device of claim 14, a plurality of switching devices, and a plurality of control devices, wherein the master communication device and the slave communication device are disposed at different locations and are communicatively coupled via a master-slave redundant link, the master communication device and the slave communication device are communicatively coupled to one switching device, and each switching device is communicatively coupled to each control device.
CN202210249541.2A 2022-03-15 2022-03-15 Communication method of communication device, communication device and distributed control system Active CN114338361B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210249541.2A CN114338361B (en) 2022-03-15 2022-03-15 Communication method of communication device, communication device and distributed control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210249541.2A CN114338361B (en) 2022-03-15 2022-03-15 Communication method of communication device, communication device and distributed control system

Publications (2)

Publication Number Publication Date
CN114338361A true CN114338361A (en) 2022-04-12
CN114338361B CN114338361B (en) 2022-06-07

Family

ID=81034069

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210249541.2A Active CN114338361B (en) 2022-03-15 2022-03-15 Communication method of communication device, communication device and distributed control system

Country Status (1)

Country Link
CN (1) CN114338361B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024011906A1 (en) * 2022-07-15 2024-01-18 南京科远智慧科技集团股份有限公司 Master-slave redundancy control system and method

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1643854A (en) * 2002-04-30 2005-07-20 国际商业机器公司 Method and arrangement for local synchronization in master-slave distributed communication systems
CN101907879A (en) * 2010-03-12 2010-12-08 大连理工大学 Industrial control network redundancy fault-tolerant system
CN102404146A (en) * 2011-11-17 2012-04-04 福建星网锐捷网络有限公司 Master-slave switching method, network device and DHCP server
US20130080817A1 (en) * 2011-07-20 2013-03-28 Janez Mihelic Systems and Methods of Network Synchronization
CN103401696A (en) * 2013-06-25 2013-11-20 国家电网公司 Dual-network redundant communication system in industrial equipment and communication method thereof
CN105812292A (en) * 2014-12-29 2016-07-27 中兴通讯股份有限公司 Switching equipment stacking method and device
CN106936613A (en) * 2015-12-31 2017-07-07 北京网御星云信息技术有限公司 A kind of method and system of Openflow interchangers quick master-slave switching
CN109831326A (en) * 2019-01-25 2019-05-31 新华三技术有限公司 Network equipment control method and the network equipment
CN111817939A (en) * 2020-07-22 2020-10-23 浙江中控技术股份有限公司 Master station redundancy implementation system and method based on industrial Ethernet protocol
CN114125894A (en) * 2021-10-29 2022-03-01 漳州科华电气技术有限公司 Data transmission method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1643854A (en) * 2002-04-30 2005-07-20 国际商业机器公司 Method and arrangement for local synchronization in master-slave distributed communication systems
CN101907879A (en) * 2010-03-12 2010-12-08 大连理工大学 Industrial control network redundancy fault-tolerant system
US20130080817A1 (en) * 2011-07-20 2013-03-28 Janez Mihelic Systems and Methods of Network Synchronization
CN102404146A (en) * 2011-11-17 2012-04-04 福建星网锐捷网络有限公司 Master-slave switching method, network device and DHCP server
CN103401696A (en) * 2013-06-25 2013-11-20 国家电网公司 Dual-network redundant communication system in industrial equipment and communication method thereof
CN105812292A (en) * 2014-12-29 2016-07-27 中兴通讯股份有限公司 Switching equipment stacking method and device
CN106936613A (en) * 2015-12-31 2017-07-07 北京网御星云信息技术有限公司 A kind of method and system of Openflow interchangers quick master-slave switching
CN109831326A (en) * 2019-01-25 2019-05-31 新华三技术有限公司 Network equipment control method and the network equipment
CN111817939A (en) * 2020-07-22 2020-10-23 浙江中控技术股份有限公司 Master station redundancy implementation system and method based on industrial Ethernet protocol
CN114125894A (en) * 2021-10-29 2022-03-01 漳州科华电气技术有限公司 Data transmission method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024011906A1 (en) * 2022-07-15 2024-01-18 南京科远智慧科技集团股份有限公司 Master-slave redundancy control system and method

Also Published As

Publication number Publication date
CN114338361B (en) 2022-06-07

Similar Documents

Publication Publication Date Title
CN103199972B (en) The two-node cluster hot backup changing method realized based on SOA, RS485 bus and hot backup system
CN102769626B (en) A kind of session information synchronous method, device and system
CN110750480B (en) Dual-computer hot standby system
CN101394306B (en) Seamless switching method for dual server system
CN109597723B (en) Dual-machine hot standby redundancy implementation system and method for subway integrated monitoring system
CN101965691B (en) Cable redundancy and networked system
CN114338361B (en) Communication method of communication device, communication device and distributed control system
EP2329372A1 (en) Method and systems for synchronization of process control servers
CN103067206A (en) Internet of things across-machine room distributed type full automatic hot standby server switching system
CN102170342B (en) IEC (integrated Ethernet chip) 104 communication host-standby switching method under high redundancy configuration
CN109769001A (en) A kind of internet of things data transmission method and system
CN102804699A (en) Method and system for implementing redundant network interface modules in a distributed I/O system
CN101388567B (en) Electric apparatus monitoring method and system
CN101917285A (en) Three-machine realization method for moonlet service host machine double-machine cooling structure
WO2006080433A1 (en) Information processing apparatus and information processing method
CN109274763B (en) Information synchronization method and dual-computer hot standby equipment
CN1080504C (en) Method of highly reliable and consistent message transmission
CN105049263A (en) Data processing method and data processing system
CN108933873B (en) User data synchronization method and device
CN112820092B (en) Method for collecting electricity consumption data, terminal equipment and storage medium
JP4788597B2 (en) Programmable controller redundant system
JP7085387B2 (en) Information transmission method of monitoring control system, information transmission method of monitoring control system
CN115037674B (en) Single-machine and multi-equipment redundancy backup method for central control system
CN102932132A (en) Time synchronization system based on multiple groups of redundancy controllers
CN114244638B (en) Multicast network communication method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 310053 No. 309 Liuhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Zhongkong Technology Co.,Ltd.

Country or region after: China

Address before: 309 Liuhe Road, Binjiang District, Hangzhou, Zhejiang 310000

Patentee before: ZHEJIANG SUPCON TECHNOLOGY Co.,Ltd.

Country or region before: China