One-way transmission current limiting method and system based on novel leaky bucket algorithm

By adopting a one-way transmission current limiting method based on the new leak bucket algorithm in the data transmission system, the packet loss problem caused by insufficient processing capabilities on the receiving end is solved, the stability and reliability of data transmission are achieved, and the stability and user experience of the system are improved.

CN120050238APending Publication Date: 2025-05-27STATE GRID HEBEI ELECTRIC POWER CO LTD +4
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510205988.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

When the reception end processing capacity is insufficient, the prior art leads to exhausting the data transmission queue resources, resulting in indiscriminate loss of data packets, affecting the reliability of the equipment.

Method used

The one-way transmission current limiting method based on the new leak bucket algorithm is adopted. By establishing a one-way transmission channel transmission queue between the sending end and the receiving end, the outflow rate is configured according to the processing capability of the receiving end, and the data traffic is cached using the multi-level service transmission queue. When the transmission queue is full, the current limit or packets are discarded according to the predefined flow control algorithm, and high-priority services are preferred.

Benefits of technology

It effectively avoids the loss of indiscriminate data packets caused by channel overload, ensures the stability and reliability of data transmission, and ensures the timely delivery of important data through intelligent scheduling mechanism, improving the stability and user experience of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120050238A_ABST
    Figure CN120050238A_ABST
Patent Text Reader

Abstract

The invention discloses a unidirectional transmission current limiting method and system based on a novel leaky bucket algorithm. The method comprises the following steps: establishing a one-way transmission channel transmission queue between a sending end and a receiving end, and configuring the outflow rate of the one-way transmission channel transmission queue according to the processing capability of the receiving end; connecting the multi-priority service transmission queue to a sending end, and caching inflowing data traffic by using the multi-priority service transmission queue; and according to a predefined flow control algorithm, transmitting the data flow through a one-way transmission channel transmission queue based on the outflow rate, and when the one-way transmission channel transmission queue is full, carrying out flow limiting or discarding on a data packet with a predefined service priority. According to the scheme of the invention, the stability and reliability of data transmission are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of data security transmission, and particularly relates to a unidirectional transmission current limiting method and system based on a new leaky bucket algorithm. Background Art

[0002] In order to protect critical business systems and data from unauthorized access, important institutions usually implement hierarchical isolation or regional division of network resources to block the spread of potential security threats from one area to another. Existing network isolation devices achieve this isolation by "copying" data in a fixed direction, which is divided into a sending end and a receiving end, and physically ensures that the data flow can only flow unidirectionally from the sending end to the receiving end.

[0003] However, since the sending end cannot receive feedback from the receiving end during the data transmission process, when the sending rate exceeds the processing capacity of the receiving end, the situation of untimely packet processing may occur. Currently, common mitigation measures are to use the leaky bucket algorithm or the token bucket algorithm to smooth the data input rate of the sending end. Nevertheless, if the data generation rate is always higher than the consumption rate of the receiving end, the transmission queue resources of the sending end may still be exhausted, resulting in indiscriminate packet loss and thus affecting the device reliability. Summary of the Invention

[0004] In order to solve the deficiencies existing in the prior art, the present invention provides a unidirectional transmission current limiting method and system based on a new leaky bucket algorithm to solve the technical problem of data loss caused by insufficient resources at the receiving end when facing a large amount of data in a short time.

[0005] To solve the above technical problems, the present invention adopts the following technical solutions.

[0006] The present invention first discloses a unidirectional transmission current limiting method based on a new leaky bucket algorithm, and the method includes the following steps:

[0007] Establish a unidirectional transmission channel transmission queue between the sending end and the receiving end, and configure the outflow rate of the unidirectional transmission channel transmission queue according to the processing capacity of the receiving end;

[0008] Connect multi-priority service transmission queues to the sending end, and use the multi-level service transmission queues to cache the incoming data traffic;

[0009] According to a predefined traffic control algorithm, transmit the data traffic through the unidirectional transmission channel transmission queue based on the outflow rate, and when the unidirectional transmission channel transmission queue is full, limit the current or discard the packets with a predefined service priority.

[0010] The present invention further includes the following preferred solutions:

[0011] Before connecting the multi-priority service transmission queue to the sending end, it further includes:

