Symmetrical equivalent fault-tolerant communication method, device, system and storage medium

By adopting a symmetrically equivalent fault-tolerant communication method in the communication system and using the loopback mode for data interaction between slave devices, the problem of single point failure of the multi-node communication system in high temperature and high pressure environments is solved, and a low-cost and high-performance Fault tolerance and high scalability.

CN118646643BActive Publication Date: 2024-10-18ZHEJIANG DAHUA TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411120913.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-10-18
Estimated Expiration
2044-08-15

AI Technical Summary

Technical Problem

In the existing technology, multi-node communication systems are prone to single-point network failures in high-temperature and high-pressure environments, causing the system to fail to work properly. Moreover, the use of redundant structures to improve fault tolerance requires the addition of additional components or resources, making it impossible to ensure communication at low cost. The system is highly fault-tolerant.

Method used

By introducing a symmetrically equivalent fault-tolerant communication method in the communication system and utilizing the loopback mode between the first processing unit and the second processing unit in the slave device for data interaction, it is ensured that when the connection between the master device and the first processing unit is abnormal, , data can be communicated with the main device through the second processing unit, achieving high fault tolerance of the system.

Benefits of technology

It ensures high fault tolerance of the communication system at low cost, improves the scalability and stability of the system, reduces system maintenance costs, reduces the circuit structure of the network link, and achieves low power consumption and low heat dissipation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118646643B_ABST
    Figure CN118646643B_ABST
Patent Text Reader

Abstract

The present application relates to a symmetrically equivalent fault-tolerant communication method, device, system and storage medium, wherein the communication method is applied to a symmetrically equivalent fault-tolerant communication system, the communication system includes a master device and at least one slave device, the slave device includes a first processing unit and a second processing unit connected to each other, and the first processing unit and the second processing unit are both connected to the master device for communication; when the connection between the first processing unit and the master device is abnormal, the first processing unit is triggered to enter a loopback mode, and in the loopback mode, the data interaction between the first processing unit and the master device is performed through the second processing unit. Through this application, the problem of being unable to ensure that the communication system has high fault tolerance at a low cost is solved, and it is achieved that the communication system has high fault tolerance at a low cost, and the scalability of the system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication network technology, and in particular to a symmetrically equivalent fault-tolerant communication method, device, system and storage medium. Background Art

[0002] When a multi-node communication system is in a complex working environment, such as a high temperature or high pressure environment, after executing business services for a long time, it is easy to have problems such as single point network failure and connection failure, causing the entire system to fail to work properly.

[0003] In order to solve the above problems, the current master-slave communication system uses a redundant structure to improve the fault tolerance and stability of the system to reduce service interruptions caused by single-point network failures. However, the use of a redundant structure requires the addition of additional components or resources, and it is impossible to ensure that the communication system has high fault tolerance at a low cost.

[0004] There is currently no effective solution to the problem in related technologies that it is impossible to ensure that the communication system has high fault tolerance at a low cost. Summary of the invention

[0005] In this embodiment, a symmetrical and equivalent fault-tolerant communication method, device, system and storage medium are provided to solve the problem in the related art that it is impossible to ensure that the communication system has high fault tolerance at a low cost.

[0006] In a first aspect, a symmetrical equivalent fault-tolerant communication method is provided in this embodiment, which is applied to a symmetrical equivalent fault-tolerant communication system; the system includes a master device and at least one slave device; the slave device includes a first processing unit and a second processing unit connected to each other, and the first processing unit and the second processing unit are both communicatively connected to the master device; the method includes:

[0007] When the connection between the first processing unit and the main device is abnormal, triggering the first processing unit to enter a loopback mode;

[0008] In the loop mode, data interaction between the first processing unit and the master device is performed through the second processing unit.

[0009] In some of the embodiments, the processing unit includes a calculation module and a loopback transmission module;

[0010] When the first processing unit is in a data frame sending state, performing data interaction between the first processing unit and the master device through the second processing unit includes:

[0011] When the computing module in the first processing unit receives the source data, the computing module processes the source data to obtain a corresponding data frame;

[0012] forwarding the data frame to the loopback transmission module in the second processing unit through the loopback transmission module in the first processing unit;

[0013] The data frame is sent to the master device through the loopback transmission module in the second processing unit.

[0014] In some of the embodiments, the loopback transmission module includes a communication controller and a protocol converter;

[0015] Forwarding the data frame to the loopback transmission module in the second processing unit through the loopback transmission module in the first processing unit includes:

[0016] The communication controller in the first processing unit performs packet processing on the data frame to obtain a first data packet;

[0017] Sending the first data packet to the protocol converter in the first processing unit for processing to obtain a corresponding second data packet;

[0018] Sending the second data packet to the communication controller in the first processing unit for unpacking processing;

[0019] When the unpacked data frame does not match the local device identifier, the unpacked data frame is forwarded to the communication controller in the second processing unit.

[0020] In some of the embodiments, the loopback transmission module includes a communication controller and a protocol converter;

[0021] The method further comprises: sending the data frame to the master device through a loopback transmission module in the second processing unit, comprising:

[0022] By means of the communication controller in the second processing unit, the received data frame is packaged to obtain a corresponding third data packet;

[0023] Sending the third data packet to the protocol converter in the second processing unit for processing to obtain a corresponding fourth data packet;

[0024] When it is detected that the second processing unit is not in the loopback mode, the fourth data packet is sent to the master device.

[0025] In some of the embodiments, the processing unit includes a calculation module and a loopback transmission module;

[0026] The method of executing data interaction between the first processing unit and the main device through the second processing unit includes:

[0027] When the first processing unit is in a data frame receiving state, transmitting the data frame to be sent in the master device to the loopback transmission module in the second processing unit;

[0028] forwarding the data frame to the loopback transmission module in the first processing unit through the loopback transmission module in the second processing unit;

[0029] The data frame is sent to the calculation module in the first processing unit.

[0030] In some of the embodiments, the loopback transmission module includes a communication controller and a protocol converter;

[0031] Forwarding the data frame to the loopback transmission module in the first processing unit through the loopback transmission module in the second processing unit includes:

[0032] Processing the data frame through the protocol converter in the second processing unit to obtain a corresponding fifth data packet;

[0033] Sending the fifth data packet to the communication controller in the second processing unit for unpacking processing;

[0034] When the data frame obtained by unpacking does not match the local device identifier, the data frame obtained by unpacking is forwarded to the communication controller in the first processing unit.

[0035] In some of the embodiments, the loopback transmission module includes a communication controller and a protocol converter;

[0036] Sending the data frame to a computing module in the first processing unit includes:

[0037] By means of the communication controller in the first processing unit, the received data frame is packaged to obtain a sixth data packet;

[0038] When it is detected that the first processing unit is in the loopback mode, sending the sixth data packet to the protocol converter in the first processing unit for processing to obtain a corresponding seventh data packet;

