Parallel Redundant Ethernet Receive Processing Method and Related Equipment Based on Ring Sliding Window Algorithm

By adopting a parallel redundant Ethernet receive processing method based on the ring sliding window algorithm, the packet loss problem caused by out-of-order message reception is solved, memory operations are simplified, and software performance and transmission stability are improved.

CN121644016BActive Publication Date: 2026-11-17XIAN MICROELECTRONICS TECH INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511744342.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-11-17
Estimated Expiration
2045-11-25

AI Technical Summary

Technical Problem

Existing parallel redundancy protocols (PRPs) have deficiencies in dynamic network adaptability, synchronization accuracy, hardware implementation, and protocol compatibility, leading to packet loss due to improper handling of out-of-order messages, especially in multipath transmission environments.

Method used

A parallel redundant Ethernet receiving and processing method based on the circular sliding window algorithm is adopted. By initializing the buffer tag array and the circular sliding window pointer, adjusting the pointer position and performing status marking, the array shifting operation is replaced, thereby achieving efficient reception of out-of-order packets and avoiding packet loss.

Benefits of technology

It simplifies the memory allocation process, improves software performance, effectively solves the packet loss problem caused by out-of-order delivery in multipath transmission environments, and improves transmission stability and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121644016B_ABST
    Figure CN121644016B_ABST
Patent Text Reader

Abstract

This invention relates to the field of network bus communication and discloses a parallel redundant Ethernet receiving and processing method and related equipment based on a circular sliding window algorithm. The method includes initializing and configuring a buffer tag array and the start and end pointers of the circular sliding window to establish a record of packet arrival status. Based on this record, when a new packet is received, the positions of the start and end pointers of the circular sliding window are adjusted according to the offset to be adjusted, replacing the array shifting operation. Based on the adjusted pointer positions, the corresponding area within the circular sliding window is marked with a status, and the parallel redundant Ethernet receiving and processing is completed according to the status markings. This invention solves the technical problem of receiving out-of-order packets while avoiding packet loss caused by out-of-order delivery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network bus communication, specifically to a parallel redundant Ethernet receiving and processing method and related equipment based on a ring sliding window algorithm. Background Technology

[0002] Parallel Redundancy Protocol (PRP) is a key technology for achieving highly reliable data transmission. Its core functionality involves a dual-network redundancy architecture to handle data link layer redundancy: the sender copies and distributes single-frame packets to both networks, while the receiver uses a sliding window to determine data redundancy, discarding duplicate frames and sending only the first frame. For example, Shanghai Huanchuang Communication's related patents employ a dynamic discarding strategy to configure parameters, effectively avoiding service failures caused by message order logic in standard PRP.

[0003] The circular sliding window is the core packet loss handling mechanism of PRP. Its upper limit is set to the expected next frame sequence number, and its lower limit is the starting frame sequence number. Out-of-order reassembly is achieved through sequence number comparison. After the receiving end acquires data from both networks, it extracts the first valid frame from the window and discards duplicate frames to ensure data uniqueness. Some physical layer-implemented PRP modules (such as dual-redundant Gigabit Ethernet PHYs) achieve seamless switching and zero recovery time through hardware acceleration. To further optimize performance, existing technologies introduce various optimization methods: dynamic flow control notifies the upper layer to adjust the transmission rate by setting MTU thresholds and flags, mitigating queue overflow packet loss; interleaving coding performs redundant calculations and interleaving on packets during the encoding stage, improving packet loss resistance; clock synchronization ensures timing consistency through a latching mechanism by comparing the clock differences between the two network ports. Currently, this technology is widely used in power protection devices, vehicle-mounted TSN networks, industrial Ethernet, and other fields, achieving microsecond-level latency and 99.999% transmission reliability.

