A data transmission optimization method, TSN communication device and chip
By carrying the path ID in the IEEE 802.1CB protocol and calculating the frame arrival frequency difference, the history cache vector length is dynamically set, which solves the problem of data frame error deletion in the existing technology and realizes adaptive data transmission optimization.
Patent Information
- Application Number
- CN202411711208.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2044-11-27
AI Technical Summary
In the frame recovery process of the existing IEEE 802.1CB protocol, improper setting and management of the history cache vector length may lead to erroneous deletion or neglect of data frames. In particular, when long and short path data is lost, the existing algorithm cannot effectively handle it.
By carrying the path ID of the transmission path in the redundant transmission protocol, calculating the frame arrival frequency difference, dynamically setting the history cache vector length, and using the sliding window mechanism to eliminate frames, data loss and disorder problems are avoided, and adaptive data transmission is achieved.
It effectively avoids the accidental deletion or neglect of data frames, improves the reliability and accuracy of data transmission, realizes an adaptive data transmission process, and adapts to frequency changes of different transmission paths.
Smart Images

Figure CN119520375B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of intelligent data transmission in time-sensitive networks (TSN), and in particular to a data transmission optimization method, a TSN communication device, and a chip. Background Art
[0002] The IEEE 802.1CB protocol, known as Frame Replication and Elimination for Reliability (FRER), is a key subprotocol in the Time-Sensitive Networking (TSN) protocol suite. Frame Replication and Elimination for Reliability (FRER) defines member streams and compound streams. Compound streams are replicated to generate multiple member streams, which are transmitted in parallel across the network. Frame elimination is then used at the receiving end to restore the data stream to a single data stream, improving data transmission reliability, particularly in Ethernet topologies requiring redundant transmission.
[0003] Current protocol standards primarily utilize the Vector Recovery Algorithm (VRA) to recover data streams. While the VRA algorithm can handle more complex frame elimination and recovery scenarios by constructing a historical cache vector to record the sequence numbers of recently forwarded frames, it also presents a significant issue: the length of the constructed historical cache vector and how these sequence numbers are managed affect the size of the sequence number gaps the algorithm can tolerate. If the vector length is insufficient to accommodate the sequence number gaps caused by data loss, the algorithm may mistakenly delete or ignore valid data units. Summary of the Invention
[0004] In order to solve the problems in the related art, the embodiments of the present disclosure provide a data transmission optimization method, a TSN communication device and a chip.
[0005] In a first aspect, an embodiment of the present disclosure provides a data transmission optimization method, which is applied to a TSN communication node, and includes:
[0006] receiving service data frames of a specified periodic service from a plurality of transmission paths based on a redundant transmission protocol, wherein a reserved subfield of a redundant flag field of the service data frame carries a path ID of a transmission path for transmitting the service data frame;
[0007] Locating each transmission path based on the path IDs of the multiple transmission paths, and calculating, for each transmission path, a frame arrival frequency based on a current reception time of a received service data frame and a historical average reception time of multiple service data frames received at historical times, thereby obtaining the frame arrival frequencies of the multiple transmission paths;
[0008] Calculating a frame arrival frequency difference of each transmission path pair in the plurality of transmission paths according to the frame arrival frequencies of the plurality of transmission paths, the transmission path pair including two different transmission paths;
[0009] determining an average frame arrival frequency difference and a maximum frame arrival frequency difference based on the frame arrival frequency difference of each transmission path pair in the plurality of transmission paths;
[0010] Determine an average frame arrival number difference Navr and a maximum frame arrival number difference Nmax within a specified time period according to the average frame arrival frequency difference and the maximum frame arrival frequency difference;
[0011] The history cache vector length W of the redundant transmission protocol is set to Navr≤W≤Nmax;
[0012] The service data frames of the specified periodic service are received from the multiple transmission paths within the specified time period, and a history buffer vector with a length of W is used to perform frame elimination on the service data frames received from the multiple transmission paths.
[0013] According to an embodiment of the present disclosure, the method further includes:
[0014] At any time point within the specified time period, each transmission path is located based on the path IDs of the multiple transmission paths, and each transmission path is monitored to determine whether it is abnormal.
[0015] According to an embodiment of the present disclosure, monitoring each transmission path to determine whether the transmission path is abnormal includes:
[0016] For each transmission path, the real-time frame arrival frequency M1 is calculated; when M1≥N1, the transmission path is determined to be in an abnormal state, wherein N1 is a first set frequency threshold, which is set based on the frame arrival frequency of the transmission path.
[0017] According to an embodiment of the present disclosure, after determining that the transmission path is in an abnormal state, the method further includes:
[0018] Monitor whether the transmission path returns to normal.
[0019] According to an embodiment of the present disclosure, monitoring whether the transmission path returns to normal includes:
[0020] Calculate the real-time frame arrival frequency M2 of the transmission path; when N2 < M2 < N1, determine that the transmission path is in an abnormal recovery state; when M2 ≤ N2, determine that the transmission path is in a normal state, where N2 is a second set frequency threshold, and the second set frequency threshold is set based on the frame arrival frequency of the transmission path and is different from the first set frequency threshold.
[0021] According to an embodiment of the present disclosure:
[0022] When the transmission path is in an abnormal recovery state, reset the length of the historical cache vector to M, where M ≥ 2W;
[0023] When the transmission path is in a normal state, restore the length N of the historical cache vector to the setting with a length of W.
[0024] According to an embodiment of the present disclosure, receiving the service data frames of the specified periodic service from multiple transmission paths based on the redundant transmission protocol includes:
[0025] For each transmission path in the multiple transmission paths, receive the service data frames by using the matching recovery algorithm in the redundant transmission protocol.
[0026] According to an embodiment of the present disclosure, receiving the service data frames by using the matching recovery algorithm in the redundant transmission protocol includes:
[0027] Judge whether the sequence number carried in the service data frame is the same as the sequence number carried in the service data frame received at the previous historical moment;
[0028] If so, discard the service data frame; otherwise, receive the service data frame.
[0029] According to an embodiment of the present disclosure, the sequence number of the service data frame received at the previous historical moment is stored in the storage device of the TSN communication node.
[0030] According to an embodiment of the present disclosure, the TSN communication node is a TSN destination node and / or a TSN relay node.
[0031] According to an embodiment of the present disclosure, determining the average frame arrival quantity difference Navr and the maximum frame arrival quantity difference Nmax within a specified time period according to the average frame arrival frequency difference and the maximum frame arrival frequency difference includes:
[0032] Set the time length of the specified time period;
[0033] The time length is multiplied by the average frame arrival frequency difference and the maximum frame arrival frequency difference, thereby obtaining the average frame arrival number difference Navr and the maximum frame arrival number difference Nmax.
[0034] According to an embodiment of the present disclosure, the method further includes:
[0035] At any moment within the specified time period, determining a difference between the service data frames received from the plurality of transmission paths and the service data frames subjected to frame elimination;
[0036] When the difference is the number of the multiple transmission paths minus one, the path IDs in the service data frames received from the multiple transmission paths are counted, and when the number of the path IDs exceeds 2, it is determined that a frame elimination error has occurred.
[0037] In a second aspect, an embodiment of the present disclosure provides a TSN communication device, including:
[0038] a receiving module configured to receive service data frames of a specified periodic service from a plurality of transmission paths based on a redundant transmission protocol, wherein a reserved subfield of a redundant flag field of the service data frame carries a path ID of a transmission path for transmitting the service data frame;
[0039] a first calculation module configured to locate each transmission path based on the path IDs of the multiple transmission paths, and for each transmission path, calculate a frame arrival frequency based on a current reception time of a received service data frame and a historical average reception time of multiple service data frames received at historical times, thereby obtaining the frame arrival frequencies of the multiple transmission paths;
[0040] a second calculation module configured to calculate a frame arrival frequency difference of each transmission path pair in the plurality of transmission paths based on the frame arrival frequencies of the plurality of transmission paths, the transmission path pair including two different transmission paths;
[0041] a third calculation module configured to determine an average frame arrival frequency difference and a maximum frame arrival frequency difference according to the frame arrival frequency difference of each transmission path pair in the plurality of transmission paths;
[0042] a fourth calculation module configured to determine an average frame arrival number difference Navr and a maximum frame arrival number difference Nmax in a specified time period according to the average frame arrival frequency difference and the maximum frame arrival frequency difference;
[0043] A dynamic setting module is configured to set the history cache vector length W of the redundant transmission protocol to Navr≤W≤Nmax;
[0044] A data frame elimination module, configured to receive service data frames of the specified periodic service from the multiple transmission paths within the specified time period, and perform frame elimination on the service data frames received from the multiple transmission paths using a historical cache vector of length W.
[0045] According to an embodiment of the present disclosure, it further includes an anomaly monitoring and recovery module; the anomaly monitoring and recovery module is configured to:
[0046] At any moment within the specified time period, locate each transmission path based on the path ID of the multiple transmission paths, and for each transmission path, monitor whether each transmission path is abnormal.
[0047] According to an embodiment of the present disclosure, for each transmission path, monitoring whether each transmission path is abnormal includes:
[0048] For each transmission path, calculate the real-time frame arrival frequency M1; when M1≥N1, determine that the transmission path is in an abnormal state, where N1 is a first set frequency threshold, and the first set frequency threshold is set based on the frame arrival frequency of the transmission path.
[0049] According to an embodiment of the present disclosure, the anomaly monitoring and recovery module is further configured to:
[0050] After determining that the transmission path is in an abnormal state, monitor whether the transmission path returns to normal.
[0051] According to an embodiment of the present disclosure, monitoring whether the transmission path returns to normal includes:
[0052] Calculate the real-time frame arrival frequency M2 of the transmission path; when N2<M2<N1, determine that the transmission path is in an abnormal recovery state; when M2≤N2, determine that the transmission path is in a normal state, where N2 is a second set frequency threshold, the second set frequency threshold is set based on the frame arrival frequency of the transmission path, and the second set frequency threshold is different from the first set frequency threshold.
[0053] According to an embodiment of the present disclosure, the dynamic setting module is further configured to:
[0054] When the transmission path is in an abnormal recovery state, reset the length of the historical cache vector to M, where M≥2W;
[0055] When the transmission path is in a normal state, restore the length N of the historical cache vector to the setting of length W.
[0056] According to an embodiment of the present disclosure, the receiving module is further configured to receive the service data frame using a matching recovery algorithm in a redundant transmission protocol for each of the multiple transmission paths.
[0057] According to an embodiment of the present disclosure, the receiving of the service data frame by using a matching recovery algorithm in a redundant transmission protocol includes:
[0058] Determining whether the sequence number carried in the service data frame is the same as the sequence number carried in the service data frame received at the previous historical moment;
[0059] If so, discard the service data frame; otherwise, receive the service data frame.
[0060] According to an embodiment of the present disclosure, a storage device is further included; the storage device is configured to:
[0061] The sequence number of the service data frame received at the last historical moment is stored.
[0062] According to an embodiment of the present disclosure, the fourth calculation module is further configured to:
[0063] Setting the length of the specified time period;
[0064] The time length is multiplied by the average frame arrival frequency difference and the maximum frame arrival frequency difference, thereby obtaining the average frame arrival number difference Navr and the maximum frame arrival number difference Nmax.
[0065] According to an embodiment of the present disclosure, the abnormality monitoring and recovery module is further configured to:
[0066] At any moment within the specified time period, determining a difference between the service data frames received from the plurality of transmission paths and the service data frames subjected to frame elimination;
[0067] When the difference is the number of the multiple transmission paths minus one, the path IDs in the service data frames received from the multiple transmission paths are counted, and when the number of the path IDs exceeds 2, it is determined that a frame elimination error has occurred.
[0068] In a third aspect, an embodiment of the present disclosure provides a TSN chip, comprising the TSN communication device as described in any one of the second aspects.
[0069] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium on which computer instructions are stored. When the computer instructions are executed by a processor, the method as described in any one of the first aspects is implemented.
[0070] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the method as described in any one of the first aspects.
[0071] According to the technical solution provided by the embodiments of the present disclosure, service data frames of a specified periodic service are received from multiple transmission paths respectively based on a redundant transmission protocol. The reserved subfield of the redundant flag field of the service data frame carries the path ID of the transmission path transmitting the service data frame. Therefore, each transmission path is located according to the path ID in the redundant transmission protocol to calculate the frame arrival frequency for each transmission path. Then, based on the frame arrival frequency difference of each transmission path pair (including two different transmission paths), the average frame arrival frequency difference and the maximum frame arrival frequency difference are determined, and then the average frame arrival number difference Navr and the maximum frame arrival number difference Nmax within a specified time period are determined. The length W of the history cache vector of the redundant transmission protocol is set to Navr≤W≤Nmax, so that the received service data frames are frame-eliminated using the history cache vector of length W within the specified time period.
[0072] The present disclosure solves the technical problem in the prior art that, in the process of achieving frame elimination, the sequence number of the forwarded data frame is managed solely by relying on the artificially set historical cache vector, which leads to the erroneous deletion of data frames. The present disclosure innovatively utilizes the frame arrival frequency of the located transmission path to reasonably set the length range of the historical cache vector within a specified time period, so as to avoid erroneously deleting or ignoring certain valid data frames as much as possible. The present disclosure pioneers the use of the path ID in the reserved subfield of the redundant transmission protocol, thereby achieving precise positioning of the transmission path. The length of the historical cache vector in the present disclosure is dynamically set according to the frame arrival frequency of the transmission path. As the number of data frames received by the TSN communication node increases, the calculation of the frame arrival frequency of the corresponding transmission path will become more and more accurate, so that the length of the historical cache vector can be dynamically adjusted for a specified time period, so as to realize an adaptive data transmission process based on the redundant communication protocol of the present disclosure, thereby achieving the purpose of data transmission optimization.
[0073] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Other features, objectives and advantages of the present disclosure will become more apparent through the following detailed description of non-limiting embodiments in conjunction with the accompanying drawings. In the accompanying drawings:
[0075] Figure 1 A schematic diagram illustrating a frame elimination mechanism of a VRA algorithm in the prior art;
[0076] Figure 2 A flowchart of a data transmission optimization method according to an embodiment of the present disclosure is shown;
[0077] Figure 3 A schematic diagram showing a first application scenario in which an embodiment of the present disclosure is applied;
[0078] Figure 4 A schematic diagram showing a second application scenario in which the embodiment of the present disclosure is applied is shown;
[0079] Figure 5 A schematic diagram showing an emergency situation caused by message disorder in the prior art;
[0080] Figure 6 A structural block diagram of a TSN communication device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0081] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts not related to the description of the exemplary embodiments are omitted in the accompanying drawings.
[0082] In the present disclosure, it should be understood that terms such as "include" or "have" are intended to indicate the presence of features, numbers, steps, actions, components, parts, or combinations thereof disclosed in the present specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, actions, components, parts, or combinations thereof exist or are added.
[0083] It should also be noted that, in the absence of conflict, the embodiments and features of the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0084] In this disclosure, if it involves operations of obtaining user information or user data or displaying user information or user data to others, such operations are all authorized and confirmed by the user, or actively selected by the user.
[0085] As previously mentioned, the VRA algorithm currently used in the IEEE 802.1CB protocol can handle more complex frame elimination and recovery scenarios by constructing a history cache vector to record the sequence numbers of recently forwarded frames. However, there are also significant issues: the length of the constructed history cache vector and how these sequence numbers are managed affect the size of the sequence number gaps that the algorithm can tolerate. If the vector length is insufficient to accommodate sequence number gaps caused by data loss, the algorithm may mistakenly delete or ignore some valid data units.
[0086] like Figure 1As shown in Figure 1, in the VRA algorithm, sequence numbers can be managed using a sliding window mechanism. Assuming the length of the history cache vector is 5, if the frame with sequence number n on the short path is lost in the current history cache vector, and the subsequent frame with sequence number n+1 arrives and is forwarded (the IEEE 802.1CB protocol standard does not provide a message order preservation mechanism), and at the same time, frames with sequence numbers n+2 to n+5 arrive and are forwarded on the short path, the history cache vector will shift right, moving the position with sequence number n out of the window. If a frame with sequence number n on the redundant path arrives at this time, it will be considered too old and discarded, resulting in the erroneous deletion of valid data units.
[0087] After in-depth research, the inventors found that the 802.1CB protocol is the main standard for reliability in time-sensitive networks, but there are still many details and issues that need to be optimized or resolved during implementation, such as how to maintain the order of messages arriving over long and short paths at the aggregation node; the setting of the historical cache vector in the VRA algorithm; and data transmission errors that occur even though the difference between the redundant frames expected to be forwarded and the frames actually eliminated in the detection function meets the preset threshold.
[0088] The embodiment of the present disclosure provides a data transmission optimization method, which receives service data frames of specified periodic services from multiple transmission paths based on a redundant transmission protocol through a TSN communication node, wherein the path ID of the transmission path for transmitting the service data frame is carried in a reserved subfield of the redundant tag field of the service data frame; locates each transmission path based on the path ID of the multiple transmission paths, and for each transmission path, calculates the frame arrival frequency according to the current reception time of the received service data frame and the historical average reception time of multiple service data frames received in historical time, thereby obtaining the frame arrival frequency of the multiple transmission paths; calculates the frame arrival frequency of each transmission path in the multiple transmission paths based on the frame arrival frequency of the multiple transmission paths. The invention relates to a method for transmitting a frame arrival frequency difference of a path pair, wherein the transmission path pair includes two different transmission paths; determining an average frame arrival frequency difference and a maximum frame arrival frequency difference according to the frame arrival frequency difference of each transmission path pair in the multiple transmission paths; determining an average frame arrival number difference Navr and a maximum frame arrival number difference Nmax in a specified time period according to the average frame arrival frequency difference and the maximum frame arrival frequency difference; setting a history cache vector length W of the redundant transmission protocol to Navr≤W≤Nmax; receiving service data frames of the specified periodic service from the multiple transmission paths in the specified time period, and performing frame elimination on the service data frames received from the multiple transmission paths using a history cache vector with a length of W.
[0089] The present disclosure locates each transmission path by including a path ID in a reserved subfield of the redundant transmission protocol. This utilizes the transmission path's frame arrival frequency to appropriately set the length range of a historical cache vector within a specified time period, minimizing the possibility of erroneous deletion or omission of valid data units. Furthermore, the length of the historical cache vector is dynamically set based on the transmission path's frame arrival frequency. As a TSN communication node receives an increasing number of data frames, the calculation of the corresponding transmission path's frame arrival frequency becomes increasingly accurate. This allows the length of the historical cache vector to be dynamically adjusted for a specified time period, enabling an adaptive data transmission process based on the redundant communication protocol of the present disclosure.
[0090] Figure 2 FIG. 1 is a flow chart showing a method for optimizing data transmission according to an embodiment of the present disclosure. Figure 2 As shown, the data transmission optimization method includes the following steps S201 to S207:
[0091] The data transmission optimization method is applied to a TSN communication node, which is a TSN destination node and / or a TSN relay node.
[0092] In step S201, service data frames of a specified periodic service are received from multiple transmission paths based on a redundant transmission protocol, wherein the reserved subfield of the redundant flag field of the service data frame carries the path ID of the transmission path for transmitting the service data frame.
[0093] The path ID (unique identifier) is identification information of the transmission path. Through the path ID, the corresponding transmission path can be quickly located in the redundant transmission protocol, thereby performing effective monitoring and control.
[0094] The designated periodic service is any periodic service, such as playing voice reminders within a specific time period in smart home services, IoT devices (such as smart meters, smart security devices, etc.) can regularly send voice reports to users to report the operating status and data of the equipment, etc.
[0095] In a specific embodiment, the path ID is carried in the Reserved subfield of the RTAG field.
[0096] Figure 3 A schematic diagram showing a first application scenario in which the embodiment of the present disclosure is applied is shown. Figure 4 A schematic diagram of a second application scenario in which the embodiment of the present disclosure is applied is shown; Figure 3 and Figure 4 The following describes receiving service data frames of designated periodic services from multiple transmission paths.
[0097] At the TSN source node, an initial data frame is copied into multiple service data frames, and each service data frame is sent to the TSN relay node or TSN destination node through a different transmission path. Figure 3 and Figure 4 The present disclosure is specifically described using the three transmission paths shown in the figure as an example. Those skilled in the art should understand that the number of transmission paths shown is not a technical means to limit the scope of protection of the present disclosure. The number of transmission paths can be n, for example, n=4, n=5, and so on.
[0098] like Figure 3 and Figure 4 As shown in the figure, transmission path 1 is a short path, and transmission paths 2 and 3 are redundant paths. At the TSN source node, the initial data frame is copied into three business data frames and sent to the TSN destination node or TSN relay node through the short path (transmission path 1) and two redundant paths (transmission paths 2 and 3).
[0099] In a TSN network, the initial frame and the multiple frame copies obtained by replicating the initial data frame are not fixed. They can be dynamically combined and split according to actual needs. For example, in some application scenarios, multiple frame copies may need to be combined into a single initial frame to meet specific transmission requirements; in other scenarios, the initial frame may need to be replicated into multiple frame copies for separate transmission. Therefore, the initial frame and frame copies can start or end at any node in the network, which means that the initial data frame and service data frame can be created, modified, or deleted at any location in the network according to actual needs.
[0100] According to an embodiment of the present disclosure, the receiving of service data frames of specified periodic services from multiple transmission paths based on a redundant transmission protocol includes: for each of the multiple transmission paths, receiving the service data frames using a matching recovery algorithm in the redundant transmission protocol.
[0101] Furthermore, the receiving of the business data frame using the matching recovery algorithm in the redundant transmission protocol includes: determining whether the serial number carried in the business data frame is the same as the serial number carried in the business data frame received at the previous historical moment; if so, discarding the business data frame, otherwise, receiving the business data frame.
[0102] The sequence number of the service data frame received at the last historical moment is stored in a storage device of the TSN communication node, such as a register or a hardware memory.
[0103] In a specific embodiment, Figure 3 and Figure 4At the TSN destination node or TSN relay node shown, the service data frames received through the three transmission paths are respectively eliminated by using the matching recovery algorithm in the redundant transmission protocol. That is, the matching recovery algorithm is used to receive service data frames on transmission path 1, transmission path 2, and transmission path 3, thereby eliminating frames for each transmission path.
[0104] In step S202, each transmission path is located based on the path ID of the multiple transmission paths, and for each transmission path, the frame arrival frequency is calculated according to the current reception time of the received service data frame and the historical average reception time of multiple service data frames received in historical time.
[0105] The frame arrival frequency of a transmission path refers to the reciprocal of the time interval between two adjacent service data frames on a transmission path, reflecting the rate and efficiency of data transmission. In the present disclosure, the calculation of the frame arrival frequency is dynamically updated. Because the frame arrival frequency of each transmission path takes into account the historical average reception time of multiple service data frames received over time, the resulting frame arrival frequency becomes increasingly accurate as the number of service data frames received increases.
[0106] It is known that in existing redundant transmission protocols, it is impossible to locate the transmission path that transmits each service data frame, and it is even more impossible to calculate the frame arrival frequency for the located transmission path. The present disclosure utilizes the reserved subfield in the redundant flag field defined in the redundant transmission protocol to carry the path ID of each transmission path, so that each transmission path can be located and the frame arrival frequency can be calculated for each transmission path.
[0107] In step S203, based on the frame arrival frequencies of the multiple transmission paths, a frame arrival frequency difference of each transmission path pair in the multiple transmission paths is calculated, where the transmission path pair includes two different transmission paths.
[0108] Assume that there are three transmission paths: transmission path 1, transmission path 2, and transmission path 3. These three transmission paths constitute three groups of transmission path pairs: transmission paths 1 and 2, transmission paths 1 and 3, and transmission paths 2 and 3. For the above three transmission paths, it is necessary to calculate the frame arrival frequency differences of the three groups of transmission path pairs.
[0109] The number of the transmission path pairs is determined according to the number of the plurality of transmission paths.
[0110] In step S204, an average frame arrival frequency difference and a maximum frame arrival frequency difference are determined according to the frame arrival frequency difference of each transmission path pair in the plurality of transmission paths.
[0111] Assuming that the number of the multiple transmission paths is 4, the 4 transmission paths constitute 6 transmission path pairs: transmission paths 1 and 2, transmission paths 1 and 3, transmission paths 1 and 4, transmission paths 2 and 3, transmission paths 2 and 4, and transmission paths 3 and 4. The frame arrival frequency differences of these 6 transmission path pairs are calculated respectively to obtain 6 frame arrival frequency differences. The largest frame arrival frequency difference is selected from the 6 frame arrival frequency differences, and the 6 frame arrival frequency differences are averaged to obtain the average frame arrival frequency difference.
[0112] In step S205, an average frame arrival number difference Navr and a maximum frame arrival number difference Nmax within a specified time period are determined according to the average frame arrival frequency difference and the maximum frame arrival frequency difference.
[0113] The specified time period may be a period of data packets in the communication network.
[0114] Specifically, the time length of the specified time period is set; and then the time length is multiplied by the average frame arrival frequency difference and the maximum frame arrival frequency difference, thereby obtaining the average frame arrival number difference Navr and the maximum frame arrival number difference Nmax.
[0115] In step S206, the history cache vector length W of the redundant transmission protocol is set to Navr≤W≤Nmax.
[0116] In step S207, service data frames of the specified periodic service are received from the multiple transmission paths within the specified time period, and a history buffer vector with a length of W is used to perform frame elimination on the service data frames received from the multiple transmission paths.
[0117] This disclosure sets the history cache vector length W for the redundant transmission protocol to Navr ≤ W ≤ Nmax. Specifically, when maintaining sequence numbers using a sliding window mechanism, if the window size is greater than or equal to Navr, the requirements of most service data frames can be met. However, if the window size is greater than Nmax, some resources may be wasted. Therefore, setting the history cache vector length W to Navr ≤ W ≤ Nmax can meet the requirements of most service data frames while avoiding resource waste.
[0118] This disclosure innovatively utilizes the frame arrival frequency of the transmission path to rationally set the length range of the historical cache vector within a specified time period, aiming to minimize the accidental deletion or omission of valid data units. This dynamic setting mechanism intelligently adjusts based on the arrival frequency of received data frames. As the number of received data frames accumulates, the calculation of the frame arrival frequency becomes increasingly accurate, allowing the length of the historical cache vector to be flexibly adjusted for a specified time period, ensuring that the redundant communication protocol of this disclosure can implement a highly adaptive data transmission process.
[0119] The inventors note that the IEEE 802.1CB protocol standard also defines an error detection mechanism for multi-path recovery, primarily through a detection function. This detection function periodically compares the difference between the expected redundant frames to be forwarded and the frames actually eliminated to determine whether the difference exceeds a preset threshold. If the threshold is reached, a potential signal anomaly event is triggered. However, even if the difference does not exceed the preset threshold, frame elimination errors may occur. For example, if one path erroneously sends a data packet twice for some reason, while another path is disconnected, existing detection functions cannot detect this situation.
[0120] According to an embodiment of the present disclosure, for any moment within the specified time period, determining the difference between the service data frames received from the plurality of transmission paths and the service data frames subjected to frame elimination;
[0121] When the difference is the number of the multiple transmission paths minus one, the path IDs in the service data frames received from the multiple transmission paths are counted, and when the number of the path IDs exceeds 2, it is determined that a frame elimination error has occurred.
[0122] The present disclosure can detect error conditions that existing detection functions cannot detect, thereby effectively identifying more error types and improving detection accuracy.
[0123] The inventors also found that since the IEEE 802.1CB protocol does not provide a message order preservation mechanism, message disorder may occur. This is not only caused by the different number of hops in the path, but also by the node load rate and port bandwidth. The disorder problem is very likely to cause sudden outages, such as Figure 5 As shown in the figure, the frame with sequence number 1 on the short path is lost. After the frames with sequence numbers 2 and 3 arrive, the redundant frame with sequence number 1' arrives. At this time, the redundant 1' frame and the 3 frames on the short path are sent out simultaneously because they are data coming in from multiple ports, which will form a burst.
[0124] To avoid the above problems, at any moment within the specified time period, each transmission path is located based on the path ID of the multiple transmission paths, and for each transmission path, it is monitored whether each transmission path is abnormal; specifically including: for each transmission path, calculating the real-time frame arrival frequency M1; when M1≥N1, it is determined that the transmission path is in an abnormal state, where N1 is the first set frequency threshold, and the first set frequency threshold is set based on the frame arrival frequency of the transmission path.
[0125] For periodic services, the frame arrival frequency within a specified time period is the average frame arrival frequency within a specified time period, and the difference between the real-time frame arrival frequency M1 and the average frame arrival frequency is relatively small under normal conditions. After M1 exceeds the first set frequency threshold N1, it indicates that there are significant transmission fluctuations in the service data frames, and at this time the transmission path may be in an abnormal state.
[0126] Further, after determining that the transmission path is in an abnormal state for each transmission path, it is also possible to monitor whether the transmission path has returned to normal, specifically including: calculating the real-time frame arrival frequency M2 of the transmission path; when N2<M2<N1, it is determined that the transmission path is in an abnormal recovery state; when M2≤N2, it is determined that the transmission path is in a normal state, where N2 is the second set frequency threshold, the second set frequency threshold is set based on the frame arrival frequency of the transmission path, and the second set frequency threshold is different from the first set frequency threshold.
[0127] Assume that the specified time period is Δt, and at any moment t1 within the Δt time period, if it is determined that the transmission path is in an abnormal state, then within the time of Δt and after the t1 moment, continue to monitor the transmission path that has an abnormality, and determine whether the transmission path has returned to normal according to the real-time frame arrival frequency.
[0128] When the transmission path is in an abnormal recovery state, reset the length of the historical cache vector to M, where M≥2W;
[0129] When the transmission path is in a normal state, restore the length N of the historical cache vector to the setting with a length of W.
[0130] Among them, when the transmission path is still in the abnormal recovery stage and has not fully returned to the normal state, in order to ensure that the transmission path can smoothly process the redundant data generated during the transition from the abnormal state to the normal state, the present disclosure adopts a strategy: set the length M of the historical cache vector to at least twice the initially set length W. This setting aims to provide sufficient data storage space to accommodate and process the additional data units that may accumulate during the path recovery process, thereby ensuring the continuity and integrity of data transmission.
[0131] In addition to dynamically setting the length of the historical cache vector within a specified time period based on the continuously updated frame arrival frequency, the present disclosure also addresses the dynamic setting of the historical cache vector in the event of an emergency. This allows the present disclosure to not only meet the needs of periodic services in a stable state, but also handle the needs of services in an abnormal recovery state.
[0132] Figure 6 A structural block diagram of a TSN communication device according to an embodiment of the present disclosure is shown.
[0133] like Figure 6 As shown, the TSN communication device 600 includes: a receiving module 610 , a first calculation module 620 , a second calculation module 630 , a third calculation module 640 , a fourth calculation module 650 , a dynamic setting module 660 and a data frame elimination module 670 .
[0134] The receiving module 610 is configured to receive service data frames of a specified periodic service from multiple transmission paths respectively, wherein the service data frames carry a path ID of a transmission path for transmitting the service data frames;
[0135] The first calculation module 620 is configured to locate each transmission path based on the path IDs of the multiple transmission paths, and for each transmission path, calculate a frame arrival frequency based on a current reception time of a received service data frame and a historical average reception time of multiple service data frames received at historical times, thereby obtaining the frame arrival frequencies of the multiple transmission paths;
[0136] The second calculation module 630 is configured to calculate a frame arrival frequency difference of each transmission path pair in the plurality of transmission paths based on the frame arrival frequencies of the plurality of transmission paths, wherein the transmission path pair includes two different transmission paths;
[0137] The third calculation module 640 is configured to determine an average frame arrival frequency difference and a maximum frame arrival frequency difference based on the frame arrival frequency difference of each transmission path pair in the plurality of transmission paths;
[0138] The fourth calculation module 650 is configured to determine an average frame arrival number difference Navr and a maximum frame arrival number difference Nmax within a specified time period according to the average frame arrival frequency difference and the maximum frame arrival frequency difference;
[0139] The dynamic setting module 660 is configured to set the history cache vector length W of the redundant transmission protocol to Navr≤W≤Nmax;
[0140] The data frame elimination module 670 is configured to receive service data frames of the specified periodic service from the multiple transmission paths within the specified time period, and perform frame elimination on the service data frames received from the multiple transmission paths using a historical cache vector of length W.
[0141] According to an embodiment of the present disclosure, it further includes an anomaly monitoring and recovery module; the anomaly monitoring and recovery module is configured to: at any moment within the specified time period, locate each transmission path based on the path ID of the multiple transmission paths, and for each transmission path, monitor whether each transmission path is abnormal.
[0142] According to an embodiment of the present disclosure, the monitoring whether each transmission path is abnormal includes: for each transmission path, calculating the real-time frame arrival frequency M1; when M1≥N1, determining that the transmission path is in an abnormal state, where N1 is a first set frequency threshold, and the first set frequency threshold is set based on the frame arrival frequency of the transmission path.
[0143] According to an embodiment of the present disclosure, the anomaly monitoring and recovery module is further configured to: after determining that the transmission path is in an abnormal state, monitor whether the transmission path returns to normal.
[0144] According to an embodiment of the present disclosure, the monitoring whether the transmission path returns to normal includes: calculating the real-time frame arrival frequency M2 of the transmission path; when N2<M2<N1, determining that the transmission path is in an abnormal recovery state; when M2≤N2, determining that the transmission path is in a normal state, where N2 is a second set frequency threshold, the second set frequency threshold is set based on the frame arrival frequency of the transmission path, and the second set frequency threshold is different from the first set frequency threshold.
[0145] According to an embodiment of the present disclosure, the dynamic setting module 660 is further configured to: when the transmission path is in an abnormal recovery state, reset the length of the historical cache vector to M, where M≥2W; when the transmission path is in a normal state, restore the length N of the historical cache vector to the setting of length W.
[0146] According to an embodiment of the present disclosure, the receiving module 610 is further configured to receive the service data frames for each transmission path in the multiple transmission paths by using a matching recovery algorithm in the redundant transmission protocol.
[0147] According to an embodiment of the present disclosure, the receiving of the business data frame using the matching recovery algorithm in the redundant transmission protocol includes: determining whether the serial number carried in the business data frame is the same as the serial number carried in the business data frame received at the previous historical moment; if so, discarding the business data frame, otherwise, receiving the business data frame.
[0148] According to an embodiment of the present disclosure, a storage device is further included; the storage device is configured to: store the sequence number of the service data frame received at the previous historical moment.
[0149] According to an embodiment of the present disclosure, the fourth calculation module 650 is also configured to: set the time length of the specified time period; multiply the time length by the average frame arrival frequency difference and the maximum frame arrival frequency difference, thereby obtaining the average frame arrival number difference Navr and the maximum frame arrival number difference Nmax.
[0150] According to an embodiment of the present disclosure, the abnormality monitoring and recovery module is further configured to: for any moment within the specified time period, determine the difference between the business data frames received from the multiple transmission paths and the business data frames that perform frame elimination; when the difference is the number of paths of the multiple transmission paths minus one, count the path IDs in the business data frames received from the multiple transmission paths, and when the number of the path IDs exceeds 2, determine that a frame elimination error has occurred.
[0151] This disclosure innovatively implements dynamic setting of the history cache vector length, minimizing the risk of accidental deletion or omission of valid data units. This dynamic setting mechanism intelligently adjusts the length based on the arrival frequency of received data frames. As the number of received data frames accumulates, the calculation of the frame arrival frequency becomes increasingly accurate, enabling flexible adjustment of the history cache vector length for specified time periods. This ensures that the redundant communication protocol of this disclosure implements a highly adaptive data transmission process.
[0152] In particular, according to embodiments of the present disclosure, the methods described above can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for executing the methods described above. In such embodiments, the computer program can be downloaded and installed from a network via a communication component and / or installed from a removable medium.
[0153] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of code, and the module, program segment or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession 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 block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.
[0154] The units or modules involved in the embodiments described in this disclosure may be implemented by software or programmable hardware. The units or modules described may also be provided in a processor, and the names of these units or modules do not, in certain circumstances, constitute limitations on the units or modules themselves.
[0155] As another aspect, the present disclosure further provides a computer-readable storage medium. This computer-readable storage medium may be included in the electronic device or computer system described in the above embodiments, or may be a standalone computer-readable storage medium not incorporated into the device. The computer-readable storage medium stores one or more programs, which are used by one or more processors to execute the methods described in the present disclosure.
[0156] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention herein is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the inventive concept. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
Claims
1. A data transmission optimization method, characterized in that: The method is applied to a time-sensitive network (TSN) communication node, and the method includes: Receiving service data frames of a specified periodic service from multiple transmission paths respectively based on a redundant transmission protocol, wherein a path ID of the transmission path for transmitting the service data frame is carried in a reserved sub-field of a redundant flag field of the service data frame; Locating each transmission path based on the path IDs of the multiple transmission paths, and for each transmission path, calculating a frame arrival frequency according to the current reception time of the received service data frame and the historical average reception time of multiple service data frames received at a historical time, so as to obtain the frame arrival frequencies of the multiple transmission paths; Calculating a frame arrival frequency difference between each pair of transmission paths in the multiple transmission paths, wherein the pair of transmission paths includes two different transmission paths; Determining an average frame arrival frequency difference and a maximum frame arrival frequency difference according to the frame arrival frequency differences between each pair of transmission paths in the multiple transmission paths; Determining an average frame arrival number difference Navr and a maximum frame arrival number difference Nmax within a specified time period according to the average frame arrival frequency difference and the maximum frame arrival frequency difference; Setting a historical cache vector length W of the redundant transmission protocol to Navr ≤ W ≤ Nmax; Receiving service data frames of the specified periodic service from the multiple transmission paths within the specified time period, and performing frame elimination on the service data frames received from the multiple transmission paths by using a historical cache vector with a length of W.
2. The method according to claim 1, characterized in that The method further includes: At any moment within the specified time period, locating each transmission path based on the path IDs of the multiple transmission paths, and for each transmission path, monitoring whether each transmission path is abnormal.
3. The method according to claim 2, characterized in that The monitoring whether each transmission path is abnormal for each transmission path includes: For each transmission path, calculating a real-time frame arrival frequency M1; when M1 ≥ N1, determining that the transmission path is in an abnormal state, where N1 is a first set frequency threshold, and the first set frequency threshold is set based on the frame arrival frequency of the transmission path.
4. The method according to claim 3, characterized in that After determining that the transmission path is in an abnormal state, it further includes: Monitoring whether the transmission path returns to normal.
5. The method according to claim 4, characterized in that The monitoring whether the transmission path returns to normal includes: Calculating a real-time frame arrival frequency M2 of the transmission path; when N2 < M2 < N1, determining that the transmission path is in an abnormal recovery state; when M2 ≤ N2, determining that the transmission path is in a normal state, where N2 is a second set frequency threshold, the second set frequency threshold is set based on the frame arrival frequency of the transmission path, and the second set frequency threshold is different from the first set frequency threshold.
6. The method according to claim 5, wherein: When the transmission path is in an abnormal recovery state, resetting the length of the historical cache vector to M, where M ≥ 2W; When the transmission path is in a normal state, restoring the length N of the historical cache vector to the set value of length W.
7. The method according to claim 1, characterized in that The receiving of service data frames of designated periodic services from multiple transmission paths based on a redundant transmission protocol includes: For each transmission path of the multiple transmission paths, the service data frame is received using a matching recovery algorithm in a redundant transmission protocol.
8. The method according to claim 7, characterized in that The receiving the service data frame by using a matching recovery algorithm in a redundant transmission protocol includes: Determining whether the sequence number carried in the service data frame is the same as the sequence number carried in the service data frame received at the previous historical moment; If so, discard the service data frame; otherwise, receive the service data frame.
9. The method according to claim 8, characterized in that The sequence number of the service data frame received at the last historical moment is stored in the storage device of the TSN communication node.
10. The method according to claim 1, characterized in that The TSN communication node is a TSN destination node and / or a TSN relay node.
11. The method according to claim 1, wherein The determining, according to the average frame arrival frequency difference and the maximum frame arrival frequency difference, an average frame arrival number difference Navr and a maximum frame arrival number difference Nmax within a specified time period, includes: Setting the length of the specified time period; The time length is multiplied by the average frame arrival frequency difference and the maximum frame arrival frequency difference, thereby obtaining the average frame arrival number difference Navr and the maximum frame arrival number difference Nmax.
12. The method according to claim 1, characterized in that The method further comprises: At any moment within the specified time period, determining a difference between the service data frames received from the plurality of transmission paths and the service data frames subjected to frame elimination; When the difference is the number of the multiple transmission paths minus one, the path IDs in the service data frames received from the multiple transmission paths are counted, and when the number of the path IDs exceeds 2, it is determined that a frame elimination error has occurred.
13. A TSN communication device, characterized in that: include: a receiving module configured to receive service data frames of a specified periodic service from a plurality of transmission paths based on a redundant transmission protocol, wherein a reserved subfield of a redundant flag field of the service data frame carries a path ID of a transmission path for transmitting the service data frame; a first calculation module configured to locate each transmission path based on the path IDs of the multiple transmission paths, and for each transmission path, calculate a frame arrival frequency based on a current reception time of a received service data frame and a historical average reception time of multiple service data frames received at historical times, thereby obtaining the frame arrival frequencies of the multiple transmission paths; a second calculation module configured to calculate a frame arrival frequency difference of each transmission path pair in the plurality of transmission paths based on the frame arrival frequencies of the plurality of transmission paths, the transmission path pair including two different transmission paths; a third calculation module configured to determine an average frame arrival frequency difference and a maximum frame arrival frequency difference according to the frame arrival frequency difference of each transmission path pair in the plurality of transmission paths; a fourth calculation module configured to determine an average frame arrival number difference Navr and a maximum frame arrival number difference Nmax in a specified time period according to the average frame arrival frequency difference and the maximum frame arrival frequency difference; A dynamic setting module, configured to set the length W of the historical cache vector of the redundant transmission protocol such that Navr ≤ W ≤ Nmax; A data frame elimination module, configured to receive service data frames of the specified periodic service from the multiple transmission paths within the specified time period, and perform frame elimination on the service data frames received from the multiple transmission paths using a historical cache vector of length W.
14. The TSN communication device according to claim 13, characterized in that Further includes an anomaly monitoring and recovery module; the anomaly monitoring and recovery module is configured to: At any moment within the specified time period, locate each transmission path based on the path ID of the multiple transmission paths, and for each transmission path, monitor whether each transmission path is abnormal.
15. The TSN communication device according to claim 14, characterized in that The monitoring whether each transmission path is abnormal includes: For each transmission path, calculate the real-time frame arrival frequency M1; when M1 ≥ N1, determine that the transmission path is in an abnormal state, where N1 is a first set frequency threshold, and the first set frequency threshold is set based on the frame arrival frequency of the transmission path.
16. The TSN communication device according to claim 15, characterized in that The anomaly monitoring and recovery module is further configured to: After determining that the transmission path is in an abnormal state, monitor whether the transmission path returns to normal.
17. The TSN communication device according to claim 16, characterized in that The monitoring whether the transmission path returns to normal includes: Calculate the real-time frame arrival frequency M2 of the transmission path; when N2 < M2 < N1, determine that the transmission path is in an abnormal recovery state; when M2 ≤ N2, determine that the transmission path is in a normal state, where N2 is a second set frequency threshold, the second set frequency threshold is set based on the frame arrival frequency of the transmission path, and the second set frequency threshold is different from the first set frequency threshold.
18. The TSN communication device according to claim 17, characterized in that The dynamic setting module is further configured to: When the transmission path is in an abnormal recovery state, reset the length of the historical cache vector to M, where M ≥ 2W; When the transmission path is in a normal state, restore the length N of the historical cache vector to the setting of length W.
19. The TSN communication device according to claim 13, characterized in that The receiving module is further configured to, for each transmission path in the multiple transmission paths, receive the service data frames using a matching recovery algorithm in the redundant transmission protocol.
20. The TSN communication device according to claim 19, characterized in that The receiving the service data frames using a matching recovery algorithm in the redundant transmission protocol includes: Determine whether the sequence number carried in the service data frame is the same as the sequence number carried in the service data frame received at the previous historical moment; If so, discard the service data frame, otherwise, receive the service data frame.
21. The TSN communication device according to claim 20, characterized in that Further includes a storage device; the storage device is configured to: Store the sequence number of the service data frame received at the previous historical moment.
22. The TSN communication device according to claim 13, characterized in that The fourth calculation module is further configured to: Set the time length of the specified time period; Multiply the time length by the average frame arrival frequency difference and the maximum frame arrival frequency difference to obtain the average frame arrival quantity difference Navr and the maximum frame arrival quantity difference Nmax.
23. The TSN communication device according to claim 14, characterized in that The anomaly monitoring and recovery module is further configured to: At any moment within the specified time period, determining a difference between the service data frames received from the plurality of transmission paths and the service data frames subjected to frame elimination; When the difference is the number of the multiple transmission paths minus one, the path IDs in the service data frames received from the multiple transmission paths are counted, and when the number of the path IDs exceeds 2, it is determined that a frame elimination error has occurred.
24. A TSN chip, characterized in that: A TSN communication device comprising the TSN communication device according to any one of claims 13 to 23.
25. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed by a processor, the method according to any one of claims 1 to 12 is implemented.
26. A computer program product comprising computer instructions, wherein when the computer instructions are executed by a processor, the method according to any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Network delay control
CN101427516A
Bill processing method, device and equipment, and storage medium
CN112560861A