Industrial opcua high-reliability communication method and system based on multi-layer decision and incremental synchronization

CN122932914APending Publication Date: 2026-10-16FUSHI NEW ENERGY TECH (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611133109.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-29
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0005]本发明的目的在于克服现有技术中存在的数据传输冗余量大、链路选择缺乏智能评估、冗余保护机制不足等缺陷,提供一种基于多层决策与增量同步的工业OPCUA高可靠通信方法及系统

Benefits of technology

本发明通过增量数据传输机制,仅传输相邻周期间空间坐标的偏移数值,相比传输完整坐标数据,显著减少了数据传输量,降低了网络带宽占用,提高了通信效率。这在高频率控制场景中尤为重要,能够节省约60%至80%的传输数据量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122932914A_ABST
    Figure CN122932914A_ABST
Patent Text Reader

Abstract

The application provides an industrial OPCUA high-reliability communication method and system based on multi-layer decision and incremental synchronization, and relates to the technical field of industrial communication. In the application, the spatial coordinates in the current cycle data packet and the last cycle data packet issued by the publishing end to multiple robot nodes are extracted, the offset value between the two is calculated and encapsulated as an incremental data message; meanwhile, the data retransmission times and network idle time of each transmission link are collected, and the evaluation value representing the congestion degree is calculated; the transmission links with the minimum and second minimum evaluation values are respectively assigned as the first communication link and the second communication link; the incremental data message is sent through the first communication link, and the redundant recovery message is generated according to the incremental data message and sent through the second communication link. The technical scheme provided by the application reduces the network transmission load, improves the communication reliability, and avoids data loss caused by link congestion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of industrial communication technology, and in particular to a highly reliable communication method and system for industrial OPCUA based on multi-layer decision-making and incremental synchronization. Background Technology

[0002] OPCUA (OPC Unified Architecture) is a communication protocol standard used in industrial automation, widely applied to data interaction between industrial devices. In multi-robot collaborative operation scenarios, the sending end needs to send control commands and spatial coordinate data to multiple robot nodes in real time to achieve precise collaborative motion control.

[0003] Existing industrial OPCUA communication solutions typically use full data transmission, meaning that a complete data packet is sent to each robot node in each communication cycle.

[0004] This approach has the following problems: First, in high-frequency control cycles, the coordinate changes between two consecutive data packets are often small, and transmitting complete data packets will cause a large amount of redundant data transmission, consuming valuable network bandwidth resources; second, existing technologies lack real-time assessment of network status when selecting links, and cannot intelligently schedule according to the actual congestion of each transmission link, which can easily lead to data queuing delays or loss on congested links; third, traditional solutions lack effective redundancy protection mechanisms, and once the main transmission link fails or loses packets, data cannot be quickly recovered, affecting the real-time performance and reliability of robot control. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of existing technologies, such as large data transmission redundancy, lack of intelligent evaluation in link selection, and insufficient redundancy protection mechanisms, and to provide an industrial OPCUA high-reliability communication method and system based on multi-level decision-making and incremental synchronization.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: Firstly, this application provides a highly reliable communication method for industrial OPCUA based on multi-layer decision-making and incremental synchronization, including: Extract the current spatial coordinates from the current period data packets sent by the publishing end to multiple robot nodes, and the previous spatial coordinates from the previous period data packets; Calculate the offset value between the current spatial coordinates and the previous spatial coordinates, and encapsulate the offset value into an incremental data message; Collect the number of data retransmissions and network idle time for each transmission link between the publishing terminal and the multiple robot nodes; Based on the number of data retransmissions and the network idle time, an assessment value representing the congestion level of each transmission link is calculated. The transmission link with the smallest evaluation value is assigned as the first communication link, and the transmission link with the second smallest evaluation value is assigned as the second communication link; The incremental data message is sent to the plurality of robot nodes through the first communication link. A redundant recovery message is generated based on the incremental data message, and the redundant recovery message is sent to the plurality of robot nodes through the second communication link.

[0007] Optionally, the current spatial coordinates in the current periodic data packets sent by the publishing end to multiple robot nodes, and the previous spatial coordinates in the previous periodic data packets are extracted, including: The underlying arrangement structure of the data packets in the current period is parsed according to the order of the physical node addresses of each robot node in the communication network. A fixed-length sequence of bytes is read from the target starting position and forward from the underlying arrangement structure of the parsed data packet, which is used as the current spatial coordinates; The underlying arrangement structure of the data packets in the previous cycle is parsed according to the order of the physical node addresses. Based on the underlying arrangement structure of the data packets of the previous period, the spatial coordinates corresponding to the same physical node address are extracted from the storage unit that stores the local historical records.

[0008] Optionally, the offset value between the current spatial coordinates and the previous spatial coordinates is calculated, and the offset value is encapsulated into an incremental data message, including: Extract the first number string consisting of zeros and ones corresponding to the current spatial coordinates, and extract the second number string consisting of zeros and ones corresponding to the previous spatial coordinates; The least significant bit of the first number string and the least significant bit of the second number string are placed in the same position for comparison calculation; Starting from the least significant bit, the values ​​of the first number string and the second number string at corresponding positions are compared bit by bit to obtain the offset value; All the offset values ​​are concatenated into a continuous data string according to the order in which the physical node addresses are arranged. Add a start segment and an end segment that conform to the preset protocol specification to the continuous data string to form the incremental data message.