[0004] However, existing PRP receiver filtering schemes still have many technical shortcomings, mainly in terms of dynamic adaptability, synchronization accuracy, and hardware implementation limitations: First, dynamic window adjustment has flaws. The window capacity depends on the RTT for dynamic adjustment, but when there is sudden network congestion or path changes, the RTT estimation is prone to lag or deviation, resulting in an excessively large window that exacerbates congestion and an excessively small window that reduces throughput efficiency (the actual efficiency may drop from more than 85% theoretically to below 70%). Moreover, the ring buffer is fixed at 256 frames (1536 bytes per frame). When the sudden traffic exceeds the capacity, even with dynamic flow control enabled, packet loss may still occur due to notification delays. Second, parallel redundancy synchronization has problems. It relies on IEEE 1588 time synchronization, but differences in hardware clock sources can cause microsecond-level drift. When the clock difference between the two network cards exceeds the latching threshold, data comparison fails. Furthermore, the receiver only discards strictly duplicate frames and cannot handle the sequence number offset problem caused by out-of-order dual-channel connections, which can easily lead to duplicate submissions or accidental deletion of valid frames. Third, there are bottlenecks in hardware resources and real-time performance. The FPGA-implemented data selection module has limitations at 1Gbps speeds. Under extreme loads such as full bandwidth, operations such as frame CRC check and sequence number sorting may introduce delays exceeding 10μs, exceeding the microsecond-level recovery requirements of industrial scenarios. Simultaneously, high-frequency data packet transmission is prone to triggering interruption storms, leading to a sharp increase in CPU load. Fourth, protocol compatibility is flawed; dynamic switching between PRP / HSR modes causes protocol stack reconstruction, resulting in 5–10ms data interruptions. Furthermore, the sliding window retransmission request (SACK) may be misinterpreted as a congestion signal by intermediate network devices, triggering unnecessary rate limiting. These defects are easily triggered in scenarios such as wireless roaming networks, bursty video streaming, long-distance cross-device transmission, and industrial control real-time buses, affecting transmission stability.

[0005] While the sliding window filtering scheme of the PRP protocol simplifies the sequence number filtering process by omitting the mechanism of determining the arrival order of identical sequence numbers through timestamps, thus improving software algorithm performance and reducing design complexity, in multipath transmission environments, packet order can easily become disordered. In such cases, simply using the sliding window algorithm can lead to packet loss. In summary, existing solutions have significant limitations in terms of dynamic network adaptability and hardware real-time performance, and further optimization is urgently needed to improve technical robustness. Summary of the Invention

[0006] In order to overcome the shortcomings of the existing technology, the present invention aims to provide a parallel redundant Ethernet receiving and processing method and related equipment based on the ring sliding window algorithm, so as to solve the technical problem of how to receive out-of-order packets while avoiding packet loss caused by out-of-order packets.

[0007] This invention is achieved through the following technical solution: In a first aspect, the present invention provides a parallel redundant Ethernet receiving processing method based on a circular sliding window algorithm, comprising: Initialize and configure the buffer tag array and the start and end pointers of the circular sliding window to establish the basis for recording the message arrival status; Based on the records, when a new message is received, the positions of the first and last pointers of the circular sliding window are adjusted according to the offset to be adjusted, in order to replace the array shifting operation; Based on the adjusted pointer position, the corresponding area within the annular sliding window is marked with a status, and the parallel redundant Ethernet receiving and processing is completed according to the status marking.

[0008] Preferably, the initialization configuration includes setting all elements of the buffer tag array to zero, the length of the buffer tag array being a configurable value with a default length of 256; initializing the first pointer L of the circular sliding window to 0 and the tail pointer R to the length of the buffer tag array - 1.

[0009] Furthermore, adjusting the positions of the first and last pointers of the circular sliding window specifically includes adjusting the first pointer L and the last pointer R, where the formula for adjusting the first pointer L is as follows: L = (L - delta)% length; The formula for adjusting the tail pointer R is as follows: R = (R - delta) % length; Where delta is the offset to be adjusted; length is the length of the buffer marker array.

[0010] Furthermore, the corresponding area within the annular sliding window is marked with a status, including marking the delta bit starting from the left boundary of the annular sliding window as a non-received state, with the mark value of the non-received state being 0; the marking is implemented using a memory segment setting interface, when R+delta ≤ length-1, directly marking arr [R+1, (R+delta)% length] as 0; when R+delta>length-1, first marking arr [R+1, length-1] as 0, and then marking arr [0, R+delta-length] as 0.

[0011] Furthermore, the corresponding area within the annular sliding window is marked with a status, including marking the delta bit starting from the left boundary of the annular sliding window as a non-received state, with the mark value of the non-received state being 0; the marking is implemented one by one using a loop operation, and when delta=1, the loop operation is omitted, the first pointer L and the tail pointer R are shifted left by 1 bit, the received mark operation at the left boundary of the annular sliding window is directly executed and the adjustment process is exited.

[0012] Furthermore, during the process of cyclically marking each packet, the number of lost packets is counted simultaneously.

