Time-sensitive network data flow gating method for robot operating system

By dynamically adjusting the gating list of the time-sensitive network in the network communication of the robot operating system, the problem of insufficient adaptability of data flow scheduling is solved, and adaptive adjustment of resources and deterministic transmission of high-priority data flows are realized, thereby improving the flexibility and stability of the network.

CN122640366APending Publication Date: 2026-08-25HARBIN INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610828658.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-09
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

In the network communication of robot operating systems, there are problems such as insufficient adaptability of data flow scheduling in complex network environments, difficulty in balancing the transmission resources of services with different priorities, and difficulty in guaranteeing the determinism of time-sensitive data transmission.

Method used

By initializing a gating list containing the gate status of each priority sending queue and the initial time slot, a periodic scheduling mechanism is established to dynamically adjust the time slot of the highest priority sending queue. Based on the real-time occupancy status, a closed-loop adaptive adjustment mechanism is formed to release redundant resources and restore the original time slot when needed.

Benefits of technology

It improves the utilization rate of time slots, reduces resource waste, enhances adaptability to complex network environments, ensures deterministic transmission of high-priority data streams, and improves the flexibility and stability of network resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122640366A_ABST
    Figure CN122640366A_ABST
Patent Text Reader

Abstract

The application discloses a time-sensitive network data stream gating method for a robot operating system, which comprises the following steps: initializing a gating list; obtaining first occupation information of a first time slot corresponding to a first target sending queue in a first preset continuous gating period; when the first occupation information meets a preset adjustment condition, adjusting the first time slot into a second time slot; obtaining second occupation information of the second time slot in a second preset continuous gating period; when the second occupation information meets a preset recovery condition, restoring the time slot corresponding to the first target sending queue into the first time slot, otherwise, keeping the time slot as the second time slot. The method provided by the application can dynamically adjust the gating list according to the actual occupation of the time slot corresponding to the sending queue with the highest priority, thereby improving the adaptability of time slot configuration to service changes, guaranteeing the deterministic transmission of high-priority data streams, and improving the utilization rate of time resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data flow gating technology in time-sensitive networks, and in particular to a time-sensitive network data flow gating method for robot operating systems. Background Technology

[0002] With the continuous development of robotics, intelligent manufacturing, and industrial automation technologies, network-based control and communication methods are widely used in robot systems, industrial control systems, and multi-device collaborative systems. In these systems, controllers, sensors, actuators, and upper-level task modules typically need to interact via communication networks. The transmitted data includes both high-real-time and deterministic business data such as control commands and status feedback, as well as large-volume or high-frequency business data such as images, point clouds, audio and video, and log information. Therefore, how to achieve the orderly transmission of different types of data streams in a unified network environment has become a crucial factor affecting the real-time control performance and overall operational stability of the system.

[0003] In related technologies, existing network communication methods typically employ Ethernet and its upper-layer communication protocols to achieve data transmission between devices, and differentiate between different services by setting priorities, queue scheduling, or bandwidth allocation. In recent years, Time-Sensitive Networking (TSN) mechanisms have also been introduced into existing technologies. Based on the IEEE 802.1Qbv standard, these mechanisms use gate control lists (GCLs) and time-aware shapers (TAS) to schedule and control data streams of different priorities, aiming to improve the real-time performance and determinism of critical service transmission. However, in practical applications, the composition of service flows, data load levels, and transmission requirements of various services in the network often change with operational status, task stages, or equipment conditions. Existing scheduling configuration methods are prone to insufficient adaptation to actual communication needs when facing complex and ever-changing network environments, resulting in inadequate network resource allocation, poor coordination between services of different priorities, and further impacting the stability and determinism of time-sensitive data transmission.

[0004] Therefore, in the network communication of robot operating systems, the insufficient adaptability of data flow scheduling in complex network environments, the difficulty in balancing the transmission resources of services with different priorities, and the difficulty in guaranteeing the determinism of time-sensitive data transmission have become urgent problems to be solved. Summary of the Invention

[0005] This application provides a time-sensitive network data stream gating method for robot operating systems, aiming to solve the problems of insufficient adaptability of data stream scheduling in complex network environments, difficulty in balancing transmission resources for different priority services, and difficulty in guaranteeing the determinism of time-sensitive data transmission in the network communication of robot operating systems.

[0006] This application provides a time-sensitive network data stream gating method for robot operating systems, the method comprising: Initialize the gating list, which includes the gate status and initial time slot of each priority transmission queue; Obtain the first occupancy information of the first time slot corresponding to the first target sending queue within a first preset continuous gating period; wherein, the first target sending queue is the sending queue with the highest priority among all priority sending queues; and the first time slot is the initial time slot corresponding to the first target sending queue. When the first occupancy information meets the preset adjustment conditions, the first time slot is adjusted to the second time slot, and the duration of the second time slot is less than the duration of the first time slot. Obtain the second occupancy information of the second time slot within the second preset continuous gating period; When the second occupancy information meets the preset recovery conditions, the time slot corresponding to the first target sending queue is restored to the first time slot; When the second occupancy information does not meet the preset recovery conditions, the time slot corresponding to the first target sending queue is kept as the second time slot.