[0009] Optionally, the number of data retransmissions and network idle time for each transmission link between the publishing terminal and the multiple robot nodes are collected, including: Monitor the data transmission status of the underlying links on each transmission link between the publishing terminal and each of the robot nodes; Record the number of times the same data is retransmitted between the time each transmission link sends data and the time it receives a feedback signal in the current period, to obtain the number of data retransmissions; The total time consumed by each of the transmission links during the current period when no data transmission or reception operations are performed is accumulated to obtain the network idle time.

[0010] Optionally, based on the number of data retransmissions and the network idle time, an assessment value representing the congestion level of each transmission link is calculated, including: Extract the number of data retransmissions and the network idle time for each of the transmission links; The number of data retransmissions is used as the dividend, and the network idle time is used as the divisor; The quotient is calculated by dividing the number of data retransmissions by the network idle time. The calculated quotient is rounded to a predetermined number of decimal places to obtain the filtered numerical result. The filtered numerical results are used as the evaluation values ​​representing the congestion level of each transmission link.

[0011] Optionally, the transmission link with the smallest evaluation value is assigned as the first communication link, and the transmission link with the second smallest evaluation value is assigned as the second communication link, including: Collect the assessment values ​​representing the degree of congestion for all the aforementioned transmission links; Compare the numerical values ​​of all the assessment values ​​representing the degree of congestion in pairs; Based on the arrangement relationship in the comparison results, all the transmission links are arranged into a sequential sequence with the beginning and end connected. Select the first transmission link in the sequentially arranged order and assign it as the first communication link; Select the second transmission link from the sequentially arranged sequence of connected ends, and assign it as the second communication link.

[0012] Optionally, generating a redundant recovery message based on the incremental data message includes: Set a fixed-length binary value as the pre-defined data to be used as the divisor; Add zero-value data bits, consistent with the pre-set data length used as a divisor, to the end of the incremental data message to form a data message with zero-value appended at the end; The process of performing bitwise logical division on the data message with zero-added values ​​at the end and the pre-set data used as the divisor; Obtain the remainder bit sequence remaining after the bitwise logical division operation is completed; The remaining bit sequence is combined with the identification code used to indicate the message type attribute to obtain the redundancy recovery message.

[0013] Secondly, this application provides a highly reliable industrial OPCUA communication system based on multi-layer decision-making and incremental synchronization, comprising: The extraction module is used to extract the current spatial coordinates from the current period data packets sent by the publishing end to multiple robot nodes, and the previous spatial coordinates from the previous period data packets. The first calculation module is used to calculate the offset value between the current spatial coordinates and the previous spatial coordinates, and encapsulate the offset value into an incremental data message. The data acquisition module is used to collect the number of data retransmissions and network idle time for each transmission link between the publishing terminal and the multiple robot nodes; The second calculation module is used to calculate an evaluation value representing the congestion level of each transmission link based on the number of data retransmissions and the network idle time. The allocation module is used to allocate the transmission link with the smallest evaluation value as the first communication link, and the transmission link with the second smallest evaluation value as the second communication link; The sending module is configured to send the incremental data message to the plurality of robot nodes through the first communication link, generate a redundant recovery message based on the incremental data message, and send the redundant recovery message to the plurality of robot nodes through the second communication link.

[0014] A computing device includes a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are invoked and executed by the processing component to implement the above-described industrial OPCUA high-reliability communication method based on multi-level decision-making and incremental synchronization.

[0015] A computer storage medium storing a computer program, which, when executed by a computer, implements the aforementioned industrial OPCUA high-reliability communication method based on multi-level decision-making and incremental synchronization.

[0016] The beneficial effects of this invention are as follows: This invention utilizes an incremental data transmission mechanism to transmit only the offset values ​​of spatial coordinates between adjacent cycles. Compared to transmitting complete coordinate data, this significantly reduces data transmission volume, lowers network bandwidth usage, and improves communication efficiency. This is particularly important in high-frequency control scenarios, saving approximately 60% to 80% of the transmitted data.

[0017] This invention achieves intelligent link selection based on real-time network status by collecting data retransmission counts and network idle time on each transmission link in real time, and calculating an assessment value characterizing the degree of congestion. Compared with traditional fixed link allocation or simple polling mechanisms, this invention can dynamically select the current optimal link, avoiding data queuing delays on congested links, reducing packet loss rate, and improving the real-time performance and stability of communication.

[0018] This invention employs a dual-link redundant transmission mechanism. While incremental data packets are transmitted via the first communication link, redundant recovery packets are transmitted on the second communication link. When packet loss or failure occurs on the main link, the receiving end can quickly recover data using the redundant recovery packets without waiting for retransmission, significantly improving communication reliability. In particular, the use of cyclic redundancy check (CRC) coding to generate the redundant recovery packets not only detects errors but also performs a certain degree of error correction, further enhancing the system's fault tolerance.

[0019] This invention organically combines three mechanisms—incremental transmission, multi-layer decision link selection, and redundancy protection—to form a complete high-reliability communication solution, which is particularly suitable for application scenarios with extremely high requirements for real-time performance and reliability, such as collaborative control of industrial robots.

[0020] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a schematic diagram of the overall process of the method of the present invention.

[0023] Figure 2 This is a schematic diagram of data packet parsing and coordinate extraction in this invention.

[0024] Figure 3 This is a schematic diagram of the incremental data calculation and encapsulation process in this invention.

[0025] Figure 4This is a schematic diagram of link status monitoring and evaluation in this invention.

[0026] Figure 5 This is a schematic diagram of the dual-link transmission and redundancy protection architecture in this invention.

[0027] Figure 6 This is a schematic diagram of the functional module structure of the system of the present invention. Detailed Implementation