[0013] Preferably, marking the corresponding area within the annular sliding window further includes marking the array position corresponding to the left boundary of the annular sliding window, i.e., the first pointer L, as a received state, wherein the mark value of the received state is 1.

[0014] Secondly, the present invention also provides a parallel redundant Ethernet receiving and processing system based on a ring sliding window algorithm, used to implement the above-described parallel redundant Ethernet receiving and processing method based on a ring sliding window algorithm, comprising: The array pointer initialization module is used to initialize and configure the buffer marker array and the first and last pointers of the circular sliding window, establishing the basis for recording the message arrival status; The pointer shift adjustment module is used to adjust the positions of the first and last pointers of the circular sliding window based on the offset to be adjusted when a new message is received, based on the recorded data, in order to replace the array shift operation; The status marking processing module is used to mark the status of the corresponding area within the annular sliding window based on the adjusted pointer position, and to complete the parallel redundant Ethernet reception processing based on the status marking.

[0015] Thirdly, the present invention also provides a mobile terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the parallel redundant Ethernet high-performance receiving processing method described above.

[0016] Fourthly, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the parallel redundant Ethernet high-performance receiving processing method described above.

[0017] Compared with the prior art, the present invention has the following beneficial technical effects: This invention provides a parallel redundant Ethernet receiving and processing method based on a circular sliding window algorithm. The circular sliding window algorithm eliminates the array copying operation caused by sequence number shifting, simplifies the memory allocation process, and improves software performance. This invention also provides two methods for marking non-received states. The first method is highly efficient in configuration and suitable for scenarios with a large number of out-of-order packets to improve software performance. The second method can statistically analyze packet loss data, taking into account the software's statistical functions, and does not affect algorithm performance when there are few out-of-order packets. This effectively solves the packet loss problem caused by out-of-order packets in multipath transmission environments and addresses the performance bottlenecks of traditional algorithms. Attached Figure Description

[0018] Figure 1 This is a flowchart of the parallel redundant Ethernet receiving and processing method based on the ring sliding window algorithm in an embodiment of the present invention; Figure 2This is a schematic diagram of a parallel redundant Ethernet receiving and processing system based on a circular sliding window algorithm in an embodiment of the present invention. In the diagram: 1. Array pointer initialization module; 2. Pointer shifting and adjustment module; 3. Status flag processing module. Detailed Implementation

[0019] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0020] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0021] The purpose of this invention is to provide a parallel redundant Ethernet receiving and processing method and related equipment based on the ring sliding window algorithm, so as to solve the technical problem of how to receive out-of-order packets while avoiding packet loss caused by out-of-order packets.

[0022] The present invention will now be described in further detail with reference to the accompanying drawings: See Figure 1 This invention provides a parallel redundant Ethernet receiving processing method based on a circular sliding window algorithm, comprising: Step 1: Initialize and configure the buffer tag array and the start and end pointers of the circular sliding window to establish the basis for recording the message arrival status; Specifically, the initialization configuration includes setting all elements of the buffer tag array to zero. The length of the buffer tag array is a configurable value, with a default length of 256. The first pointer L of the circular sliding window is initialized to 0, and the tail pointer R is initialized to the length of the buffer tag array - 1.

[0023] Array right shift by delta bits includes: (1) Array right shift delta: arr_t[]<- arr[]; arr[delta,length-1]<- arr_t[0,length-1-delta]; (2) The newly added delta vacant positions are marked as unreceived: arr[0,delta-1]<- non_received(0); (3) The array 0 subscript position marker has been received: arr[0] = received(1).

[0024] Step 2: Based on the records, when a new message is received, adjust the positions of the first and last pointers of the circular sliding window according to the offset to be adjusted, in order to replace the array shifting operation; Specifically, adjusting the positions of the first and last pointers in the circular sliding window includes adjusting the first pointer L and the last pointer R. The formula for adjusting the first pointer L is as follows: L = (L - delta)% length; The formula for adjusting the tail pointer R is as follows: R=(R-delta)% length=(L-1-delta)%length; Where delta is the offset to be adjusted; length is the length of the buffer marker array.

[0025] In this embodiment, the array is initialized as follows: Array is set to zero: L = 0, R = length - 1 Shifting a circular array right by delta bits: R = (L-1)%length (1) Shift the first and last pointers (indices) of the circular array left by delta positions: L = (L - delta) % length, R = (R - delta) % length = (L - 1 - delta) % length (2) The delta bits starting at the left boundary (L index / R+1 index) of the circular array are marked as not received: arr[L,(L+delta-1)%length]<- non_received(0) (3) The left boundary (L index) of the circular array is marked as received: arr[L]=received(1) (4) The delta bit starting at the left boundary (L index / R+1 index) of the circular array is marked as not received.