[0039] Sending the seventh data packet to the communication controller in the first processing unit for unpacking processing;

[0040] When the unpacked data frame matches the local device identifier, the unpacked data frame is sent to the calculation module in the first processing unit.

[0041] In some embodiments, when the system includes at least a first slave device and a second slave device, the method further includes:

[0042] When the processing units in the second slave device are abnormally connected to the master device, triggering the processing units in the second slave device to enter a loopback mode;

[0043] In the loopback mode, data interaction between the processing unit in the second slave device and the master device is performed through the processing unit in the first slave device that is normally connected to the master device.

[0044] In a second aspect, a symmetrical equivalent fault-tolerant communication device is provided in this embodiment, which is applied to a symmetrical equivalent fault-tolerant communication system; the system includes a master device and at least one slave device; the slave device includes a first processing unit and a second processing unit connected to each other, and the first processing unit and the second processing unit are both communicatively connected to the master device; the device includes a control module and an interaction module;

[0045] The control module is used to trigger the first processing unit to enter a loopback mode when the connection between the first processing unit and the main device is abnormal;

[0046] The interaction module is used to perform data interaction between the first processing unit and the main device through the second processing unit in the loop mode.

[0047] In the third aspect, a symmetrical and equivalent fault-tolerant communication system is provided in this embodiment, and the system includes a master device, at least one slave device and a processor; wherein the slave device includes a first processing unit and a second processing unit connected to each other, and the first processing unit and the second processing unit are both communicatively connected to the master device; and the processor is used to execute the symmetrical and equivalent fault-tolerant communication method described in the first aspect above.

[0048] In a fourth aspect, a storage medium is provided in this embodiment, on which a computer program is stored, and when the program is executed by a processor, the symmetrical and equivalent fault-tolerant communication method described in the first aspect is implemented.

[0049] Compared with the related art, the symmetrically equivalent fault-tolerant communication method, device, system and storage medium provided in this embodiment, wherein the communication method is applied to a symmetrically equivalent fault-tolerant communication system, the system comprising a master device and at least one slave device, the slave device comprising a first processing unit and a second processing unit connected to each other, and the first processing unit and the second processing unit are both communicatively connected to the master device; by triggering the first processing unit to enter a loopback mode when the connection between the first processing unit and the master device is abnormal, and in the loopback mode, executing data interaction between the first processing unit and the master device through the second processing unit, the problem of being unable to ensure that the communication system has high fault tolerance at a low cost is solved, low-cost assurance of the communication system having high fault tolerance is achieved, and the scalability of the system is improved.

[0050] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] 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:

[0052] Figure 1 It is a hardware structure block diagram of a terminal device of a symmetrical and equivalent fault-tolerant communication method provided in an embodiment of the present application;

[0053] Figure 2 is a flow chart of a symmetrical and equivalent fault-tolerant communication method provided by an embodiment of the present application;

[0054] Figure 3 It is a structural diagram of a symmetrical and equivalent fault-tolerant communication system provided in an embodiment of the present application;

[0055] Figure 4 is a schematic diagram of data interaction between a processing unit and a main device provided in an embodiment of the present application;

[0056] Figure 5 is a schematic diagram of the internal structure of a communication controller provided by an embodiment of the present application;

[0057] Figure 6 is a schematic diagram of data interaction between a processing unit and a main device provided by another embodiment of the present application;

[0058] Figure 7 It is a flowchart of a symmetrical and equivalent fault-tolerant communication method provided by an embodiment of the present application;

[0059] Figure 8 is a flow chart of a symmetrical and equivalent fault-tolerant communication method provided by another embodiment of the present application;

[0060] Fig. 9 It is a flow chart of a symmetrical and equivalent fault-tolerant communication method provided by a preferred embodiment of the present application;

[0061] Fig.10 It is a structural block diagram of a symmetrical and equivalent fault-tolerant communication device provided in one embodiment of the present application.

[0062] In the figure: 102, processor; 104, memory; 106, transmission device; 108, input and output device; 10, control module; 20, interaction module. DETAILED DESCRIPTION

[0063] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0064] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0065] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 : is a hardware structure block diagram of a terminal of the symmetrical equivalent fault-tolerant communication method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0066] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the symmetrical equivalent fault-tolerant communication method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 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 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal 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.

[0067] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0068] In this embodiment, a symmetrical and equivalent fault-tolerant communication method is provided. Figure 2 is a flow chart of the symmetrical and equivalent fault-tolerant communication method of this embodiment, such as Figure 2 As shown, the process includes the following steps:

[0069] Step S210, when the connection between the first processing unit and the main device is abnormal, triggering the first processing unit to enter the loopback mode;

[0070] Step S220: In the loopback mode, data interaction between the first processing unit and the main device is performed through the second processing unit.

[0071] Specifically, this embodiment is applied to a symmetrically equivalent fault-tolerant communication system, such as Figure 3 As shown, the communication system includes a master device and at least one slave device, the slave device includes a first processing unit and a second processing unit connected to each other, the first processing unit and the second processing unit have the same firmware program, and the first processing unit and the second processing unit are both connected to the master device. Each processing unit in the slave device obtains source data through an analog to digital (AD) acquisition module, and the source data is processed by the algorithm inside the processing unit and transmitted to the master device through a communication network port, such as an Ethernet interface, etc., and the master device processes the received data uniformly and transmits it to the central processor through a high-speed peripheral component interconnect express (PCIe) interface to perform corresponding business processing. Accordingly, the master device transmits algorithm parameter data or upgrade firmware program data to the designated processing unit through the communication network port.

[0072] Exemplarily, a Field Programmable Gate Array (FPGA) is used as a processing unit in a slave device, and the slave device includes a first FPGA and a second FPGA, and the first FPGA and the second FPGA are connected through a high-speed interface, such as a serializer / deserializer (Serdes) interface, and the first FPGA and the second FPGA are both connected to the master device through an Ethernet interface. The first FPGA and the second FPGA can be connected in the form of a backplane connector, so that the FPGA can be removed and replaced.

[0073] When the connection between each processing unit and the main device is normal, each processing unit exchanges data with the main device through its corresponding communication network port. When an abnormal connection between any processing unit and the main device is detected, the processing unit will use the loopback mode to achieve data interaction with the main device. It should be noted that, except for abnormal connection between the processing unit and the main device, the software configuration can be customized according to application requirements, and the software configuration controls the processing unit to enter the loopback mode.

[0074] Wherein, when the connection between the first processing unit and the main device is abnormal, the first processing unit is triggered to enter the loopback mode. In the loopback mode, when the first processing unit is in the data frame sending state, the received source data is processed by the calculation module in the first processing unit to obtain the corresponding data frame, and the data frame is forwarded to the loopback transmission module in the second processing unit through the loopback transmission module in the first processing unit, and then the data frame is sent to the main device through the loopback transmission module in the second processing unit; when the first processing unit is in the data frame receiving state, the data frame to be sent in the main device is transmitted to the loopback transmission module in the second processing unit, and the data frame is forwarded to the loopback transmission module in the first processing unit through the loopback transmission module in the second processing unit, and the data frame is sent to the calculation module in the first processing unit.