[0028] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the scope of protection of the invention.

[0029] like Figure 1 As shown, this embodiment provides a highly reliable communication method for industrial OPCUA based on multi-layer decision-making and incremental synchronization, applied to a collaborative control scenario for industrial robots. In this scenario, a central publisher needs to periodically send control commands and spatial coordinate data to multiple robot nodes, with a control cycle typically ranging from 10 milliseconds to 50 milliseconds. Multiple physical or logical transmission links exist between the publisher and each robot node, and these links may be based on different network devices or routing paths.

[0030] The core idea of ​​this method is to reduce data volume through incremental transmission, perform intelligent routing by real-time evaluation of link status, and ensure reliable data delivery through a dual-link redundancy mechanism. Specifically, it includes the following steps: Step S101: Extract the current spatial coordinates from the current periodic data packets sent by the publishing end to multiple robot nodes, and the previous spatial coordinates from the previous periodic data packets.

[0031] In industrial OPCUA communication, the publishing end sends data packets to multiple robot nodes at fixed intervals. Each data packet contains the target spatial coordinates of each robot node. To achieve incremental transmission, it is necessary to first extract and compare the spatial coordinate data of the current period and the previous period.

[0032] like Figure 2 As shown, the specific extraction process is as follows: First, the underlying structure of the current period's data packets is parsed according to the order of the physical node addresses of each robot node in the communication network. Here, the physical node address refers to the unique identifier registered by each robot node in the OPCUA server, typically arranged according to the order in which the nodes joined the network or a pre-planned numbering system. For example, assuming there are 5 robot nodes in the network with physical node addresses Node01, Node02, Node03, Node04, and Node05, the coordinate data in the data packets will also be arranged in this order.

[0033] The underlying structure of a data packet refers to the byte-level organization of data packets below the application layer of the OPCUA protocol stack. A typical data packet structure includes: a header, a node identifier area, a data area, and a checksum area. The data area stores the spatial coordinates of each node sequentially according to their address order. The parsing process involves locating the beginning of the data area and identifying the boundaries of each field according to the OPCUA protocol specification.

[0034] Next, a fixed-length sequence of bytes is read from the underlying structure of the parsed data packet, starting from the target's starting position, to serve as the current spatial coordinates. Here, the target's starting position refers to the position of the first byte in the data packet corresponding to the coordinate data of a specific robot node. Spatial coordinates are typically represented using a three-dimensional Cartesian coordinate system, including X, Y, and Z components. Each component is represented by a 32-bit floating-point number, therefore the spatial coordinates of each node occupy 12 bytes. By reading 12 bytes consecutively from the target's starting position, the current spatial coordinates of that node can be obtained.

[0035] For example, for Node01, assuming its coordinate data starts from byte 20 of the data packet, 12 bytes are read consecutively from byte 20. Bytes 20-23 are the X coordinate, bytes 24-27 are the Y coordinate, and bytes 28-31 are the Z coordinate. Specific coordinate values ​​can be obtained through floating-point decoding, such as X=125.35, Y=230.12, and Z=180.00.

[0036] Then, following the same physical node address order, the underlying data packet structure of the previous cycle is parsed. The previous cycle data packet refers to the data packet sent in the cycle immediately preceding the current cycle. To ensure incremental calculations are possible, the system needs to store the content of the most recently sent data packet in local storage.

[0037] Finally, based on the underlying data packet arrangement structure of the previous period's data packets, the previous spatial coordinates corresponding to the same physical node address are extracted from the locally stored historical records. This locally stored historical records can be a buffer allocated in the publisher's memory, a cache, or a dedicated register. To improve extraction efficiency, a hash table data structure can be used, with the physical node address as the key and the previous coordinate data as the value. This way, during extraction, a hash lookup based on the node address is all that's needed to quickly locate the corresponding historical coordinate data.

[0038] Through the above process, the spatial coordinate data of each robot node in the current cycle and the previous cycle are obtained, laying the foundation for subsequent incremental calculations. It is worth noting that in the first cycle after the first startup or after an abnormal restart, since there is no data from the previous cycle, the full transmission mode should be adopted to send the complete spatial coordinate data to each node and save the data to the local storage unit as the benchmark for the incremental calculation of the next cycle.

[0039] Step S102: Calculate the offset value between the current spatial coordinates and the previous spatial coordinates, and encapsulate the offset value into an incremental data message.

[0040] After obtaining the current and previous spatial coordinates, it is necessary to calculate the offset between them and encapsulate the offset value into an incremental data message for transmission. The purpose of this step is to significantly reduce the amount of data transmitted by transmitting only the coordinate change rather than the complete coordinate value.

[0041] like Figure 3 As shown, the specific calculation and encapsulation process is as follows: First, extract the first numeric string (consisting of zeros and ones) corresponding to the current spatial coordinate, and extract the second numeric string (consisting of zeros and ones) corresponding to the previous spatial coordinate. Spatial coordinates are stored internally in binary form. Taking a 32-bit floating-point number as an example, according to the IEEE 754 standard, a floating-point number consists of 1 sign bit, 8 exponent bits, and 23 mantissa bits, totaling 32 bits. Therefore, a three-dimensional spatial coordinate (X, Y, and Z components) corresponds to a 96-bit binary number. The extraction process involves converting the memory representation of these floating-point numbers into binary bit strings.

[0042] For example, for Node01, assuming its current coordinates are X=125.35, Y=230.12, Z=180.00, after converting to binary, it yields a 96-bit first number string; its previous coordinates were X=125.30, Y=230.10, Z=180.00, which, after converting to binary, yields a 96-bit second number string.

