Data processing method and device, communication equipment and medium

By adjusting the memory size of the ring buffer and processing the frame sequence number difference, the problem of data frame disorder caused by the FRER mechanism in a time-sensitive network is solved, and the reliability and efficiency of data frames are improved in the orderly forwarding of data frames and network transmission are improved.

CN119496754APending Publication Date: 2025-02-21深圳市三旺通信股份有限公司
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411675240.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

In time-sensitive networks, the FRER mechanism causes data frames with the same sequence number to be out of order, affecting the orderliness of data transmission.

Method used

Ensure that data frames are forwarded in sequence by adjusting the memory size of the ring buffer based on the device network delay characteristics and using the difference between the frame sequence number and the expected sequence number.

Benefits of technology

It effectively solves the problem of out-of-order data frames in the FRER mechanism, ensures orderly forwarding of data frames, and improves the reliability and efficiency of network transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119496754A_ABST
    Figure CN119496754A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and discloses a data processing method and device, communication equipment and a medium, and the memory size of a ring buffer arranged in the equipment is adjusted according to network delay characteristics of the equipment; receiving real-time data frames of all paths, and processing each real-time data frame to obtain a corresponding frame serial number; the frame serial number and the expected serial number are processed, and if a processing result meets a first preset condition, the real-time data frame corresponding to the frame serial number is temporarily stored in the adjusted buffer area; and forwarding the real-time data frames in the buffer area in sequence. According to the method and the device, disorder possibly occurring in the process that the data frames arrive in sequence in the FRER mechanism can be effectively solved, and ordered forwarding of the data frames is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data technology, and in particular to a data processing method, apparatus, communication equipment and medium. Background Art

[0002] Time-Sensitive Network (TSN) can not only meet the strict requirements of industrial networks for real-time and determinism, but also enable different types of data flows, namely critical control data, ordinary IT traffic and time-sensitive data, to coexist harmoniously in the same network architecture. This integration paves the way for the simplification and standardization of industrial networks, greatly reducing the complexity and maintenance costs of application systems.

[0003] In TSN, the frame replication and elimination for reliability (FRER) mechanism defined by IEEE 802.1CB improves the reliability of data transmission by creating and transmitting multiple copies of key data frames in the network. It can be understood that by transmitting the same replicated data frames on different redundant paths, even if a transmission path fails, the data frame copies can still reach the destination through other paths, thereby ensuring the completeness of data transmission.

[0004] Due to the different physical characteristics and network loads of different paths, their transmission delays will also vary. In order to ensure low latency, FRER chooses to always forward the first arriving data frame of each sequence number. However, the delay differences between different paths may cause data frames with the same sequence number to arrive at the device out of order. Summary of the invention

[0005] In view of this, the embodiments of the present application provide a data processing method, apparatus, communication equipment and medium, which can effectively solve the problem of disorder when data frames with the same sequence number arrive at the communication equipment.

[0006] In a first aspect, an embodiment of the present application provides a data processing method, including:

[0007] Adjust the memory size of the ring buffer set in the device according to the device network latency characteristics;

[0008] Receive real-time data frames of all paths, and process each of the real-time data frames to obtain a corresponding frame sequence number;

[0009] Processing the frame sequence number and the expected sequence number, and if the processing result meets the first preset condition, temporarily storing the real-time data frame corresponding to the frame sequence number in the adjusted buffer;

[0010] The real-time data frames in the buffer are forwarded in sequence.

[0011] In some embodiments, determining the device network delay characteristic includes:

[0012] Receive preset data frames of all paths, and record a receiving timestamp of each preset data frame;

[0013] The device network delay characteristics are determined according to the preset data frames of all paths and the corresponding receiving timestamps.

[0014] In some embodiments, the preset data frame includes a protocol identifier, a sending timestamp, a path identifier and a frame check; wherein the protocol identifier is used to describe the communication protocol adopted by the data frame, the sending timestamp is used to describe the sending time of the data frame, and the path identifier is used to describe the path passed by the data frame.

[0015] In some embodiments, the device network delay characteristics include a maximum delay time difference;

[0016] The determining the maximum delay time difference according to the data frames of all paths and the corresponding receiving timestamps thereof includes:

[0017] Processing the preset data frame of each path and its corresponding receiving timestamp to obtain the delay time of each path;

[0018] Process the delay times of all paths to obtain a maximum delay time and a minimum delay time;