[0075] The current master-slave communication system uses a redundant structure to improve the system's fault tolerance and stability, in order to reduce service interruptions caused by single-point network failures. However, the use of a redundant structure requires the addition of additional components or resources, and cannot ensure that the communication system has high fault tolerance at a low cost.

[0076] The communication method of the present application is applied to a symmetrical and equivalent fault-tolerant communication system, which includes a master device and at least one slave device, the slave device includes a first processing unit and a second processing unit connected to each other, and the first processing unit and the second processing unit are both connected to the master device in communication; when the first processing unit is abnormally connected to the master device, the first processing unit is triggered to enter the loopback mode, and in the loopback mode, the data interaction between the first processing unit and the master device is performed through the second processing unit. Based on this, a processing unit pair is provided in the slave device, and when any processing unit in the slave device cannot communicate and connect normally with the master device, the loopback mode is triggered to bypass the abnormal network connection, so that the data interaction between the processing unit and the master device is performed by another processing unit in a normal communication state, which solves the problem of being unable to ensure that the communication system has high fault tolerance at low cost, and realizes low-cost assurance that the communication system has high fault tolerance, improves the scalability and stability of the system, and reduces the system maintenance cost. In addition, by reducing the circuit structure of the network link, the overall low power consumption, low cost and low heat dissipation of the system are achieved.

[0077] The data frame sending process of the first processing unit is described and illustrated below.

[0078] In some of the embodiments, the processing unit includes a calculation module and a loopback transmission module;

[0079] When the first processing unit is in a data frame sending state, data interaction between the first processing unit and the main device is performed through the second processing unit, including the following steps:

[0080] When the computing module in the first processing unit receives the source data, it processes the source data to obtain a corresponding data frame;

[0081] Forwarding the data frame to the loopback transmission module in the second processing unit through the loopback transmission module in the first processing unit;

[0082] The data frame is sent to the main device through the loopback transmission module in the second processing unit.

[0083] Specifically, when the first processing unit enters the loop mode, if the first processing unit is in a data frame sending state, the acquired source data is input into the calculation module in the first processing unit through the data acquisition module in the first processing unit, and the source data is calculated and processed according to the algorithm inside the calculation module to obtain the corresponding data frame.

[0084] Furthermore, the data frame is sent to the loopback transmission module in the first processing unit, and the data frame is forwarded to the second processing unit through the loopback transmission module in the first processing unit. When the second processing unit is normally connected to the main device, the data frame is sent to the main device through the loopback transmission module in the second processing unit.

[0085] It should be noted that the loopback transmission module in the processing unit usually includes a communication controller and a protocol converter. The communication controller is used to perform operations such as frame packaging, unpacking and forwarding on the data frame, and the protocol converter is used to perform protocol conversion on the received data frame. Among them, after the data frame output by the calculation module in the first processing unit is processed by the communication controller and the protocol converter, if the data frame does not match the local device identifier, the data frame is forwarded to the second processing unit through the high-speed interface between the processing units. When it is detected that the second processing unit is connected to the main device normally, the data frame is processed in sequence by the communication controller and the protocol converter in the second processing unit, and the processed data frame is sent to the main device through the communication network port between the second processing unit and the main device.

[0086] Through this embodiment, when the computing module in the first processing unit receives the source data, the source data is processed to obtain the corresponding data frame, and the data frame is forwarded to the loopback transmission module in the second processing unit through the loopback transmission module in the first processing unit, and the data frame is sent to the main device through the loopback transmission module in the second processing unit. In this way, the loopback transmission module inside the first processing unit is used to bypass the abnormal network connection, and the data frame is sent from the first processing unit to the main device, thereby improving the fault tolerance and stability of the system, and at the same time, no additional redundant link structure or equipment is required.

[0087] In some of the embodiments, the loopback transmission module includes a communication controller and a protocol converter;

[0088] Forwarding the data frame to the loopback transmission module in the second processing unit through the loopback transmission module in the first processing unit includes the following steps:

[0089] The communication controller in the first processing unit performs packet processing on the data frame to obtain a first data packet;

[0090] Sending the first data packet to the protocol converter in the first processing unit for processing to obtain a corresponding second data packet;

[0091] Sending the second data packet to the communication controller in the first processing unit for unpacking processing;

[0092] When the data frame obtained by unpacking does not match the local device identifier, the data frame obtained by unpacking is forwarded to the communication controller in the second processing unit.

[0093] Specifically, when the first processing unit is in a data frame sending state, the process of the first processing unit sending the data frame to the master device is as follows: Figure 4 As shown in path 1, the path passes through the computing module, the communication controller and the protocol converter in the first processing unit in sequence, and is forwarded to the second processing unit through the communication controller. Through the data acquisition module in the first processing unit, the acquired source data is input into the computing module in the first processing unit, and the source data is calculated and processed according to the algorithm inside the computing module to obtain the corresponding data frame, and the data frame is sent to the communication controller in the first processing unit for packet processing to obtain the first data packet. Among them, the first data packet is a private protocol message format, and the message format includes the destination address, source address, frame type, frame length, payload, frame check, end character and idle character, etc.

[0094] Furthermore, the first data packet is sent to the protocol converter in the first processing unit for processing to obtain the second data packet, so that the first data packet is converted into the protocol message format preset in the protocol converter, for example, when the processing unit and the main device communicate using the Ethernet interface, it is converted into the Ethernet protocol message format accordingly. The second data packet is sent to the communication controller in the first processing unit for unpacking processing. If the unpacked data frame matches the local device identifier, the current operation is terminated; if the unpacked data frame does not match the local device identifier, the unpacked data frame is forwarded to the communication controller in the second processing unit through the high-speed interface between the first processing unit and the second processing unit. Among them, the frame sending channel in the communication controller connected to the high-speed interface is only generated when the forwarded data frame through the protocol converter is received.

[0095] It should be noted that if Figure 5As shown, the communication controller in each processing unit includes an arbitrator, a packet assembly unit, an unpacking unit and a matching forwarding unit. When the communication controller receives the data frame output by the computing module, the data frame is processed by frame arbitration, frame buffering and frame packet assembly to obtain a corresponding first data packet; the first data packet is sent to the protocol converter in the first processing unit, and the first data packet is converted into a corresponding second data packet through protocol conversion; the second data packet is sent to the communication controller in the first processing unit for unpacking, and the unpacked data frame is transmitted to the matching forwarding unit. When the unpacked data frame does not match the local device identifier, it is forwarded to the communication controller in the second processing unit.