[0043] Next, the least significant bit of the first and second number strings are placed in the same position for comparison calculation. Here, the least significant bit refers to the rightmost bit of the binary number, i.e., the bit with the least weight. Aligning the least significant bits of the two number strings is necessary for subsequent bit-by-bit comparison operations. In a computer, this can be achieved through bit-aligned memory operations or dedicated bitwise operation instructions.

[0044] Then, starting from the least significant bit, the values ​​at corresponding positions in the first and second binary strings are compared bit by bit to obtain the offset value. This bit-by-bit comparison refers to performing a bitwise XOR operation on the two binary strings. The characteristic of the XOR operation is that the result is 0 when two bits are the same, and 1 when two bits are different. Therefore, the result of the XOR operation precisely represents the difference between the two coordinate values ​​at the binary level.

[0045] The specific formula for calculating the offset value is as follows:

[0046] in, Indicates the offset value. The binary representation of the current spatial coordinates (the first number string). The binary representation of the previous spatial coordinates (the second number string). This indicates a bitwise XOR operation.

[0047] For example, suppose the current value of a coordinate component corresponds to the binary string 01000010111101010110011001100110 (corresponding to decimal 125.35), and the previous value corresponds to the binary string 01000010111101010011001100110011 (corresponding to decimal 125.30). Then the XOR operation result is 00000000000000000010101010101010101. This result is the offset value of that coordinate component.

[0048] It is important to note that in collaborative control scenarios for industrial robots, the spatial coordinate changes between adjacent cycles are typically small. Therefore, most bits in the offset value are 0, with only a few bits being 1. This is precisely why incremental transmission can significantly reduce the amount of data. To further compress the data, the offset value can be optimized through encoding, such as using run-length encoding or Huffman coding. However, in this embodiment, to maintain real-time performance, the original offset value is transmitted directly.

[0049] Next, all offset values ​​are concatenated into a continuous data string according to the order of their physical node addresses. Assuming there are N robot nodes in the network, and each node's spatial coordinates contain 3 components, each component being 32 bits, then each node's offset value is 96 bits. The offset values ​​of the N nodes are then concatenated sequentially to form a string of length 96. A continuous string of N bits.

[0050] For example, for 5 robot nodes, the length of the concatenated data string is 96. 5 = 480 bits, or 60 bytes. Compared to transmitting complete coordinate data (12 bytes per node, 60 bytes in total), although the number of bytes is the same, the actual amount of data transmitted can be further reduced through protocol layer compression mechanisms (such as OPCUA compression options) because a large number of bits in the offset value are 0.

[0051] Finally, start and end segments conforming to the preset protocol specifications are added to the continuous data string to form an incremental data message. The preset protocol specifications here refer to the message format defined by the OPCUA protocol or a user-defined application layer protocol. The start segment typically includes fields such as: synchronization header, message type identifier, message length, and timestamp; the end segment typically includes fields such as: checksum and end flag.

[0052] For example, a complete incremental data message structure is as follows:

[0053] The synchronization header uses a fixed byte sequence (e.g., 0xAA0x550xAA0x55) to identify the start of the message at the receiving end; the message type identifier is used to distinguish different types such as incremental messages, full messages, and control messages; the message length indicates the number of bytes in the data area; the timestamp records the precise time of message generation, which is used by the receiving end to determine the timeliness of the data; the CRC check is used to detect bit errors during transmission; and the end flag is used to indicate the end of the message.

[0054] Through the above encapsulation process, the system converts the offset value into an incremental data packet that conforms to the protocol specification, which can be transmitted in the OPCUA network.

[0055] Step S103: Collect the number of data retransmissions and network idle time for each transmission link between the publishing terminal and the multiple robot nodes.

[0056] To achieve intelligent link selection, the congestion level of each transmission link needs to be assessed in real time. This invention uses two indicators—data retransmission count and network idle time—to characterize the link status.

[0057] like Figure 4 As shown, the specific data collection process is as follows: First, monitor the data transmission status of each transmission link between the publishing terminal and each robot node at the lowest level. Here, "lower level link" refers to the data link layer and physical layer in the OSI seven-layer model, corresponding to specific transmission media and protocols such as Ethernet and wireless networks. Monitoring can be achieved through the API interface provided by the network interface card (NIC) driver, or through dedicated network monitoring hardware or software tools (such as tcpdump, Wireshark, etc.).

[0058] The monitored data includes: packet transmission time, acknowledgment signal reception time, retransmission events, and idle periods on each link. These information has corresponding statistical counters at both the transport and network layers of the TCP / IP protocol stack, and can be queried via system calls or the SNMP (Simple Network Management Protocol).

[0059] Next, the number of times each transmission link retransmits the same data within the current period until it receives a feedback signal is recorded to obtain the data retransmission count. Here, "data retransmission" refers to the behavior of the sending end retransmitting the same data packet according to the protocol because it failed to receive an acknowledgment signal (ACK) from the receiving end in a timely manner.

[0060] In the TCP protocol, the sending end starts a retransmission timer after sending a data packet. If an ACK is received from the receiving end before the timer expires, the transmission is considered successful; if no ACK is received after the timeout, the data packet is considered to have been lost or delayed, triggering the retransmission mechanism. The retransmission count is the total number of retransmissions that occur within a control period (e.g., 50 milliseconds).