[0019] The maximum delay time and the minimum delay time are calculated to obtain the maximum delay time difference.

[0020] In some embodiments, the method further comprises:

[0021] Determine a smoothing factor and a safety margin; wherein the safety margin is dynamically determined according to the degree of fluctuation of the historical data frames in the ring buffer to meet the delay fluctuation within a preset time;

[0022] determining an adjustment strategy according to the device network delay characteristics, the smoothing factor and the safety margin;

[0023] The memory size of the ring buffer is adjusted according to the adjustment strategy.

[0024] In some embodiments, the method further comprises:

[0025] When each of the real-time data frames is transmitted to the corresponding position of the buffer, determining whether the corresponding position has identification information through a bitmap;

[0026] If there is no identification information, the real-time data frames corresponding to the frame sequence numbers are cached one by one in corresponding positions of the ring buffer in the order of the frame sequence numbers.

[0027] In some embodiments, forwarding the real-time data frames in the ring buffer in sequence includes:

[0028] A preset position corresponding to the expected sequence number in the ring buffer is indexed using a modulo operation; if the real-time data frame is present at the preset position, the real-time data frame is forwarded.

[0029] In a second aspect, an embodiment of the present application provides a data processing device, including:

[0030] An adjustment module, the adjustment module being used to adjust the memory size of a ring buffer set in the device according to the network delay characteristics of the device;

[0031] A receiving module, the receiving module is used to receive real-time data frames of all paths, and process each of the real-time data frames to obtain a corresponding frame sequence number;

[0032] A processing module, the processing module is used to process the frame sequence number and the expected sequence number, and if the processing result meets the first preset condition, temporarily store the real-time data frame corresponding to the frame sequence number in the adjusted ring buffer;

[0033] A read-out module is used to sequentially forward the real-time data frames in the ring buffer that meet the expected sequence numbers.

[0034] In a third aspect, an embodiment of the present application provides a communication device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the above-mentioned data processing method.

[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which implements the above-mentioned data processing method when executed on a processor.

[0036] The embodiments of the present application have the following beneficial effects:

[0037] The data processing method of the present application sets an adaptive ring buffer in the device to temporarily store the received real-time data frames, adjusts and maintains the memory size of the ring buffer to ensure that possible disordered frames can be accommodated, then temporarily stores the real-time data frames that meet the first preset condition in the ring buffer through the position index and the expected sequence number, and reads and forwards the real-time data frames in the ring buffer in sequence; thereby effectively solving the disorder that may occur in the process of the orderly arrival of data frames in the FRER mechanism, and ensuring the orderly forwarding of data frames. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 A flow chart of the data processing method according to an embodiment of the present application is shown;

[0040] Figure 2 A flow chart of determining network delay characteristics according to an embodiment of the present application is shown;

[0041] Figure 3 A schematic diagram of the structure of a preset data frame in an embodiment of the present application is shown;

[0042] Figure 4 A flow chart showing a maximum delay time difference determined in an embodiment of the present application is shown;

[0043] Figure 5 A structural schematic diagram of a data processing device according to an embodiment of the present application is shown.

[0044] Description of main component symbols:

[0045] 10 - adjustment module; 20 - receiving module; 30 - processing module; 40 - reading module. DETAILED DESCRIPTION

[0046] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0047] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0048] Hereinafter, the terms "including", "having" and their cognates that can be used in various embodiments of the present application are intended only to indicate specific features, numbers, steps, operations, elements, components or a combination of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or a combination of the foregoing items or increasing the possibility of one or more features, numbers, steps, operations, elements, components or a combination of the foregoing items. In addition, the terms "first", "second", "third" and the like are only used to distinguish descriptions and cannot be understood as indicating or implying relative importance.

[0049] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.

[0050] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0051] The core of the static redundancy method adopted by FRER is to assign a unique sequence number to each key data frame and copy the data frame to multiple independent transmission paths. By identifying and processing these sequence numbers, each interactive node, i.e., device in the network can effectively delete duplicate data frames and ensure that only one copy of each unique data frame is processed. The working principle of FRER is to always forward the data frame that arrives first with each sequence number; however, in the actual network environment, when the fast path suddenly interrupts the transmission, the slow path will supplement the current data frame lost due to the abnormality of the fast path and continue to transmit new data frames; when the fast path is restored, the sequence number of the data frame of the fast path will precede the sequence number of the slow path. Therefore, over a period of time, the current data frame of the fast path and the new data frame of the slow path will be transmitted to the interactive node at the same time, causing the interactive node to forward multiple data frames in a burst, resulting in disorder; this disorder phenomenon is a challenge for applications that need to be reordered, especially in applications with high real-time requirements, such as video streaming, audio transmission, etc.