[0096] Through this embodiment, the communication controller in the first processing unit performs packet processing on the data frame to obtain a first data packet, the first data packet is sent to the protocol converter in the first processing unit for processing to obtain a corresponding second data packet, and the second data packet is sent to the communication controller in the first processing unit for unpacking. When the unpacked data frame does not match the local device identifier, the unpacked data frame is forwarded to the communication controller in the second processing unit, so as to utilize the communication controller and the protocol converter to achieve normal sending of the data frame.

[0097] In some of the embodiments, the loopback transmission module includes a communication controller and a protocol converter;

[0098] The data frame is sent to the master device through the loopback transmission module in the second processing unit, including the following steps:

[0099] The communication controller in the second processing unit performs packet processing on the received data frame to obtain a corresponding third data packet;

[0100] Sending the third data packet to the protocol converter in the second processing unit for processing to obtain a corresponding fourth data packet;

[0101] When it is detected that the second processing unit is not in the loopback mode, a fourth data packet is sent to the master device.

[0102] Specifically, Figure 4 As shown in path 1, the path passes through the communication controller, the protocol converter, the transmission channel between the protocol converter and the communication network port in the second processing unit in sequence. When the communication controller in the second processing unit receives the data frame sent by the first processing unit, the data frame is processed by frame arbitration, frame buffering, and frame grouping to obtain a corresponding third data packet, and the third data packet is sent to the protocol converter in the second processing unit, and the third data packet is converted by protocol to obtain a corresponding fourth data packet.

[0103] Furthermore, when it is detected that the second processing unit is not in loop mode, that is, the second processing unit communicates normally with the main device, the fourth data packet is sent to the main device through the sending channel between the protocol converter and the communication network port, thereby completing the data frame sending from the first processing unit to the main device.

[0104] It should be noted that, since the second processing unit is normally connected to the main device, the process of the second processing unit sending the data frame is as follows: Figure 4 As shown in path 3, the path passes through the computing module, the communication controller, the protocol converter, and the transmission channel between the protocol converter and the communication network port in the second processing unit. When the second processing unit sends a data frame to the main device, the communication controller in the second processing unit receives the data frame output by the computing module, and the data frame is processed by frame arbitration, frame buffering, and frame grouping to obtain a corresponding first data packet, and the first data packet is sent to the protocol converter in the second processing unit. The first data packet is converted by the protocol to obtain a corresponding second data packet, and then the second data packet is sent to the main device through the transmission channel between the protocol converter and the communication network port.

[0105] Through this embodiment, the communication controller in the second processing unit performs packet processing on the received data frame to obtain a corresponding third data packet, and the third data packet is sent to the protocol converter in the second processing unit for processing to obtain a corresponding fourth data packet. When it is detected that the second processing unit is not in the loop mode, the fourth data packet is sent to the main device, thereby realizing the data frame sending of the first processing unit.

[0106] The data frame receiving process of the first processing unit is described and illustrated below.

[0107] In some of the embodiments, the processing unit includes a calculation module and a loopback transmission module;

[0108] The data interaction between the first processing unit and the main device is performed by the second processing unit, including the following steps:

[0109] When the first processing unit is in a data frame receiving state, the data frame to be sent in the master device is transmitted to the loopback transmission module in the second processing unit;

[0110] forwarding the data frame to the loopback transmission module in the first processing unit through the loopback transmission module in the second processing unit;

[0111] The data frame is sent to the computing module in the first processing unit.

[0112] Specifically, when the first processing unit enters the loopback mode, if the first processing unit is in a data frame receiving state, the data frame to be sent in the master device is transmitted to the loopback transmission module in the second processing unit, and the data frame is forwarded to the loopback transmission module in the first processing unit through the high-speed interface between the first processing unit and the second processing unit, and the data frame is sent to the calculation module in the first processing unit. The data frame to be sent includes but is not limited to algorithm parameter data and upgrade firmware program data.

[0113] It should be noted that the loopback transmission module in the processing unit usually includes a communication controller and a protocol converter, the communication controller is used to perform frame packaging, unpacking and forwarding operations on the data frame, and the protocol converter is used to perform protocol conversion on the received data frame. In this embodiment, the data frame to be sent is transmitted to the second processing unit through the communication network port between the main device and the second processing unit, the data frame is processed in sequence by the protocol converter and the communication controller in the second processing unit, and the processed data frame is forwarded to the first processing unit through the high-speed interface between the processing units. After the data frame is processed by the communication controller and the protocol converter in the first processing unit, it is sent to the computing module in the first processing unit to complete the reception of the data frame.

[0114] Through this embodiment, when the first processing unit is in a data frame receiving state, the data frame to be sent in the main device is transmitted to the loopback transmission module in the second processing unit, and the data frame is forwarded to the loopback transmission module in the first processing unit through the loopback transmission module in the second processing unit, and the data frame is sent to the calculation module in the first processing unit. In this way, when the connection between the first processing unit and the main device is abnormal, the data frame reception of the first processing unit is realized, the fault tolerance and stability of the communication system are improved, and no additional redundant link structure or equipment is required.

[0115] In some of the embodiments, the loopback transmission module includes a communication controller and a protocol converter;

[0116] Forwarding the data frame to the loopback transmission module in the first processing unit through the loopback transmission module in the second processing unit includes the following steps:

[0117] Processing the data frame through a protocol converter in the second processing unit to obtain a corresponding fifth data packet;

[0118] Sending the fifth data packet to the communication controller in the second processing unit for unpacking processing;

[0119] When the data frame obtained by unpacking does not match the local device identifier, the data frame obtained by unpacking is forwarded to the communication controller in the first processing unit.

[0120] Specifically, when the first processing unit is in a data frame receiving state, the process of the first processing unit receiving the data frame is as follows: Figure 4 As shown in the middle path 2, the path passes through the receiving channel between the protocol converter and the communication network port, the protocol converter and the communication controller in the second processing unit in sequence. The data frame to be sent is transmitted to the protocol converter through the receiving channel between the protocol converter in the second processing unit and the communication network port, and the received data frame is processed by the protocol converter to obtain the corresponding fifth data packet, so that the data frame is converted into the protocol message format preset in the protocol converter, for example, when the processing unit communicates with the main device using the Ethernet interface, it is converted into the Ethernet protocol message format accordingly.

[0121] Further, the fifth data packet is sent to the communication controller in the second processing unit for unpacking. If the unpacked data frame matches the local device identifier, the current operation is terminated; if the unpacked data frame does not match the local device identifier, the unpacked data frame is forwarded to the communication controller in the first processing unit through the high-speed interface between the first processing unit and the second processing unit. The frame transmission channel in the communication controller connected to the high-speed interface is generated only when a data frame forwarded by the protocol converter is received.