[0061] For example, suppose that in the current period, the publishing end sends 10 data packets to a robot node, and 2 of these data packets are retransmitted because they did not receive ACKs in time. Then the data retransmission count for this link is 2. The higher the retransmission count, the worse the link quality, which may indicate problems such as congestion, interference, or hardware failure.

[0062] Then, the total time consumed by each transmission link during the current period without any data transmission or reception operations is accumulated to obtain the network idle time. Network idle time refers to the period during which a link is available but not used. Within a control period, the remaining time, excluding the time spent actually transmitting data and waiting for acknowledgments, is the idle time. The specific calculation method is as follows:

[0063] in, Indicates network idle time. Indicates the total duration of the control cycle (e.g., 50 milliseconds). This indicates the actual time consumed in transmitting data. This indicates the time to wait for a confirmation signal.

[0064] For example, assuming a control cycle of 50 milliseconds, if a link actually takes 8 milliseconds to transmit data and 12 milliseconds to wait for acknowledgment, then the idle time is 50 - 8 - 12 = 30 milliseconds. A longer idle time indicates a lighter link load and more available bandwidth.

[0065] By collecting two metrics—the number of data retransmissions and network idle time—the system can comprehensively assess the real-time status of each transmission link, providing data support for subsequent link selection.

[0066] Step S104: Based on the number of data retransmissions and the network idle time, calculate the evaluation value representing the congestion level of each transmission link.

[0067] Based on the number of data retransmissions and network idle time, an assessment value that comprehensively reflects the degree of link congestion is calculated. The smaller the assessment value, the better the link quality.

[0068] The specific calculation process is as follows: First, extract the number of data retransmissions and network idle time for each transmission link. Assume there are... For the first transmission link, Link The number of times the data is resent is recorded as Network idle time is recorded as .

[0069] Next, the number of data retransmissions is used as the dividend, and the network idle time is used as the divisor to calculate the quotient. The formula for calculating the evaluation value is:

[0070] in, Indicates the first Evaluation values ​​for each link.

[0071] The design logic of this formula is as follows: the more times data is retransmitted, the worse the link quality, and the higher the evaluation value should be; the longer the network idle time, the lighter the link load and the higher the availability, and the lower the evaluation value should be. By using division, these two factors are combined into a unified evaluation index.

[0072] For example, assuming link A retransmits 2 times and has an idle time of 30 milliseconds, the evaluated value would be: If Link B retransmits 5 times and has an idle time of 15 milliseconds, then the evaluated value is: Clearly, the link A smaller assessment value indicates lower congestion and better quality.

[0073] Then, the calculated quotient is rounded to a predetermined number of decimal places to obtain the filtered numerical result. The purpose of rounding to decimal places is to avoid the accumulation of precision errors in floating-point operations and to simplify subsequent numerical comparison operations. In practical applications, it can be set to round to 4 decimal places, i.e., accurate to the ten-thousandths place. For example, the evaluation value of link A is rounded to 0.0667, and the evaluation value of link B is rounded to 0.3333.

[0074] Finally, the filtered numerical results are used as assessment values ​​representing the congestion level of each transmission link. These assessment values ​​will be used for link ranking and selection in the next step.

[0075] It's important to note that when the network idle time of a link is 0 (i.e., the link is fully saturated), the division operation will produce an infinite result. To avoid this, a lower limit constraint can be imposed on the idle time before the calculation, for example, setting a minimum idle time of 0.1 milliseconds. Alternatively, the formula for calculating the evaluation value can be modified as follows:

[0076] in, It is a very small positive number (e.g., 0.0001) used to prevent division by zero errors.

[0077] Step S105: Assign the transmission link with the smallest evaluation value as the first communication link, and assign the transmission link with the second smallest evaluation value as the second communication link.

[0078] Based on the evaluation values ​​of each transmission link, the links are sorted and primary and backup transmission links are allocated.

[0079] like Figure 5 As shown, the specific allocation process is as follows: First, we compile the assessment values ​​representing the congestion level for all transmission links. Assuming there are M transmission links in the network, this forms a set of assessment values. .

[0080] Next, all the assessment values ​​representing the degree of congestion are compared pairwise. This is a sorting operation, which can be implemented using efficient algorithms such as quicksort or mergesort. The comparison is based on the magnitude of the assessment value; the smaller the value, the better the link quality, and the higher the sorting priority.

[0081] Then, based on the arrangement relationships in the comparison results, all transmission links are arranged into a sequential sequence with the first link connected to the last. The sorted link sequence is denoted as... ,in, The link with the lowest corresponding evaluation value, The link with the largest corresponding evaluation value satisfies .

[0082] Next, the transmission link that is first in the sequentially arranged order (with the first and last links connected) is selected and assigned as the first communication link. (The rest of the text is missing.) It is assigned as the first communication link for transmitting primary incremental data packets. Because... It has the lowest evaluation value, the lowest congestion level, and the highest reliability, making it the most suitable as the main transmission channel.

[0083] Finally, the transmission link that is second in the sequentially arranged order (with the first and last links connected) is selected and assigned as the second communication link. It is assigned as the second communication link for transmitting redundancy recovery messages. As the link with the second smallest evaluation value, although its quality is slightly inferior... However, it still has good reliability and is suitable as a backup transmission channel.

[0084] The advantage of using a dual-link transmission mechanism is that when the first communication link experiences a sudden congestion or failure that leads to data loss, the receiving end can still receive redundant recovery messages through the second communication link, thereby reconstructing the original data, avoiding the delay of retransmission waiting, and ensuring the real-time performance and reliability of communication.