[0007] Optionally, in the above scheme, when the first occupancy information meets the preset adjustment condition, the reduction duration of the first time slot is a preset duration. The preset duration is the difference between the duration corresponding to the first time slot and the duration corresponding to the second time slot.

[0008] Optionally, in the above scheme, after adjusting the first time slot to the second time slot, the method further includes: Based on the preset duration, the third time slot corresponding to the second target sending queue is adjusted to the fourth time slot; Wherein, the second target sending queue is the highest priority sending queue among all priority sending queues, excluding the first target sending queue; the third time slot is the initial time slot corresponding to the second target sending queue; the duration corresponding to the fourth time slot is the sum of the duration corresponding to the third time slot and the preset duration.

[0009] In the above scheme, optionally, the first occupancy information is used to characterize the proportion of time during which no Ethernet frames pass through the first time slot within the first preset continuous gating period; The second occupancy information is used to characterize the proportion of time during which Ethernet frames pass through the second time slot within the second preset continuous gating period.

[0010] Optionally, in the above scheme, before adjusting the first time slot to the second time slot, the method further includes: When the proportion of time in which no Ethernet frames pass through the first time slot in any gating period is greater than a preset proportion, the first time slot is marked as a state of interest, and the first timer is started. When the attention state continues until the first timer reaches the first preset value, it is determined that the first occupancy information meets the preset adjustment condition.

[0011] Optionally, in the above scheme, after marking the first time slot as a state of interest and starting the first timer, the method further includes: When the proportion of time during which no Ethernet frames pass through the first time slot in any gating period is not greater than the preset proportion, the attention status flag of the first time slot is canceled and the first timer is reset.

[0012] Optionally, in the above scheme, the preset recovery condition includes: the proportion of time in which Ethernet frames pass through in each gate period within the second preset continuous gate period of the second time slot is greater than the second preset proportion.

[0013] Optionally, in the above scheme, a protective band is provided between adjacent gate control cycles corresponding to the gate control list; Within the protection zone, Ethernet frames that have already started transmitting continue to complete the transmission, while Ethernet frames that have not yet started transmitting are not allowed to start transmitting.

[0014] Optionally, in the above scheme, the duration of the protection band is not less than the transmission duration of the longest Ethernet frame in the current link.

[0015] In the above scheme, optionally, when the first time slot is adjusted to the second time slot, the duration corresponding to the second time slot is not less than the minimum duration threshold; The minimum duration threshold is determined by the average frame pass duration of the first target transmission queue within the most recent preset number of gating periods.

[0016] Compared with the prior art, this application has at least the following beneficial effects: Based on further analysis and research of existing technical problems, this application recognizes the following issues in robot operating system network communication: insufficient adaptability of data flow scheduling in complex network environments, difficulty in balancing transmission resources for services of different priorities, and difficulty in guaranteeing the determinism of time-sensitive data transmission. This application establishes a basic periodic scheduling mechanism in time-sensitive networks by initializing a gating list containing the gate states of each priority sending queue and the initial time slot. Furthermore, by obtaining the first occupancy information of the first time slot corresponding to the highest priority first target sending queue within a first preset continuous gating period, the actual usage of this time slot is continuously monitored. When the monitoring results indicate that the time slot is redundant, it is dynamically adjusted to a second time slot with a shorter duration, thereby releasing some time resources. After the reduction is completed, the remaining time slot is then... The second time slot is described with second occupancy information within the second preset continuous gating period. Based on this occupancy information, it is determined whether the currently reduced time slot can still meet the transmission requirements of the first target transmission queue. When the recovery condition is met, the original first time slot is restored. When the recovery condition is not met, the reduction result is maintained, thus forming a closed-loop adaptive adjustment mechanism based on real-time occupancy. Through the above process, the rigidity of resource allocation caused by the static configuration of the gating list in traditional time-sensitive networks can be avoided. The time slot allocation can be adaptively adjusted according to the dynamic changes in service load, thereby improving the utilization rate of time slots and reducing resource waste while ensuring deterministic transmission of high-priority data streams. This solves the problem of low resource utilization and insufficient scheduling flexibility caused by the fixed gating strategy being difficult to adapt to dynamic changes in services in the background technology. Attached Figure Description

[0017] Figure 1 A flowchart illustrating a time-sensitive network data stream gating method for a robot operating system, provided as an embodiment of this application; Figure 2 This is a schematic diagram illustrating the control method of communication in a communication network by configuring a gate list in accordance with a time-sensitive network data stream gating method for a robot operating system, as provided in one embodiment of this application. Figure 3 A schematic diagram of a robot operating system provided in one embodiment of this application; Figure 4 A schematic diagram showing the position of each time slot and guard band within the GCL cycle during the application of a time-sensitive network data stream gating method for a robot operating system provided in one embodiment of this application; Figure 5 A schematic diagram illustrating the total latency of a time-sensitive network data stream gating method for a robot operating system provided in one embodiment of this application during application; Figure 6This is a flowchart illustrating the application of a time-sensitive network data stream gating method for a robot operating system, as provided in one embodiment of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0019] In one embodiment, such as Figure 1 As shown, a time-sensitive network data stream gating method for robot operating systems is provided, including the following steps: Initialize the gating list, which includes the gate status and initial time slot of each priority transmission queue; Obtain the first occupancy information of the first time slot corresponding to the first target sending queue within a first preset continuous gating period; wherein, the first target sending queue is the sending queue with the highest priority among all priority sending queues; and the first time slot is the initial time slot corresponding to the first target sending queue. When the first occupancy information meets the preset adjustment conditions, the first time slot is adjusted to the second time slot, and the duration of the second time slot is less than the duration of the first time slot. Obtain the second occupancy information of the second time slot within the second preset continuous gating period; When the second occupancy information meets the preset recovery conditions, the time slot corresponding to the first target sending queue is restored to the first time slot; When the second occupancy information does not meet the preset recovery conditions, the time slot corresponding to the first target sending queue is kept as the second time slot.

