System redundancy communication method and distributed control system
By analyzing and reorganizing the messages of the communication module in the distributed control system, determining the working status of each module, and switching the status when necessary, the problem of restricted deployment of redundant communication modules is solved, and the system is achieved with high reliability and stable operation.
Patent Information
- Application Number
- CN202411863315.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-17
AI Technical Summary
In distributed control systems, the deployment of redundant communication modules is limited by rack restrictions and cannot be distributed and deployed at two physical locations far away, resulting in the inability to establish a dedicated physical connection to achieve redundant communication.
By receiving the first message sent by multiple communication modules, the message is parsed and reorganized to determine the working state of each module, and when the communication state of the main module is abnormal, the working state is switched to realize redundant communication.
It realizes that without the need for dedicated physical redundant channels, ensures the high reliability of the communication modules in the system and the continuity of data communication, improves the redundant processing capabilities of distributed control system equipment, and ensures the stable operation of the system.
Smart Images

Figure CN119788499A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of industrial control technology, and in particular to a system redundant communication method and a distributed control system. Background Art
[0002] In traditional distributed industrial control systems, controllers are usually connected to redundant communication modules installed on the base, and the redundant communication modules are connected to input / output modules through the rack to realize the input and output functions of the control system. However, this architecture requires that redundant communication modules and input / output modules must be deployed in the same cabinet and connected through the rack, resulting in limited deployment distance, and redundant communication modules need to be installed on the same base for redundant interaction through the base.
[0003] With the development of Ethernet technology, especially the development of Advanced Physical Layer (APL) technology, the deployment of input and output modules is no longer limited to the rack, but can be flexibly deployed through APL cables. Therefore, communication modules and input and output modules are no longer centrally deployed, and the base and rack are replaced by Ethernet connections. But the problem that follows is that redundant communication modules may be distributed in two physical locations far away, deployed at the head and tail of the cascade network respectively. Therefore, it is impossible to establish a dedicated physical connection (such as the base) as a redundant channel to achieve redundant communication.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a system redundant communication method and a distributed control system to at least solve the technical problem that the deployment of input / output modules that are restricted by racks is limited because the distributed control system installs redundant communication modules on the same base.
[0006] According to one aspect of an embodiment of the present application, a system redundant communication method is provided, comprising: receiving a first message sent by each of a plurality of communication modules in a distributed control system, wherein the plurality of communication modules are respectively deployed in different networks, the first message carries at least the communication status of the communication module, and the communication status is used to reflect the network status of the network in which the communication module is located; parsing and reorganizing the first message sent by each communication module to obtain a second message corresponding to the communication module, and sending the second message to other communication modules except the communication module, wherein each communication module is used to determine whether its own working state is a primary state based on receiving the second message and its own communication state; when the communication state of the first communication module whose working state is a primary state is an abnormal state, receiving a first switching message sent by the first communication module that carries at least the Internet Protocol IP address of the second communication module whose network state is second only to the first communication module, parsing and reorganizing the first switching message to obtain a corresponding second switching message, and sending the second switching message to the second communication module, wherein the second communication module is used to switch its own working state from a standby state to a primary state.
[0007] Optionally, before receiving the first message sent by each of the multiple communication modules in the distributed control system, the method also includes: receiving an identity authentication request message sent by each of the communication modules in the distributed control system, wherein the identity authentication request message carries at least the identity information of the communication module, and the identity information includes at least one of the following: the Internet Protocol IP address of the communication module, the configuration verification code of the communication module, and the module identifier and module address of each input / output module connected to the communication module; authenticating each communication module according to the identity authentication request message sent by each communication module; and when any communication module passes the identity authentication, storing the module identifier and module address of each input / output module connected to the communication module in the identity authentication request message in a preset database.
[0008] Optionally, identity authentication is performed on each communication module based on the identity authentication request message sent by each communication module, including: for each communication module, matching the identity information in the identity authentication request message sent by the communication module with a preset database, wherein the database stores: configuration information of all communication modules in the distributed control system, and the configuration information includes at least one of the following: the IP address of the communication module, the configuration verification code of the communication module, the module identifier and module address of each input / output module connected to the communication module; when the identity information in the identity authentication request message of any communication module successfully matches the database, it is determined that the communication module has passed the identity authentication; when the identity information in the identity authentication request message of any communication module fails to match the database, it is determined that the communication module has not passed the identity authentication.
[0009] Optionally, the first message sent by each communication module is parsed and reorganized to obtain a second message corresponding to the communication module, including: parsing and verifying the first message sent by each communication module, wherein the first message also carries a first message sequence number, a module address and a module identifier of a target input / output module that sends the first message; when the first message sent by any communication module passes the verification, the second message corresponding to the communication module is reorganized from a new first message sequence number, a module address and a module identifier of the target input / output module that sends the first message.
[0010] Optionally, the first message sent by each communication module is parsed and verified, including: for the first message sent by each communication module, the first message is parsed to at least obtain the first message sequence number of the first message, the module address and module identifier of the target input / output module that sends the first message; determine whether the module address and module identifier of the target input / output module in the first message match a preset database, wherein the database includes the module addresses and module identifiers of all input / output modules in the distributed control system that are connected to the communication module that has passed identity authentication; if the module address and module identifier of the target input / output module in the first message successfully match the database, then continue to determine whether the first message sequence number is continuous with the message sequence number of the previous message; if the first message sequence number of the first message is continuous with the message sequence number of the previous message, it is determined that the first message has passed the verification; if the module address and module identifier of the target input / output module in the first message fail to match the database and / or the message sequence number of the first message is not continuous with the message sequence number of the previous message, it is determined that the first message has not passed the verification.
[0011] Optionally, the first switching message is parsed and reorganized to obtain a corresponding second switching message, including: parsing and verifying the first switching message, wherein the first switching message also carries a second message sequence number, a switching operation instruction and a corresponding command code; when the first switching message passes the verification, the second switching message is reorganized from a new first message sequence number, a switching operation instruction and a corresponding command code.
[0012] Optionally, the first switching message is parsed and verified, including: parsing the first switching message to obtain at least the second message sequence number of the first switching message and a command code corresponding to the switching operation instruction; judging whether the second message sequence number of the first switching message is continuous with the message sequence number of the previous message; if the first message sequence number of the first switching message is continuous with the message sequence number of the previous message, continuing to judge whether the command code in the first switching message is valid; if the command code in the first switching message is valid, determining that the first switching message has passed the verification; if the second message sequence number of the first switching message is discontinuous with the message sequence number of the previous message and / or the command code in the first switching message is invalid, determining that the first switching message has not passed the verification.
[0013] According to another aspect of an embodiment of the present application, a distributed control system is further provided, which includes: a controller, multiple communication modules, and multiple input / output modules, and the multiple communication modules are respectively deployed in different networks, wherein each communication module in the multiple communication modules is used to send a first message to the controller, wherein the first message carries at least the communication status of the communication module, and the communication status is used to reflect the network status of the network in which the communication module is located; the controller is used to parse and reorganize the first message sent by each communication module to obtain a second message corresponding to the communication module, and send the second message to other communication modules except the communication module; each communication module in the multiple communication modules A communication module is further used to receive second messages corresponding to other communication modules sent by the controller, and determine whether its own working state is the main state in combination with its own communication state, wherein the communication module whose working state is the main state is the first communication module; the first communication module is used to send a first switching message to the controller when its own communication state is an abnormal state, which carries at least the IP address of the second communication module whose network state is second only to the first communication module; the controller is also used to parse and reorganize the first switching message to obtain the corresponding second switching message, and send the second switching message to the second communication module; the second communication module is used to switch its own working state from the standby state to the main state.
[0014] According to another aspect of an embodiment of the present application, a computer program product is further provided. The computer program product includes: a computer program, wherein when the computer program is executed by a processor, the above-mentioned system redundant communication method is implemented.
[0015] According to another aspect of an embodiment of the present application, an electronic device is further provided. The electronic device includes: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above-mentioned system redundant communication method through the computer program.
[0016] In an embodiment of the present application, a controller receives a first message sent by each of a plurality of communication modules in a distributed control system, wherein the plurality of communication modules are respectively deployed in different networks, and the first message carries at least the communication status of the communication module, and the communication status is used to reflect the network status of the network in which the communication module is located; the first message sent by each communication module is parsed and reorganized to obtain a second message corresponding to the communication module, and the second message is sent to other communication modules except the communication module, wherein each communication module is used to determine whether its own working state is the main state based on receiving the second message and its own communication state; when the communication state of the first communication module whose working state is the main state is an abnormal state, a first switching message sent by the first communication module carrying at least the IP address of the second communication module whose network state is second only to the first communication module is received, and the first switching message is parsed and reorganized to obtain the corresponding second switching message, and the second switching message is sent to the second communication module, wherein the second communication module is used to switch its own working state from the standby state to the main state. The entire redundant processing process uses the controller as a redundant channel manager to achieve the technical effect of ensuring the high reliability of the communication module and the continuity of data communication in the system without the need for dedicated physical redundant channels. It achieves the purpose of improving the redundant processing capability of distributed control system equipment and ensuring stable operation of the system in scenarios where modules are dispersedly deployed on industrial sites, and further solves the technical problem of limited deployment of input / output modules that are restricted by racks due to the distributed control system installing redundant communication modules on the same base. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 is a schematic diagram of an optional distributed control system architecture according to an embodiment of the present application;
[0019] Figure 2 is a flow chart of an optional system redundant communication method according to an embodiment of the present application;
[0020] Figure 3 is a schematic diagram of the architecture of another optional distributed control system according to an embodiment of the present application;
[0021] Figure 4 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0023] It should be noted that the terms "first", "second", etc. in the specification, claims and drawings of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0024] In order to better understand the embodiments of the present application, some nouns or terms that appear in the description of the embodiments of the present application are first translated and explained as follows:
[0025] Distributed Control System (DCS), also known as distributed control system, is a computer control system that centrally manages and disperses the control of production processes. It is a comprehensive control system that has emerged with the continuous improvement of the level of automation in modern large-scale industrial production and the increasingly complex requirements of process control. It integrates computer technology, network technology, communication technology and automatic control technology. It is a new control system that disperses risks and optimizes centralized control.
[0026] Ethernet-APL (Advanced Physical Layer): is a new end-to-end Ethernet communication standard applicable to various field devices. This standard takes into full account the specific needs of the process industry, thus introducing the "two-wire system". The two-wire system is used for the concept of two-wire intrinsically safe Ethernet protection devices, which can not only realize long-distance cable transmission and intrinsically safe applications, but also provide power for connected field devices. For networks in the process industry, this new technology provides comprehensive interoperability and greater flexibility.
[0027] Example 1
[0028] The embodiment of the present application provides a distributed control system, wherein: Figure 1 is a schematic diagram of the structure of an optional distributed control system 10 according to an embodiment of the present application, such as Figure 1 The system 10 includes:
[0029] The controller 12, also known as the control unit, has the ability to connect and manage the communication module and can perform data processing and logical operations;
[0030] Multiple communication modules 14 can be connected to the controller 12 via conventional Ethernet (such as Ethernet / IP, HART-IP, OPC UA, etc.); at the same time, they are connected to multiple input / output modules 16 via Ethernet APL communication standard for collecting and forwarding control data;
[0031] The multiple input / output modules 16 have the ability to collect input and output signal data and send them to the multiple communication modules 14 via the Ethernet APL communication standard.
[0032] Among them, the above-mentioned multiple communication modules 14 are respectively deployed in different networks, and the multiple communication modules 14 are respectively connected to each input / output module 16k in the distributed control system, so that when an abnormality occurs in the network where any communication module 14i is located, the distributed control system 10 can still transmit control data through redundant communication modules.
[0033] Specifically, each module in the distributed control system 10 can implement the redundancy function of the system according to the following process, including:
[0034] Step 1: Each communication module 14i may first send a first message to the controller 12, wherein the first message carries at least the communication status of the communication module 14i, and the communication status is used to reflect the network status of the network where the communication module 14i is located;
[0035] Step 2: The controller 12 parses and reorganizes the first message sent by each communication module 14i to obtain a second message corresponding to the communication module 14i, and sends the second message to other communication modules 14j (i≠j) except the communication module 14i;
[0036] Step 3: Each communication module 14i can also receive the second message corresponding to other communication modules 14j sent by the controller 12, and determine whether its own working state is the main state based on its own communication state, wherein the communication module 14i whose working state is the main state is the first communication module;
[0037] Step 4: When the communication status of the first communication module 14i is abnormal, the first communication module 14i sends a first switching message to the controller 12, which carries at least the IP address of the second communication module 14k whose network status is second only to its own;
[0038] Step 5: The controller 12 parses and reorganizes the first switching message sent by the first communication module 14i to obtain a corresponding second switching message, and sends the second switching message to the second communication module 14j;
[0039] Step 6: The second communication module 14j switches its working state from the standby state to the active state.
[0040] Based on the above-mentioned distributed control system 10, the embodiment of the present application also provides a system redundant communication method applied to the above-mentioned controller 12. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0041] Figure 2 is a flow chart of a system redundant communication method provided according to an embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:
[0042] Step S202, receiving first messages sent by multiple communication modules in the distributed control system, wherein the multiple communication modules are respectively deployed in different networks, and the first messages carry at least the communication status of the communication modules, and the communication status is used to reflect the network status of the network where the communication modules are located;
[0043] Step S204, parsing and reorganizing the first message sent by each communication module to obtain a second message corresponding to the communication module, and sending the second message to other communication modules except the communication module, wherein each communication module is used to determine whether its own working state is the main state according to the received second message and its own communication state;
[0044] Step S206, when the communication state of the first communication module whose working state is the main state is abnormal, receive the first switching message sent by the first communication module and carrying at least the Internet Protocol IP address of the second communication module whose network state is second only to the first communication module, and parse and reorganize the first switching message to obtain the corresponding second switching message, and send the second switching message to the second communication module, wherein the second communication module is used to switch its own working state from the standby state to the main state.
[0045] The following describes each step of the system redundant communication method in conjunction with a specific implementation process.
[0046] As an optional implementation, since control systems often process sensitive data and critical operations, the access of illegal devices may introduce security vulnerabilities and even cause the system to be attacked. To this end, before receiving the first message sent by each of the multiple communication modules, the controller in the distributed control system of the embodiment of the present application can also perform a legitimacy check on each communication module according to the following steps to prevent unauthorized modules from accessing the system and ensure network and data security, including:
[0047] Step S1, receiving identity authentication request messages sent by all communication modules in the distributed control system.
[0048] Specifically, the above-mentioned identity authentication request message carries at least the identity information of the communication module, and the identity information includes but is not limited to: the Internet Protocol IP address of the communication module, the module identifier and module address of each input / output module connected to the communication module, etc., wherein:
[0049] IP address of the communication module: a digital label assigned to the communication module. In a distributed industrial control system, each communication module is usually assigned one or a group of IP addresses to facilitate other devices (such as controllers) to find and communicate with it through the network. IP addresses can be statically assigned or dynamically acquired, and are usually in the form of four groups of numbers, each between 0 and 255, separated by dots, such as 192.168.1.2.
[0050] The configuration check code of the communication module is a specific value generated after the control system configuration is completed, which is used to verify the integrity and consistency of the system configuration. When the control system is configured or the configuration is changed, the check code will be updated accordingly. During the communication process, by comparing the configuration check codes of the sender and the receiver, it can be ensured that the configuration information received by the receiver has not been tampered with or damaged, which is crucial to ensure that the control system operates as expected and maintain system security.
[0051] The module identifier and module address (also known as module ID) of each input / output module connected to the communication module: It is a unique number assigned to each input / output module in the control system, which can generally be preset by the manufacturer or set as needed during system installation or configuration to ensure that each module has a unique identity in the system. Therefore, the module identification can identify and locate each input / output module in the system.
[0052] It should be noted that the controller can also encrypt the identity information in the identity authentication request message and then transmit it, and the encryption key can be determined by the pre-agreement between the communication module and the controller, so as to ensure that the identity authentication request message can be transmitted securely during the transmission process, avoiding the identity information of the communication module from being tampered with, resulting in unreliable authentication results.
[0053] Step S2: performing identity authentication on each communication module according to the identity authentication request message sent by each communication module.
[0054] In the technical solution provided in the above step S2, the controller verifies the identity information in the identity authentication request message sent by each communication module to confirm its legitimacy and consistency.
[0055] Optionally, the controller may perform identity authentication for each communication module according to the following steps, including:
[0056] First, the identity information in the identity authentication request message sent by the communication module is matched with a preset database.
[0057] The database stores configuration information of all communication modules in the distributed control system, and the configuration information includes at least one of the following: the IP address of the communication module, the configuration verification code of the communication module, and the module identifier and module address of each input / output module connected to the communication module.
[0058] When the identity information in the identity authentication request message of any communication module successfully matches the database, it is determined that the communication module passes the identity authentication.
[0059] When the identity information in the identity authentication request message of any communication module fails to match the database, it is determined that the communication module has failed the identity authentication.
[0060] In the above authentication process, the controller performs the authentication process based on the extracted identity information to verify whether the communication module is a legitimate member in the preset configuration of the control system. Only communication modules that pass the authentication can be regarded as valid components of the network, and modules that fail the authentication will be denied access, thereby ensuring the security of the network and the integrity of the data.
[0061] Step S3, when any communication module passes the identity authentication, the module identifiers and module addresses of the input / output modules connected to the communication module in the identity authentication request message are stored in a preset database.
[0062] Specifically, for communication modules that have passed identity authentication, the controller further stores the module identifier and module address of the input / output module connected to it in the database. This storage operation provides a basis for subsequent data communication and redundancy management, ensuring that the control system accurately tracks and manages legitimate input / output module information, which is conducive to the optimal configuration of the system and the rapid location of faults.
[0063] It should be noted that the update of the database is dynamic. As the communication module is added, removed or the status changes, the controller will continue to update the stored information in the database to reflect the latest network status. This dynamic maintenance mechanism ensures the immediacy and accuracy of the control system configuration and provides a reliable information source for real-time data processing and the implementation of redundancy mechanisms.
[0064] As an optional implementation, in the technical solution provided in step S204, the controller may receive and forward the message of each communication module according to the following steps, including:
[0065] Step S2041: the controller parses and verifies the first message sent by the communication module.
[0066] The first message may be a detection message, a real-time status message, a switching message, etc. The first message sent by the communication module contains not only the communication status of the communication module, but also the first message sequence number, the module address and module identifier (module ID) of the target input / output module sending the first message.
[0067] Taking into account that the communication protocols of different networks have different requirements for message formats, in order to avoid communication errors caused by protocol incompatibility in messages transmitted by communication modules, after receiving the first message sent by a communication module, the controller can first parse the message to obtain the key information in the message, and then verify this information to ensure normal redundant communication.
[0068] Specifically, the controller can implement verification of the first message sent by each communication module according to the following steps, including:
[0069] First, the first message is parsed to identify various fields in the message to obtain at least a first message sequence number (also called a serial number) of the first message, a module address and a module identifier of a target input / output module that sends the first message;
[0070] Determine whether the module address and module identifier of the target input / output module in the first message match a preset database, wherein the database includes the module addresses and module identifiers of all input / output modules in the distributed control system connected to the communication module that has passed identity authentication;
[0071] If the module address and module identifier of the target input / output module in the first message successfully match the database, then continue to determine whether the first message sequence number is continuous with the message sequence number of the previous message, that is, determine whether the first message sequence number matches the next value of the message sequence number in the previous message, so as to prevent message loss or duplication;
[0072] If the first message sequence number of the first message is continuous with the message sequence number of the previous message, it is determined that the first message passes the verification;
[0073] If the module address and module identifier of the target input / output module in the first message fail to match the database and / or the message sequence number of the first message is not continuous with the message sequence number of the previous message (which indicates that the data packet is lost or there is a transmission error), it is determined that the first message has failed the check.
[0074] It should be noted that the above verification process is only explained as an example. The verification content involved in the verification of the first message: checking the continuity of the serial number, verifying whether the module address and identifier are consistent with the information previously stored in the database, confirming the format of the message (such as the format and serial number range of the serial number) and whether the content meets the expected communication protocol standard. The order of the verification content can be set by yourself according to the actual application scenario.
[0075] Step S2042, when the first message sent by any communication module passes the verification, the second message corresponding to the communication module is reassembled by the new first message sequence number, the module address and module identifier of the target input / output module sending the first message.
[0076] That is, once the first message passes the verification, the controller will reassemble the verified information, i.e., the new first message sequence number, the module address and the module identifier of the target input / output module, into a second message. The reassembly process usually involves encapsulating the verified information into a new message in a specific format (i.e., the message format corresponding to the protocol of the network where the other communication modules are located).
[0077] It should be noted that, during the reassembly process, the controller may also add additional control information or security authentication information to the second message to ensure that the message can be correctly identified and processed during subsequent transmission.
[0078] Step S2043: Send the second message to other communication modules except the communication module.
[0079] That is to say, the controller reassembles the second message sent by the first message sent by each communication module and sends it to other communication modules except itself, so that each communication module in the multiple communication modules can determine whether its own working status is the main status based on receiving the second message sent by the controller from other communication modules and its own communication status.
[0080] After each communication module receives the second message corresponding to other communication modules sent by the controller, it can determine whether its own working state is the main state based on the received second message and its own communication state, that is, the basis for each communication module to determine whether its own working state is the main state is the "communication state". Since the communication state reflects the network state of the network where the communication module is located, and the network state can be reflected by whether the network is faulty and the level of network fault (such as a high fault level corresponding to a network device fault, and a low fault level corresponding to a long network response event). Therefore, each communication module can determine whether its own working state is the main state according to the following rules, including:
[0081] When the communication status in the second message sent by other communication modules and received by communication module A is abnormal and the communication status of communication module A itself is normal, the communication module A decides itself to be the main communication module and updates its working status flag to the main status.
[0082] When the communication status in the second message sent by other communication modules and received by communication module A is abnormal (such as network equipment failure, response event too long, etc.), and the communication status of communication module A itself is normal, communication module A needs to make a decision based on its own fault level and the fault level of other communication modules. If the fault level of communication module A is higher, it decides itself as a backup communication module and updates its working status identifier to the backup state; if the fault level of communication module A is lower, it decides itself as the main communication module and updates its working status identifier to the main state.
[0083] After each communication module determines the communication module whose working state is the main state through the above steps, the communication module can be recorded as the first communication module. If the communication state of the first communication module whose working state is the main state is abnormal, then the first communication module will actively send a first switching message to the controller that carries at least the IP address of the second communication module whose network state is second only to the first communication module, so as to ensure the normal operation of the distributed control system. At the same time, the first communication module needs to synchronously switch its own working state from the main state to the standby state. The controller can receive and forward the first switching message according to the following process, including:
[0084] After receiving the first switching message, the controller also considers that the communication protocols of the networks where the first communication module and the second communication module are located are different. Therefore, the controller can parse and reorganize the first switching message according to the following process to obtain the corresponding second switching message, including:
[0085] Step S2061: receiving a first switching message sent by a first communication module and carrying at least an IP address of a second communication module whose network status is second only to that of the first communication module.
[0086] Step S2062: parse and verify the first switching message, wherein the first switching message also carries a second message sequence number, a switching operation instruction and a corresponding command code.
[0087] Specifically, the controller may implement verification of the first switching message according to the following steps, including:
[0088] First, the first switching message is parsed to obtain at least the second message sequence number of the first switching message and a command code corresponding to the switching operation instruction;
[0089] Determine whether the second message sequence number of the first switching message is continuous with the message sequence number of the previous message;
[0090] If the first message sequence number of the first switching message is continuous with the message sequence number of the previous message, then continue to determine whether the command code in the first switching message is valid, that is, determine whether the command code is consistent with the command code corresponding to the switching operation predefined in the preset operation command library;
[0091] If the command code in the first switching message is valid, determining that the first switching message passes the verification;
[0092] If the second message sequence number of the first switching message is not continuous with the message sequence number of the previous message and / or the command code in the first switching message is invalid, it is determined that the first switching message has failed the verification.
[0093] It should be noted that the above verification process is only used as an example for explanation, and the verification contents involved in the verification of the first switching message: checking the continuity of the sequence number, verifying the validity of the command code, confirming whether the format of the message (such as the format and sequence number range of the sequence number) and the content meet the expected communication protocol standard, etc. The order of the verification contents can be set by oneself in combination with the actual application scenario. Step S2063, when the first switching message passes the verification, the second switching message is recomposed by the new second message sequence number, the switching operation instruction and the corresponding command code.
[0094] Step S2064: Send the second switching message to the second communication module.
[0095] Finally, the second communication module that receives the second switching message can respond to the second switching message to switch its own working state from the standby state to the active state, thereby ensuring that the entire control system can work normally.
[0096] For example, Figure 3 is an optional architecture diagram of a distributed control system according to an embodiment of the present application, such as Figure 3 The system includes a controller, two APL communication modules deployed in network A and network B respectively, and multiple input / output modules, and these input / output modules are connected to the two APL communication modules respectively through the Ethernet-APL communication standard.
[0097] Therefore, the APL communication modules on both sides can first send a first message to the controller respectively, and the first message carries their respective communication status; and the controller can parse and reorganize the first messages of the APL communication modules on both sides to obtain the corresponding second message, and send the obtained second message to the APL communication module on the opposite side.
[0098] Then, the APL communication modules on both sides can each compare the communication status of the opposite APL communication module in the received second message with their own communication status, where: if the network they are in has no fault or the fault level is lower than that of the opposite APL communication module, they will mark themselves as the main APL communication module.
[0099] Then, if the communication state of the main APL communication module is abnormal, a fault occurs or the fault level is higher than that of the opposite APL communication module, the main APL communication module will send a first switching message to the controller, and at the same time, update its own mark as a standby APL communication module; and the controller can obtain a corresponding second switching message from the first switching message, and send the obtained second switching message to the opposite APL communication module;
[0100] Finally, the APL communication module on the opposite side receives the second switching message, and changes its own mark from a standby APL communication module to an active APL communication module.
[0101] In the above embodiment, the controller can manage the message information of multiple communication modules at the remote end, and each communication module can determine whether its own working state is the main state according to its own communication state and the corresponding communication state of the communication module sent by the controller to the other end; and if the communication state of the first communication module whose working state is the main state is abnormal, the controller can receive the first switching message sent by the first communication module, which at least carries the IP address of the second communication module whose network state is second only to the first communication module, and parse and reorganize the first switching message to obtain the corresponding second switching message, and send the second switching message to the second communication module, and accordingly the second communication module can switch its own working state from the standby state to the main state according to the second switching message. The entire redundant processing process uses the controller as a redundant channel manager to achieve the technical effect of ensuring the high reliability of the communication module in the system and the continuity of data communication without the need for a dedicated physical redundant channel, and achieves the purpose of improving the redundant processing capability of the distributed control system equipment and ensuring the stable operation of the system in the scenario of dispersed deployment of industrial field modules.
[0102] Example 2
[0103] According to an embodiment of the present application, a computer program product is further provided. The computer program product includes a computer program. When the computer program is executed by a processor, the system redundant communication method in Embodiment 1 is implemented.
[0104] According to an embodiment of the present application, a non-volatile storage medium is also provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the system redundant communication method in Example 1 by running the computer program.
[0105] According to an embodiment of the present application, a processor is further provided, which is used to run a computer program, wherein the system redundant communication method in Example 1 is executed when the computer program is running.
[0106] According to an embodiment of the present application, an electronic device is further provided. The electronic device includes: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the system redundant communication method in Example 1 through the computer program.
[0107] Specifically, the computer program executes the following steps when it is running: receiving a first message sent by each of the multiple communication modules in the distributed control system, wherein the multiple communication modules are respectively deployed in different networks, and the first message carries at least the communication status of the communication module, and the communication status is used to reflect the network status of the network in which the communication module is located; parsing and reorganizing the first message sent by each communication module to obtain a second message corresponding to the communication module, and sending the second message to other communication modules except the communication module, wherein each communication module is used to determine whether its own working state is the main state based on receiving the second message and its own communication state; when the communication state of the first communication module whose working state is the main state is abnormal, receiving a first switching message sent by the first communication module that carries at least the Internet Protocol IP address of the second communication module whose network state is second only to the first communication module, parsing and reorganizing the first switching message to obtain the corresponding second switching message, and sending the second switching message to the second communication module, wherein the second communication module is used to switch its own working state from the standby state to the main state.
[0108] As an optional implementation, the electronic device may be in the form of a mobile terminal, a computer terminal or a similar computing device. Figure 4 FIG. 1 shows a hardware structure block diagram of an electronic device for implementing a system redundant communication method. Figure 4 As shown, the electronic device 40 may include one or more (402a, 402b, ..., 402n are used to illustrate) processors 402 (the processor 402 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 404 for storing data, and a sending device 406 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 4 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 4 More or fewer components as shown, or with Figure 4 Different configurations shown.
[0109] It should be noted that the one or more processors 402 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the electronic device 40. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0110] The memory 404 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the system redundant communication method in the embodiment of the present application. The processor 402 executes various functional applications and data processing by running the software programs and modules stored in the memory 404, that is, to implement the vulnerability detection method of the above-mentioned application. The memory 404 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 404 may further include a memory remotely arranged relative to the processor 402, and these remote memories may be connected to the electronic device 40 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0111] The sending device 406 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the electronic device 40. In one example, the sending device 406 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the sending device 406 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0112] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 40 .
[0113] The serial numbers of the above embodiments are only for description and do not represent the advantages or disadvantages of the embodiments.
[0114] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0115] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0116] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0117] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0118] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), mobile hard disk, disk or optical disk, etc., which can store program code.
[0119] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A system redundant communication method, characterized in that: include: Receiving first messages respectively sent by a plurality of communication modules in a distributed control system, wherein the plurality of communication modules are respectively deployed in different networks, and the first messages carry at least a communication status of the communication modules, and the communication status is used to reflect a network status of the network in which the communication modules are located; Parse and reorganize the first message sent by each of the communication modules to obtain a second message corresponding to the communication module, and send the second message to other communication modules except the communication module, wherein each of the communication modules is used to determine whether its own working state is the main state according to receiving the second message and its own communication state; When the communication state of the first communication module whose working state is the main state is abnormal, a first switching message sent by the first communication module and carrying at least the Internet Protocol IP address of a second communication module whose network state is second only to the first communication module is received, and the first switching message is parsed and reorganized to obtain a corresponding second switching message, and the second switching message is sent to the second communication module, wherein the second communication module is used to switch its own working state from the standby state to the main state.
2. The method according to claim 1, characterized in that Before receiving first messages respectively sent by a plurality of communication modules in the distributed control system, the method further comprises: Receiving identity authentication request messages sent by all communication modules in the distributed control system, wherein the identity authentication request message carries at least identity information of the communication module, and the identity information includes at least one of the following: an Internet Protocol IP address of the communication module, a configuration verification code of the communication module, and a module identifier and a module address of each input / output module connected to the communication module; Performing identity authentication on each of the communication modules according to the identity authentication request message sent by each of the communication modules; In the case that any one of the communication modules passes the identity authentication, the module identifiers and module addresses of the input / output modules connected to the communication module in the identity authentication request message are stored in a preset database.
3. The method according to claim 2, characterized in that Performing identity authentication on each of the communication modules according to the identity authentication request message sent by each of the communication modules includes: For each of the communication modules, the identity information in the identity authentication request message sent by the communication module is matched with a preset database, wherein the database stores: configuration information of all communication modules in the distributed control system, and the configuration information includes at least one of the following: the IP address of the communication module, the configuration verification code of the communication module, and the module identifier and module address of each input / output module connected to the communication module; When the identity information in the identity authentication request message of any of the communication modules successfully matches the database, determining that the communication module has passed the identity authentication; When the identity information in the identity authentication request message of any one of the communication modules fails to match the database, it is determined that the communication module has failed the identity authentication.
4. The method according to claim 1, characterized in that: Parsing and reorganizing the first message sent by each of the communication modules to obtain a second message corresponding to the communication module, including: Parsing and verifying the first message sent by each of the communication modules, wherein the first message also carries a first message sequence number, a module address and a module identifier of a target input / output module sending the first message; When the first message sent by any of the communication modules passes the verification, the second message corresponding to the communication module is recomposed by the new first message sequence number, the module address and module identifier of the target input / output module sending the first message.
5. The method according to claim 4, characterized in that Parsing and verifying the first message sent by each of the communication modules, including: For each first message sent by the communication module, the first message is parsed to obtain at least a first message sequence number of the first message, a module address and a module identifier of a target input / output module sending the first message; Determining whether the module address and module identifier of the target input / output module in the first message match a preset database, wherein the database includes the module addresses and module identifiers of all input / output modules in the distributed control system connected to the communication module that has passed identity authentication; If the module address and module identifier of the target input / output module in the first message successfully match the database, continue to determine whether the first message sequence number is continuous with the message sequence number of the previous message; If the first message sequence number of the first message is continuous with the message sequence number of the previous message, determining that the first message passes the verification; If the module address and module identifier of the target input / output module in the first message fail to match the database and / or the message sequence number of the first message is not continuous with the message sequence number of the previous message, it is determined that the first message fails the verification.
6. The method according to claim 1, characterized in that Parsing and reorganizing the first switching message to obtain a corresponding second switching message includes: Parsing and verifying the first switching message, wherein the first switching message also carries a second message sequence number, a switching operation instruction and a corresponding command code; When the first switching message passes the verification, the second switching message is reassembled by a new first message sequence number, the switching operation instruction and the corresponding command code.
7. The method according to claim 6, characterized in that Parsing and verifying the first switching message includes: Parsing the first switching message to obtain at least a second message sequence number of the first switching message and a command code corresponding to the switching operation instruction; Determining whether the second message sequence number of the first switching message is continuous with the message sequence number of the previous message; If the first message sequence number of the first switching message is continuous with the message sequence number of the previous message, then continue to determine whether the command code in the first switching message is valid; If the command code in the first switching message is valid, determining that the first switching message passes the verification; If the second message sequence number of the first switching message is not continuous with the message sequence number of the previous message and / or the command code in the first switching message is invalid, it is determined that the first switching message has failed the verification.
8. A distributed control system, characterized in that: The distributed control system includes: a controller, multiple communication modules, and multiple input / output modules, and the multiple communication modules are respectively deployed in different networks, wherein: Each communication module in the plurality of communication modules is used to send a first message to the controller, wherein the first message carries at least a communication status of the communication module, and the communication status is used to reflect a network status of a network in which the communication module is located; The controller is used to parse and reorganize the first message sent by each communication module to obtain the second message corresponding to the communication module, and send the second message to other communication modules except the communication module respectively; Each communication module in the plurality of communication modules is further configured to receive a second message corresponding to other communication modules sent by the controller, and determine whether its own working state is a master state in combination with its own communication state, wherein the communication module whose working state is a master state is the first communication module; The first communication module is configured to send a first switching message carrying at least an IP address of a second communication module whose network status is second only to that of the first communication module to the controller when its own communication status is abnormal; The controller is further configured to parse and reorganize the first switching message to obtain a corresponding second switching message, and send the second switching message to the second communication module; The second communication module is used to switch its working state from a standby state to an active state.
9. A computer program product, characterized in that include: A computer program, wherein when the computer program is executed by a processor, the system redundant communication method according to any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: include: A memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the system redundant communication method according to any one of claims 1 to 7 through the computer program.
Citation Information
Patent Citations
Construction method of control system redundancy framework
CN104571040A
Method for switching DCS redundant communication module
CN107992027A
Equipment state switching control method and device, equipment and computer storage medium
CN115495289A
PAS100 control system's controller and redundant framework of bus
CN204883338U
Multi-mode communication device, method and system
WO2020109867A2