[0122] Through this embodiment, the data frame is processed by the protocol converter in the second processing unit to obtain the corresponding fifth data packet, and the fifth data packet is sent to the communication controller in the second processing unit for unpacking. When the unpacked data frame does not match the local device identifier, the unpacked data frame is forwarded to the communication controller in the first processing unit, thereby utilizing the second processing unit to realize the forwarding of the data frame.

[0123] In some of the embodiments, the loopback transmission module includes a communication controller and a protocol converter;

[0124] Sending the data frame to the computing module in the first processing unit includes the following steps:

[0125] By means of the communication controller in the first processing unit, the received data frame is packaged to obtain a sixth data packet;

[0126] When it is detected that the first processing unit is in the loopback mode, the sixth data packet is sent to the protocol converter in the first processing unit for processing to obtain a corresponding seventh data packet;

[0127] Sending the seventh data packet to the communication controller in the first processing unit for unpacking processing;

[0128] When the unpacked data frame matches the local device identifier, the unpacked data frame is sent to the calculation module in the first processing unit.

[0129] Specifically, Figure 4 As shown in path 2, the path passes through the communication controller and the protocol converter in the first processing unit in sequence, and is sent to the computing module through the communication controller. When the communication controller in the first processing unit receives the data frame, the data frame is packaged to obtain a sixth data packet. If it is detected that the first processing unit is in loop mode, the sixth data packet is sent to the protocol converter in the first processing unit for processing to obtain a corresponding seventh data packet.

[0130] Furthermore, the seventh data packet is sent to the communication controller in the first processing unit for unpacking, and it is determined whether the unpacked data frame matches the local device identifier. If the unpacked data frame matches the local device identifier, the unpacked data frame is sent to the computing module in the first processing unit to complete the reception of the data frame.

[0131] It should be noted that if Figure 5 As shown, the communication controller in each processing unit includes an arbitrator, a packet assembly unit, an unpacking unit and a matching forwarding unit. When the communication controller receives a data frame forwarded by the second processing unit, the data frame is processed by frame arbitration, frame buffering, and frame packet assembly to obtain a corresponding sixth data packet; the sixth data packet is sent to the protocol converter in the first processing unit, and the first data packet is converted by protocol to obtain a corresponding seventh data packet; the seventh data packet is sent to the communication controller in the first processing unit for unpacking, and the unpacked data frame is transmitted to the matching forwarding unit, and when the unpacked data frame matches the local device identifier, it is sent to the computing module in the first processing unit.

[0132] In addition, the second processing unit is connected to the main device normally, and the process of the second processing unit receiving the data frame is as follows: Figure 4 As shown in the path 4, the path passes through the receiving channel between the protocol converter and the communication network port, the protocol converter, the communication controller and the computing module in the second processing unit in sequence. When the second processing unit receives the data frame sent by the main device, the data frame to be sent in the main device is transmitted to the protocol converter for processing through the receiving channel between the protocol converter and the communication network port in the second processing unit to obtain the corresponding fifth data packet, and the fifth data packet is sent to the communication controller in the second processing unit for unpacking processing. When the unpacked data frame matches the local device identifier, the unpacked data frame is sent to the computing module in the second processing unit.

[0133] Through this embodiment, the communication controller in the first processing unit performs packet processing on the received data frame to obtain a sixth data packet. When it is detected that the first processing unit is in loopback mode, the sixth data packet is sent to the protocol converter in the first processing unit for processing to obtain a corresponding seventh data packet. The seventh data packet is sent to the communication controller in the first processing unit for unpacking. When the unpacked data frame matches the local device identifier, the unpacked data frame is sent to the computing module in the first processing unit, thereby realizing the reception of the data frame.

[0134] In some of the embodiments, when the system includes at least a first slave device and a second slave device, the communication method further includes the following steps:

[0135] When the processing units in the second slave device are abnormally connected to the master device, triggering the processing units in the second slave device to enter the loopback mode;

[0136] In the loopback mode, data interaction between the processing unit in the second slave device and the master device is performed through the processing unit in the first slave device that is normally connected to the master device.

[0137] Specifically, when the communication system includes at least a first slave device and a second slave device, the first slave device and the second slave device are connected. If the processing units in the second slave devices are abnormally connected to the master device, the processing units in the second slave devices are triggered to enter the loopback mode. In the loopback mode, data interaction between the processing units in the second slave device and the master device is executed through the processing units in the first slave device that are normally connected to the master device.

[0138] Among them, Figure 6 As shown in FIG. 1 , the first processing unit in the first slave device is connected to the master device normally, the second processing unit in the first slave device and the third processing unit and the fourth processing unit in the second slave device are all abnormally connected to the master device, and the second processing unit is connected to the third processing unit via a high-speed interface. Taking the data interaction between the fourth processing unit and the master device as an example, the process of the fourth processing unit sending a data frame is as follows: Figure 6 As shown in path A, the path passes through the computing module, the communication controller and the protocol converter in the fourth processing unit in sequence, and is forwarded to the third processing unit through the communication controller; passes through the communication controller and the protocol converter in the third processing unit in sequence, and is forwarded to the second processing unit through the communication controller; passes through the communication controller and the protocol converter in the second processing unit in sequence, and is forwarded to the first processing unit through the communication controller; passes through the communication controller, the protocol converter, the sending channel between the protocol converter and the communication network port in the first processing unit in sequence.

[0139] When the fourth processing unit is in a data frame sending state, the acquired source data is input into a calculation module in the fourth processing unit through a data acquisition module in the fourth processing unit, the source data is calculated and processed according to an algorithm inside the calculation module to obtain a corresponding data frame, and the data frame is sent to a communication controller in the fourth processing unit for packet assembly processing to obtain a first data packet.

[0140] Furthermore, the first data packet is sent to the protocol converter in the fourth processing unit for processing to obtain a second data packet, and the second data packet is sent to the communication controller in the fourth processing unit for unpacking. If the unpacked data frame does not match the local device identifier, the unpacked data frame is forwarded to the third processing unit through the high-speed interface between the third processing unit and the fourth processing unit.

[0141] When the communication controller in the third processing unit receives the data frame, the data frame is processed by the frame arbitration, frame buffering, and frame grouping of the communication controller to obtain the corresponding third data packet, and the third data packet is sent to the protocol converter in the second processing unit, and the third data packet is converted by the protocol to obtain the corresponding fourth data packet. At this time, if it is detected that the third processing unit is in loopback mode, the fourth data packet is sent to the communication controller, and the fourth data packet is unpacked and matched and forwarded, so that the unpacked data frame is forwarded to the second processing unit through the high-speed interface between the second processing unit and the third processing unit, and the data frame processing method in the third processing unit is executed in the second processing unit, so that the data frame is further forwarded to the first processing unit that is normally connected to the main device.

[0142] When the first processing unit receives the data frame forwarded by the second processing unit, the data frame is processed in turn by the communication controller and the protocol converter in the first processing unit, and the processed data frame is sent to the main device through the sending channel between the protocol converter and the communication network port.

