Traffic scheduling method, system and device and readable storage medium
By judging the relationship between the protection band and the remaining time of the gate and the time threshold in the 802.1Qbv protocol, differentiating the calculation method to allow or prohibit message transmission, the problem of low transmission efficiency in the prior art is solved, and more efficient message transmission and resource utilization are achieved.
Patent Information
- Application Number
- CN202510917647.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-08-15
AI Technical Summary
In the 802.1Qbv protocol, the setting of the protection band and the remaining time of the gate leads to a reduction in the packet transmission efficiency during the gate period, and the configuration of the threshold time cannot be effectively utilized. Especially when the packets to be transmitted are different, the configured protection band and the remaining time of the gate are too long, resulting in system logic conflicts.
By judging the relationship between the protection band and the gate remaining time and the preset time threshold, the two types of calculation methods are divided to allow or prohibit message transmission, ensuring that there is no message truncation during node or periodic switching, and the message transmission is effectively used for non-service time.
While saving resources, the implementation of GuardBand function in the 802.1Qbv protocol and the transmission efficiency of packets during the gate cycle are improved, avoiding waste of hardware resources and improving the adaptability of the solution.
Smart Images

Figure CN120499100A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of network communication technology, and in particular relates to a traffic scheduling method, system, device and readable storage medium. Background Art
[0002] With the rapid growth of data network data volume, the demand for network quality is becoming increasingly higher. When intermediate links encounter problems, it is necessary to quickly switch to backup link nodes to enhance network reliability and stability. The resulting TSN protocol suite uses the 802.1Qbv protocol to achieve precise data latency control. By adding time-sensitive gate threshold control to the egress of packets, it ensures that time-sensitive traffic can be accurately forwarded at the specified time. The 802.1Qbv protocol requires that the 802.1AS protocol (hereinafter referred to as PTP) complete time synchronization before running the 802.1Qbv state machine (802.1Qbv protocol).
[0003] In the prior art, on nodes with the guard band function enabled or at an indeterminate time like EndOfCycleTime, to ensure smooth forwarding on the subsequent forwarding channel / next cycle, packets are not forwarded during the guard band period and EndOfCycleTime, thus avoiding forwarding channel occupancy. It is understandable that the prior art setting of the guard band time and EndOfCycleTime is intended to prevent frame truncation and address physical layer hard handoff issues. However, this implementation reduces the forwarding efficiency of the cycle time and fails to effectively utilize the configured threshold time.
[0004] Therefore, in response to the above technical problems, it is necessary to provide a traffic scheduling method, system, device and readable storage medium.
[0005] The information disclosed in this background technology section is only intended to enhance understanding of the overall background of the invention and should not be regarded as an admission or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the Invention
[0006] The object of the present invention is to provide a traffic scheduling method, system, device and readable storage medium, which can maximize the implementation of the GuardBand function in the 802.1Qbv protocol and the forwarding efficiency of messages within the gating period while saving resources.
[0007] In order to achieve the above object, a specific embodiment of the present invention provides the following technical solutions:
[0008] In a first aspect, the present invention provides a traffic scheduling method, which is applied to a gating cycle generated based on the IEEE 802.1Qbv protocol, comprising:
[0009] In response to the message forwarding instruction, obtaining the length of the non-service time of the currently expected forwarded message and the data transmission rate of the egress channel, wherein the non-service period includes the current gating remaining time or the guard band time;
[0010] When the non-service time is less than or equal to a preset time threshold, calculating the amount of data that can be transmitted during the non-service time based on the data transmission rate and the length of the non-service time;
[0011] If the amount of data that can be transmitted during the non-business time is greater than or equal to the size of the message to be transmitted, forwarding of the message to be transmitted is allowed; otherwise, forwarding of the message to be transmitted is prohibited.
[0012] In one or more embodiments of the present invention, the method further comprises:
[0013] When the non-service time is greater than a preset time threshold, forwarding of the message to be transmitted is allowed.
[0014] In one or more embodiments of the present invention, setting the time threshold includes:
[0015] Obtaining a storage space size of a preset register, the register being used to store a value of an amount of data that can be transmitted during the non-business time;
[0016] Calculating a maximum value that can be stored in the register based on the storage space size of the register;
[0017] The maximum value of the time threshold is calculated based on the data transmission rate of the egress channel and the number of bytes of the maximum value.
[0018] In one or more embodiments of the present invention, the maximum value of the time threshold is calculated as follows:
[0019] Threshold max =N / V out
[0020] Among them, Threshold max is the maximum value of the time threshold; N is the maximum value that the register can store, in bytes; V out is the data transmission rate of the egress channel.
[0021] In one or more embodiments of the present invention, setting the time threshold includes:
[0022] Maintain the maximum packet length of forwardable messages;
[0023] Calculating the time required to forward the message with the maximum packet length based on the data transmission rate of the egress channel;
[0024] The time threshold is greater than or equal to the time required to forward a message with the maximum packet length.
[0025] In one or more embodiments of the present invention, setting the time threshold includes:
[0026] The time threshold is set to be equal to the time required to forward a message with the maximum packet length.
[0027] In one or more embodiments of the present invention, the formula for the length of the gating remaining time in the non-service time of the currently expected forwarding message is:
[0028]
[0029] Among them, edofcycletime is the remaining time of gating; cycletime is the time length of the entire scheduling cycle; admincontrollist.intervaltime(n) is the duration of the gating state window corresponding to the nth node configured in admincontrollist.
[0030] In a second aspect, the present invention provides a traffic scheduling system, which is applied to the traffic scheduling method, and includes:
[0031] An acquisition module, configured to obtain, in response to a message forwarding instruction, the length of a non-business time during which a message is currently expected to be forwarded and a data transmission rate of an egress channel, wherein the non-business time period includes a current gating remaining time or a guard band time;
[0032] A calculation module, configured to calculate, when the non-business time is less than or equal to a preset time threshold, an amount of data that can be transmitted during the non-business time based on the data transmission rate and the length of the non-business time;
[0033] The forwarding module is configured to allow the forwarding of the message to be transmitted when the amount of data that can be transmitted during the non-business time is greater than or equal to the size of the message to be transmitted, and otherwise prohibit the forwarding of the message to be transmitted.
[0034] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the traffic scheduling method by executing the computer instructions.
[0035] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the traffic scheduling method.
[0036] Compared to existing technologies, the traffic scheduling method provided by the present invention, applied within the gating cycle generated based on the IEEE 802.1Qbv protocol, ensures the stable implementation of the corresponding functions of the guard band and the remaining gating time. It also effectively utilizes time that would otherwise be inaccessible for message transmission, improving message transmission efficiency within the gating cycle. Furthermore, based on the configuration of time thresholds, the present invention differentiates the utilization of non-service time into two different dimensions for operation, avoiding macro-waste of hardware resources and improving the adaptability of the solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0038] Figure 1 This is a schematic diagram of a traffic scheduling scenario in one embodiment of the present invention;
[0039] Figure 2 is a flow chart of a traffic scheduling method according to one embodiment of the present invention;
[0040] Figure 3 This is a structural block diagram of a traffic scheduling system in one embodiment of the present invention;
[0041] Figure 4 It is a structural block diagram of an electronic device in one embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0043] Unless expressly stated otherwise, throughout the specification and claims, the term "comprise" or variations such as "include" or "comprising", etc., will be understood to include the stated elements or components but not to exclude other elements or other components.
[0044] Prior art uses the concept of a "gated list" based on the IEEE 802.1Qbv protocol to precisely control the timing of the transmit queues on each output port. Each queue is associated with a "gate." Only when the gate for a queue is open are frames in that queue eligible for selection by the scheduler and sent to the physical link. When the gate is closed, even if the scheduler attempts to send frames from that queue, it is blocked. By defining a recurring schedule, the gate opening and closing times for each queue are specified within each time period.
[0045] When a cycle ends, the system forcibly ends the current cycle and immediately jumps back to the first node in the gating list to begin a new round of scheduling. This ensures that the transmission of time-sensitive flows (such as industrial control instructions) is strictly repeated within the planned time window. Guard bands and gating time remain between nodes and after the last node. During these guard bands and gating time, new messages are prevented from being sent, and only existing messages are sent. This eliminates the risk of message conflicts and truncation during scheduling node switching or cycle switching, ensuring transmission stability and certainty.
[0046] In the above technical solution, since messages cannot be forwarded during the guard band period or the remaining gate time, while this eliminates the risk of message truncation, it also reduces data transmission efficiency during the gate period. Especially when the lengths of the messages to be transmitted vary, a longer guard band period and remaining gate time are often configured, further reducing transmission efficiency. Furthermore, since the guard band period is set within the duration of the previous node, message forwarding is blocked while the corresponding gate is open, which can easily cause system logic conflicts.
[0047] The inventors of this invention identified the major shortcomings of the existing technology and, based on these shortcomings, proposed a novel technical implementation approach: while retaining the guard band and gated remaining time designs, the message transmission logic is iterated. When entering the guard band period or the gated remaining time, two calculation methods are differentiated by determining the relationship between the guard band remaining time / gated remaining time and a preset time threshold. This effectively utilizes the guard band period and gated remaining time for message transmission, while introducing a novel calculation method to prevent message truncation during node or cycle switching. This approach retains the key benefits of the existing technology while overcoming its shortcomings.
[0048] Please refer to Figure 1FIG. 1 is a flow chart of a flow scheduling method according to an embodiment of the present invention. The flow scheduling method specifically includes the following steps:
[0049] S101: In response to a message forwarding instruction, obtaining the length of the non-service time during which the message is currently expected to be forwarded and the data transmission rate of the egress channel;
[0050] It should be noted that, in the embodiment of the present invention, the non-service period includes the current gating remaining time or the guard band time. Figure 2 As shown, the remaining gate time refers to the remaining time in the gated period after all nodes within the gated period have expired. The guard band is a function switch for a node. When a node enables the guard band, a specific period of time before the end of the previous node's duration is recorded as the guard band time. In the present invention, the guard band time is used to conditionally limit message transmission to prevent node switching from causing the interruption of previously transmitted but unfinished messages.
[0051] It can be understood that in the entire scheduling cycle, based on the number of nodes that enable the protection band function, there may be multiple independent protection band periods. The aforementioned length of the non-business time of the currently expected forwarding message is obtained. When the non-business time is the protection band time, it refers to the length of an independent protection band time that needs to be calculated, rather than the sum of the protection band times within the cycle.
[0052] For example, consider nodes A, B, and C. In the configured gating list, the gates corresponding to these three nodes are opened sequentially. Nodes B and C both have the guard band function enabled; a remaining gating time is configured for node C. In response to a message forwarding instruction, when node A is enabled until the guard band time expires, only the remaining guard band time duration for node A is obtained, without adding the guard band time duration for node B.
[0053] It's also important to note that the remaining gate time can be understood as the guard band time at the end of each scheduling cycle, ensuring that frames sent by the last node are not truncated. However, unlike the guard band time, the remaining gate time does not occupy the duration of the last node; instead, it is calculated independently at one end of the gating cycle.
[0054] Therefore, in an exemplary embodiment, the formula for the length of the gating remaining time in the non-service time of the currently expected forwarding message is:
[0055]
[0056] Among them, edofcycletime is the remaining time of gating; cycletime is the time length of the entire scheduling cycle; admincontrollist.intervaltime(n) is the duration of the gating state window corresponding to the nth node configured in admincontrollist; the admincontrollist is the aforementioned gating list.
[0057] S102: When the non-service time is less than or equal to a preset time threshold, calculating the amount of data that can be transmitted during the non-service time based on the data transmission rate and the length of the non-service time;
[0058] It should be noted that the more non-service time remaining, the more relaxed the requirements for message transmission. The time threshold is set to measure the amount of non-service time remaining, matching different data transmission modes, and reducing the computational effort required to implement the present invention while ensuring that no message is truncation during node / cycle switching.
[0059] Specifically, when the non-business time is greater than a preset time threshold, the message to be transmitted is allowed to be forwarded. At this time, it is considered that the current non-business time is relatively long, and most messages can be forwarded completely within the time limit, without having to calculate the amount of data that can be transmitted in the remaining time and compare it with the message to be transmitted. At this time, the risk of forwarding messages without setting a limit is relatively small, and computing resources can be saved at the same time. On the other hand, when comparing the amount of data that can be transmitted with the amount of data to be transmitted, it is necessary to first store the calculated amount of data that can be transmitted in the remaining non-business time in a preset register. When the non-business time is relatively long, the calculated amount of data that can be transmitted will occupy a larger register memory space, and may even exceed the upper limit that the register can store, causing confusion in subsequent forwarding operations.
[0060] It is understood that in the embodiment of the present invention, since the node thresholds are opened sequentially based on the gating list, it is optional to configure only one register during forwarding to store the amount of data that can be transmitted during the remaining non-business time. After a period of non-business time ends, the register is reset to zero, waiting for the next non-business time.
[0061] Furthermore, in an exemplary embodiment, setting the time threshold includes: obtaining a storage space size of a preset register, the register being used to store a value indicating the amount of data that can be transmitted during the non-business hours; calculating a maximum value that can be stored in the register based on the storage space size of the register; calculating a maximum value for the time threshold based on the data transmission rate of the egress channel and the number of bytes of the maximum value; maintaining a maximum packet length for forwardable messages; calculating the time required to forward a message with the maximum packet length based on the data transmission rate of the egress channel; and setting the time required to forward a message with the maximum packet length as the minimum value of the time threshold.
[0062] The formula for calculating the maximum value of the time threshold is:
[0063] Threshold max =N / V out
[0064] Among them, Threshold max is the maximum value of the time threshold; N is the maximum value that the register can store, in bytes; V out is the data transmission rate of the egress channel.
[0065] It should be noted that in the embodiments of the present invention, the time threshold can be customized based on user experience and actual usage scenario constraints. This is not limited to the above-described embodiments, and the specific value of the time threshold is not restricted by the present invention. Furthermore, in actual use, time thresholds can be set separately for the remaining gate time and the guard band time of different nodes, or the same time threshold can be shared. This is not a limitation of the present invention.
[0066] The customization process can be achieved by configuring a preset user terminal, which is installed with a computer software program that matches the traffic scheduling method provided by this method; the user terminal may include but is not limited to a desktop computer (PC), desktop computer, smart phone, handheld computer, tablet computer, personal digital assistant (PDA) and other portable electronic devices or wearable electronic devices, and the embodiments of the present invention do not limit the above content.
[0067] It is understandable that the storage limit of the register determines the maximum value of the time threshold setting. For example, if the bit width of the register is n, the maximum value it can store is 2 n -1. That is, the maximum amount of data that can be forwarded within the corresponding time threshold is 2 n-1 byte. If the time threshold is larger, the data recorded in the register will overflow. Furthermore, a preset maximum packet length for forwardable messages is used to limit the minimum value of the time threshold. During the forwarding process, there is no restriction on forwarding messages when non-business time exceeds the time threshold. Therefore, if the time threshold is set too low, the fault tolerance of the solution will be reduced, and it is easy for messages to not be forwarded during node switching.
[0068] Considering that the essence of the guaranteed band is to avoid frame truncation, eliminate scheduling handover deviation, and solve the physical layer hard handover problem, in the present invention, the time threshold is preferably set to be equal to the time required to forward a message with the maximum packet length.
[0069] S103: If the amount of data that can be transmitted during the non-business time is greater than or equal to the size of the message to be transmitted, forwarding of the message to be transmitted is allowed; otherwise, forwarding of the message to be transmitted is prohibited.
[0070] It is understood that the amount of data that can be transmitted during non-business time is equal to the product of the length of the non-business time and the transmission rate of the egress channel. For example, if the length of the non-business time is 10000ns and the rate of the egress channel is 1.25×10 8 bps, the amount of data that can be transmitted during non-business hours is calculated to be 1250 bytes.
[0071] In an exemplary embodiment of the present invention, if the amount of data that can be transmitted during the non-business time is greater than or equal to the size of the message to be transmitted, that is, the complete transmission of the message can be completed within the remaining non-business time, then the forwarding of the message to be transmitted is allowed; on the contrary, if the amount of data that can be transmitted during the non-business time is less than the size of the message to be transmitted, it means that the current remaining non-business time is insufficient to complete the sending of the message, and the sending of the message should be prohibited.
[0072] It is understandable that after each forwarding operation on a message during non-business time, the remaining length of the non-business time of the currently expected forwarded message and the data transmission rate of the egress channel should be re-acquired to calculate whether the next message can be forwarded.
[0073] In order to fully and comprehensively illustrate the technical solution of the present invention and the beneficial effects brought about by the technical solution, the following is a specific embodiment of the present invention. In this embodiment, it includes node 1, node 2, and node 3. A threshold list is maintained to sequentially open the gates corresponding to nodes 1, 2, and 3. The duration of the gate opening corresponding to each node includes a first period consisting of the gate opening time to the guard band time opening time, and a second period consisting of the guard band time opening time to the guard band time expiration time. The guard band time expiration time is also the closing time of the gate corresponding to the current node.
[0074] First, based on the preset maximum forwardable packet length, the egress channel transmission rate, and the register memory size, a time threshold of 68 seconds is defined. Nodes 2 and 3 both enable the guard band function.
[0075] When the gate corresponding to node 1 opens, the corresponding message is forwarded normally until the guard band begins. The guard band duration is obtained. If it is greater than 68 seconds, the message is forwarded normally, regardless of size or type. If the duration is less than or equal to 68 seconds, the packet length of the message to be forwarded is recorded and the time required to forward the message is calculated based on the egress rate. If the time is greater than the remaining guard band time, forwarding is prohibited. If the time is less than or equal to the remaining guard band time, forwarding is allowed.
[0076] Similar forwarding logic is used for subsequent nodes. In particular, for node 3, since it is the last node in the cycle, there is no node with the protection band function enabled afterwards, so the message can be forwarded normally during the duration of node 3. After entering the remaining gate time, similar to entering the protection band time, if the duration is greater than 68s, the message will continue to be forwarded normally without limiting the size and type of the message. When the remaining protection band time is less than or equal to 68s, it is necessary to record the packet length of the message to be forwarded, and calculate the time required to forward the message to be forwarded based on the export rate. If it is greater than the remaining time of the protection band, forwarding is prohibited; if it is less than or equal to the remaining time of the protection band, forwarding is allowed.
[0077] Please refer to Figure 3 As shown, based on the same inventive concept as the aforementioned traffic scheduling method, an embodiment of the present invention provides a traffic scheduling system 300 , which includes: an acquisition module 301 , a calculation module 302 and a forwarding module 303 .
[0078] Specifically, the acquisition module 301 is used to respond to the message forwarding instruction, obtain the length of the non-business time of the current expected forwarded message and the data transmission rate of the export channel, and the non-business period includes the current gated remaining time or the protection band time; the calculation module 302 is used to calculate the amount of data that can be transmitted within the non-business time based on the data transmission rate and the length of the non-business time when the non-business time is less than or equal to the preset time threshold; the forwarding module 303 is used to allow the forwarding of the message to be transmitted when the amount of data that can be transmitted within the non-business time is greater than or equal to the size of the message to be transmitted, otherwise prohibit the forwarding of the message to be transmitted.
[0079] Please refer to Figure 4As shown, an embodiment of the present invention further provides an electronic device 400, which includes at least one processor 401, a memory 402 (e.g., a non-volatile memory), a storage 403, and a communication interface 404, and the at least one processor 401, the memory 402, the storage 403, and the communication interface 404 are connected together via an internal bus 405. The at least one processor 401 is configured to call at least one program instruction stored or encoded in the memory 402, so that the at least one processor 401 performs various operations and functions of the traffic scheduling method described in various embodiments of this specification.
[0080] In the embodiments of the present specification, the electronic device 400 may include but is not limited to: a personal computer, a server computer, a workstation, a desktop computer, a laptop computer, a notebook computer, a mobile electronic device, a smart phone, a tablet computer, a cellular phone, a personal digital assistant (PDA), a handheld device, a messaging device, a wearable electronic device, a consumer electronic device, and the like.
[0081] An embodiment of the present invention also provides a computer-readable medium that carries computer-executable instructions. When the computer-executable instructions are executed by a processor, they can be used to implement various operations and functions of the traffic scheduling method described in various embodiments of this specification.
[0082] The computer-readable medium in the present invention can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0083] In the present invention, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0084] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0085] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatuses, systems, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0086] The foregoing descriptions of specific exemplary embodiments of the present invention are for purposes of illustration and description. These descriptions are not intended to limit the invention to the precise forms disclosed, and it is apparent that many variations and modifications are possible in light of the foregoing teachings. The exemplary embodiments have been selected and described for the purpose of explaining the specific principles of the invention and their practical application, thereby enabling those skilled in the art to realize and utilize a variety of exemplary embodiments of the invention and various options and modifications. The scope of the invention is intended to be defined by the claims and their equivalents.
[0087] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.
[0088] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
Claims
1. A traffic scheduling method, applied to a gating cycle generated based on the IEEE 802.1Qbv protocol, characterized in that: include: In response to the message forwarding instruction, obtaining the length of the non-service time of the currently expected forwarded message and the data transmission rate of the egress channel, wherein the non-service period includes the current gating remaining time or the guard band time; When the non-business time is less than or equal to a preset time threshold, calculating the amount of data that can be transmitted during the non-business time based on the data transmission rate of the egress channel and the length of the non-business time; If the amount of data that can be transmitted during the non-business time is greater than or equal to the size of the message to be transmitted, forwarding of the message to be transmitted is allowed; otherwise, forwarding of the message to be transmitted is prohibited.
2. The traffic scheduling method according to claim 1, characterized in that: The method further comprises: When the non-service time is greater than a preset time threshold, forwarding of the message to be transmitted is allowed.
3. The traffic scheduling method according to claim 1, wherein: Setting the time threshold includes: Obtaining a storage space size of a preset register, the register being used to store a value of an amount of data that can be transmitted during the non-business time; Calculating a maximum value that can be stored in the register based on the storage space size of the register; The maximum value of the time threshold is calculated based on the data transmission rate of the egress channel and the number of bytes of the maximum value.
4. The traffic scheduling method according to claim 3, characterized in that: The maximum value of the time threshold is calculated as follows: Threshold max =N / V out Among them, Threshold max is the maximum value of the time threshold; N is the maximum value that the register can store, in bytes; V out is the data transmission rate of the egress channel.
5. The traffic scheduling method according to claim 3, characterized in that: Setting the time threshold includes: Maintain the maximum packet length of forwardable messages; Calculating the time required to forward the message with the maximum packet length based on the data transmission rate of the egress channel; The time threshold is greater than or equal to the time required to forward a message with the maximum packet length.
6. The traffic scheduling method according to claim 5, characterized in that: Setting the time threshold includes: The time threshold is set to be equal to the time required to forward a message with the maximum packet length.
7. The traffic scheduling method according to claim 1, characterized in that: The formula for the length of the remaining gating time in the non-service time of the currently expected forwarding message is: Among them, endofcycletime is the remaining time of gating; cycletime is the time length of the entire scheduling cycle; admincontrollist.intervaltime(n) is the duration of the gating state window corresponding to the nth node configured in admincontrollist.
8. A traffic scheduling system, applied to the traffic scheduling method according to any one of claims 1 to 7, characterized in that: include: An acquisition module, configured to obtain, in response to a message forwarding instruction, the length of a non-service time during which a message is currently expected to be forwarded and a data transmission rate of an egress channel, wherein the non-service period includes a current gating remaining time or a guard band time; A calculation module, configured to calculate, when the non-business time is less than or equal to a preset time threshold, an amount of data that can be transmitted during the non-business time based on the data transmission rate and the length of the non-business time; The forwarding module is configured to allow the forwarding of the message to be transmitted when the amount of data that can be transmitted during the non-business time is greater than or equal to the size of the message to be transmitted, and otherwise prohibit the forwarding of the message to be transmitted.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the traffic scheduling method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the traffic scheduling method according to any one of claims 1 to 7.
Citation Information
Cited By
Message transmission method and system, electronic equipment and storage medium
CN121193688A