[0020] In some implementations, the time-sensitive network (TSN) data stream gating method for robot operating systems provided in this application runs on a TSN device that supports a time-aware shaping mechanism. The TSN device can be a switch, bridging device, or other network node with gating and scheduling capabilities. The method can be applied to robot communication systems, industrial automation networks, or other time-sensitive network scenarios with multi-priority deterministic communication requirements. In robot application scenarios, the relevant terminals can be equipped with a robot operating system, which includes a basic operating system layer and a robot middleware layer. The robot middleware includes a lower-level communication middleware and an upper-level inter-component communication / control framework. In addition to supporting basic communication protocols such as TCP, UDP, and DDS, the communication middleware can also be integrated with time-sensitive networks to form a real-time communication middleware, supporting real-time communication of multi-priority services within the same network. To ensure consistent time bases for gating and scheduling, before executing the method, the TSN device, the upstream Ethernet frame sender, and the downstream Ethernet frame receiver first complete time synchronization so that each gating cycle and each time slot can be executed according to a unified clock.

[0021] During the initialization phase, the gating list is first initialized. This list includes the gate states and initial time slots for each priority transmission queue. The gate state indicates whether the corresponding transmission queue is allowed to transmit within a certain time period; the initial time slot indicates the transmission time window pre-allocated to the corresponding transmission queue within a gating cycle. The gating list mainly describes two types of parameters: the gate states of each priority transmission queue and the duration of the gate states. The gating list is a cyclically executed list, storing control information on the on / off states of the interface forwarding queues and executing it repeatedly in each gating cycle. In specific implementations, multiple priority transmission queues can be established based on the latency sensitivity and deterministic requirements of different services. Time-sensitive services such as control commands and actuator control information are mapped to higher-priority transmission queues, while image streams, point cloud streams, audio / video streams, log streams, or background synchronization streams are mapped to medium- and low-priority transmission queues. Within the gating cycle, multiple fine-grained time slots can be divided. Each time slot forms a virtual communication channel within a specific time period as needed. Within the corresponding time period, only the priority transmission queue corresponding to that time slot is allowed to pass through. In this way, different priority sending queues can obtain sending opportunities that are isolated from each other within the same gating period.

[0022] After the gating list is initialized, the first occupancy information of the first time slot corresponding to the first target sending queue within the first preset continuous gating period is obtained. The first target sending queue is the highest priority sending queue among all priority sending queues, and the first time slot is the initial time slot corresponding to this first target sending queue. Specifically, a centralized network controller can communicate with the TSN devices to continuously collect the usage of the first time slot within multiple continuous gating periods. The centralized network controller is responsible for managing and configuring the entire TSN network resources, collecting the network device topology, device capabilities, and traffic requirements, calculating resource allocation schemes based on the collected information, and then issuing corresponding configuration commands to each TSN device. Simultaneously, the centralized network controller can continuously communicate with each device to obtain and update network topology information, continuously monitor the network status according to traffic characteristics, and dynamically adjust the gating list based on the monitoring results. This centralized control method ensures that the time slot adjustment process remains consistent with the overall network resource status.

[0023] When the first occupancy information meets the preset adjustment conditions, the first time slot is adjusted to a second time slot, the duration of which is less than that of the first time slot. Specifically, the centralized network controller can update the duration parameter of the time slot corresponding to the first target transmission queue in the gating list according to a preset adjustment strategy, reducing the original first time slot to a second time slot. Since the gating list is a cyclically executed list, once the new second time slot is written and takes effect, subsequent gating cycles can continue to run according to the new gate state and time slot configuration. The time resources released after the first time slot is reduced can be uniformly re-planned by the gating list to avoid the original high-priority transmission window remaining idle for a long time.

[0024] After adjusting the first time slot to the second time slot, the second occupancy information of the second time slot is acquired within a second preset continuous gating period. This second occupancy information reflects whether the second time slot remains in a high-usage state after reduction. Specifically, after the second time slot is put into operation, the centralized network controller can collect the traffic flow of the second time slot periodically within multiple consecutive gating periods to determine whether the reduced transmission window can still meet the transmission requirements of the first target transmission queue. If the second occupancy information meets the preset recovery conditions, the time slot corresponding to the first target transmission queue is restored to the first time slot; if the second occupancy information does not meet the preset recovery conditions, the time slot corresponding to the first target transmission queue is maintained as the second time slot. This forms a closed-loop adjustment mechanism of "observation, reduction, verification, restoration or maintenance."