[0143] In addition, the process of receiving the data frame by the fourth processing unit is as follows: Figure 6 As shown in path B, in the first processing unit, it passes through the receiving channel, protocol converter and communication controller between the protocol converter and the communication network port in sequence; in the second processing unit, it passes through the communication controller and protocol converter in sequence, and is forwarded to the third processing unit through the communication controller; in the third processing unit, it passes through the communication controller and protocol converter in sequence, and is forwarded to the fourth processing unit through the communication controller; in the fourth processing unit, it passes through the communication controller and protocol converter in sequence, and is sent to the computing module through the communication controller.

[0144] When the fourth processing unit is in a data frame receiving state, the data frame to be sent is transmitted to the protocol converter in the first processing unit through the receiving channel between the protocol converter and the communication network port, and the received data frame is processed by the protocol converter to obtain a corresponding fifth data packet. The fifth data packet is sent to the communication controller in the first processing unit for unpacking. If the unpacked data frame does not match the local device identifier, the unpacked data frame is forwarded to the communication controller in the second processing unit through the high-speed interface between the first processing unit and the second processing unit.

[0145] When the communication controller in the second processing unit receives the data frame, it performs packet processing on the data frame to obtain a sixth data packet. If it is detected that the second processing unit is in loopback mode, the sixth data packet is sent to the protocol converter in the second processing unit for processing to obtain the corresponding seventh data packet, and the seventh data packet is sent to the communication controller in the second processing unit for unpacking processing to determine whether the unpacked data frame matches the local device identifier. If the unpacked data frame does not match the local device identifier, the unpacked data frame is sent to the communication controller in the third processing unit through the high-speed interface between the second processing unit and the third processing unit, and the data frame processing method in the second processing unit is executed in the third processing unit, so that the data frame is further sent to the fourth processing unit.

[0146] Afterwards, when the fourth processing unit receives the data frame, the data frame is processed by the communication controller and the protocol converter in the fourth processing unit to determine whether the processed data frame matches the local device identifier. If the processed data frame matches the local device identifier, the data frame is sent to the computing module in the fourth processing unit to complete the data frame reception by the fourth processing unit.

[0147] It should be noted that, since the first processing unit is normally connected to the main device, the process of the first processing unit sending the data frame is as follows: Figure 6 As shown in path C, the path passes through the computing module, the communication controller, the protocol converter, and the transmission channel between the protocol converter and the communication network port in the first processing unit. When the first processing unit sends a data frame to the main device, the communication controller in the first processing unit receives the data frame output by the computing module, and the data frame is processed by frame arbitration, frame buffering, and frame grouping to obtain a corresponding first data packet, and the first data packet is sent to the protocol converter in the first processing unit. The first data packet is converted by the protocol to obtain a corresponding second data packet, and then the second data packet is sent to the main device through the transmission channel between the protocol converter and the communication network port. In addition, the process of the second processing unit receiving the data frame is as follows: Figure 6As shown in the path D, the path passes through the receiving channel between the protocol converter and the communication network port, the protocol converter, the communication controller and the computing module in the first processing unit in sequence. When the first processing unit receives the data frame sent by the main device, the data frame to be sent in the main device is transmitted to the protocol converter for processing through the receiving channel between the protocol converter and the communication network port in the first processing unit to obtain the corresponding fifth data packet, and the fifth data packet is sent to the communication controller in the first processing unit for unpacking processing. When the unpacked data frame matches the local device identifier, the unpacked data frame is sent to the computing module in the first processing unit.

[0148] Through this embodiment, when the processing units in the second slave device are abnormally connected to the master device, the processing units in the second slave device are triggered to enter the loopback mode, and in the loopback mode, the data interaction between the processing units in the second slave device and the master device is performed through the processing units in the first slave device that are normally connected to the master device. Therefore, when most links are abnormal, the system can still use a small number of normal links or even a normal link to achieve normal operation of the system, thereby improving the fault tolerance and scalability of the system. At the same time, the computing power of the processing units can be improved by expanding multiple slave devices without worrying about the physical interface control capability of the master device.

[0149] Figure 7 is a flow chart of the symmetrical and equivalent fault-tolerant communication method of this embodiment, such as Figure 7 As shown, in the case where the first processing unit sends a data frame to the main device, the specific process of the communication method includes the following steps:

[0150] When the first processing unit is in a data frame sending state, the acquired source data is input into the calculation module in the first processing unit through the data acquisition module in the first processing unit, and the source data is calculated and processed according to the algorithm inside the calculation module to obtain the corresponding data frame. The data frame is sent to the communication controller in the first processing unit, and the data frame is subjected to frame arbitration, frame buffering, and frame packetization processing to obtain a first data packet S701, and the first data packet is sent to the protocol converter in the first processing unit for processing to obtain a second data packet S702.

[0151] Furthermore, the second data packet is sent to the communication controller in the first processing unit for unpacking processing S703, and it is determined whether the unpacked data frame matches the local device identifier S704. If the unpacked data frame matches the local device identifier, the current operation S705 is terminated; if the unpacked data frame does not match the local device identifier, the unpacked data frame is forwarded to the communication controller in the second processing unit S706 through the high-speed interface between the first processing unit and the second processing unit.

[0152] When the communication controller in the second processing unit receives the data frame sent by the first processing unit, the data frame is processed by frame arbitration, frame buffering, and frame grouping to obtain the corresponding third data packet S707, and the third data packet is sent to the protocol converter in the second processing unit, and the third data packet is converted by protocol to obtain the corresponding fourth data packet S708. Afterwards, when it is detected that the second processing unit communicates normally with the main device, the fourth data packet is sent to the main device through the transmission channel between the protocol converter and the communication network port S709.

[0153] Figure 8 is a flow chart of the symmetrical and equivalent fault-tolerant communication method of this embodiment, such as Figure 8 As shown, in the case where the first processing unit receives a data frame sent by the master device, the specific process of the communication method includes the following steps:

[0154] When the first processing unit is in a data frame receiving state, the data frame to be sent is transmitted to the protocol converter S801 in the second processing unit through the receiving channel between the protocol converter in the second processing unit and the communication network port, and the received data frame is processed by the protocol converter to obtain the corresponding fifth data packet S802.

[0155] Further, the fifth data packet is sent to the communication controller in the second processing unit for unpacking processing S803, and it is determined whether the unpacked data frame matches the local device identifier S804. If the unpacked data frame matches the local device identifier, the current operation S805 is terminated; if the unpacked data frame does not match the local device identifier, the unpacked data frame is forwarded to the communication controller in the first processing unit S806 through the high-speed interface between the first processing unit and the second processing unit.