[0085] For example, suppose there are 5 transmission links in an industrial network, with the following evaluation values: Link A: 0.0667, Link B: 0.3333, Link C: 0.1200, Link D: 0.0500, and Link E: 0.2000. After sorting, the ordered sequence is as follows: Therefore, link D is assigned as the first communication link, and link A is assigned as the second communication link.

[0086] It is worth noting that link evaluation and allocation are performed periodically. In each control cycle, the system re-collects the status data of each link, recalculates the evaluation values, and dynamically adjusts the allocation of the first and second communication links based on the latest results. This dynamic adjustment mechanism allows the system to adapt to real-time changes in network conditions and always select the optimal transmission path.

[0087] Step S106: The incremental data message is sent to the plurality of robot nodes through the first communication link; a redundant recovery message is generated based on the incremental data message; and the redundant recovery message is sent to the plurality of robot nodes through the second communication link.

[0088] Step S107: After the link allocation is completed, an incremental data message is sent through the first communication link, and a redundancy recovery message is generated based on the incremental data message and sent through the second communication link.

[0089] The incremental data packet transmission process is as follows: The system will transmit the incremental data packet, encapsulated in step two, through the OPCUA protocol stack's transmission interface, specifying the first communication link. At the network layer, link selection can be achieved by binding to a specific network interface or setting a routing policy.

[0090] The generation of the redundancy recovery message uses Cyclic Redundancy Check (CRC) encoding technology, and the specific process is as follows: First, a fixed-length binary value is designated as the pre-defined divisor. This binary value is called the generator polynomial. In CRC encoding, the generator polynomial is pre-defined, with common standards including CRC-16 and CRC-32. For example, the generator polynomial of CRC-16 is... The corresponding binary representation is 11000000000000101 (17 bits, with the highest bit being 1).

[0091] Next, zero-value data bits, matching the pre-defined length used as the divisor, are added to the end of the incremental data message, forming a data message with extended zero values ​​at the end. Assuming the generator polynomial length is n bits (including the most significant 1), n-1 zero bits are added to the end of the incremental data message. For example, for CRC-16 (a 17-bit generator polynomial), 16 zero bits are added to the end of the message.

[0092] Let M be the binary representation of the incremental data packet, and m bits be its length. The expanded data packet is: (Equivalent to shifting left by n-1 bits and padding the right side with zeros).

[0093] Then, the data message padded with zeros at the end is subjected to bitwise logical division with the pre-set data used as the divisor. Here, logical division refers to modulo-2 division, i.e., binary division without considering carry and borrow, equivalent to a bitwise XOR operation.

[0094] The process of modulo 2 division is as follows: First, the expanded data packet The generator polynomial G is used as the dividend. Then, starting from the highest bit of the dividend, it is aligned with the divisor. If the current highest bit is 1, the divisor is XORed with the corresponding number of bits starting from the current bit. If the current highest bit is 0, the bits are shifted directly. The above process is repeated until all bits of the dividend have been processed. The remaining bits are the remainder.

[0095] For example, assuming the incremental data packet is 1101011011 (10 bits), using the CRC-4 generator polynomial 10011 (5 bits), it is expanded to 11010110110000 (14 bits). The modulo-2 division process is as follows:

[0096] Next, obtain the remainder sequence after the bitwise logical division operation. In the example above, the remainder is 1110 (4 bits). This remainder is the CRC checksum.

[0097] Finally, the remaining bit sequence is combined with the identification code used to indicate the message type attribute to obtain the redundancy recovery message. The identification code is used to identify the message as a redundancy recovery message, distinguishing it from incremental data messages. For example, a 1-byte type identifier can be set, with a value of 0x02 indicating a redundancy recovery message (as opposed to 0x01 indicating an incremental data message).

[0098] The complete structure of the redundancy recovery message is as follows:

[0099] It is important to note that the redundancy recovery message only contains the CRC checksum, not the complete incremental data. Upon receiving the incremental data message, the receiving end performs a CRC check using the same generator polynomial. If the check passes, the data is complete and error-free; if the check fails, an error occurred during transmission. In this case, the receiving end will request to re-acquire the data via a second communication link, or utilize the CRC's error correction capabilities to perform some degree of error correction.

[0100] In step S108, the redundancy recovery message is sent to multiple robot nodes through the second communication link. Since the second communication link is physically or logically independent of the first communication link, even if the first communication link fails or becomes congested, the second communication link still has a high probability of maintaining normal operation, thus ensuring the reliability of data transmission.

[0101] Upon receiving both the incremental data message and the redundancy recovery message simultaneously, the receiving end first performs a CRC check on the incremental data message. If the check passes, it directly uses the offset value in the incremental data message, combined with the previously stored spatial coordinates, to recover the complete spatial coordinates for the current period, and controls the robot's movement accordingly. If the check fails, it uses the CRC checksum in the redundancy recovery message to attempt to locate and correct the error bits, or requests the transmitting end to resend the data.

[0102] Through the above six steps, this invention realizes highly reliable industrial OPCUA communication based on incremental transmission, intelligent link selection, and redundancy protection.

[0103] like Figure 6 As shown, this embodiment also provides an industrial OPCUA high-reliability communication system based on multi-layer decision-making and incremental synchronization to implement the above method. The system includes the following functional modules: The extraction module 100 is used to extract the current spatial coordinates from the current periodic data packets sent by the publishing end to multiple robot nodes, and the previous spatial coordinates from the previous periodic data packets. This module internally includes a data packet parsing unit and a coordinate extraction unit, which are responsible for parsing the underlying structure of the data packets and extracting coordinate data from them, respectively.