[0012] Determine the priority of the service application according to the delay sensitivity and the size of the application traffic.

[0013] The predefined traffic control algorithms are the leaky bucket algorithm, the counter algorithm, the sliding window algorithm, the weighted fair queue algorithm, and the RED queue algorithm.

[0014] The rate limiting or discarding of the data packets with predefined service priorities further includes:

[0015] Reduce the output rate of the low-priority service transmission queue, or preferentially discard the data in the low-priority queue.

[0016] The present invention also discloses a unidirectional transmission rate limiting system based on the novel leaky bucket algorithm, which utilizes the foregoing unidirectional transmission rate limiting method based on the novel leaky bucket algorithm, including:

[0017] A configuration module, configured to establish a unidirectional transmission channel transmission queue between the sending end and the receiving end, and configure the outflow rate of the unidirectional transmission channel transmission queue according to the processing capacity of the receiving end;

[0018] A caching module, configured to connect the multi-priority service transmission queue to the sending end, and cache the inflowing data traffic by using the multi-level service transmission queue;

[0019] A transmission module, configured to transmit the data traffic through the unidirectional transmission channel transmission queue based on the predefined traffic control algorithm and the outflow rate, and when the unidirectional transmission channel transmission queue is full, rate limit or discard the data packets with predefined service priorities.

[0020] Correspondingly, the present application also discloses a terminal, including a processor and a storage medium;

[0021] The storage medium is used to store instructions;

[0022] The processor is configured to operate according to the instructions to execute the steps of the foregoing unidirectional transmission rate limiting method based on the novel leaky bucket algorithm.

[0023] Correspondingly, the present application also discloses a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the steps of the foregoing unidirectional transmission rate limiting method based on the novel leaky bucket algorithm.

[0024] The beneficial effects of the present invention are as follows. Compared with the prior art, the present invention provides a unidirectional transmission current limiting method and system based on a novel leaky bucket algorithm, adopting a hierarchical traffic current limiting model based on the leaky bucket algorithm, aiming to optimize the data traffic management in the transmission queue of the unidirectional transmission channel. First, the outflow rate of the transmission queue of the unidirectional transmission channel is set according to the processing capacity of the receiving end, and the inflowing data traffic is cached through multiple-level service transmission queues. The sending end can intelligently perform selective current limiting and discarding of the inflowing data by continuously monitoring the throughput of the transmission queue of the unidirectional transmission channel, thereby ensuring the smoothness and reliability of data transmission. To further improve the performance of the system, a dynamic traffic adjustment mechanism is introduced. When it is detected that the transmission queue of the unidirectional transmission channel is approaching the full-load state, through the priority sorting algorithm, higher transmission priority is given to critical applications that are sensitive to delay and have a small traffic volume, while reducing the transmission rate of low-priority services, effectively avoiding the phenomenon of indiscriminate packet loss caused by channel overload. It can not only maintain a stable transmission rate in the absence of receiving-end feedback, but also ensure the timely transmission of important data through the intelligent scheduling mechanism, significantly improving the stability of the entire system and the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a schematic diagram of the hierarchical leaky bucket traffic current limiting model in the present invention;

[0026] Figure 2 It is a schematic diagram of the leaky bucket algorithm in the present invention;

[0027] Figure 3 It is a flow chart of current limiting or discarding in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0028] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0029] The embodiments described in this application are only a part of the embodiments of the present invention, rather than all embodiments. Based on the spirit of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0030] In view of the deficiencies of the prior art, the present invention proposes a unidirectional transmission current limiting method and system based on a novel leaky bucket algorithm. By using the current limiting technology of a hierarchical leaky bucket model, when the transmission queue resources of the unidirectional transmission channel are in short supply, according to the priorities of different services, the inflow rate of the data stream of low-priority services is selectively limited, so that the data incoming rate in the transmission queue of the unidirectional transmission channel can be controlled within the throughput of the channel, thereby reducing data packet loss. When the transmission queue of the unidirectional transmission channel is full, low-priority service data packets are preferentially discarded to maintain the reliability of core services to the greatest extent.

[0031] The unidirectional transmission current limiting method based on the novel leaky bucket algorithm disclosed by the present invention includes the following steps:

[0032] Step 1: Establish a transmission queue for the unidirectional transmission channel between the sending end and the receiving end, and configure the outflow rate of the transmission queue for the unidirectional transmission channel according to the processing capacity of the receiving end.

[0033] Calculate the channel memory W at time t t :

[0034] W t = W t-1 + N t - R

[0035] where R represents the channel outflow rate, and N t represents the amount of data arriving at time t.

[0036] Step 2: Connect the multi-priority service transmission queue to the sending end, and use the multi-level service transmission queue to buffer the incoming data traffic.

[0037] B represents the capacity of the service transmission queue; P i (i = h, m, l) represents the stocks of the service transmission queues with high, medium, and low different priorities; V i (i = h, m, l) represents the outlet rates of the service transmission queues with high, medium, and low different services; H t represents the amount of data arriving at time t for high-priority services, M t represents the amount of data arriving at time t for medium-priority services, and L t represents the amount of data arriving at time t for low-priority services. Then, at any time, the calculation formula for the capacity of the service transmission queue is:

[0038] P h ' = P h + H t - V h

[0039] P m ' = P m + M t - V m

[0040] P l ' = P l + L t - V l

[0041] Step 3: According to the predefined traffic control algorithm, based on the outflow rate, transmit the data traffic through the one-way transmission channel transmission queue. When the one-way transmission channel transmission queue is full, that is, W t = C, limit the flow or discard the data packets with predefined service priorities. C represents the capacity of the one-way transmission channel transmission queue.

[0042] (1) When W t < C, V h = H t , V m = M t , V l = L t , that is, no flow limiting is performed at this time.

[0043] (2) When W t = C, set the initial state V h = V m = V l = R / 3, and then observe the available capacity of the service transmission queue to limit the flow or discard. The specific algorithm flow is as Figure 3 shown.

[0044] For example, in a good network condition, all service transmission queues can be transmitted at the same exit rate as the receiving speed; but at this time, a sudden large traffic impact occurs. At this time, if the system detects that the one-way transmission channel transmission queue is close to the full load state, it will start the dynamic traffic adjustment mechanism. First, set the exit rates of the high, medium, and low service transmission queues to 1 / 3R to ensure that the one-way transmission channel transmission queue will not overflow; then monitor the capacity of the service transmission queue. If there are more high-priority services and the accumulated traffic in the queue exceeds 50%, that is, P h + H t - V h > 50% × B, then reduce the exit rate of the low-priority service transmission queue to 1 / 6R and increase the exit traffic of the high-priority service transmission queue to 1 / 2R; if the accumulated traffic in the high-priority service queue is still increasing at this time and exceeds 70%, that is, P h + H t - V h > 70% × B, at this time, discard the low-priority service packets and give priority to ensuring that the exit rate of the high-priority service is increased to 2 / 3R; when the number of high-priority services continues to increase to 90%, that is, P h + H t - Vh > 90% × B, at this time, discard medium-priority services to ensure high-priority services. If the accumulated high-priority service traffic is less than 50% of the capacity, but the medium-priority service capacity exceeds 50%, that is, P m + M t - V m > 50% × B, at this time, reduce the output rate of the low-priority service transmission queue to 1 / 6R, and increase the output traffic of the medium-priority service transmission queue to 1 / 2R; if the medium-priority service traffic accumulates to 90%, that is, P m + M t - V m > 90% × B, then discard low-priority service packets and increase the output rate of medium-priority services to 2 / 3R.

[0045] Based on the leaky bucket algorithm, the present invention constructs a hierarchical leaky bucket traffic rate-limiting model. As Figure 1 shown, this model first configures the outflow rate of the transmission queue of the unidirectional transmission channel according to the processing capacity of the receiving end, and uses a multi-level service transmission queue to cache the inflowing data traffic. The sending end monitors the throughput of the transmission queue of the unidirectional transmission channel to selectively limit the inflow of data and discard it.

[0046] As Figure 2 shown, the leaky bucket algorithm is a traffic shaping and traffic control technology. By simulating a "bucket" with a fixed capacity and outflow rate, it ensures that the output data rate remains constant regardless of the input data rate. Based on the leaky bucket algorithm, the present invention can ensure that the data rate flowing into the receiving end adapts to the processing capacity of the receiving end, prevent packet loss, and improve the reliability of the system even when the sending end cannot obtain feedback from the receiving end.