[0156] When the communication controller in the first processing unit receives the data frame, it performs frame arbitration, frame buffering, and frame grouping processing on the data frame to obtain a sixth data packet S807, and when it is detected that the first processing unit is in loopback mode, the sixth data packet is sent to the protocol converter in the first processing unit for processing to obtain a corresponding seventh data packet S808. The seventh data packet is sent to the communication controller in the first processing unit for unpacking processing, and it is determined whether the unpacked data frame matches the local device identifier. If the unpacked data frame matches the local device identifier, the unpacked data frame is sent to the calculation module S809 in the first processing unit.

[0157] The present embodiment is described and illustrated below through preferred embodiments.

[0158] Fig. 9 is a flow chart of the symmetrical and equivalent fault-tolerant communication method of this preferred embodiment, such as Fig. 9As shown, the symmetrically equivalent fault-tolerant communication method includes the following steps:

[0159] Step S910, when the connection between the first processing unit and the main device is abnormal, triggering the first processing unit to enter the loopback mode;

[0160] Step S920, when the first processing unit is in a data frame sending state, the received source data is processed by a calculation module in the first processing unit to obtain a corresponding data frame;

[0161] Step S930, forwarding the data frame to the loopback transmission module in the second processing unit through the loopback transmission module in the first processing unit;

[0162] Step S940, sending the data frame to the master device through the loopback transmission module in the second processing unit;

[0163] Step S950, when the first processing unit is in a data frame receiving state, the data frame to be sent in the master device is transmitted to the loopback transmission module in the second processing unit;

[0164] Step S960, forwarding the data frame to the loopback transmission module in the first processing unit through the loopback transmission module in the second processing unit;

[0165] Step S970: sending the data frame to the calculation module in the first processing unit.

[0166] Through this embodiment, when the connection between the first processing unit and the main device is abnormal, the first processing unit is triggered to enter the loopback mode. When the first processing unit is in the data frame sending state, the received source data is processed to obtain the corresponding data frame. The data frame is forwarded to the loopback transmission module in the second processing unit through the loopback transmission module in the first processing unit, and the data frame is sent to the main device through the loopback transmission module in the second processing unit. In this way, the loopback transmission module is used to bypass the abnormal network connection, so that the first processing unit sends the data frame to the main device.

[0167] Moreover, when the first processing unit is in a data frame receiving state, the data frame to be sent in the main device is transmitted to the loopback transmission module in the second processing unit, and the data frame is forwarded to the loopback transmission module in the first processing unit through the loopback transmission module in the second processing unit, and the data frame is sent to the computing module in the first processing unit, so that the second processing unit is used to forward the data frame, thereby realizing the data frame receiving process of the first processing unit, solving the problem of being unable to ensure that the communication system has high fault tolerance at low cost, achieving low cost to ensure that the communication system has high fault tolerance, and improving the scalability and stability of the system.

[0168] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a 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.

[0169] In this embodiment, a symmetrical and equivalent fault-tolerant communication device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. The terms "module", "unit", "subunit" and the like used below can implement a combination of software and / or hardware of predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0170] Fig.10 is a structural block diagram of a symmetrical and equivalent fault-tolerant communication device of this embodiment, such as Fig.10 As shown, the device includes: a control module 10 and an interaction module 20;

[0171] The control module 10 is used to trigger the first processing unit to enter the loopback mode when the connection between the first processing unit and the main device is abnormal;

[0172] The interaction module 20 is used to perform data interaction between the first processing unit and the main device through the second processing unit in the loopback mode.

[0173] The device provided by this embodiment is applied to a symmetrically equivalent fault-tolerant communication system, wherein the communication system includes a master device and at least one slave device, wherein the slave device includes a first processing unit and a second processing unit connected to each other, and both the first processing unit and the second processing unit are communicatively connected to the master device; when the connection between the first processing unit and the master device is abnormal, the first processing unit is triggered to enter a loopback mode, and in the loopback mode, data interaction between the first processing unit and the master device is performed through the second processing unit, thereby solving the problem of being unable to ensure that the communication system has high fault tolerance at a low cost, achieving low-cost ensuring that the communication system has high fault tolerance, and improving the scalability of the system.

[0174] In some of the embodiments, the interaction module 20 is also used to process the source data to obtain the corresponding data frame when the computing module in the first processing unit receives the source data; forward the data frame to the loop transmission module in the second processing unit through the loop transmission module in the first processing unit; and send the data frame to the main device through the loop transmission module in the second processing unit.

[0175] In some of the embodiments, the interaction module 20 is also used to perform packet processing on the data frame through the communication controller in the first processing unit to obtain a first data packet; send the first data packet to the protocol converter in the first processing unit for processing to obtain a corresponding second data packet; send the second data packet to the communication controller in the first processing unit for unpacking; when the unpacked data frame does not match the local device identifier, forward the unpacked data frame to the communication controller in the second processing unit.

[0176] In some of the embodiments, the interaction module 20 is also used to perform packet processing on the received data frames through the communication controller in the second processing unit to obtain a corresponding third data packet; send the third data packet to the protocol converter in the second processing unit for processing to obtain a corresponding fourth data packet; and send the fourth data packet to the main device when it is detected that the second processing unit is not in loop mode.

[0177] In some of the embodiments, the interaction module 20 is also used to transmit the data frame to be sent in the main device to the loop transmission module in the second processing unit when the first processing unit is in a data frame receiving state; forward the data frame to the loop transmission module in the first processing unit through the loop transmission module in the second processing unit; and send the data frame to the computing module in the first processing unit.

[0178] In some of the embodiments, the interaction module 20 is also used to process the data frame through the protocol converter in the second processing unit to obtain a corresponding fifth data packet; send the fifth data packet to the communication controller in the second processing unit for unpacking; when the unpacked data frame does not match the local device identifier, forward the unpacked data frame to the communication controller in the first processing unit.

[0179] In some of the embodiments, the interaction module 20 is also used to perform packet processing on the received data frame through the communication controller in the first processing unit to obtain a sixth data packet; when it is detected that the first processing unit is in loop mode, the sixth data packet is sent to the protocol converter in the first processing unit for processing to obtain a corresponding seventh data packet; the seventh data packet is sent to the communication controller in the first processing unit for unpacking; when the unpacked data frame matches the local device identifier, the unpacked data frame is sent to the computing module in the first processing unit.

[0180] In some of the embodiments, the interaction module 20 is also used to trigger the processing units in the second slave device to enter a loopback mode when the processing units in the second slave device are abnormally connected to the master device; in the loopback mode, data interaction between the processing units in the second slave device and the master device is performed through the processing units in the first slave device that are normally connected to the master device.

[0181] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0182] In this embodiment, a symmetrically equivalent fault-tolerant communication system is provided, the system includes a master device, at least one slave device and a processor; wherein the slave device includes a first processing unit and a second processing unit connected to each other, and the first processing unit and the second processing unit are both communicatively connected to the master device; the processor is used to execute the symmetrically equivalent fault-tolerant communication method of the first aspect mentioned above.