[0104] The first calculation module 200 is used to calculate the offset between the current spatial coordinates and the previous spatial coordinates, and encapsulate the offset value into an incremental data message. This module includes an XOR operation unit and a message encapsulation unit, which are responsible for performing bitwise XOR calculations and adding protocol header and footer fields, respectively.

[0105] The data acquisition module 300 is used to collect the number of data retransmissions and network idle time for each transmission link between the publishing terminal and multiple robot nodes. This module connects to each transmission link through a network monitoring interface to obtain link status information in real time.

[0106] The second calculation module 400 is used to calculate an assessment value representing the congestion level of each transmission link based on the number of data retransmissions and network idle time. This module implements the division calculation and decimal place retention functions for the assessment value.

[0107] The allocation module 500 is used to allocate the transmission link with the smallest evaluation value as the first communication link and the transmission link with the second smallest evaluation value as the second communication link. This module internally includes a sorting unit and a link selection unit.

[0108] The sending module 600 is used to send incremental data packets to multiple robot nodes through a first communication link, generate redundant recovery packets based on the incremental data packets, and send the redundant recovery packets to multiple robot nodes through a second communication link. This module internally includes a CRC encoding unit and a dual-link transmission unit.

[0109] The various functional modules are connected via an internal data bus, enabling information sharing and collaborative operation. The system can be deployed on the hardware platform of the publishing end, such as an industrial control computer, embedded controller, or dedicated communication gateway device.

[0110] This embodiment also provides a computing device, including a processing component and a storage component. The processing component may be a central processing unit (CPU), a digital signal processor (DSP), a field-programmable gate array (FPGA), or an application-specific integrated circuit (ASIC). The storage component may be random access memory (RAM), read-only memory (ROM), flash memory, or a solid-state drive (SSD). The storage component stores one or more computer instructions, which are invoked and executed by the processing component to implement the aforementioned high-reliability communication method for industrial OPCUA based on multi-level decision-making and incremental synchronization.

[0111] This embodiment also provides a computer storage medium storing a computer program. When the computer program is executed by a computer, it implements the aforementioned high-reliability communication method for industrial OPCUA based on multi-level decision-making and incremental synchronization. The computer storage medium can be any medium capable of storing a computer program, such as a USB flash drive, external hard drive, optical disc, or network server storage space.

[0112] This embodiment, based on Embodiment 1, further illustrates the application effect in a specific industrial scenario.

[0113] Suppose a car manufacturing workshop has six industrial robots deployed, each responsible for welding, painting, assembly, and other processes, requiring collaborative operation. The central control system acts as the sending end, issuing spatial coordinate commands to each robot node every 20 milliseconds. The sending end and each robot node are connected via an industrial Ethernet network, with four transmission links, each based on a different physical network interface and switch path.

[0114] During system operation, the data acquisition module 300 monitors the status of each link in real time. At a specific moment, the collected data is as follows:

[0115] After sorting, the link quality from best to worst is: Link 3, Link 1, Link 4, Link 2. Therefore, the allocation module 500 allocates Link 3 as the first communication link and Link 1 as the second communication link.

[0116] The extraction module 100 extracts the spatial coordinates of each robot node from the current periodic data packet and the previous periodic data packet. Taking robot node 1 as an example, its current coordinates are... The previous coordinates were .

[0117] The first calculation module 200 calculates the offset values. Since the X and Y coordinates change very little and the Z coordinate remains unchanged, most bits in the binary representation of the offset values ​​are 0. After concatenating the offset values ​​of the six robot nodes, a 72-byte data string is formed. After compression processing by the OPCUA protocol layer, the actual transmitted incremental data packet is only 25 bytes, a reduction of approximately 65% ​​compared to the full 72 bytes transmitted.

[0118] The sending module 600 sends a 25-byte incremental data message through link 3, and at the same time generates a 4-byte CRC-32 checksum based on the incremental data message, encapsulates it into a redundancy recovery message, and sends it through link 1.

[0119] During a transmission, link 3 experienced a bit flip due to electromagnetic interference. Upon receiving the incremental data packet, the robot node performed a CRC check and found it to be faulty. At this point, the node used the redundancy to recover the CRC checksum from the packet, located the faulty bit using a CRC error correction algorithm, and corrected it, successfully recovering the correct offset value. The entire process took less than one millisecond and did not cause any delay to robot control.

[0120] If a traditional retransmission mechanism is used, when a data error is detected, a timeout is required (usually set to 10-20 milliseconds), followed by a request to the publishing end to retransmit, and then another complete transmission process (approximately 5 milliseconds). The total delay reaches 15-25 milliseconds, exceeding one control cycle, which can lead to inconsistent robot movement and even safety hazards. This invention effectively avoids this problem through a dual-link redundancy mechanism.

[0121] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. For those skilled in the art, the present invention can be modified and varied in various ways. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A highly reliable communication method for industrial OPCUA based on multi-level decision-making and incremental synchronization, characterized in that, include: Extract the current spatial coordinates from the current period data packets sent by the publishing end to multiple robot nodes, and the previous spatial coordinates from the previous period data packets; Calculate the offset value between the current spatial coordinates and the previous spatial coordinates, and encapsulate the offset value into an incremental data message; Collect the number of data retransmissions and network idle time for each transmission link between the publishing terminal and the multiple robot nodes; Based on the number of data retransmissions and the network idle time, an assessment value representing the congestion level of each transmission link is calculated. The transmission link with the smallest evaluation value is assigned as the first communication link, and the transmission link with the second smallest evaluation value is assigned as the second communication link; The incremental data message is sent to the plurality of robot nodes through the first communication link. A redundant recovery message is generated based on the incremental data message, and the redundant recovery message is sent to the plurality of robot nodes through the second communication link.