[0026] Step 3: Based on the adjusted pointer position, mark the status of the corresponding area within the annular sliding window, and complete the parallel redundant Ethernet receiving and processing work according to the status marks.

[0027] The method for marking the corresponding area within the annular sliding window includes marking the delta bit starting from the left boundary of the annular sliding window as a non-received state, with the mark value of the non-received state being 0. The marking is implemented using a memory segment setting interface. When R+delta ≤ length-1, arr [R+1, (R+delta)% length] is directly marked as 0. When R+delta > length-1, arr [R+1, length-1] is first marked as 0, and then arr [0, R+delta-length] is marked as 0.

[0028] The method involves marking the corresponding area within the annular sliding window with a status. The second method includes marking the delta bit starting from the left boundary of the annular sliding window as a non-received state, with the value of the non-received state being 0. The marking is implemented one by one using a loop operation. When delta=1, the loop operation is omitted, and after the first pointer L and the tail pointer R are shifted left by 1 bit, the received marking operation at the left boundary of the annular sliding window is directly executed and the adjustment process is exited.

[0029] In this invention, during the process of cyclically calculating and marking each packet, the number of lost packets is counted simultaneously.

[0030] In this invention, the corresponding area within the annular sliding window is marked with a status, and the array position corresponding to the left boundary of the annular sliding window, i.e., the first pointer L, is marked as a received state, and the marked value of the received state is 1.

[0031] Example 1 This embodiment provides a parallel redundant Ethernet receiving processing method based on the ring sliding window algorithm for receiving out-of-order packets caused by multipath propagation. The specific process is as follows: Initialize the buffer marker array [0, 255], with the first pointer L = 0 and the tail pointer R = 255; Receive message 1_a: Update the window to [1,x,x…,x], mark sequence number 1 as received, and upload the message; Receive message 1_b: Window state is [1,x,x…,x], this sequence number has been marked, discard the message; Receive message 2_a: offset delta=1, after adjusting the pointer, the array is shifted 1 bit to the right, the window is updated to [2,1,x…,x], sequence number 2 is marked as received, and the message is uploaded; Receive message 2_b: Window state is [2,1,x…,x], this sequence number has been marked, discard the message; Receive message 3_a: offset delta=1, after adjusting the pointer, the array is shifted 1 bit to the right, the window is updated to [3,2,1,x…,x], sequence number 3 is marked as received, and the message is uploaded; Receive message 5_a: offset delta=2, after adjusting the pointer, the array is shifted 2 positions to the right, the window is updated to [5,x,3,2,1,x…,x], sequence number 5 is marked as received, and the message is uploaded; Receive message 4_a: Update the window to [5,4,3,2,1,x…,x], mark sequence number 4 as received, and upload the message; Receive message 8_a: offset delta=3, after adjusting the pointer, the array is shifted 3 bits to the right, the window is updated to [8,x,x,5,4,3,2,1,x…,x], sequence number 8 is marked as received, and the message is uploaded; Receive message 6_a: Update the window to [8,x,6,5,4,3,2,1,x…,x], mark sequence number 6 as received, and upload the message; Received message 4_b: Window state is [8,263], this sequence number has been marked, discard the message.

[0032] Example 2 This embodiment provides a parallel redundant Ethernet receiving processing method based on the ring sliding window algorithm for receiving out-of-order packets caused by packet loss. The specific process is as follows: Initialize the buffer marker array [0, 255], with the first pointer L = 0 and the tail pointer R = 255; Receive message 1_b: Update the window to [1,x,x…,x], mark sequence number 1 as received, and upload the message; Received message 1_a: Window state is [2,1,x…,x], this sequence number has been marked, discard the message; Receive message 2_b: Update the window to [2,1,x…,x], mark sequence number 2 as received, and upload the message; Receive message 3_b: Update the window to [3,2,1,x…,x], mark sequence number 3 as received, and upload the message; Receive message 2_a: Window state is [3,2,1,x…,x], this sequence number has been marked, discard the message; Received message 3_a: Window state is [3,2,1,x…,x], this sequence number has been marked, discard the message; Message 4_a was lost and no corresponding action was taken. Receive message 5_a: offset delta=2, after adjusting the pointer, the window is updated to [5,x,3,2,1,x…,x], sequence number 5 is marked as received, and the message is uploaded; Receive message 4_b: Update the window to [5,4,3,2,1,x…,x], mark sequence number 4 as received, and upload the message; Receive message 6_a: Update the window to [6,5,4,3,2,1,x…,x], mark sequence number 6 as received, and upload the message.