[0052] The data processing method is described below in conjunction with some specific embodiments.

[0053] Figure 1 A flow chart of a data processing method according to an embodiment of the present application is shown. Exemplarily, the data processing method includes the following steps:

[0054] S100, adjusting the memory size of the ring buffer according to the network delay characteristics of the device.

[0055] In some embodiments, the device network delay characteristics are obtained based on the preset data frames of all paths, and the memory size of the ring buffer in the device is adjusted according to the device network delay characteristics; the memory size of the ring buffer in the device must be sufficient to accommodate possible out-of-order frames. Figure 2 As shown, the device network delay characteristics are obtained according to the preset data frame processing of all paths, including:

[0056] S110, receiving preset data frames of all paths, and recording a receiving timestamp of each data frame.

[0057] Before the preset data frame is sent, the source node at the sending end uses the system's high-precision clock to construct a preset data frame with a sending timestamp and path identifier to interact with the destination elimination node (i.e., device), and the sending timestamp is placed in a specific field of the preset data frame. When the device at the receiving end receives the preset data frame with a sending timestamp, it immediately records the current system time, also using a high-precision clock. The device at the receiving end calculates the end-to-end transmission delay of the preset data frame, i.e., the path delay time, by comparing the sending timestamp in the preset data frame with the local receiving timestamp. The calculation process of the path delay time needs to take into account the clock synchronization error that may exist between the sending end and the receiving end, so the system also needs to implement an accurate clock synchronization mechanism, such as using the Network Time Protocol (NTP) or the Precision Time Protocol (PTP).

[0058] In some embodiments, Figure 3 As shown, the preset data frame includes an Ethernet frame header, a protocol identifier, a sending timestamp, a path identifier, padding, and a frame checksum (FCS). The preset data frame is constructed using the system's high-precision clock. When receiving preset data frames of different paths, the device also uses a high-precision clock to record the corresponding receiving timestamp. For example, the clock synchronization mechanism of the high-precision clock uses the Network Time Protocol (NTP) or the Precision Time Protocol (PTP).

[0059] For example, a data frame with a certain sequence number is copied to obtain five identical preset data frames, and the five identical preset data frames are transmitted to the device through five different paths in order to eliminate redundant data frames with a certain sequence number. In order to balance real-time performance and overhead, the data frame interaction time is set to 100ms by default, or can be set by the user according to actual needs.

[0060] S120, determining a device network delay characteristic according to preset data frames of all paths and their corresponding receiving timestamps.

[0061] In some embodiments, the device network delay characteristics include a maximum delay time difference, such as Figure 4 As shown, the process of determining the maximum delay time difference according to the preset data frames of all paths and their corresponding receiving timestamps includes:

[0062] S121, processing the preset data frame of each path and its corresponding receiving timestamp to obtain the delay time of each path.

[0063] In some embodiments, the path delay time is calculated directly based on a single measurement result. For example, the difference between the receiving timestamp T1 and the sending timestamp T0 recorded in the preset data frame of the first path is the delay time ΔT1 of the first path = T1-T0; similarly, the delay time ΔT2 of the second path = T2-T0, the delay time ΔT3 of the third path = T3-T0, the delay time ΔT4 of the fourth path = T4-T0, and the delay time ΔT5 of the fifth path = T5-T0.

[0064] In other embodiments, in order to obtain a stable and reliable delay time, a sliding window averaging method is used. Within a fixed-size time window (for example, 1 second, 2 seconds, etc.), the device records the receiving timestamps of all preset data frames on each redundant path and calculates the average delay time of the corresponding path within the current time window; the time window is updated over time so that the delay time of each path is always the latest average delay time.

[0065] S122, processing the delay times of all paths to obtain a maximum delay time and a minimum delay time.

[0066] In some embodiments, the delay times of all paths are compared and screened to obtain the maximum delay time and the minimum delay time; in another embodiment, the delay times of all paths are sorted, and then the delay times at both ends of the sorting result are respectively determined as the maximum delay time and the minimum delay time.