2. The method according to claim 1, characterized in that, Extract the current spatial coordinates from the current periodic data packets sent by the publishing end to multiple robot nodes, and the previous spatial coordinates from the previous periodic data packets, including: The underlying arrangement structure of the data packets in the current period is parsed according to the order of the physical node addresses of each robot node in the communication network. A fixed-length sequence of bytes is read from the target starting position and forward from the underlying arrangement structure of the parsed data packet, which is used as the current spatial coordinates; The underlying arrangement structure of the data packets in the previous cycle is parsed according to the order of the physical node addresses. Based on the underlying arrangement structure of the data packets of the previous period, the spatial coordinates corresponding to the same physical node address are extracted from the storage unit that stores the local historical records.

3. The method according to claim 1, characterized in that, Calculate the offset between the current spatial coordinates and the previous spatial coordinates, and encapsulate the offset value into an incremental data message, including: Extract the first number string consisting of zeros and ones corresponding to the current spatial coordinates, and extract the second number string consisting of zeros and ones corresponding to the previous spatial coordinates; The least significant bit of the first number string and the least significant bit of the second number string are placed in the same position for comparison calculation; Starting from the least significant bit, the values ​​of the first number string and the second number string at corresponding positions are compared bit by bit to obtain the offset value; All the offset values ​​are concatenated into a continuous data string according to the order in which the physical node addresses are arranged. Add a start segment and an end segment that conform to the preset protocol specification to the continuous data string to form the incremental data message.

4. The method according to claim 1, characterized in that, Collect the number of data retransmissions and network idle time for each transmission link between the publishing terminal and the multiple robot nodes, including: Monitor the data transmission status of the underlying links on each transmission link between the publishing terminal and each of the robot nodes; Record the number of times the same data is retransmitted between the time each transmission link sends data and the time it receives a feedback signal in the current period, to obtain the number of data retransmissions; The total time consumed by each of the transmission links during the current period when no data transmission or reception operations are performed is accumulated to obtain the network idle time.

5. The method according to claim 1, characterized in that, Based on the number of data retransmissions and the network idle time, an assessment value representing the congestion level of each transmission link is calculated, including: Extract the number of data retransmissions and the network idle time for each of the transmission links; The number of data retransmissions is used as the dividend, and the network idle time is used as the divisor; The quotient is calculated by dividing the number of data retransmissions by the network idle time. The calculated quotient is rounded to a predetermined number of decimal places to obtain the filtered numerical result. The filtered numerical results are used as the evaluation values ​​representing the congestion level of each transmission link.

6. The method according to claim 1, characterized in that, Assigning the transmission link with the smallest evaluation value as the first communication link, and assigning the transmission link with the second smallest evaluation value as the second communication link, includes: Collect the assessment values ​​representing the degree of congestion for all the aforementioned transmission links; Compare the numerical values ​​of all the assessment values ​​representing the degree of congestion in pairs; Based on the arrangement relationship in the comparison results, all the transmission links are arranged into a sequential sequence with the beginning and end connected. Select the first transmission link in the sequentially arranged order and assign it as the first communication link; Select the second transmission link from the sequentially arranged sequence of connected ends, and assign it as the second communication link.

7. The method according to claim 1, characterized in that, Generate a redundant recovery message based on the incremental data message, including: Set a fixed-length binary value as the pre-defined data to be used as the divisor; Add zero-value data bits, consistent with the pre-set data length used as a divisor, to the end of the incremental data message to form a data message with zero-value appended at the end; The process of performing bitwise logical division on the data message with zero-added values ​​at the end and the pre-set data used as the divisor; Obtain the remainder bit sequence remaining after the bitwise logical division operation is completed; The remaining bit sequence is combined with the identification code used to indicate the message type attribute to obtain the redundancy recovery message.

8. A highly reliable industrial OPCUA communication system based on multi-layer decision-making and incremental synchronization, characterized in that, The system is used to implement the industrial OPCUA high-reliability communication method based on multi-level decision-making and incremental synchronization as described in any one of claims 1-7; the system includes: The extraction module is used to extract the current spatial coordinates from the current period data packets sent by the publishing end to multiple robot nodes, and the previous spatial coordinates from the previous period data packets. The first calculation module is used to calculate the offset value between the current spatial coordinates and the previous spatial coordinates, and encapsulate the offset value into an incremental data message. The data acquisition module is used to collect the number of data retransmissions and network idle time for each transmission link between the publishing terminal and the multiple robot nodes; The second calculation module is used to calculate an evaluation value representing the congestion level of each transmission link based on the number of data retransmissions and the network idle time. The allocation module is used to allocate the transmission link with the smallest evaluation value as the first communication link, and the transmission link with the second smallest evaluation value as the second communication link; The generation module is used to send the incremental data message to the plurality of robot nodes through the first communication link, generate a redundant recovery message based on the incremental data message, and send the redundant recovery message to the plurality of robot nodes through the second communication link.

9. A computing device, characterized in that, It includes a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are invoked and executed by the processing component to implement a highly reliable industrial OPCUA communication method based on multi-level decision-making and incremental synchronization as described in any one of claims 1-7.

10. A computer storage medium, characterized in that, The system stores a computer program, which, when executed by a computer, implements a highly reliable industrial OPCUA communication method based on multi-level decision-making and incremental synchronization as described in any one of claims 1-7.