[0183] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.

[0184] In addition, in combination with the symmetrical equivalent fault-tolerant communication method provided in the above embodiment, a storage medium can also be provided in this embodiment to implement the method. The storage medium stores a computer program; when the computer program is executed by the processor, any one of the symmetrical equivalent fault-tolerant communication methods in the above embodiment is implemented.

[0185] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.

[0186] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.

[0187] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.

[0188] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A symmetrical equivalent fault-tolerant communication method, characterized in that: A symmetrically equivalent fault-tolerant communication system is provided; the system comprises a master device and at least one slave device; the slave device comprises a first processing unit and a second processing unit connected to each other, and the first processing unit and the second processing unit are both communicatively connected to the master device; wherein the processing unit comprises a computing module and a loopback transmission module, and the loopback transmission module comprises a communication controller and a protocol converter; the method comprises: When the connection between the first processing unit and the main device is abnormal, triggering the first processing unit to enter a loopback mode; In the loopback mode, data interaction between the first processing unit and the master device is performed through the second processing unit; Wherein, when the first processing unit is in a data frame sending state, the data interaction between the first processing unit and the master device is performed through the second processing unit, including: when the computing module in the first processing unit receives the source data, the source data is processed to obtain the corresponding data frame; the data frame is forwarded to the loopback transmission module in the second processing unit through the loopback transmission module in the first processing unit; the data frame is sent to the master device through the loopback transmission module in the second processing unit; Among them, forwarding the data frame to the loop transmission module in the second processing unit through the loop transmission module in the first processing unit includes: performing packet processing on the data frame through the communication controller in the first processing unit to obtain a first data packet; sending the first data packet to the protocol converter in the first processing unit for processing to obtain a corresponding second data packet; sending the second data packet to the communication controller in the first processing unit for unpacking; when the unpacked data frame does not match the local device identifier, forwarding the unpacked data frame to the communication controller in the second processing unit; when the unpacked data frame matches the local device identifier, ending the current operation.

2. The symmetrical equivalent fault-tolerant communication method according to claim 1, characterized in that: The loopback transmission module includes a communication controller and a protocol converter; The method further comprises: sending the data frame to the master device through a loopback transmission module in the second processing unit, comprising: By means of the communication controller in the second processing unit, the received data frame is packaged to obtain a corresponding third data packet; Sending the third data packet to the protocol converter in the second processing unit for processing to obtain a corresponding fourth data packet; When it is detected that the second processing unit is not in the loopback mode, the fourth data packet is sent to the master device.

3. The symmetrical equivalent fault-tolerant communication method according to claim 1, characterized in that: The processing unit includes a calculation module and a loop transmission module; The method of executing data interaction between the first processing unit and the main device through the second processing unit includes: When the first processing unit is in a data frame receiving state, transmitting the data frame to be sent in the master device to the loopback transmission module in the second processing unit; forwarding the data frame to the loopback transmission module in the first processing unit through the loopback transmission module in the second processing unit; The data frame is sent to the calculation module in the first processing unit.

4. The symmetrical equivalent fault-tolerant communication method according to claim 3, characterized in that: The loopback transmission module includes a communication controller and a protocol converter; Forwarding the data frame to the loopback transmission module in the first processing unit through the loopback transmission module in the second processing unit includes: Processing the data frame through the protocol converter in the second processing unit to obtain a corresponding fifth data packet; Sending the fifth data packet to the communication controller in the second processing unit for unpacking processing; When the data frame obtained by unpacking does not match the local device identifier, the data frame obtained by unpacking is forwarded to the communication controller in the first processing unit.

5. The symmetrical equivalent fault-tolerant communication method according to claim 3, characterized in that: The loopback transmission module includes a communication controller and a protocol converter; Sending the data frame to a computing module in the first processing unit includes: By means of the communication controller in the first processing unit, the received data frame is packaged to obtain a sixth data packet; When it is detected that the first processing unit is in the loopback mode, sending the sixth data packet to the protocol converter in the first processing unit for processing to obtain a corresponding seventh data packet; Sending the seventh data packet to the communication controller in the first processing unit for unpacking processing; When the unpacked data frame matches the local device identifier, the unpacked data frame is sent to the calculation module in the first processing unit.

6. The symmetrical equivalent fault-tolerant communication method according to claim 1, characterized in that: In the case where the system includes at least a first slave device and a second slave device, the method further includes: When the processing units in the second slave device are abnormally connected to the master device, triggering the processing units in the second slave device to enter a loopback mode; In the loopback mode, data interaction between the processing unit in the second slave device and the master device is performed through the processing unit in the first slave device that is normally connected to the master device.

7. A symmetrical equivalent fault-tolerant communication device, characterized in that: A symmetrically equivalent fault-tolerant communication system; the system comprises a master device and at least one slave device; the slave device comprises a first processing unit and a second processing unit connected to each other, and the first processing unit and the second processing unit are both communicatively connected to the master device; wherein the processing unit comprises a computing module and a loopback transmission module, and the loopback transmission module comprises a communication controller and a protocol converter; the device comprises a control module and an interaction module; The control module is used to trigger the first processing unit to enter a loopback mode when the connection between the first processing unit and the main device is abnormal; The interaction module is used to perform data interaction between the first processing unit and the master device through the second processing unit in the loopback mode; The interaction module is further configured to process the source data to obtain a corresponding data frame when the computing module in the first processing unit receives the source data; forward the data frame to the loopback transmission module in the second processing unit through the loopback transmission module in the first processing unit; and send the data frame to the master device through the loopback transmission module in the second processing unit; The interaction module is also used to perform packet processing on the data frame through the communication controller in the first processing unit to obtain a first data packet; send the first data packet to the protocol converter in the first processing unit for processing to obtain a corresponding second data packet; send the second data packet to the communication controller in the first processing unit for unpacking; when the unpacked data frame does not match the local device identifier, forward the unpacked data frame to the communication controller in the second processing unit; when the unpacked data frame matches the local device identifier, end the current operation.

8. A symmetrical equivalent fault-tolerant communication system, characterized in that: The system includes a master device, at least one slave device and a processor; wherein the slave device includes a first processing unit and a second processing unit connected to each other, and the first processing unit and the second processing unit are both communicatively connected to the master device; the processing unit includes a computing module and a loopback transmission module, and the loopback transmission module includes a communication controller and a protocol converter; the processor is used to execute the symmetrically equivalent fault-tolerant communication method described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the symmetrically equivalent fault-tolerant communication method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method, apparatus and device for confirming primary and standby states

    CN107968718A

  • Fault detection method, device and system, equipment and medium

    CN112685266A

  • Protection switching method and device, electronic equipment and storage medium

    CN116016139A

  • Bi-directional line switched ring with uninterrupted service restoration

    US20020191538A1