[0025] Furthermore, during network transmission, the total latency for users typically includes Ethernet frame transmission latency, transmission latency, processing latency within the TSN device, enqueueing latency within the time shaper, and dequeueing / forwarding latency. The method described primarily reduces processing latency within the TSN device by optimizing the gating list and time slot configuration, and also reduces waiting and conflicts caused by unreasonable time slot allocation.

[0026] This embodiment establishes a closed-loop adjustment process involving gating list initialization, acquisition of first occupancy information, reduction of first time slots, acquisition of second occupancy information, and restoration or maintenance. This ensures that the time slot corresponding to the highest-priority first target transmission queue is no longer a fixed, static configuration, but can be adaptively adjusted according to actual occupancy. This allows for the release of excess time resources when the first target transmission queue is idle for extended periods, and timely restoration of the original time slots when high load occurs after reduction. This improves the adaptability of time slot configuration to complex network environments, while balancing the deterministic transmission requirements of high-priority services with overall network resource utilization.

[0027] In this embodiment, when the first occupancy information meets the preset adjustment condition, the reduction duration of the first time slot is the preset duration; The preset duration is the difference between the duration corresponding to the first time slot and the duration corresponding to the second time slot.

[0028] In some implementations, when the first occupancy information meets the preset adjustment conditions, the reduction duration of the first time slot is a preset duration, wherein the preset duration is the difference between the duration corresponding to the first time slot and the duration corresponding to the second time slot. This preset duration can serve as the amount of time resources released after the first time slot is reduced, and also as a quantitative basis for subsequent reallocation of time resources within the gating cycle.

[0029] In practice, the original duration of the first time slot in the current gating list can be read first, and then the target duration of the second time slot can be calculated by combining it with a preset adjustment strategy. The difference between the two is then used as the preset duration. In one implementation, the target duration of the second time slot can be obtained by reducing the original duration of the first time slot by a preset ratio; for example, a fixed ratio reduction can be used in some implementations. In another implementation, the second time slot can be obtained by directly subtracting a fixed length from the first time slot. Regardless of the method used, the preset duration represents the portion of schedulable time resources released by the time slot corresponding to the first target sending queue.

[0030] When generating a new gating list, the centralized network controller can explicitly record a preset duration. This allows for subsequent expansion of time slots corresponding to other priority sending queues, or for determining whether the reduced second time slot still meets the minimum duration threshold. Thus, the preset duration not only describes the reduction action itself but also serves as an important input parameter for subsequent resource reallocation and security checks.

[0031] This embodiment quantifies the reduction duration of the first time slot, providing a clear and calculable parameter basis for the time slot adjustment process. This facilitates the direct determination of the released time resources during the gating list update process, thereby improving the executability and consistency of the gating adjustment process.

[0032] In this embodiment, after adjusting the first time slot to the second time slot, the method further includes: Based on the preset duration, the third time slot corresponding to the second target sending queue is adjusted to the fourth time slot; Wherein, the second target sending queue is the highest priority sending queue among all priority sending queues, excluding the first target sending queue; the third time slot is the initial time slot corresponding to the second target sending queue; the duration corresponding to the fourth time slot is the sum of the duration corresponding to the third time slot and the preset duration.

[0033] In some implementations, after adjusting the first time slot to the second time slot, the method further includes adjusting the third time slot corresponding to the second target sending queue to the fourth time slot based on the preset duration. Here, the second target sending queue is the highest priority sending queue among all priority sending queues, excluding the first target sending queue; the third time slot is the initial time slot corresponding to the second target sending queue; and the duration of the fourth time slot is the sum of the duration of the third time slot and the preset duration. In this way, the time resources released by the first target sending queue are not left idle, but are redistributed to the next highest priority sending queue.

[0034] In practice, when reconstructing the gating list, the centralized network controller can maintain the priority order of all transmission queues other than the first target transmission queue, and only extend the duration of the time slot corresponding to the second target transmission queue, that is, extend the original third time slot into a fourth time slot. Since the second target transmission queue has the highest priority among all remaining transmission queues, its services usually still correspond to high real-time requirements or large bandwidth demands. Therefore, prioritizing the allocation of the preset duration to the second target transmission queue is beneficial to improving the time resource utilization efficiency of other higher priority services without affecting the basic guarantee capability of the highest priority transmission window.

[0035] Furthermore, with the total length of the gating period remaining unchanged, the above adjustment process is equivalent to transferring part of the transmission time from the first target transmission queue to the second target transmission queue within the gating period, enabling the gating list to perform more reasonable time slot reallocation when facing dynamic service loads.

[0036] This embodiment compensates the time slot of the second target sending queue by reducing the preset duration of the first target sending queue, thus avoiding the waste of the released time resources and further improving the sending window conditions of the second highest priority sending queue. As a result, the gating list can improve the resource utilization efficiency and bandwidth coordination capability of other higher priority services while ensuring the deterministic guarantee of the highest priority service.

[0037] In this embodiment, the first occupancy information is used to characterize the proportion of time during which no Ethernet frames pass through the first time slot within the first preset continuous gating period; The second occupancy information is used to characterize the proportion of time during which Ethernet frames pass through the second time slot within the second preset continuous gating period.