[0047] To alleviate the problem of packet loss at the sending end caused by the transmission queue of the unidirectional transmission channel exceeding the capacity limit of the "leaky bucket", the present invention introduces a dynamic traffic adjustment mechanism. When it is detected that the transmission queue of the unidirectional transmission channel is approaching the full-load state, the inflow of the input data stream is restricted to ensure that the input rate meets the carrying capacity of the channel, thereby reducing indiscriminate packet loss. The specific solution is to sort by service priority. According to the different requirements of different service applications for transmission delay, and based on the delay sensitivity and application traffic size, determine the priority of the service application. For example, use a sorting algorithm to give higher transmission priority to applications that are delay-sensitive and have small traffic. The high-priority service transmission queue has the privilege of sending data to the transmission queue of the unidirectional transmission channel earlier than other transmission queues. When the transmission queue is approaching saturation, reduce the output rate of the low-priority service transmission queue to alleviate the throughput pressure of the channel.

[0048] When the transmission queue of the unidirectional transmission channel is full and some data must be discarded, the data in the low-priority queue is discarded first, and then the data in the high-priority queue is discarded. Then the remaining transmission queues are aggregated into the transmission queue of the unidirectional transmission channel transmission queue, and the leaky bucket-based flow rate limiting algorithm is continued to be used to ensure the reliability of unidirectional transmission.

[0049] The above leaky bucket algorithm is a specific flow control method. In addition to this, algorithms such as the counter algorithm (fixed window algorithm), sliding window algorithm, weighted fair queue algorithm, and RED queue algorithm can also be used for flow control.

[0050] The beneficial effects of the present invention are as follows. Compared with the prior art, the present invention provides a unidirectional transmission flow rate limiting method and system based on a novel leaky bucket algorithm, adopting a hierarchical flow rate limiting model based on the leaky bucket algorithm, aiming to optimize the data flow management in the transmission queue of the unidirectional transmission channel. First, the outflow rate of the transmission queue of the unidirectional transmission channel is set according to the processing capacity of the receiving end, and the inflowing data flow is buffered through a multi-level service transmission queue. The sending end can intelligently perform selective flow rate limiting and discarding of the inflowing data by continuously monitoring the throughput of the transmission queue of the unidirectional transmission channel, thereby ensuring the smoothness and reliability of data transmission. In order to further improve the performance of the system, a dynamic flow regulation mechanism is introduced. When it is detected that the transmission queue of the unidirectional transmission channel is approaching the full load state, through the priority sorting algorithm, higher transmission priority is given to critical applications that are sensitive to delay and have a small traffic volume, and at the same time, the transmission rate of low-priority services is reduced, effectively avoiding the phenomenon of indiscriminate packet loss caused by channel overload. It can not only maintain a stable transmission rate in the absence of feedback from the receiving end, but also ensure the timely transmission of important data through the intelligent scheduling mechanism, significantly improving the stability of the entire system and the user experience.

[0051] The present invention can be a system, method, and / or computer program product. The present invention also discloses a unidirectional transmission flow rate limiting system based on the novel leaky bucket algorithm based on the aforementioned unidirectional transmission flow rate limiting method based on the novel leaky bucket algorithm, including:

[0052] A configuration module, used to establish a transmission queue for the unidirectional transmission channel between the sending end and the receiving end, and configure the outflow rate of the transmission queue of the unidirectional transmission channel according to the processing capacity of the receiving end;

[0053] A caching module, used to connect the multi-priority service transmission queue to the sending end, and buffer the inflowing data flow using the multi-level service transmission queue;

[0054] A transmission module, used to transmit the data flow through the transmission queue of the unidirectional transmission channel based on the predefined flow control algorithm and the outflow rate. When the transmission queue of the unidirectional transmission channel is full, limit the flow rate or discard the data packets with the predefined service priority.

[0055] Based on the spirit of the present invention, those skilled in the art can easily conceive that a computer program product can be obtained based on the aforementioned one-way transmission current limiting method based on the new leaky bucket algorithm. The computer program product may include a computer-readable storage medium having thereon computer-readable program instructions for causing a processor to implement various aspects of the present disclosure. That is, the present application also includes a terminal, including a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the aforementioned one-way transmission current limiting method based on the new leaky bucket algorithm.