[0067] S123, calculating the difference between the maximum delay time and the minimum delay time to obtain a maximum delay time difference.

[0068] In some embodiments, the time difference between the maximum delay time and the minimum delay time is calculated and used as the maximum delay time difference Δt, that is, the device network delay feature. The device network delay feature also includes the standard deviation, etc., which can be used to evaluate the overall difference level of the delay time.

[0069] If the maximum delay time difference Δt is large, it means that the overall delay time between different paths is significantly different, and the ring buffer needs to be increased to accommodate possible out-of-order frames; if the maximum delay time difference Δt is small, it means that the overall delay time between different paths is similar, and the ring buffer size can be appropriately reduced to reduce the delay.

[0070] According to the delay time of all path transmission processes monitored in advance, the maximum delay time difference is calculated, and the memory size of the ring buffer is dynamically adjusted according to the maximum delay time difference to accommodate possible out-of-order frames for subsequent processing.

[0071] An adaptive ring buffer is set in the device, and the ring buffer caches the data frames received by the device. Each position in the ring buffer corresponds to a data frame with a sequence number, that is, different positions in the ring buffer are used to cache a data frame with different sequence numbers.

[0072] In some embodiments, an adjustment strategy is first determined based on the device network delay characteristics, a safety margin, and a smoothing factor α; then the memory size of the ring buffer is adjusted based on the adjustment strategy; wherein, when adjusting the memory size of the ring buffer based on the adjustment strategy, the adjustment strategy is gradually fine-tuned by controlling the size of the smoothing factor α to gradually fine-tune the memory size of the ring buffer.

[0073] Exemplarily, the adjustment calculation method of the memory size of the ring buffer is:

[0074] Nˋ=[N*(1-α)+(Δt+S)*α]*2 / T

[0075] In the formula, Nˋ represents the target memory size of the ring buffer, N represents the current memory size of the ring buffer; α represents the smoothing factor; Δt represents the maximum delay time difference; S is the safety margin, that is, in order to cope with the delay fluctuations that may occur in the short term, the size of the safety margin is dynamically adjusted according to the fluctuation degree of historical data; T represents the sending period of all data frames.

[0076] In some embodiments, a delay history record is maintained. If a path suddenly fails, the delay time calculation will be abnormal because the timestamp data cannot be interacted. In this case, the delay history data needs to be used as reference data to determine the device network delay characteristics.

[0077] After confirming the adjusted target memory size of the ring buffer, the memory allocation of the ring buffer will be adjusted accordingly. If the target memory size is larger than the current memory size, the system will allocate additional memory to increase the memory of the ring buffer; if the target memory size is smaller than the current memory size, the system will release excess memory from the ring buffer to reduce the memory of the ring buffer.

[0078] S200, receiving real-time data frames of all paths, and processing each real-time data frame to obtain a corresponding frame sequence number.

[0079] After each real-time data frame arrives at the device, the real-time data frame is processed using a sequence recovery algorithm to obtain a frame sequence number corresponding to the real-time data frame.

[0080] S300, processing the frame sequence number and the expected sequence number, and when the processing result meets the first preset condition, temporarily storing the real-time data frame corresponding to the frame sequence number in the adjusted ring buffer.

[0081] The processing performed on the frame sequence number and the expected sequence number is to subtract the frame sequence number from the expected sequence number, and the processing result obtained is greater than zero, equal to zero, and less than zero.

[0082] When the processing result satisfies the first preset condition, that is, the processing result is greater than zero, it indicates that the real-time data frame arrives in advance and the real-time data frame needs to be temporarily stored in the ring buffer.

[0083] In the process of temporarily storing the real-time data frame in the adjusted ring buffer, it is first determined whether the real-time data frame can be placed in the ring buffer, and then the real-time data frame that can be placed in the ring buffer is placed in the corresponding position of the ring buffer. It can be understood that when each real-time data frame is transmitted to the corresponding position of the ring buffer, it is determined by the bitmap whether there is identification information at the corresponding position. If there is no identification information, the real-time data frame is cached one by one in the order of the frame sequence number of the real-time data frame to the corresponding position of the ring buffer; if there is identification information, the real-time data frame cannot be cached to the corresponding position of the ring buffer.