[0038] In some implementations, the first occupancy information is used to characterize the percentage of time during which no Ethernet frames pass through the first time slot within the first preset continuous gating period; the second occupancy information is used to characterize the percentage of time during which Ethernet frames pass through the second time slot within the second preset continuous gating period. Here, the first occupancy information reflects the idle level of the first time slot, and the second occupancy information reflects the busy level of the second time slot; together, they constitute the core observation in the adaptive adjustment of the time slot.

[0039] In practice, the TSN device can record the frame passage status in the first time slot and the second time slot respectively within each gating cycle, and upload the relevant statistical results to the centralized network controller. For the first occupancy information, the total duration of the first time slot within the corresponding gating cycle and the cumulative duration of no Ethernet frames passing can be calculated, and the ratio of the two can be used to obtain the percentage of time without frame passage. For the second occupancy information, the cumulative duration of Ethernet frames passing in the second time slot can be calculated, and this cumulative duration can be divided by the total duration of the second time slot to obtain the percentage of time with frame passage. The statistical results of multiple consecutive gating cycles can also be accumulated, filtered, or combined in a predetermined manner to form the first occupancy information and the second occupancy information that can be directly used for threshold judgment.

[0040] Since the first occupancy information and the second occupancy information correspond to different states before and after the adjustment, they are defined by the proportion of time without frames and the proportion of time with frames, respectively, which makes the judgment logic more targeted: the former is used to identify whether there is long-term redundancy in the first time slot, and the latter is used to identify whether the second time slot has re-entered high load due to reduction.

[0041] This embodiment clarifies the composition of the first and second occupancy information, making the observations before and after the adjustment clearly distinguishable. This facilitates the implementation of idleness and busyness judgments for the first and second time slots respectively, thereby improving the interpretability and executability of the time slot adjustment decision.

[0042] In this embodiment, before adjusting the first time slot to the second time slot, the method further includes: When the proportion of time in which no Ethernet frames pass through the first time slot in any gating period is greater than a preset proportion, the first time slot is marked as a state of interest, and the first timer is started. When the attention state continues until the first timer reaches the first preset value, it is determined that the first occupancy information meets the preset adjustment condition.

[0043] In some implementations, before adjusting the first time slot to the second time slot, the following processing is also included: when the proportion of time in which no Ethernet frame passes through the first time slot in any gating period is greater than a preset proportion, the first time slot is marked as a state of interest and a first timer is started; when the state of interest continues until the first timer reaches a first preset value, it is determined that the first occupancy information meets the preset adjustment condition.

[0044] In practice, the centralized network controller can read the percentage of time during which no Ethernet frames passed through the first time slot after each gating cycle and compare this percentage with a preset ratio. If the percentage is greater than the preset ratio, it indicates that the first target transmission queue has not fully occupied its allocated first time slot during that cycle. In this case, instead of immediately reducing the slot, the first time slot is marked as being in a state of interest, and a first timer is started to record whether this high idle state persists. The first timer can increment with each gating cycle, that is, the count increases once for each new gating cycle. Only when the first timer accumulates to a first preset value is the idle characteristic of the first time slot corresponding to the first target transmission queue considered to be persistent, thus confirming that the first occupancy information meets the preset adjustment conditions. In the technical implementation, multiple consecutive observation cycles can be used to avoid a single, occasional idle period directly triggering time slot reduction.

[0045] This embodiment essentially establishes a continuous confirmation process for the reduction of the first time slot. By first entering a state of interest and then accumulating confirmation through continuous gating cycles, false idle periods caused by short-term traffic fluctuations can be effectively filtered out.

[0046] This embodiment introduces a state of interest and a first timer, adding a continuous observation step to the reduction of the first time slot. This allows the reduction operation to be based on continuous idle characteristics rather than single fluctuation characteristics, thereby reducing the risk of false triggering and improving the stability of time slot adjustment.

[0047] In this embodiment, after marking the first time slot as a state of interest and starting the first timer, the method further includes: When the proportion of time during which no Ethernet frames pass through the first time slot in any gating period is not greater than the preset proportion, the attention status flag of the first time slot is canceled and the first timer is reset.

[0048] In some implementations, after marking the first time slot as a state of interest and starting the first timer, the following process is also included: when the proportion of time in which no Ethernet frames pass through the first time slot in any gating period is not greater than the preset proportion, the state of interest marking of the first time slot is canceled and the first timer is reset.

[0049] In practice, while the first time slot is already under observation, the centralized network controller continues to collect the percentage of frameless passage time for the first time slot cycle by cycle. If, in any subsequent gating cycle, this percentage is no longer greater than a preset proportion, it indicates that the high idle characteristic of the first time slot has been interrupted, the load on the first target transmission queue may have recovered, or at least its corresponding transmission window is no longer continuously redundant. At this point, continuing to maintain the observation status and accumulate the first timer becomes meaningless; therefore, the observation status flag for the first time slot can be canceled, and the first timer can be cleared or reset.

[0050] By setting up this exit mechanism for the state of interest, the continuous idle confirmation process of the first time slot can be dynamically revoked. When the load condition changes, the system will not continue to advance the reduction action based on the invalid historical observation results, but will wait for the next round of new continuous idle characteristics to reappear before re-entering the state of interest.

