Data transmission method and device
By completing 2-get 2 verification inside the sending end of the rail transit system and sending only one set of valid data, the problem of increasing communication data volume caused by 2-get 2 technology is solved, the real-time and security of the system are improved, and communication is reduced. Bus bandwidth occupancy.
Patent Information
- Application Number
- CN202110722166.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-28
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2041-06-28
AI Technical Summary
In the prior art, although the 2-take 2 technology is used in the rail transit system, it can effectively prevent the risk caused by random failures, but it causes the amount of communication data on the communication bus to multiply, affecting the real-time and efficiency of the system.
Complete 2-get 2 verification inside the sending end, and only one set of valid data is sent, data communication is carried out through Ethercat technology, the amount of communication data is reduced, and verification is carried out on the receiving end to ensure the security and real-time nature of the system.
By completing 2-checking and 2 verification inside the sending end, the amount of communication data is reduced, the real-time nature of the system is improved, and the occupancy rate of communication bus bandwidth is effectively reduced, the number of supported sites is increased, and the system security is ensured. .
Smart Images

Figure CN113612574B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a data transmission method and device. Background Art
[0002] In recent years, with the development of rail transit technology, rail transit safety has received more and more attention, and the safety requirements of rail transit safety-related systems have also become higher and higher. A very important part of the safety requirements is the safety integrity requirements, which can reflect the ability of safety-related systems to perform safety functions. Safety integrity includes random failure integrity. Although probability calculations and assumptions are made for the quantitative evaluation of random failure integrity, there may still be residual risks of dangerous failures.
[0003] At present, the 2-out-of-2 technique is usually used to reduce the risk probability caused by random failures, that is, the two operation units perform the same operation respectively, and then compare the operation results. Only when the operation results are consistent, the operation results are valid, otherwise it is considered a 2-out-of-2 failure. The 2-out-of-2 technique can effectively prevent the risks caused by random failures, but it has a great impact on the communication bus. Since the dual CPUs (Central Processing Units) of each operation unit have the same amount of input data and output data, this will cause the amount of communication data on the communication bus to increase exponentially. Summary of the invention
[0004] The present invention provides a data transmission method and device, which are used to solve the defect of the prior art that the amount of communication data increases exponentially, and achieve the reduction of the amount of communication data.
[0005] The present invention provides a data transmission method, which is applied to an Ethercat site at a sending end, and comprises:
[0006] Receiving data to be transmitted and verification codes to be transmitted respectively sent by two local processors, wherein the data to be transmitted is sent after the two local processors perform 2-out-of-2 verification, and the two local processors are two processors connected to the local Ethercat site;
[0007] Determine a set of local transmission data and a local verification code based on the two sets of received data to be transmitted and the verification code to be transmitted;
[0008] The local transmission data and the local verification code are sent to the opposite Ethercat site, and forwarded by the opposite Ethercat site to two opposite processors, so that the two opposite processors respectively verify the local transmission data based on the local verification code. The two opposite processors are two processors connected to the opposite Ethercat site.
[0009] According to a data transmission method provided by the present invention, in the two local processors, the data to be transmitted sent by the first local processor is a part of the original data, and the data to be transmitted sent by the second local processor is another part of the original data, and the two local processors perform 2-out-of-2 check on the original data;
[0010] The verification code to be transmitted sent by the first local processor is a part of the original verification code, and the verification code to be transmitted sent by the second local processor is another part of the original verification code, and the original verification code is determined based on the original data.
[0011] According to a data transmission method provided by the present invention, determining a set of local transmission data and a local verification code based on two received sets of data to be transmitted and verification codes to be transmitted includes:
[0012] Combining the two groups of received data to be transmitted to obtain the local transmission data;
[0013] The two groups of received verification codes to be transmitted are combined to obtain the local verification code.
[0014] According to a data transmission method provided by the present invention, the data to be transmitted and the check code to be transmitted sent by the first local processor are odd-numbered data in the original data combination, and the data to be transmitted and the check code to be transmitted sent by the second local processor are even-numbered data in the original data combination;
[0015] The original data combination is a combination of the original data and the original check code.
[0016] The present invention also provides a data transmission method, which is applied to an Ethercat site at a receiving end, and comprises:
[0017] Receive a group of peer transmission data and peer verification code sent by the peer Ethercat site; the peer transmission data and peer verification code are determined by the peer Ethercat site based on the two groups of to-be-transmitted data and to-be-transmitted verification code received, the to-be-transmitted data and to-be-transmitted verification code are respectively sent to the peer Ethercat site after two peer processors perform 2-out-of-2 verification, and the two peer processors are two processors connected to the peer Ethercat site;
[0018] The peer transmission data and the peer verification code are forwarded to two local processors, so that the two local processors respectively verify the peer transmission data based on the peer verification code, and the two local processors are two processors connected to the local Ethercat site.
[0019] According to a data transmission method provided by the present invention, in the two peer processors, the data to be transmitted sent by the first peer processor is a part of the original data, and the data to be transmitted sent by the second peer processor is another part of the original data, and the 2-out-of-2 check performed by the two peer processors is performed on the original data;
[0020] The verification code to be transmitted sent by the first peer processor is a part of the original verification code, and the verification code to be transmitted sent by the second peer processor is another part of the original verification code, and the original verification code is determined based on the original data.
[0021] According to a data transmission method provided by the present invention, the peer transmission data and the peer check code are determined by the peer Ethercat site through the following steps:
[0022] Combining the two groups of received data to be transmitted to obtain the opposite end transmission data;
[0023] The two groups of received verification codes to be transmitted are combined to obtain the peer verification code.
[0024] According to a data transmission method provided by the present invention, the data to be transmitted and the check code to be transmitted sent by the first peer processor are odd-numbered data in the original data combination, and the data to be transmitted and the check code to be transmitted sent by the second peer processor are even-numbered data in the original data combination;
[0025] The original data combination is a combination of the original data and the original check code.
[0026] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned data transmission methods when executing the program.
[0027] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned data transmission methods are implemented.
[0028] The data transmission method and device provided by the present invention ensure the security of the system by completing 2-out-of-2 verification inside the sending end. The sending end and the receiving end perform data communication based on Ethercat technology, which improves the real-time performance of the system. Moreover, when the sending end and the receiving end perform data communication, only one set of valid data needs to be transmitted, thereby reducing the amount of communication data, thereby effectively reducing the occupancy rate of the communication bus bandwidth and increasing the number of sites supported by the communication bus. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 It is a flow chart of a data transmission method based on 2-out-of-2 technology provided by the prior art;
[0031] Figure 2 It is one of the flowcharts of the data transmission method provided by the present invention;
[0032] Figure 3 This is the second flow chart of the data transmission method provided by the present invention;
[0033] Figure 4 is an example diagram of the data transmission method provided by the present invention;
[0034] Figure 5 is a schematic diagram of the communication architecture of the vehicle-mounted control platform provided by the present invention;
[0035] Figure 6 It is one of the structural schematic diagrams of the data transmission device provided by the present invention;
[0036] Figure 7 This is the second structural diagram of the data transmission device provided by the present invention;
[0037] Figure 8 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] Ethercat (EtherNet Control Automation Technology) is a real-time industrial fieldbus communication protocol based on the Ethernet development framework. It has the characteristics of high performance, flexible topology, easy application, low cost, high-precision equipment synchronization, optional cable redundancy and functional safety protocol, hot plug and play, etc. The emergence of Ethercat has set a new standard for the real-time performance and topological flexibility of the system. The Ethercat fieldbus adopts a master-slave communication mechanism. There can only be one master station in a communication network, but there can be multiple slave stations. The master station can read and write the interactive data with the slave stations according to the set cycle.
[0040] The Ethercat fieldbus is well known for its short communication cycle and high real-time performance, but its small single-cycle communication volume has become a fatal disadvantage in some application scenarios. For the Ethercat communication chips currently available on the market, the total application layer communication volume available for a single cycle of an Ethercat slave is only about 1K bytes, and the total application layer communication volume available for a single cycle of an Ethercat master is less than 30K bytes. When there are application scenarios where the communication data volume exceeds these values, high-performance communication chips can only be used to develop related protocols on their own.
[0041] In order to meet the safety requirements of safety-related systems, 2-out-of-2 technology is usually used to reduce the risk probability caused by random failures. Figure 1 It is a flow chart of a data transmission method based on 2-out-of-2 technology provided by the prior art, such as Figure 1 As shown, CPU1 at the sending end sends data to CPU1 at the receiving end, and CPU2 at the sending end sends data to CPU2 at the receiving end; when a CPU at the sending end fails, the dual CPUs at the receiving end can make effective detection and perform corresponding protection processing by judging the consistency of the received data.
[0042] The probability of random failures is extremely low. The probability of random failures occurring in both CPUs at the same time and in the same location is negligible. Therefore, the 2-out-of-2 technology can effectively prevent the risks caused by random failures of a single CPU. However, this technology has a great impact on the communication bus. Since the dual CPUs of each computing unit have equal amounts of input data and output data, the amount of communication data on the communication bus increases exponentially, which is a huge challenge for the Ethercat fieldbus.
[0043] In this regard, an embodiment of the present invention provides a data transmission method, which can reduce the amount of communication data, thereby achieving both the use of 2-out-of-2 technology to ensure system security and the use of Ethercat field bus to take advantage of its high real-time characteristics. Figure 2It is one of the flowcharts of the data transmission method provided by the present invention, such as Figure 2 As shown, the execution subject of the method is the Ethercat site at the sending end, and the method includes:
[0044] Step 110, receiving the data to be transmitted and the check code to be transmitted respectively sent by two local processors, where the data to be transmitted is sent after the two local processors perform 2-out-of-2 check, and the two local processors are two processors connected to the local Ethercat site;
[0045] Step 120, determining a set of local transmission data and a local verification code based on the received two sets of to-be-transmitted data and to-be-transmitted verification codes;
[0046] Step 130, the local transmission data and the local verification code are sent to the opposite Ethercat site, and the opposite Ethercat site forwards them to two opposite processors, so that the two opposite processors respectively verify the local transmission data based on the local verification code. The two opposite processors are two processors connected to the opposite Ethercat site.
[0047] Specifically, since the execution subject is the Ethercat site of the sending end, the local end represents the sending end, and the opposite end represents the receiving end. The sending end and the receiving end perform data communication based on the Ethercat communication bus, thereby improving the real-time performance of the system. Considering that the dual CPUs of the sending end in the prior art respectively send equal amounts of data to the receiving end, and the receiving end then performs a 2-out-of-2 check on the received data, this process causes the amount of communication data on the communication bus to increase exponentially. In response to this problem, the embodiment of the present invention pre-completes the 2-out-of-2 check inside the sending end, that is, the two local processors inside the sending end respectively calculate the original data to be transmitted to the receiving end, and compare the two sets of original data obtained. If the comparison result is that the two sets of original data are consistent, it is determined that the 2-out-of-2 check passes, otherwise, it is determined that the 2-out-of-2 check fails. Here, the embodiment of the present invention does not specifically limit the type of original data, for example, it can be communication data between the train end and the ground end, I / O (Input / Output, input and output port) type data, etc.
[0048] After determining that the 2-out-of-2 check has passed, the two local processors can send the data to be transmitted to the local Ethercat station based on the original data. On this basis, the local Ethercat station can determine a group of local transmission data based on the two groups of data to be transmitted, and send this group of local transmission data to the receiving Ethercat station, thereby using 2-out-of-2 check to ensure system security while only needing to send one group of local transmission data to the receiving end, thereby reducing the amount of communication data. Here, the local transmission data is the data that is finally determined to be transmitted to the receiving end.
[0049] It is understandable that there may be multiple ways for two local processors to send data to be transmitted, and correspondingly, the method of determining the local transmission data will also be different. For example, both local processors send complete original data to the local Ethercat site. At this time, the two sets of data to be transmitted are the same, and the local Ethercat site only needs to select one of the two received sets of data to be transmitted to obtain the local transmission data; for another example, the first local processor sends complete original data to the local Ethercat site, and the second local processor only sends a part of the original data to the local Ethercat site. The local Ethercat site can directly use the data to be transmitted sent by the first local processor as the local transmission data; for another example, the first local processor only sends a part of the original data to the local Ethercat site, and the second local processor sends another part of the original data to the local Ethercat site. The local Ethercat site can combine the two received sets of data to be transmitted into the final local transmission data.
[0050] In addition, if a local processor fails, it may continue to send data, such as duplicating the last sent data or sending random data. Therefore, after the 2-out-of-2 check is passed, the data to be transmitted by the local processor to the local Ethercat site may be abnormal data. In addition, there are certain security risks in the data transmission process, such as when the local processor sends data to the local Ethercat site, the local Ethercat site sends data to the opposite Ethercat site, and the opposite Ethercat site sends data to the opposite processor.
[0051] In this regard, the embodiment of the present invention sets two local processors to send the to-be-transmitted data to the local Ethercat station and also send the to-be-transmitted verification code corresponding to the to-be-transmitted data. On this basis, the local Ethercat station can determine a set of local verification codes according to the two sets of to-be-transmitted verification codes received, and send it to the opposite end in step 130, so that the opposite end can verify the local transmission data according to the local verification code. It can be understood that since the to-be-transmitted verification code occupies a small number of bytes, the impact of sending the to-be-transmitted verification code on the amount of communication data can be ignored.
[0052] After the peer Ethercat site receives the local transmission data and the local verification code sent by the local Ethercat site, the peer Ethercat site can forward the local transmission data and the local verification code to the two peer processors connected to it. On this basis, the two peer processors can verify the local transmission data based on the local verification code. It can be understood that if a local processor fails, the verification of the local transmission data by the peer processor will fail, thereby effectively preventing the risks that may be caused by the failure of the sending end processor and further ensuring the security of the system.
[0053] The method provided by the embodiment of the present invention ensures the security of the system by completing 2-out-of-2 verification inside the sending end. The sending end and the receiving end perform data communication based on Ethercat technology, which improves the real-time performance of the system. Moreover, when the sending end and the receiving end perform data communication, only one set of valid data needs to be transmitted, thereby reducing the amount of communication data, thereby effectively reducing the occupancy rate of the communication bus bandwidth and increasing the number of sites supported by the communication bus.
[0054] Based on any of the above embodiments, in the two local processors, the data to be transmitted sent by the first local processor is a part of the original data, and the data to be transmitted sent by the second local processor is another part of the original data, and the two local processors perform 2-out-of-2 check on the original data;
[0055] The verification code to be transmitted sent by the first local processor is a part of the original verification code, and the verification code to be transmitted sent by the second local processor is another part of the original verification code. The original verification code is determined based on the original data.
[0056] Specifically, the original data is the data that needs to be transmitted to the receiving end calculated by the two local processors respectively. The two local processors perform a 2-out-of-2 check, which is to check the two sets of original data obtained by the two local processors respectively. After determining that the two sets of original data are consistent, the data to be transmitted will be sent. In addition, in order to ensure the correctness of the data, after obtaining the original data, the two local processors will also generate a corresponding data check code for the original data, thereby obtaining the original check code.
[0057] Considering that both groups of data to be transmitted are complete original data, or one group of data to be transmitted is complete original data and the other group of data to be transmitted is partial original data, the amount of communication data will still increase. Therefore, in an embodiment of the present invention, two local processors are set up, and the data to be transmitted sent by the first local processor to the local Ethercat site is a part of the original data, and the data to be transmitted sent by the second local processor to the local Ethercat site is another part of the original data, so that the total amount of data sent by the two local processors to the local Ethercat site is only the amount of original data, thereby avoiding an increase in the amount of communication data.
[0058] Correspondingly, when the data to be transmitted sent by the first local processor is part of the original data, and the data to be transmitted sent by the second local processor is another part of the original data, the verification code to be transmitted sent by the first local processor to the local Ethercat site is part of the original verification code, and the verification code to be transmitted sent by the second local processor to the local Ethercat site is another part of the original verification code.
[0059] Here, the two groups of data to be transmitted and the check code to be transmitted can be obtained by combining the original data and the original check code and then dividing them, or by dividing the original data and the original check code separately, and the division method here can also be set arbitrarily according to the needs. For example, the original data and the original check code are combined to obtain the combined data, and the odd-numbered bits of the combined data are taken out as a group of data to be transmitted and the check code to be transmitted, which are sent by the first local processor, and the remaining data, that is, the even-numbered bits of the combined data, are taken as another group of data to be transmitted and the check code to be transmitted, which are sent by the second local processor; or, the original data is divided into 1:2, and the data to be transmitted sent by the first local processor is the first 1 / 3 of the original data, and the data to be transmitted sent by the second local processor is the last 2 / 3 of the original data. At this time, the check code to be transmitted sent by the first local processor can be the first 1 / 3 of the original check code, and the check code to be transmitted sent by the second local processor is the last 2 / 3 of the original check code.
[0060] Based on any of the above embodiments, step 120 includes:
[0061] Combine the two groups of data to be transmitted to obtain the local transmission data;
[0062] The two groups of received verification codes to be transmitted are combined to obtain the local verification code.
[0063] Specifically, in order to ensure the integrity of the data transmitted to the receiving end, the embodiment of the present invention combines the two received sets of data to be transmitted when both are partial original data, thereby obtaining complete local transmission data. Similarly, the two received sets of verification codes to be transmitted are partial original verification codes, so it is necessary to combine the two received sets of verification codes to be transmitted, thereby obtaining a complete local verification code, so as to verify the local transmission data based on the local verification code later.
[0064] Based on any of the above embodiments, the data to be transmitted and the check code to be transmitted sent by the first local processor are odd-numbered data bits in the original data combination, and the data to be transmitted and the check code to be transmitted sent by the second local processor are even-numbered data bits in the original data combination;
[0065] The original data combination is a combination of the original data and the original check code.
[0066] Specifically, in order to effectively prevent the risks that may be caused by the failure of the processor at the sending end, the embodiment of the present invention uses the original data after adding the original check code as the original data combination, takes out the odd-numbered data bits in the original data combination as a group of data to be transmitted and the check code to be transmitted, and is sent to the local Ethercat site by the first local processor, and the even-numbered data bits in the original data combination are used as another group of data to be transmitted and the check code to be transmitted, and are sent to the local Ethercat site by the second local processor, so that the data and check code received by the subsequent receiving end come from the two processors at the sending end. The receiving end can verify the data based on the check code, thereby ensuring the correctness of the data, and effectively preventing the risks that may be caused by the failure of a processor at the sending end.
[0067] Based on any of the above embodiments, Figure 3 FIG. 2 is a flow chart of the data transmission method provided by the present invention. Figure 3 As shown, the method is applied to an Ethercat site at a receiving end, and the method includes:
[0068] Step 210, receiving a set of peer transmission data and peer verification code sent by the peer Ethercat site; the peer transmission data and the peer verification code are determined by the peer Ethercat site based on the received two sets of to-be-transmitted data and to-be-transmitted verification code, the to-be-transmitted data and the to-be-transmitted verification code are respectively sent to the peer Ethercat site after two peer processors perform 2-out-of-2 verification, and the two peer processors are two processors connected to the peer Ethercat site;
[0069] Step 220, forwarding the peer transmission data and the peer verification code to two local processors, so that the two local processors respectively verify the peer transmission data based on the peer verification code, and the two local processors are two processors connected to the local Ethercat site.
[0070] Specifically, since the execution subject is the Ethercat site of the receiving end, the local end represents the receiving end, and the opposite end represents the sending end. The sending end and the receiving end perform data communication based on the Ethercat communication bus, thereby improving the real-time performance of the system. Considering that in the prior art, after the dual CPUs of the sending end send equal amounts of data to the receiving end respectively, the receiving end then performs a 2-out-of-2 check on the received data, this process causes the amount of communication data on the communication bus to increase exponentially. In response to this problem, the embodiment of the present invention pre-completes the 2-out-of-2 check inside the sending end, that is, the two opposite-end processors inside the sending end respectively calculate the original data to be transmitted to the receiving end, and compare the two sets of original data obtained. If the comparison result is that the two sets of original data are consistent, it is determined that the 2-out-of-2 check passes, otherwise, it is determined that the 2-out-of-2 check fails. Here, the embodiment of the present invention does not specifically limit the type of original data, for example, it can be communication data between the train end and the ground end, I / O type data, etc.
[0071] After determining that the 2-out-of-2 check has passed, the two peer processors can send the data to be transmitted to the peer Ethercat station based on the original data. On this basis, the peer Ethercat station can determine a set of peer transmission data based on the two sets of received data to be transmitted, and send this set of peer transmission data to the receiving Ethercat station, thereby using the 2-out-of-2 check to ensure system security while only needing to send one set of peer transmission data to the receiving end, thereby reducing the amount of communication data. Here, the peer transmission data is the data that is finally determined to be transmitted to the receiving end.
[0072] It is understandable that there may be multiple ways for two peer processors to send data to be transmitted, and correspondingly, the method of determining the peer transmission data will also be different. For example, both peer processors send complete original data to the peer Ethercat site. At this time, the two sets of data to be transmitted are the same, and the peer Ethercat site only needs to select one of the two received sets of data to be transmitted to obtain the peer transmission data; for another example, the first peer processor sends complete original data to the peer Ethercat site, and the second peer processor only sends a part of the original data to the peer Ethercat site, and the peer Ethercat site can directly use the data to be transmitted sent by the first peer processor as the peer transmission data; for another example, the first peer processor only sends a part of the original data to the peer Ethercat site, and the second peer processor sends another part of the original data to the peer Ethercat site, and the peer Ethercat site can combine the two received sets of data to be transmitted into the final peer transmission data.
[0073] In addition, if a certain peer processor fails, it may continue to send data, such as copying the data sent last time, sending data randomly, etc. Therefore, after the 2-out-of-2 check is passed, the data to be transmitted sent by the peer processor to the peer Ethercat site may be abnormal data. In addition, there will be certain security risks in the data transmission process such as the peer processor sending data to the peer Ethercat site, the peer Ethercat site sending data to the local Ethercat site, and the local Ethercat site sending data to the local processor. In this regard, the embodiment of the present invention sets two peer processors to send the data to be transmitted to the peer Ethercat site while sending the data to be transmitted, and also sends the verification code to be transmitted corresponding to the data to be transmitted. On this basis, the peer Ethercat site can determine a set of peer verification codes based on the two sets of verification codes to be transmitted received, and send it to the local end, so that the local end can verify the data transmitted by the peer according to the verification code of the peer. It can be understood that since the number of bytes occupied by the verification code to be transmitted is relatively small, the impact of sending the verification code to be transmitted on the amount of communication data can be ignored.
[0074] After the local Ethercat station receives a set of peer transmission data and peer verification code sent by the peer Ethercat station, the local Ethercat station can forward the peer transmission data and peer verification code to the two local processors connected to it. On this basis, the two local processors can verify the peer transmission data based on the peer verification code. It can be understood that if one of the peer processors fails, the local processor will fail to verify the peer transmission data, thereby effectively preventing the risks that may be caused by the failure of the sending end processor and further ensuring the security of the system.
[0075] The method provided by the embodiment of the present invention ensures the security of the system by completing 2-out-of-2 verification inside the sending end. The sending end and the receiving end perform data communication based on Ethercat technology, which improves the real-time performance of the system. Moreover, when the sending end and the receiving end perform data communication, only one set of valid data needs to be transmitted, thereby reducing the amount of communication data, thereby effectively reducing the occupancy rate of the communication bus bandwidth and increasing the number of sites supported by the communication bus.
[0076] Based on any of the above embodiments, in the two peer processors, the data to be transmitted sent by the first peer processor is a part of the original data, and the data to be transmitted sent by the second peer processor is another part of the original data, and the 2-out-of-2 check performed by the two peer processors is performed on the original data;
[0077] The verification code to be transmitted sent by the first peer processor is a part of the original verification code, and the verification code to be transmitted sent by the second peer processor is another part of the original verification code. The original verification code is determined based on the original data.
[0078] Specifically, the original data is the data that needs to be transmitted to the receiving end calculated by the two opposite-end processors respectively. The two opposite-end processors perform a 2-out-of-2 check, which is to check the two sets of original data obtained by the two opposite-end processors respectively. After determining that the two sets of original data are consistent, the data to be transmitted will be sent. In addition, in order to ensure the correctness of the data, after obtaining the original data, the two opposite-end processors will also generate a corresponding data check code for the original data, thereby obtaining the original check code.
[0079] Considering that both groups of data to be transmitted are complete original data, or one group of data to be transmitted is complete original data and the other group of data to be transmitted is partial original data, the amount of communication data will still increase. Therefore, in the embodiment of the present invention, two peer processors are set up, and the data to be transmitted sent by the first peer processor to the peer Ethercat site is a part of the original data, and the data to be transmitted sent by the second peer processor to the peer Ethercat site is another part of the original data, so that the total amount of data sent by the two peer processors to the peer Ethercat site is only the amount of original data, thereby avoiding an increase in the amount of communication data.
[0080] Correspondingly, when the data to be transmitted sent by the first peer processor is a part of the original data, and the data to be transmitted sent by the second peer processor is another part of the original data, the verification code to be transmitted sent by the first peer processor to the peer Ethercat site is a part of the original verification code, and the verification code to be transmitted sent by the second peer processor to the peer Ethercat site is another part of the original verification code.
[0081] Here, the two groups of data to be transmitted and the check code to be transmitted can be obtained by combining the original data and the original check code and then dividing them, or by dividing the original data and the original check code separately, and the division method here can also be arbitrarily set according to the needs. For example, the original data and the original check code are combined to obtain the combined data, and the odd-numbered bits of the combined data are taken out as a group of data to be transmitted and the check code to be transmitted, which are sent by the first opposite end processor, and the remaining data, that is, the even-numbered bits of the combined data, are taken as another group of data to be transmitted and the check code to be transmitted, which are sent by the second opposite end processor; or, the original data is divided into 1:2, and the data to be transmitted sent by the first opposite end processor is the first 1 / 3 of the original data, and the data to be transmitted sent by the second opposite end processor is the last 2 / 3 of the original data. At this time, the check code to be transmitted sent by the first opposite end processor can be the first 1 / 3 of the original check code, and the check code to be transmitted sent by the second opposite end processor can be the last 2 / 3 of the original check code.
[0082] Based on any of the above embodiments, the peer transmission data and the peer check code are determined by the peer Ethercat site through the following steps:
[0083] Combine the two groups of received data to be transmitted to obtain the data transmitted by the other end;
[0084] The two groups of received verification codes to be transmitted are combined to obtain the verification code of the other end.
[0085] Specifically, in order to ensure the integrity of the data transmitted to the receiving end, in the embodiment of the present invention, when the two groups of data to be transmitted received by the opposite end Ethercat station are both partial original data, the opposite end Ethercat station combines the two groups of data to be transmitted received to obtain complete opposite end transmission data. Similarly, the two groups of verification codes to be transmitted received by the opposite end Ethercat station are partial original verification codes, so it is necessary to combine the two groups of verification codes to be transmitted received to obtain a complete opposite end verification code, so that the subsequent local end processor can verify the opposite end transmission data based on the opposite end verification code.
[0086] Based on any of the above embodiments, the data to be transmitted and the check code to be transmitted sent by the first peer processor are odd-numbered data bits in the original data combination, and the data to be transmitted and the check code to be transmitted sent by the second peer processor are even-numbered data bits in the original data combination;
[0087] The original data combination is a combination of the original data and the original check code.
[0088] Specifically, in order to effectively prevent the risks that may be caused by the failure of the processor at the sending end, the embodiment of the present invention uses the original data after adding the original check code as the original data combination, takes out the odd-numbered data bits in the original data combination as a group of data to be transmitted and the check code to be transmitted, and is sent by the first opposite-end processor to the opposite-end Ethercat site, and the even-numbered data bits in the original data combination are used as another group of data to be transmitted and the check code to be transmitted, and are sent by the second opposite-end processor to the opposite-end Ethercat site, so that the data and check code subsequently received by the receiving end come from the two processors at the sending end. The receiving end can verify the data based on the check code, thereby ensuring the correctness of the data, and effectively preventing the risks that may be caused by the failure of a processor at the sending end.
[0089] Based on any of the above embodiments, Figure 4 is an example diagram of the data transmission method provided by the present invention, such as Figure 4 As shown, the system to which the method is applicable may be a communication system having an active Ethercat master and multiple Ethercat slaves. The system includes a logic unit and multiple execution units. The logic unit includes the Ethercat master, and CPU1 and CPU2 that perform logic operations and use 2-out-of-2 technology. The execution unit includes the Ethercat slave, and CPU1 and CPU2 that perform logic operations and use 2-out-of-2 technology.
[0090] In this example, the sending end is the logic unit, the Ethercat station at the sending end is the Ethercat master, the receiving end is the execution unit, and the Ethercat station at the receiving end is the Ethercat slave. The specific process of transmitting data from the logic unit to the execution unit is as follows:
[0091] 1. CPU1 and CPU2 of the logic unit calculate the original data to be sent to the execution unit according to the current system status and add the original check code.
[0092] 2. CPU1 and CPU2 of the logic unit use 2-out-of-2 technology to compare the original data to be sent to the execution unit. Only relatively consistent data can be sent to the execution unit.
[0093] 3. CPU1 of the logic unit sends the 1st / 3rd / 5th / 7th... field of the data with the original checksum added to it to the Ethercat master in the logic unit, and CPU2 of the logic unit sends the 2nd / 4th / 6th / 8th... field of the data with the original checksum added to it to the Ethercat master in the logic unit. It can be understood that at this time, each CPU sends half of the valid data and half of the checksum.
[0094] 4. The Ethercat master of the logic unit restores the two sets of data to be transmitted and the check code to be transmitted received from CPU1 and CPU2 into the local transmission data and the local check code to be sent to the execution unit, and then sends them to the execution unit through the ethercat bus.
[0095] 5. After receiving the data from the master station, the Ethercat slave station of the execution unit sends it to CPU1 and CPU2 of the execution unit respectively.
[0096] 6. The CPU1 and CPU2 of the execution unit respectively verify the received local transmission data according to the local verification code.
[0097] When the execution unit sends data to the logic unit, the same communication mechanism is used, which will not be described in detail.
[0098] Based on any of the above embodiments, the vehicle control platform is a safety system based on the ethercat communication architecture, and the vehicle control platform includes a logic unit and four execution units. Among them, the logic unit adopts the F75P module and the F306 module of a German company, the CPU1 and CPU2 in the F75P module perform logical operations, and the F306 module is an Ethercat master station responsible for completing the communication with the execution unit. The execution unit is a self-developed module, the chips used by CPU1 and CPU2 for calculation are the TMS570 series, and the chip used by the ethercat slave station for communication is ET1100.
[0099] Figure 5 is a schematic diagram of the communication architecture of the vehicle control platform provided by the present invention, such as Figure 5 As shown, the execution units included in the platform are: speed measurement unit, vehicle control unit, communication unit, I / O unit, and each execution unit performs different functions. In order to meet the safety integrity level requirements, the logic unit and the execution unit in the platform both use 2-out-of-2 technology. The communication between the logic unit and the execution unit adopts the data transmission method provided by the present invention.
[0100] It should be noted that the purpose of the present invention is to provide a method for communicating between subsystems in a safety system through the Ethercat field bus, which can use the 2-out-of-2 technology to ensure the security of the system, and can use the Ethercat field bus to give full play to its high real-time characteristics, while overcoming the problem of its small single-cycle communication volume.
[0101] The data transmission device provided by the present invention is described below. The data transmission device described below and the data transmission method described above can be referenced to each other.
[0102] Based on any of the above embodiments, Figure 6is one of the structural diagrams of the data transmission device provided by the present invention, such as Figure 6 As shown, the device is applied to an Ethercat site at the sending end, and the device includes:
[0103] The receiving module 610 is used to receive the data to be transmitted and the check code to be transmitted respectively sent by two local processors, where the data to be transmitted is sent after the two local processors perform 2-out-of-2 check, and the two local processors are two processors connected to the local Ethercat site;
[0104] A determination module 620, configured to determine a set of local transmission data and a local verification code based on the received two sets of to-be-transmitted data and to-be-transmitted verification codes;
[0105] The sending module 630 is used to send the local transmission data and the local verification code to the opposite Ethercat site, and the opposite Ethercat site forwards it to the two opposite processors, so that the two opposite processors can verify the local transmission data based on the local verification code respectively. The two opposite processors are two processors connected to the opposite Ethercat site.
[0106] The device provided by the embodiment of the present invention ensures the security of the system by completing 2-out-of-2 verification inside the sending end. The sending end and the receiving end perform data communication based on Ethercat technology, which improves the real-time performance of the system. Moreover, when the sending end and the receiving end perform data communication, only one set of valid data needs to be transmitted, thereby reducing the amount of communication data, thereby effectively reducing the occupancy rate of the communication bus bandwidth and increasing the number of sites supported by the communication bus.
[0107] Based on any of the above embodiments, in the two local processors, the data to be transmitted sent by the first local processor is a part of the original data, and the data to be transmitted sent by the second local processor is another part of the original data, and the two local processors perform 2-out-of-2 check on the original data;
[0108] The verification code to be transmitted sent by the first local processor is a part of the original verification code, and the verification code to be transmitted sent by the second local processor is another part of the original verification code. The original verification code is determined based on the original data.
[0109] Based on any of the above embodiments, determining a set of local transmission data and a local verification code based on the received two sets of to-be-transmitted data and to-be-transmitted verification codes includes:
[0110] Combine the two groups of data to be transmitted to obtain the local transmission data;
[0111] The two groups of received verification codes to be transmitted are combined to obtain the local verification code.
[0112] Based on any of the above embodiments, the data to be transmitted and the check code to be transmitted sent by the first local processor are odd-numbered data bits in the original data combination, and the data to be transmitted and the check code to be transmitted sent by the second local processor are even-numbered data bits in the original data combination;
[0113] The original data combination is a combination of the original data and the original check code.
[0114] Based on any of the above embodiments, Figure 7 This is a second structural diagram of the data transmission device provided by the present invention, such as Figure 7 As shown, the device is applied to an Ethercat site at the receiving end, and the device includes:
[0115] The receiving module 710 is used to receive a set of peer transmission data and peer verification code sent by the peer Ethercat station; the peer transmission data and the peer verification code are determined by the peer Ethercat station based on the two sets of to-be-transmitted data and to-be-transmitted verification code received, the to-be-transmitted data and the to-be-transmitted verification code are respectively sent to the peer Ethercat station after two peer processors perform 2-out-of-2 verification, and the two peer processors are two processors connected to the peer Ethercat station;
[0116] The forwarding module 720 is used to forward the peer transmission data and the peer verification code to two local processors, so that the two local processors can verify the peer transmission data based on the peer verification code respectively. The two local processors are two processors connected to the local Ethercat site.
[0117] The device provided by the embodiment of the present invention ensures the security of the system by completing 2-out-of-2 verification inside the sending end. The sending end and the receiving end perform data communication based on Ethercat technology, which improves the real-time performance of the system. Moreover, when the sending end and the receiving end perform data communication, only one set of valid data needs to be transmitted, thereby reducing the amount of communication data, thereby effectively reducing the occupancy rate of the communication bus bandwidth and increasing the number of sites supported by the communication bus.
[0118] Based on any of the above embodiments, in the two peer processors, the data to be transmitted sent by the first peer processor is a part of the original data, and the data to be transmitted sent by the second peer processor is another part of the original data, and the 2-out-of-2 check performed by the two peer processors is performed on the original data;
[0119] The verification code to be transmitted sent by the first peer processor is a part of the original verification code, and the verification code to be transmitted sent by the second peer processor is another part of the original verification code. The original verification code is determined based on the original data.
[0120] Based on any of the above embodiments, the peer transmission data and the peer check code are determined by the peer Ethercat site through the following steps:
[0121] Combine the two groups of received data to be transmitted to obtain the data transmitted by the other end;
[0122] The two groups of received verification codes to be transmitted are combined to obtain the verification code of the other end.
[0123] Based on any of the above embodiments, the data to be transmitted and the check code to be transmitted sent by the first peer processor are odd-numbered data bits in the original data combination, and the data to be transmitted and the check code to be transmitted sent by the second peer processor are even-numbered data bits in the original data combination;
[0124] The original data combination is a combination of the original data and the original check code.
[0125] Figure 8 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 8 As shown, the electronic device may include: a processor (processor) 810, a communication interface (Communications Interface) 820, a memory (memory) 830 and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call the logic instructions in the memory 830 to execute the data transmission method, which is applied to the Ethercat site of the sending end, and the method includes: receiving the data to be transmitted and the check code to be transmitted respectively sent by two local processors, the data to be transmitted is sent after the two local processors perform 2-out-of-2 check, and the two local processors are two processors connected to the local Ethercat site; based on the two groups of data to be transmitted and the check code to be transmitted received, determining a group of local transmission data and the local check code; sending the local transmission data and the local check code to the opposite Ethercat site, and forwarding them to the two opposite processors by the opposite Ethercat site, so that the two opposite processors respectively check the local transmission data based on the local check code, and the two opposite processors are two processors connected to the opposite Ethercat site;
[0126] Or a data transmission method is executed, which is applied to an Ethercat site at a receiving end, and includes: receiving a group of peer transmission data and a peer verification code sent by the peer Ethercat site; the peer transmission data and the peer verification code are determined by the peer Ethercat site based on two groups of received data to be transmitted and verification codes to be transmitted, the data to be transmitted and the verification code to be transmitted are respectively sent to the peer Ethercat site after two peer processors perform 2-out-of-2 verification, and the two peer processors are two processors connected to the peer Ethercat site; forwarding the peer transmission data and the peer verification code to two local processors, so that the two local processors respectively verify the peer transmission data based on the peer verification code, and the two local processors are two processors connected to the local Ethercat site.
[0127] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0128] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, the computer can execute the data transmission method provided by the above methods, the method is applied to an Ethercat site at a sending end, the method comprising: receiving data to be transmitted and a check code to be transmitted respectively sent by two local processors, the data to be transmitted is sent after the two local processors perform a 2-out-of-2 check, the two local processors are two processors connected to the local Ethercat site; based on the two received groups of data to be transmitted and the check code to be transmitted, determining a group of local transmission data and a local check code; sending the local transmission data and the local check code to the opposite Ethercat site, and forwarding them to the two opposite processors by the opposite Ethercat site, so that the two opposite processors respectively check the local transmission data based on the local check code, the two opposite processors are two processors connected to the opposite Ethercat site;
[0129] Or execute the data transmission method provided by the above methods, which is applied to the Ethercat site of the receiving end, and the method includes: receiving a group of peer transmission data and peer verification code sent by the peer Ethercat site; the peer transmission data and the peer verification code are determined by the peer Ethercat site based on the two groups of to-be-transmitted data and to-be-transmitted verification code received, the to-be-transmitted data and the to-be-transmitted verification code are respectively sent to the peer Ethercat site by two peer processors after 2-out-of-2 verification, and the two peer processors are two processors connected to the peer Ethercat site; forwarding the peer transmission data and the peer verification code to two local processors, so that the two local processors respectively verify the peer transmission data based on the peer verification code, and the two local processors are two processors connected to the local Ethercat site.
[0130] On the other hand, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the data transmission method provided by the above methods, the method being applied to an Ethercat site at a sending end, the method comprising: receiving data to be transmitted and a check code to be transmitted respectively sent by two local processors, the data to be transmitted being sent after a 2-out-of-2 check is performed by the two local processors, and the two local processors are two processors connected to the local Ethercat site; determining a set of local transmission data and a local check code based on the two received sets of data to be transmitted and the check code to be transmitted; sending the local transmission data and the local check code to the opposite Ethercat site, and forwarding the local transmission data and the local check code to the opposite Ethercat site by the opposite Ethercat site to the two opposite processors, so that the two opposite processors respectively check the local transmission data based on the local check code, and the two opposite processors are two processors connected to the opposite Ethercat site;
[0131] Or the data transmission method provided by the above methods is executed, which is applied to the Ethercat site of the receiving end, and includes: receiving a group of peer transmission data and peer verification code sent by the peer Ethercat site; the peer transmission data and the peer verification code are determined by the peer Ethercat site based on the two groups of to-be-transmitted data and to-be-transmitted verification code received, the to-be-transmitted data and the to-be-transmitted verification code are respectively sent to the peer Ethercat site after two peer processors perform 2-out-of-2 verification, and the two peer processors are two processors connected to the peer Ethercat site; the peer transmission data and the peer verification code are forwarded to two local processors, so that the two local processors respectively verify the peer transmission data based on the peer verification code, and the two local processors are two processors connected to the local Ethercat site.
[0132] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0133] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data transmission method, characterized in that: The method is applied to an Ethercat site at a sending end, and the method comprises: Receiving data to be transmitted and verification codes to be transmitted respectively sent by two local processors, wherein the data to be transmitted is sent after the two local processors perform 2-out-of-2 verification, and the two local processors are two processors connected to the local Ethercat site; Determine a set of local transmission data and a local verification code based on the two sets of received data to be transmitted and the verification code to be transmitted; The local transmission data and the local verification code are sent to the opposite Ethercat site, and the opposite Ethercat site forwards them to two opposite processors, so that the two opposite processors respectively verify the local transmission data based on the local verification code, and the two opposite processors are two processors connected to the opposite Ethercat site; Among the two local processors, the data to be transmitted sent by the first local processor is a part of the original data, and the data to be transmitted sent by the second local processor is another part of the original data, and the 2-out-of-2 check performed by the two local processors is performed on the original data; The verification code to be transmitted sent by the first local processor is a part of the original verification code, and the verification code to be transmitted sent by the second local processor is another part of the original verification code, and the original verification code is determined based on the original data; The step of determining a set of local transmission data and a local verification code based on the received two sets of data to be transmitted and the verification code to be transmitted includes: Combining the two groups of received data to be transmitted to obtain the local transmission data; The two groups of received verification codes to be transmitted are combined to obtain the local verification code.
2. The data transmission method according to claim 1, characterized in that: The data to be transmitted and the check code to be transmitted sent by the first local processor are odd-numbered data bits in the original data combination, and the data to be transmitted and the check code to be transmitted sent by the second local processor are even-numbered data bits in the original data combination; The original data combination is a combination of the original data and the original check code.
3. A data transmission method, characterized in that: The method is applied to an Ethercat site at a receiving end, and the method comprises: Receive a group of peer transmission data and peer verification code sent by the peer Ethercat site; the peer transmission data and peer verification code are determined by the peer Ethercat site based on the two groups of to-be-transmitted data and to-be-transmitted verification code received, the to-be-transmitted data and to-be-transmitted verification code are respectively sent to the peer Ethercat site after two peer processors perform 2-out-of-2 verification, and the two peer processors are two processors connected to the peer Ethercat site; Forwarding the peer transmission data and the peer verification code to two local processors, so that the two local processors respectively verify the peer transmission data based on the peer verification code, and the two local processors are two processors connected to the local Ethercat site; Among the two peer processors, the data to be transmitted sent by the first peer processor is a part of the original data, and the data to be transmitted sent by the second peer processor is another part of the original data, and the 2-out-of-2 check performed by the two peer processors is performed on the original data; The verification code to be transmitted sent by the first peer processor is a part of the original verification code, and the verification code to be transmitted sent by the second peer processor is another part of the original verification code, and the original verification code is determined based on the original data; The peer transmission data and the peer check code are determined by the peer Ethercat site through the following steps: Combining the two groups of received data to be transmitted to obtain the opposite end transmission data; The two groups of received verification codes to be transmitted are combined to obtain the peer verification code.
4. The data transmission method according to claim 3, characterized in that: The data to be transmitted and the check code to be transmitted sent by the first peer processor are odd-numbered data bits in the original data combination, and the data to be transmitted and the check code to be transmitted sent by the second peer processor are even-numbered data bits in the original data combination; The original data combination is a combination of the original data and the original check code.
5. A data transmission device, characterized in that: The device is applied to an Ethercat site at a sending end, and the device comprises: A receiving module, used for receiving data to be transmitted and a check code to be transmitted respectively sent by two local processors, wherein the data to be transmitted is sent after the two local processors perform a 2-out-of-2 check, and the two local processors are two processors connected to the local Ethercat site; A determination module, used for determining a set of local transmission data and a local verification code based on the received two sets of to-be-transmitted data and to-be-transmitted verification codes; A sending module, used for sending the local transmission data and the local verification code to the opposite end Ethercat site, and forwarding the local transmission data and the local verification code to two opposite end processors by the opposite end Ethercat site, so that the two opposite end processors respectively verify the local transmission data based on the local verification code, and the two opposite end processors are two processors connected to the opposite end Ethercat site; Among the two local processors, the data to be transmitted sent by the first local processor is a part of the original data, and the data to be transmitted sent by the second local processor is another part of the original data, and the 2-out-of-2 check performed by the two local processors is performed on the original data; The verification code to be transmitted sent by the first local processor is a part of the original verification code, and the verification code to be transmitted sent by the second local processor is another part of the original verification code, and the original verification code is determined based on the original data; The step of determining a set of local transmission data and a local verification code based on the received two sets of data to be transmitted and the verification code to be transmitted includes: Combining the two groups of received data to be transmitted to obtain the local transmission data; The two groups of received verification codes to be transmitted are combined to obtain the local verification code.
6. A data transmission device, characterized in that: The device is applied to an Ethercat site at a receiving end, and the device comprises: A receiving module, used for receiving a group of peer transmission data and peer verification code sent by a peer Ethercat site; the peer transmission data and peer verification code are determined by the peer Ethercat site based on the two groups of to-be-transmitted data and to-be-transmitted verification code received, the to-be-transmitted data and to-be-transmitted verification code are respectively sent to the peer Ethercat site after two peer processors perform 2-out-of-2 verification, and the two peer processors are two processors connected to the peer Ethercat site; A forwarding module, used for forwarding the peer transmission data and the peer verification code to two local processors, so that the two local processors respectively verify the peer transmission data based on the peer verification code, and the two local processors are two processors connected to the local Ethercat site; Among the two peer processors, the data to be transmitted sent by the first peer processor is a part of the original data, and the data to be transmitted sent by the second peer processor is another part of the original data, and the 2-out-of-2 check performed by the two peer processors is performed on the original data; The verification code to be transmitted sent by the first peer processor is a part of the original verification code, and the verification code to be transmitted sent by the second peer processor is another part of the original verification code, and the original verification code is determined based on the original data; The peer transmission data and the peer check code are determined by the peer Ethercat site through the following steps: Combining the two groups of received data to be transmitted to obtain the opposite end transmission data; The two groups of received verification codes to be transmitted are combined to obtain the peer verification code.