[0084] For example, when a real-time data frame corresponding to a certain frame sequence number may need to be temporarily stored in the adjusted ring buffer, the bitmap is used to determine whether there is identification information at the corresponding position of the indexed ring buffer. If there is identification information, it indicates that a data frame already exists at the corresponding position of the ring buffer, and the real-time data frame cannot be temporarily stored; if there is no identification information, it indicates that the corresponding position of the ring buffer is empty, and the real-time data frame can be cached. When caching real-time data frames, the real-time data frames are temporarily stored one by one in the corresponding positions of the ring buffer according to the frame sequence number. Finally, different positions in the ring buffer cache real-time data frames with different sequence numbers, and each position of each ring buffer only temporarily stores one real-time data frame.

[0085] When the processing result meets the second preset condition, that is, the processing result is less than zero, it means that the real-time data frame has expired and can be directly discarded.

[0086] When the processing result meets the third preset condition, that is, the processing result is equal to zero, it means that the real-time data frame arrives on schedule, and can be directly forwarded or eliminated. The forwarding process is to directly forward the first real-time data frame that arrives on schedule, and the subsequent real-time data frames that arrive on schedule are eliminated by the device.

[0087] S400, forwarding the real-time data frames in the ring buffer in sequence.

[0088] In some embodiments, the process of forwarding the real-time data frames in the ring buffer in order includes: using a modulo operation to index a preset position in the ring buffer according to an expected sequence number; if there is a real-time data frame at the preset position, forwarding the real-time data frame. Using a modulo operation to index the corresponding position of the ring buffer ensures that the index does not exceed the range of the ring buffer.

[0089] When processing real-time data frames in the ring buffer, first check whether there is a data frame at the current index position. If there is a real-time data frame, forward the real-time data frame, then increase the index and expected sequence number by one, and continue indexing and forwarding until an empty position is encountered or the entire ring buffer is processed.

[0090] When an empty position is encountered, the system starts a timeout timer. The timeout period is set according to actual needs. During the timeout waiting period, if the data frame corresponding to the expected sequence number is received, that is, the received real-time data frame arrives on schedule, then the timer is stopped immediately, the real-time data frame that arrives on schedule is processed, and the next position of the ring buffer is checked.

[0091] If a timeout occurs, all available frames in the ring buffer from the current index to the preset position will be processed, even if this means skipping some missing frames to ensure that the system does not wait indefinitely for a frame that may never arrive.

[0092] This application has the following advantages:

[0093] This application uses a high-precision clock and a sliding window averaging method to calculate the delay time, thereby improving the accuracy and stability of time measurement.

[0094] The present application monitors the transmission delay of redundant paths in real time, and dynamically adjusts the memory size of the ring buffer according to the maximum delay time difference, thereby achieving self-adaptation to changes in network delay.

[0095] This application uses a smoothing factor and a safety margin to adjust the memory size of the ring buffer, which can quickly respond to network changes and avoid frequent fluctuations.

[0096] The present application combines sequence number difference and bitmap mechanism to process real-time data frames, thereby improving the efficiency of real-time data frame sorting and forwarding.

[0097] The timeout mechanism set in this application avoids the system from losing truth due to long waiting time, thus ensuring the real-time nature of real-time data frame forwarding.

[0098] In summary, the present application not only ensures the real-time forwarding of data frames, but also effectively solves the disorder problem of FRER data frames, thereby improving the reliability and efficiency of network transmission.

[0099] Figure 5 A schematic diagram of the structure of a data processing device according to an embodiment of the present application is shown. Exemplarily, the data processing device includes an adjustment module 10 , a receiving module 20 , a processing module 30 and a reading module 40 .

[0100] The adjustment module 10 is used to adjust the memory size of the ring buffer set in the device according to the network delay characteristics of the device.

[0101] The receiving module 20 is used to receive real-time data frames of all paths and process each real-time data frame to obtain a corresponding frame sequence number.

[0102] The processing module 30 is used to process the frame sequence number and the expected sequence number, and if the processing result meets the first preset condition, temporarily store the real-time data frame corresponding to the frame sequence number in the adjusted ring buffer.

[0103] The reading module 40 is used to forward the real-time data frames that meet the expected sequence numbers in the ring buffer in sequence.

[0104] It can be understood that the device of this embodiment corresponds to the data processing method of the above embodiment, and the options in the above embodiment are also applicable to this embodiment, so they will not be described repeatedly here.