[0051] This embodiment adds an exit mechanism to the watchlist state, making the continuous idle confirmation of the first time slot more consistent with actual business fluctuations. This avoids continuing to use the existing watchlist state to reduce the time slot due to a mid-term load rebound, thereby further improving the accuracy and robustness of adaptive gating adjustment.

[0052] In this embodiment, the preset recovery condition includes: the proportion of time in which Ethernet frames pass through in each gate period of the second time slot within the second preset continuous gate period is greater than the second preset proportion.

[0053] In some implementations, the preset recovery condition includes: the proportion of time in which Ethernet frames pass through in each gate period of the second time slot within the second preset continuous gating period is greater than a second preset proportion. This second preset proportion can be used as a threshold value for determining whether the second time slot has re-entered a high-load state.

[0054] In practice, after the first time slot has been adjusted to the second time slot, the centralized network controller can periodically calculate the percentage of time with frames passing through the second time slot within a second preset continuous gating period. If, within this continuous observation window, the percentage of time with Ethernet frames passing through in each gating period is greater than the second preset proportion, it indicates that the reduced second time slot has been in a high-utilization state for multiple consecutive periods, approaching or reaching peak load. Technically, this can be achieved by judging high occupancy over multiple consecutive periods; for example, using high occupancy for several consecutive periods as a recovery criterion. In this case, the system can determine that the second time slot is insufficient to continuously guarantee stable transmission of the first target transmission queue and needs to be restored to the original first time slot.

[0055] Compared to judging whether to restore based on a single gating cycle, the method of "all cycles within the second preset continuous gating cycle meet the high occupancy condition" can more effectively distinguish between short-term traffic peaks and truly continuous high load states, thereby preventing premature restoration of the first time slot due to instantaneous sudden traffic.

[0056] This embodiment specifies the preset recovery condition as the second time slot exhibiting a high percentage of frame passing time within multiple consecutive gating cycles. This allows the recovery action to be based on continuous high load observation results, which helps to maintain the resource utilization rate of the second time slot while timely restoring the original transmission window of the first target transmission queue, ensuring its deterministic transmission capability when the service load recovers.

[0057] In this embodiment, a protective band is provided between adjacent gate control cycles corresponding to the gate control list; Within the protection zone, Ethernet frames that have already started transmitting continue to complete the transmission, while Ethernet frames that have not yet started transmitting are not allowed to start transmitting.

[0058] In some implementations, a guard band is provided between adjacent gating periods corresponding to the gating list; within the guard band, Ethernet frames that have already started transmitting continue to complete transmission, while Ethernet frames that have not yet started transmitting are not allowed to start transmitting. The guard band can be understood as a dedicated transition period set at the boundary of the gating period to restrict the initiation of new frame transmission near the boundary.

[0059] In practice, the guard band can be set between two adjacent gating cycles, or near the boundary area of ​​time slots corresponding to different priority transmission queues. The purpose of the guard band is to prevent newly initiated Ethernet frames from crossing cycle boundaries and continuing to occupy time slot resources corresponding to high-priority transmission queues in subsequent gating cycles, especially in time slots corresponding to low-priority transmission queues, thus increasing the latency of high-priority data transmission. Therefore, within the guard band, Ethernet frames that have already started transmission before the start of the guard band are allowed to continue transmitting; Ethernet frames that have not yet started transmission are not allowed to start transmission after entering the guard band. This achieves the control effect of "only allowing the end to be completed, not allowing new ones" when switching gating cycles.

[0060] In specific implementations, the protection band can usually be predetermined when the TSN device leaves the factory and remains unchanged during operation, thus distinguishing it from the time slot that can be dynamically adjusted during operation: the former mainly undertakes the boundary protection function, while the latter mainly undertakes the resource allocation function.

[0061] This embodiment establishes a transmission protection mechanism at the boundary of the gating cycle by setting a protection band between adjacent gating cycles, making the time slot switching process smoother and more controllable. This helps prevent frames from the low-priority transmission queue from occupying the high-priority transmission window across cycles, thereby improving the gating scheduling's ability to guarantee time-sensitive services.

[0062] In this embodiment, the duration of the guard band is not less than the transmission duration of the longest Ethernet frame in the current link.

[0063] In some implementations, the duration of the guard band is not less than the transmission duration of the longest Ethernet frame in the current link. This configuration provides sufficient boundary protection for the guard band, enabling it to cover potential boundary crossing risks even in scenarios with maximum frame length.

[0064] In practical implementation, the complete transmission duration of the longest Ethernet frame in the current link can be estimated or calculated based on the current link speed, the maximum Ethernet frame length, and the necessary protocol overhead. This duration is then used as the lower limit of the guard band duration. This ensures that even if an Ethernet frame of the maximum length is initiated and transmitted just before the guard band begins, its complete transmission process is covered by the guard band, preventing further intrusion into the high-priority transmission window of the next gating cycle. If the port cannot accurately predict the end time of the next frame's complete transmission, a configuration method of "not less than the transmission duration of the longest Ethernet frame" can be used to provide a more reliable safety margin for the cycle boundary.