[0033] The length of the buffer tag array of the present invention can be flexibly configured according to the actual application scenario, and is not limited to the default 256; the two methods for not receiving status tags can be dynamically selected according to the number of out-of-order packets. When there are many out-of-order packets, the first method is selected to improve performance, and when it is necessary to count the number of lost packets or when there are few out-of-order packets, the second method is selected to balance functionality and efficiency.

[0034] In summary, this invention provides a parallel redundant Ethernet receiving processing method based on the circular sliding window algorithm. The circular sliding window algorithm eliminates the array copying operation caused by sequence number shifting, simplifies the memory allocation process, and improves software performance. This invention also provides two methods for marking non-received states. The first method is highly efficient in configuration and suitable for scenarios with a large number of out-of-order packets to improve software performance. The second method can statistically analyze packet loss data, taking into account the software's statistical functions, and does not affect algorithm performance when there are few out-of-order packets. This effectively solves the packet loss problem caused by out-of-order packets in multipath transmission environments and addresses the performance bottlenecks of traditional algorithms.

[0035] Example 3 according to Figure 2 As shown, this embodiment provides a parallel redundant Ethernet receiving and processing system based on a circular sliding window algorithm, used to implement the above-described parallel redundant Ethernet receiving and processing method based on a circular sliding window algorithm, including: Array pointer initialization module 1 is used to initialize and configure the buffer mark array and the first and last pointers of the circular sliding window, and establish the basis for recording the message arrival status; The pointer shift adjustment module 2 is used to adjust the positions of the first and last pointers of the circular sliding window based on the offset to be adjusted when a new message is received, based on the recorded data, in order to replace the array shift operation. The status marking processing module 3 is used to mark the status of the corresponding area within the annular sliding window based on the adjusted pointer position, and to complete the parallel redundant Ethernet reception processing based on the status marking.

[0036] Example 4 The present invention also provides a mobile terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, such as a parallel redundant Ethernet receiving processing program based on a circular sliding window algorithm.

[0037] When the processor executes the computer program, it implements the steps of the above-described parallel redundant Ethernet receiving processing method based on the ring sliding window algorithm, for example: Initialize and configure the buffer tag array and the start and end pointers of the circular sliding window to establish the basis for recording the message arrival status; Based on the records, when a new message is received, the positions of the first and last pointers of the circular sliding window are adjusted according to the offset to be adjusted, in order to replace the array shifting operation; Based on the adjusted pointer position, the corresponding area within the annular sliding window is marked with a status, and the parallel redundant Ethernet receiving and processing is completed according to the status marking.

[0038] Alternatively, when the processor executes the computer program, it implements the functions of each module in the above system, for example: Array pointer initialization module 1 is used to initialize and configure the buffer mark array and the first and last pointers of the circular sliding window, and establish the basis for recording the message arrival status; The pointer shift adjustment module 2 is used to adjust the positions of the first and last pointers of the circular sliding window based on the offset to be adjusted when a new message is received, based on the recorded data, in order to replace the array shift operation. The status marking processing module 3 is used to mark the status of the corresponding area within the annular sliding window based on the adjusted pointer position, and to complete the parallel redundant Ethernet reception processing based on the status marking.

[0039] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the mobile terminal.

[0040] For example, the computer program can be divided into an array pointer initialization module 1, a pointer shifting and adjustment module 2, and a status flag processing module 3; The specific functions of each module are as follows: Array pointer initialization module 1 is used to initialize and configure the buffer mark array and the first and last pointers of the circular sliding window, and establish the basis for recording the message arrival status; The pointer shift adjustment module 2 is used to adjust the positions of the first and last pointers of the circular sliding window based on the offset to be adjusted when a new message is received, based on the recorded data, in order to replace the array shift operation. The status marking processing module 3 is used to mark the status of the corresponding area within the annular sliding window based on the adjusted pointer position, and to complete the parallel redundant Ethernet reception processing based on the status marking.

[0041] The mobile terminal can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. The mobile terminal may include, but is not limited to, a processor and memory.