[0105] The present application also provides a communication device, which exemplarily includes a processor and a memory, wherein the memory stores a computer program, and the processor runs the computer program to enable the communication device to execute the functions of each module in the above-mentioned data processing method or the above-mentioned data processing device. For example, the communication device may be a switch, a router, etc. that supports the FRER mechanism.

[0106] Among them, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU) and a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or at least one of other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application.

[0107] The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory is used to store a computer program, and the processor may execute the computer program accordingly after receiving an execution instruction.

[0108] The present application also provides a computer-readable storage medium for storing the computer program used in the above communication device. For example, the computer-readable storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0109] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow diagram, and the combination of boxes in the structure diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0110] In addition, the functional modules or units in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0111] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.

[0112] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A data processing method, characterized in that: include: Adjust the memory size of the ring buffer set in the device according to the device network latency characteristics; Receive real-time data frames of all paths, and process each of the real-time data frames to obtain a corresponding frame sequence number; Processing the frame sequence number and the expected sequence number, and if the processing result meets the first preset condition, temporarily storing the real-time data frame corresponding to the frame sequence number in the adjusted buffer; The real-time data frames in the buffer are forwarded in sequence.

2. The data processing method according to claim 1, characterized in that: Determining the network delay characteristics of the device, including: Receive preset data frames of all paths, and record a receiving timestamp of each preset data frame; The device network delay characteristics are determined according to the preset data frames of all paths and the corresponding receiving timestamps.

3. The data processing method according to claim 2, characterized in that: The preset data frame includes a protocol identifier, a sending timestamp, a path identifier and a frame check; wherein the protocol identifier is used to describe the communication protocol adopted by the data frame, the sending timestamp is used to describe the sending time of the data frame, and the path identifier is used to describe the path passed by the data frame.

4. The data processing method according to claim 2, characterized in that: The device network delay characteristics include a maximum delay time difference; The determining the maximum delay time difference according to the data frames of all paths and the corresponding receiving timestamps thereof includes: Processing the preset data frame of each path and its corresponding receiving timestamp to obtain the delay time of each path; Process the delay times of all paths to obtain a maximum delay time and a minimum delay time; The maximum delay time and the minimum delay time are calculated to obtain the maximum delay time difference.

5. The data processing method according to claim 1, characterized in that: The method further comprises: Determine a smoothing factor and a safety margin; wherein the safety margin is dynamically determined according to the degree of fluctuation of the historical data frames in the ring buffer to meet the delay fluctuation within a preset time; determining an adjustment strategy according to the device network delay characteristics, the smoothing factor and the safety margin; The memory size of the ring buffer is adjusted according to the adjustment strategy.

6. The data processing method according to claim 1, characterized in that: Also includes: When each of the real-time data frames is transmitted to the corresponding position of the buffer, determining whether the corresponding position has identification information through a bitmap; If there is no identification information, the real-time data frames corresponding to the frame sequence numbers are cached one by one in corresponding positions of the ring buffer in the order of the frame sequence numbers.

7. The data processing method according to claim 6, characterized in that: The forwarding of the real-time data frames in the ring buffer in sequence includes: A preset position corresponding to the expected sequence number in the ring buffer is indexed using a modulo operation; if the real-time data frame is present at the preset position, the real-time data frame is forwarded.

8. A data processing device, characterized in that: include: An adjustment module, the adjustment module being used to adjust the memory size of a ring buffer set in the device according to the network delay characteristics of the device; A receiving module, the receiving module is used to receive real-time data frames of all paths, and process each of the real-time data frames to obtain a corresponding frame sequence number; A processing module, the processing module is used to process the frame sequence number and the expected sequence number, and if the processing result meets the first preset condition, temporarily store the real-time data frame corresponding to the frame sequence number in the adjusted ring buffer; A read-out module is used to sequentially forward the real-time data frames in the ring buffer that meet the expected sequence numbers.

9. A communication device, characterized in that: The communication device comprises a processor and a memory, wherein the memory stores a computer program, and the processor is configured to execute the computer program to implement the data processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer program stores a computer program, which, when executed on a processor, implements the data processing method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Transmission path determination method and device for time-sensitive network, and storage medium

    CN120528856A

  • Time-sensitive network-oriented transmission path determination method, device and storage medium

    CN120528856B

  • Time sequence data transmission method and device, equipment and storage medium

    CN121434270A