[0065] Since the protective strip usually serves as a boundary protection function, its length can be set during the equipment pre-configuration stage. Even if the time slot is adaptively adjusted later, the protective strip can remain unchanged to maintain the stability of the cycle switching boundary.

[0066] This embodiment limits the minimum length of the guard band, ensuring that the guard band still has sufficient isolation capability in scenarios with the maximum frame length. This enhances the reliability of the gating cycle switching boundary and further reduces the risk of low-priority frames encroaching on high-priority time slots.

[0067] In this embodiment, when the first time slot is adjusted to the second time slot, the duration corresponding to the second time slot is not less than the minimum duration threshold. The minimum duration threshold is determined by the average frame pass duration of the first target transmission queue within the most recent preset number of gating periods.

[0068] In some implementations, when the first time slot is adjusted to the second time slot, the duration of the second time slot is not less than a minimum duration threshold; wherein, the minimum duration threshold is determined by the average frame pass duration of the first target transmission queue within the most recent preset number of gating periods. This minimum duration threshold is used to set a lower limit constraint on the reduction process from the first time slot to the second time slot, so that even if the first target transmission queue is idle for a long period of time, its corresponding transmission window is not allowed to be compressed to a level lower than the basic transmission requirements.

[0069] In practical implementation, the centralized network controller can continuously record the actual frame passage of the first target transmission queue in its corresponding time slot within the most recent preset number of gating periods. For example, it can record the cumulative duration of frame passage in each gating period and average these durations to form the average frame passage duration. Based on this, the average frame passage duration can be used as the basis for determining the minimum duration threshold. In a more specific implementation, a safety margin can be further introduced based on the average frame passage duration, such as multiplying the average by a preset safety factor to obtain a more robust minimum duration threshold. Technically, this can be achieved by monitoring the traffic passage time within the most recent few gating periods and forming a reduction threshold accordingly to avoid excessive compression of the second time slot.

[0070] When the centralized network controller generates the reduced second time slot, it can simultaneously perform a minimum duration threshold check: if the proposed second time slot duration is lower than the minimum duration threshold, further reduction to that level is not allowed; instead, the second time slot is corrected to be no less than the minimum duration threshold. This way, even if the network is relatively idle for a period of time, the necessary buffer space can still be reserved for the first target transmission queue.

[0071] This embodiment sets a minimum duration threshold to provide a lower limit protection for the reduction from the first time slot to the second time slot, avoiding the impact on the continuous transmission capability of critical services due to excessive compression of the time slot corresponding to the highest priority transmission queue. This helps to improve the utilization rate of time slots while maintaining the deterministic transmission performance of the first target transmission queue.

[0072] In one embodiment, such as Figure 2 , Figure 4 and Figure 5 As shown in the figure, this embodiment illustrates the process by which predefined Ethernet frames of different priorities are sent from the sending server to the receiving client in a communication network, and are controlled by the TSN device. The steps are as follows: Step 1: Initialize the TSN device, predefine the size of each time slot and the guard band size for each priority level, and the guard band size shall not be less than the longest Ethernet frame; Step 2: The server sends a large number of Ethernet frames through the TSN device, and the GCL gating begins to regulate the data. Step 3: Based on the current network environment and long-term monitoring of the highest priority time slot, adjust the observation status and timers of each priority time slot; Step 4: Based on the judgment conditions, adjust the size of the time slots for each level accordingly to ensure that high-priority Ethernet frames are transmitted with the most suitable network bandwidth and at the highest priority, while reserving sufficient bandwidth space for low-priority data streams.

[0073] like Figure 6The method for regulating GCL is explained in detail below. The specific steps are as follows: Step 1: The TSN device initializes the GCL list, initializes the gate status and priority list within it, and allocates time slots of corresponding sizes to the priorities; Step 2: The network controller remotely monitors the use of the highest priority time slot. If no Ethernet frames pass through the time slot for more than 50% of a certain period, the time slot is marked as a focus and a timer is set for it. Step 3: If Ethernet frames pass through a certain time slot in the watchlist for more than 50% of the time in a certain period, then cancel the watchlist status, clear the timer, and proceed to step S02. Step 4: If the timer of a time slot under watch has more than or equal to 10 cycles, reduce the size of the time slot by 10%, allocate the reduced portion to a time slot with a lower priority, mark the time slot as alert, reset its timer to 0, and increment it by 1 every cycle. Step 5: If an alert time slot has Ethernet frames passing through for more than 75% of the time in 5 consecutive cycles, it is considered that the usage of the time slot is still at its peak, and the size of the time slot is increased by 10%, which is the part reduced in step S04. Step 6: If an Ethernet frame passes through a time slot in an alert state for less than 75% of the time for 5 consecutive cycles, then approve the adjustment, clear the alert state and its timer, and repeat step S02.

[0074] Step 7: For the time slots corresponding to high priority, corresponding traffic monitoring is set. The centralized network controller monitors the traffic volume of the time slot in the last 5 periods. The average time t of the traffic is calculated to be 1.25 times as the reduction threshold of the time slot, that is, the size of the time slot cannot be less than 1.25t.