[0042] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the mobile terminal, connecting various parts of the mobile terminal via various interfaces and lines.

[0043] The memory can be used to store the computer program and / or module. The processor implements various functions of the mobile terminal by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory.

[0044] The memory may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function (such as sound playback, image playback, etc.); the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, SmartMediaCards (SMC), Secure Digital (SD) cards, FlashCards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.

[0045] Example 5 The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the parallel redundant Ethernet receiving and processing method based on a ring sliding window algorithm.

[0046] If the modules / units integrated in the mobile terminal are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.

[0047] Based on this understanding, all or part of the processes in the above method can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of the above-described aggregated reinforcement learning resource scheduling method. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate form.

[0048] The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0049] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A parallel redundant Ethernet receiving processing method based on a ring sliding window algorithm, characterized in that, include: Initialize and configure the buffer tag array and the start and end pointers of the circular sliding window to establish the basis for recording the message arrival status; Based on the records, when a new message is received, the positions of the first and last pointers of the circular sliding window are adjusted according to the offset to be adjusted, in order to replace the array shifting operation; Based on the adjusted pointer position, the corresponding area within the annular sliding window is marked with a status, and the parallel redundant Ethernet receiving and processing is completed according to the status marking. Specifically, adjusting the positions of the first and last pointers of the annular sliding window includes adjusting the first pointer L and the last pointer R, wherein the formula for adjusting the first pointer L is as follows: L = (L - delta)% length; The formula for adjusting the tail pointer R is as follows: R = (R - delta) % length; Where delta is the offset to be adjusted; length is the length of the buffer marker array; The step of marking the corresponding area within the annular sliding window includes marking the delta bit starting from the left boundary of the annular sliding window as a non-received state, where the mark value for the non-received state is 0. The marking is implemented using a memory segment setting interface. When R+delta≤length-1, arr[R+1,(R+delta)%length] is directly marked as 0. When R+delta>length-1, arr[R+1, length-1] is first marked as 0, and then arr[0, R+delta-length] is marked as 0. The step of marking the corresponding area within the annular sliding window includes marking the delta bit starting from the left boundary of the annular sliding window as a non-received state, and the mark value of the non-received state is 0; the marking is implemented one by one using a loop operation. When delta=1, the loop operation is omitted, the first pointer L and the tail pointer R are shifted to the left by 1 bit, the received mark operation at the left boundary of the annular sliding window is directly executed and the adjustment process is exited. The step of marking the state of the corresponding area within the annular sliding window also includes marking the array position corresponding to the left boundary of the annular sliding window, i.e., the first pointer L, as a received state, and the mark value of the received state is 1.

2. The parallel redundant Ethernet receiving processing method based on the ring sliding window algorithm according to claim 1, characterized in that, The initialization configuration includes setting all elements of the buffer tag array to zero. The length of the buffer tag array is a configurable value, with a default length of 256. The first pointer L of the circular sliding window is initialized to 0, and the last pointer R is initialized to the length of the buffer tag array - 1.

3. The parallel redundant Ethernet receiving processing method based on ring sliding window algorithm according to claim 1, characterized in that, During the process of marking each packet in the loop, the number of lost packets is counted simultaneously.

4. A parallel redundant Ethernet receiving processing system based on a ring sliding window algorithm, characterized in that, A parallel redundant Ethernet receiving processing method based on a ring sliding window algorithm as described in any one of claims 1-3 includes: The array pointer initialization module is used to initialize and configure the buffer marker array and the first and last pointers of the circular sliding window, establishing the basis for recording the message arrival status; The pointer shift adjustment module is used to adjust the positions of the first and last pointers of the circular sliding window based on the offset to be adjusted when a new message is received, based on the recorded data, in order to replace the array shift operation; A state marking processing module is configured to mark a corresponding region in the ring-shaped sliding window based on the adjusted pointer position, and complete parallel redundant Ethernet receiving processing work according to the state marking.

5. A mobile terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The computer program is executed by the processor to implement the steps of the parallel redundant Ethernet receiving processing method based on the ring-shaped sliding window algorithm according to any one of claims 1-3.

6. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 5. The computer program is executed by the processor to implement the steps of the parallel redundant Ethernet receiving processing method based on the ring-shaped sliding window algorithm according to any one of claims 1-3.

Citation Information

Patent Citations

  • Data processing method and storage system

    CN114780458A

  • Data processing method, electronic equipment and storage medium

    CN116647516A