[0056] A computer-readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example - but not limited to - an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanical encoding device, such as punch cards or raised structures in grooves having instructions stored thereon, and any suitable combination of the foregoing. The computer-readable storage medium used herein is not construed as an instantaneous signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through an optical fiber cable), or electrical signals transmitted through wires.

[0057] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing / processing devices, or downloaded to an external computer or external storage device through a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0058] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine - related instructions, microcode, firmware instructions, state - setting data, or source code or object code written in any combination of one or more programming languages, including object - oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer - readable program instructions may be executed entirely on the user's computer, partially on the user's computer, executed as a stand - alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider). In some embodiments, by using the state information of the computer - readable program instructions to customize an electronic circuit, such as a programmable logic circuit, a field - programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer - readable program instructions to implement various aspects of the present disclosure.

[0059] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: it is still possible to modify the specific implementation manners of the present invention or make equivalent substitutions. Any modification or equivalent substitution that does not depart from the spirit and scope of the present invention shall be covered by the protection scope of the claims of the present invention.

Claims

1. A unidirectional transmission current limiting method based on a new leaky bucket algorithm, characterized in that: include: A unidirectional transmission channel transmission queue is established between the sending end and the receiving end, and the outflow rate of the unidirectional transmission channel transmission queue is configured according to the processing capability of the receiving end; Connect multi-priority service transmission queues to the sending end and use multi-level service transmission queues to buffer incoming data traffic; According to a predefined flow control algorithm, the data flow is transmitted through a transmission queue of a unidirectional transmission channel based on the outflow rate, and when the transmission queue of the unidirectional transmission channel is full, data packets of a predefined service priority are limited or discarded.

2. According to claim 1, the one-way transmission current limiting method based on the novel leaky bucket algorithm is characterized in that: Before connecting the multi-priority service transmission queue to the sending end, further comprising: Prioritize business applications based on latency sensitivity and application traffic volume.

3. The one-way transmission current limiting method based on the novel leaky bucket algorithm according to claim 2 is characterized in that: The predefined flow control algorithms are leaky bucket algorithm, counter algorithm, sliding window algorithm, weighted fair queue algorithm, and red queue algorithm.

4. The one-way transmission current limiting method based on the novel leaky bucket algorithm according to claim 3 is characterized in that: The limiting or discarding of data packets with predefined service priorities further includes: Reduce the output rate of low-priority service transmission queues, or discard data in low-priority queues first.

5. A unidirectional transmission current limiting system based on a new leaky bucket algorithm, characterized in that: include: A configuration module, used to establish a transmission queue of a unidirectional transmission channel between a sending end and a receiving end, and configure an outflow rate of the transmission queue of the unidirectional transmission channel according to a processing capability of the receiving end; A cache module, used to connect the multi-priority service transmission queue to the sending end, and use the multi-level service transmission queue to cache the incoming data traffic; The transmission module is used to transmit the data traffic through the unidirectional transmission channel transmission queue based on the outflow rate according to a predefined flow control algorithm, and when the unidirectional transmission channel transmission queue is full, limit or discard the data packets of the predefined service priority.

6. The one-way transmission current limiting system based on the novel leaky bucket algorithm according to claim 5 is characterized in that: The cache module is further used for: Before connecting the multi-priority service transmission queue to the sending end, the service application is prioritized according to delay sensitivity and application traffic size.

7. The one-way transmission current limiting system based on the novel leaky bucket algorithm according to claim 6 is characterized in that: The predefined flow control algorithms are leaky bucket algorithm, counter algorithm, sliding window algorithm, weighted fair queue algorithm, and red queue algorithm.

8. The one-way transmission current limiting system based on the novel leaky bucket algorithm according to claim 7 is characterized in that: The transmission module is further used for: Reduce the output rate of low-priority service transmission queues, or discard data in low-priority queues first.

9. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is used to operate according to the instruction to execute the steps of the unidirectional transmission current limiting method based on the novel leaky bucket algorithm according to any one of claims 1-4.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the unidirectional transmission current limiting method based on the novel leaky bucket algorithm described in any one of claims 1 to 4 are implemented.