[0075] like Figure 3 As shown, Figure 2 The terminals shown all contain the robot operating system, which includes a basic operating system layer and a robot middleware layer. The robot middleware includes a lower-level communication middleware and an upper-level inter-robot component communication / control framework. The communication middleware includes previously basic communication protocols (such as TCP / UDP, DDS, etc.) and is also integrated with TSN to form a real-time communication middleware, ensuring real-time control of the robot.

[0076] like Figure 4As shown, the GCL period is divided into multiple fine-grained time slots. Each time slot forms a virtual communication channel within a specific time period according to actual needs. During this period, only traffic queues of a specific priority can pass through. A guard band exists within the GCL period to prevent low-priority traffic from preempting high-priority time slot resources before transmission is completed, thus preventing increased data transmission delays for high-priority traffic. Within the guard band, frames that have not yet been transmitted can continue to be transmitted, but data frames that have not yet started transmission must stop.

[0077] like Figure 5 As shown, the total latency for the user includes the Ethernet frame transmission latency, transmission latency, processing latency within the TSN device, enqueueing latency within the time shaper, and dequeueing / forwarding latency. This method primarily reduces the processing latency within the TSN device.

[0078] In a Time-Sensitive Network (TSN) architecture, the centralized network controller is responsible for managing and configuring the resources of the entire TSN network to ensure the accurate transmission of time-sensitive data streams and the optimization of network performance.

[0079] The centralized network controller collects information about network devices, such as topology, device capabilities, and traffic requirements, calculates the optimal resource allocation scheme based on this information, and then sends configuration commands to each device.

[0080] The centralized network controller communicates with network devices to obtain and update network topology information, ensuring that the network configuration scheme adapts to the current network structure. Based on the nature of traffic, it continuously monitors the network status and dynamically adjusts the configuration as needed.

[0081] The data stream gating method is completed as described above.

[0082] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. A time-sensitive network data stream gating method for robot operating systems, characterized in that, The method includes: Initialize the gating list, which includes the gate status and initial time slot of each priority transmission queue; Obtain the first occupancy information of the first time slot corresponding to the first target sending queue within a first preset continuous gating period; wherein, the first target sending queue is the sending queue with the highest priority among all priority sending queues; and the first time slot is the initial time slot corresponding to the first target sending queue. When the first occupancy information meets the preset adjustment conditions, the first time slot is adjusted to the second time slot, and the duration of the second time slot is less than the duration of the first time slot. Obtain the second occupancy information of the second time slot within the second preset continuous gating period; When the second occupancy information meets the preset recovery conditions, the time slot corresponding to the first target sending queue is restored to the first time slot; When the second occupancy information does not meet the preset recovery conditions, the time slot corresponding to the first target sending queue is kept as the second time slot.

2. The method according to claim 1, characterized in that, When the first occupancy information meets the preset adjustment conditions, the reduction duration of the first time slot is the preset duration; The preset duration is the difference between the duration corresponding to the first time slot and the duration corresponding to the second time slot.

3. The method according to claim 2, characterized in that, After adjusting the first time slot to the second time slot, the method further includes: Based on the preset duration, the third time slot corresponding to the second target sending queue is adjusted to the fourth time slot; Wherein, the second target sending queue is the highest priority sending queue among all priority sending queues, excluding the first target sending queue; the third time slot is the initial time slot corresponding to the second target sending queue; the duration corresponding to the fourth time slot is the sum of the duration corresponding to the third time slot and the preset duration.

4. The method according to claim 1, characterized in that, The first occupancy information is used to characterize the percentage of time during which no Ethernet frames pass through the first time slot within the first preset continuous gating period; The second occupancy information is used to characterize the proportion of time during which Ethernet frames pass through the second time slot within the second preset continuous gating period.

5. The method according to claim 4, characterized in that, Before adjusting the first time slot to the second time slot, the method further includes: When the proportion of time in which no Ethernet frames pass through the first time slot in any gating period is greater than a preset proportion, the first time slot is marked as a state of interest, and the first timer is started. When the attention state continues until the first timer reaches the first preset value, it is determined that the first occupancy information meets the preset adjustment condition.

6. The method according to claim 5, characterized in that, After marking the first time slot as a state of interest and starting the first timer, the method further includes: When the proportion of time during which no Ethernet frames pass through the first time slot in any gating period is not greater than the preset proportion, the attention status flag of the first time slot is canceled and the first timer is reset.

7. The method according to claim 1, characterized in that, The preset recovery conditions include: the proportion of time in which Ethernet frames pass through each gate cycle within the second preset continuous gate cycle of the second time slot is greater than the second preset proportion.

8. The method according to claim 1, characterized in that, A protective band is provided between adjacent gate control cycles corresponding to the gate control list; Within the protection zone, Ethernet frames that have already started transmitting continue to complete the transmission, while Ethernet frames that have not yet started transmitting are not allowed to start transmitting.

9. The method according to claim 8, characterized in that, The duration of the guard band is not less than the transmission duration of the longest Ethernet frame in the current link.

10. The method according to claim 1, characterized in that, When the first time slot is adjusted to the second time slot, the duration of the second time slot is not less than the minimum duration threshold. The minimum duration threshold is determined by the average frame pass duration of the first target transmission queue within the most recent preset number of gating periods.