A flow control method, electronic device, storage medium and product

By dynamically determining the back pressure control duration and independently controlling the input and output channels, the problem that existing flow control methods cannot cover everything from nanosecond-level sudden back pressure to millisecond-level long-term congestion is solved, achieving precise flow control and efficient data transmission.

CN122137784APending Publication Date: 2026-06-02PURPLE MOUNTAIN LAB

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PURPLE MOUNTAIN LAB
Filing Date
2026-03-12
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing flow control methods cannot achieve full-time coverage from nanosecond-level burst backpressure to millisecond-level long-term congestion, and cannot accurately control flow.

Method used

The system executes the following steps in a loop: determine the congestion state based on the current available transmission capacity of the channel, calculate the backpressure control duration, control the backpressure state of the channel based on the backpressure control duration, dynamically calculate the current available transmission capacity of the channel using the token bucket algorithm, and independently control the input and output channels to achieve a physically isolated architecture.

Benefits of technology

It achieves precise flow control from sudden backpressure to long-term congestion scenarios, avoids packet truncation and deadlock, improves the efficiency and accuracy of flow control, and covers flow regulation in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122137784A_ABST
    Figure CN122137784A_ABST
Patent Text Reader

Abstract

This invention discloses a flow control method, electronic device, storage medium, and product. The method involves repeatedly executing the following steps until the flow meets a preset termination condition: determining the current congestion state of the channel based on the current available transmission capacity of the channel; calculating the backpressure control duration based on the current congestion state of the channel; and controlling the backpressure state of the channel based on the backpressure control duration. This invention overcomes the bottleneck of long-term congestion verification by dynamically determining the backpressure control duration, and can cover flow control from sudden backpressure to long-term congestion scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of flow control technology, and in particular to a flow control method, electronic device, storage medium, and product. Background Technology

[0002] Flow control primarily covers complex scenarios ranging from nanosecond-level burst backpressure to millisecond-level long-term congestion. This requires the flow control mechanism to accurately simulate hardware-level behaviors such as PCIe Credit-Based flow control and virtual channel arbitration. However, existing technologies in flow control are limited by the single backpressure scenario and cannot cover abnormal scenarios ranging from nanosecond-level burst backpressure to millisecond-level long-term congestion, thus failing to achieve precise flow control. Summary of the Invention

[0003] Purpose of the invention: To address the inability of existing flow control methods to achieve full-time coverage from nanosecond-level burst backpressure to millisecond-level long-term congestion, this invention proposes a flow control method, electronic device, storage medium, and product.

[0004] Technical solution: In a first aspect, embodiments of the present invention propose a flow control method, which repeatedly executes the following steps until the flow rate meets a preset termination condition:

[0005] Determine the current congestion status of the channel based on its current available transmission capacity;

[0006] Calculate the backpressure control duration based on the current congestion status of the channel;

[0007] The back pressure status of the control channel is determined based on the back pressure control duration.

[0008] Secondly, embodiments of the present invention provide an electronic device, the electronic device comprising:

[0009] At least one processor;

[0010] and memory that is communicatively connected to at least one processor;

[0011] The memory stores a computer program that can be executed by at least one processor, which enables the at least one processor to perform a flow control method.

[0012] Thirdly, embodiments of the present invention provide a computer-readable storage medium storing computer instructions for causing a processor to execute a flow control method.

[0013] Fourthly, embodiments of the present invention provide a computer program product, which includes a computer program that implements a flow control method when executed by a processor.

[0014] This invention provides a flow control method that determines the current congestion state of a channel based on its current available transmission capacity; calculates the backpressure control duration based on the current congestion state; and controls the backpressure state of the channel based on the backpressure control duration, thereby achieving flow control. dynamic Determining the duration of backpressure control breaks through the bottleneck of long-term congestion verification and can cover flow control from sudden backpressure to long-term congestion scenarios.

[0015] The electronic devices, storage media, and products provided in the embodiments of this application also have the above-mentioned technical effects.

[0016] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart of a flow control method proposed in an embodiment of the present invention. Detailed Implementation

[0019] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0020] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0021] Example 1:

[0022] This invention proposes a flow control verification method, which repeatedly executes the following steps until the flow meets a preset termination condition:

[0023] S10: Determine the current congestion status of the channel based on the current available transmission capacity of the channel;

[0024] S11: Calculate the back pressure control duration based on the current congestion status of the channel;

[0025] S12: Control the back pressure state of the control channel according to the back pressure control duration.

[0026] The embodiments of the present invention dynamically determine the backpressure control duration, break through the bottleneck of long-term congestion verification, solve the problem of insufficient scenario coverage, and realize flow control from sudden backpressure to long-term congestion.

[0027] Example 2:

[0028] Building upon Embodiment 1, this invention proposes a flow control method implemented on the UVM platform and oriented towards Remote Direct Memory Access (RDMA). RDMA can be understood as a technology whereby an external device bypasses the remote host (CPU) to access data in its host memory or access user-space memory on another host. These external devices include, but are not limited to, PCIe devices. RDMA achieves ultra-low latency and zero-copy data transmission at the microsecond level, and has become a core network technology for high-performance computing clusters, distributed storage systems, and AI training platforms. However, in handling flow control at external device interfaces, the design complexity of the RDMA controller increases exponentially with network speed. To address this technical problem, the flow control method proposed in this invention includes the following steps:

[0029] S20: Calculate the current available transmission capacity of the channel.

[0030] One approach is to accumulate the number of bytes actually transmitted within a fixed time window, and then calculate the current available transmission capacity of the channel based on the length of the time window and the number of bytes actually transmitted.

[0031] As another implementation, embodiments of the present invention calculate the currently available transmission capacity of a channel through a credit mechanism. For example, the credit mechanism is implemented using a token bucket algorithm, including:

[0032] S201: Initialize the initial capacity of the token bucket. In this embodiment of the invention, the initial capacity is a fixed value.

[0033] S202: In each clock cycle, tokens are added to the token bucket according to the configured transmission rate. The token bucket represents the maximum transmission capacity of the channel, and the tokens represent the amount of data that can be transmitted. When data transmission occurs, the corresponding number of tokens are consumed from the token bucket.

[0034] S203: By continuously monitoring the number of tokens remaining in the token bucket, the number of remaining tokens directly reflects the current available transmission capacity.

[0035] The token bucket algorithm used in this invention implements a credit mechanism that can avoid congestion, accurately control the long-term average rate and maximum burst volume, and also support controllable burst traffic, such as supporting a large amount of traffic in a short period of time when there has been no traffic for a long time.

[0036] The embodiments of the present invention can cross-verify the results of the two implementation methods above to ensure the accuracy of the current available transmission capacity calculation.

[0037] S21: Determine the current congestion state of the channel based on the current available transmission capacity of the channel. For example, the congestion state can be defined as: a first congestion state, a second congestion state, and a third congestion state. In this embodiment of the invention, to intuitively understand the flow control method of this embodiment, the first congestion state is defined as sudden backpressure, the second congestion state is defined as normal congestion, and the third congestion state is defined as long-term congestion.

[0038] When the available transmission capacity of a channel drops to a set safety threshold within a set time period, and the duration of the drop is shorter than the set time threshold, the current congestion state of the channel is determined to be the first congestion state, i.e., sudden backpressure. Specifically, this can be understood as: when the available transmission capacity of the channel drops sharply and exceeds the safety threshold in a very short time, but the duration of the drop is relatively short. The set time must be an extremely short time; for example, it can be set according to the operating rate. The set time threshold is defined as approximately 1 / 100th of the time required for the port queue to go from empty to full. When the drop duration is shorter than the set time threshold, the drop duration is considered short. Here, 1 / 100th can be set manually and is not a fixed value.

[0039] When the real-time transmission rate exceeds a set rate threshold for a duration longer than a set rate duration threshold, and the current available transmission capacity of the channel is less than the available transmission capacity of the channel at the previous moment, the current congestion state of the channel is determined to be the second congestion state, i.e., ordinary congestion. Specifically, this can be understood as: when the real-time transmission rate continuously exceeds the set rate threshold, and the current available transmission capacity of the channel shows a stable decreasing trend. For example, the set rate duration threshold is 1 / 50 to 2 / 3 of the time required for the port queue to go from empty to full, where 1 / 50 to 2 / 3 can be set manually and is not a fixed value. As one implementation method, the real-time transmission rate is calculated by statistically analyzing the data transmission volume within a fixed time period.

[0040] When the duration for which the current available transmission capacity of a channel is lower than a set safety threshold exceeds a set capacity duration threshold, and the increase in available transmission capacity per unit time compared to the previous moment is less than a set increment threshold, the current congestion state of the channel is determined to be the third congestion state, i.e., long-term congestion. Specifically, this can be understood as: when the current available transmission capacity of the channel remains low for an extended period, and the recovery speed is slow. Recovery can be understood as an increase in the number of currently transmittable data positions; for the token bucket algorithm, this means an increase in the number of tokens in the token bucket. Generally, ordinary congestion can recover to normal with only a few backpressure attempts and no longer requires backpressure. Therefore, a prolonged low-capacity state can be specifically understood as repeated backpressure occurrences over a period of time.

[0041] In this embodiment of the invention, all states other than the first congestion state, the second congestion state, and the third congestion state are non-congestion states.

[0042] S22: Obtain the backpressure control duration based on the current channel congestion status. As one implementation method, this step includes:

[0043] When the current congestion state of the channel is the first congestion state, the backpressure control duration is the time required for the channel to recover from the current available transmission capacity to the set capacity. Generally, in the first congestion state, a one-time short-term backpressure is performed. The backpressure control duration is a set value, which is generally the time required to restore the transmittable capacity to about 50% of the total transmission capacity.

[0044] When the current congestion state of the channel is the second congestion state, the backpressure control duration is obtained by dividing the difference between the real-time transmission volume and the set transmission volume per unit time by the real-time transmission rate, so that the real-time transmission volume and the set transmission volume are basically equivalent within a unit time. The real-time transmission volume per unit time is obtained based on the real-time transmission rate, and the set transmission volume per unit time is obtained based on the set rate threshold.

[0045] When the current congestion state of the channel is the third congestion state, the backpressure control duration is the time required for the channel to recover from its current available transmission capacity to a set safety threshold. In the third congestion state, prolonged backpressure can cause the backpressure signal to repeatedly jump because the available transmission capacity never recovers, essentially mimicking the second congestion state. To avoid this, the backpressure signal needs to remain constant after being raised until the current available transmission capacity recovers to the set safety threshold, at which point the backpressure control is automatically released. This embodiment of the invention maintains the backpressure state of the channel based on the backpressure control duration, preventing new data transmission. Simultaneously, this backpressure control duration is also used to assess the severity of the current channel congestion, providing a reference for subsequent traffic regulation.

[0046] Therefore, it can be seen that the backpressure control duration in this embodiment of the invention is not a preset fixed value, but is dynamically calculated based on the recovery rate of the current available transmission capacity of the channel. S23: According to the backpressure control duration, the control channel is in a backpressure state, wherein the channel in the backpressure state is locked.

[0047] S24: The control channel is unlocked if the back pressure control duration is met.

[0048] In this embodiment of the invention, the channel can be specifically understood as an input channel and an output channel. The flow control method proposed in this embodiment of the invention is executed independently in the read channel and the write channel until the flow meets a preset termination condition.

[0049] This invention is implemented based on the UVM platform, which can set a unified backpressure interface or use multiple independently controlled backpressure interfaces. Existing backpressure methods are similar to applying backpressure to both read and write operations whenever either the read or write operation exceeds a safety threshold, which is acceptable in normal scenarios. However, in situations with large asymmetric bandwidth allocation, this can lead to ports with low traffic idling. Therefore, this invention independently controls the input and output channels, calculates read and write traffic separately, determines whether the safety threshold has been reached, and decides when to apply backpressure based on local cache capacity. This avoids idling, eliminates blind spots in asymmetric congestion simulation, and improves efficiency and accuracy. It enables high-proportion asymmetric bandwidth testing (e.g., a 10:1 read-to-write ratio) and reduces channel interference, covering mixed read / write scenarios. Furthermore, the input and output channels of this invention employ a physically isolated architecture and are independently controlled according to the aforementioned flow control method, thus solving the read / write interference problem in existing flow control methods.

[0050] The embodiments of the present invention lock the channel before performing backpressure control and release the channel after completing backpressure control, which can greatly reduce and eliminate the risk of data truncation and the probability of deadlock. It solves the problems in the prior art that lack a transmission-backpressure protection mechanism, which leads to easy data packet truncation, data transmission errors, and affects the normal packet sending process.

[0051] The embodiments of the present invention regulate traffic flow across multiple time periods through a credit mechanism, which can cover traffic control under scenarios ranging from sudden back pressure to long-term congestion.

[0052] The embodiments of the present invention provide a physically accurate and scenario-complete verification basis for next-generation RDMA devices.

[0053] Example 3:

[0054] This invention provides a flow control verification system that cyclically executes the following modules until the flow meets a preset termination condition, including:

[0055] The backpressure duration calculation module is configured to determine the current congestion status of the channel based on the current available transmission capacity of the channel, and calculate the backpressure control duration based on the current congestion status of the channel.

[0056] The back pressure module is configured to control the back pressure state of the channel based on the back pressure control duration.

[0057] The embodiments of the present invention dynamically determine the backpressure control duration, break through the bottleneck of long-term congestion verification, solve the problem of insufficient scenario coverage, and realize flow control from sudden backpressure to long-term congestion.

[0058] Example 4:

[0059] Building upon Embodiment 3, this invention proposes a flow control system implemented on the UVM platform and oriented towards Remote Direct Memory Access (RDMA). RDMA can be understood as a technology whereby an external device bypasses the remote host (CPU) to access data in its host memory or access user-space memory on another host. The external device includes, but is not limited to, PCIe devices. The control system includes:

[0060] The backpressure duration calculation module is configured to determine the current congestion state of the channel based on the channel's current available transmission capacity. For example, the congestion state can be defined as: a first congestion state, a second congestion state, and a third congestion state. In this embodiment of the invention, to intuitively understand the flow control method, the first congestion state is defined as sudden backpressure, the second congestion state as ordinary congestion, and the third congestion state as long-term congestion.

[0061] When the available transmission capacity of a channel drops to a set safety threshold within a set time period, and the duration of the drop is shorter than the set time threshold, the current congestion state of the channel is determined to be the first congestion state, i.e., sudden backpressure. Specifically, this can be understood as: when the available transmission capacity of the channel drops sharply and exceeds the safety threshold in a very short time, but the duration of the drop is relatively short. The set time must be an extremely short time; for example, it can be set according to the operating rate. The set time threshold is defined as approximately 1 / 100th of the time required for the port queue to go from empty to full. When the drop duration is shorter than the set time threshold, the drop duration is considered short. Here, 1 / 100th can be set manually and is not a fixed value.

[0062] When the real-time transmission rate exceeds a set rate threshold for a duration longer than a set rate duration threshold, and the current available transmission capacity of the channel is less than the available transmission capacity of the channel at the previous moment, the current congestion state of the channel is determined to be the second congestion state, i.e., ordinary congestion. Specifically, this can be understood as: when the real-time transmission rate continuously exceeds the set rate threshold, and the current available transmission capacity of the channel shows a stable decreasing trend. For example, the set rate duration threshold is 1 / 50 to 2 / 3 of the time required for the port queue to go from empty to full, where 1 / 50 to 2 / 3 can be set manually and is not a fixed value. As one implementation method, the real-time transmission rate is calculated by statistically analyzing the data transmission volume within a fixed time period.

[0063] When the duration for which the current available transmission capacity of a channel is lower than a set safety threshold exceeds a set capacity duration threshold, and the increase in available transmission capacity per unit time compared to the previous moment is less than a set increment threshold, the current congestion state of the channel is determined to be the third congestion state, i.e., long-term congestion. Specifically, this can be understood as: when the current available transmission capacity of the channel remains low for an extended period and recovery is slow. Recovery can be understood as an increase in the number of currently transmittable data positions; for the token bucket algorithm, this means an increase in the number of tokens in the token bucket. Generally, ordinary congestion can recover to normal with only a few backpressure attempts and no longer requires backpressure. Therefore, a prolonged low-capacity state can be specifically understood as repeated backpressure occurrences over a period of time.

[0064] In this embodiment of the invention, all states other than the first congestion state, the second congestion state, and the third congestion state are non-congestion states.

[0065] The backpressure duration calculation module is configured to obtain the backpressure control duration based on the current congestion status of the channel.

[0066] As one implementation method, when the current congestion state of the channel is the first congestion state, the backpressure control duration is the time required for the channel to recover from the current available transmission capacity to the set capacity. Generally, in the first congestion state, a one-time short-term backpressure is performed, and the backpressure control duration is a set value, which is generally the time required to restore the transmittable capacity to about 50% of the total transmission capacity.

[0067] When the current congestion state of the channel is the second congestion state, the backpressure control duration is obtained by dividing the difference between the real-time transmission volume and the set transmission volume per unit time by the real-time transmission rate, so that the real-time transmission volume and the set transmission volume are basically equivalent within a unit time. The real-time transmission volume per unit time is obtained based on the real-time transmission rate, and the set transmission volume per unit time is obtained based on the set rate threshold.

[0068] When the channel is currently in the third congestion state, the backpressure control duration is the time required for the channel to recover from its current available transmission capacity to a set safety threshold. In the third congestion state, a prolonged backpressure period can cause the backpressure signal to repeatedly change since the available transmission capacity never recovers, similar to the second congestion state. To avoid this, the backpressure should remain constant after being raised until the current available transmission capacity recovers to the set safety threshold, at which point the backpressure control should be automatically released.

[0069] This embodiment of the invention controls the backpressure state of the channel based on the backpressure control duration, preventing new data transmission. Simultaneously, the backpressure control duration is also used to assess the severity of current channel congestion, providing a reference for subsequent traffic regulation.

[0070] Therefore, it can be seen that the back pressure control duration in the embodiments of the present invention is not a preset fixed value, but is dynamically calculated based on the recovery rate of the current available transmission capacity of the channel.

[0071] The back pressure module is configured to control the channel to be in a back pressure state according to the back pressure control duration.

[0072] The transmission module is configured to lock the channel when it is under back pressure, and to unlock the control channel when the back pressure control duration is met.

[0073] In this embodiment of the invention, the currently available transmission capacity of the channel can be calculated in the following manner:

[0074] One approach is to accumulate the number of bytes actually transmitted within a fixed time window, and then calculate the current available transmission capacity of the channel based on the length of the time window and the number of bytes actually transmitted.

[0075] As another implementation, embodiments of the present invention calculate the currently available transmission capacity of a channel through a credit mechanism. For example, the credit mechanism is implemented using a token bucket algorithm, including:

[0076] The initial capacity of the token bucket is initialized. In this embodiment of the invention, the initial capacity is a fixed value.

[0077] During each clock cycle, tokens are added to the token bucket according to the configured transmission rate. The token bucket represents the maximum transmission capacity of the channel, and the tokens represent the amount of data that can be transmitted. When data transmission occurs, the corresponding number of tokens are consumed from the token bucket.

[0078] By continuously monitoring the number of tokens remaining in the token bucket, the number of remaining tokens directly reflects the current available transmission capacity.

[0079] The token bucket algorithm used in this invention implements a credit mechanism that can avoid congestion, accurately control the long-term average rate and maximum burst volume, and also support controllable burst traffic, such as supporting a large amount of traffic in a short period of time when there has been no traffic for a long time.

[0080] The embodiments of the present invention can cross-verify the results of the two implementation methods above to ensure the accuracy of the current available transmission capacity calculation.

[0081] In this embodiment of the invention, the channel can be specifically understood as an input channel and an output channel. To solve the problem of read / write interference in existing flow control methods, the input and output channels adopt a physically isolated architecture and are independently controlled according to the aforementioned flow control method. This invention independently controls the input and output channels, eliminating blind spots in asymmetric congestion simulation and improving efficiency and accuracy. It enables large-scale asymmetric bandwidth testing (such as a 10:1 read / write ratio) and reduces channel interference, covering testing in mixed read / write scenarios.

[0082] The embodiments of the present invention lock the channel before performing backpressure control and release the channel after completing backpressure control, which can greatly reduce and eliminate the risk of data truncation and the probability of deadlock. It solves the problems in the prior art that lack a transmission-backpressure protection mechanism, which leads to easy data packet truncation, data transmission errors, and affects the normal packet sending process.

[0083] The embodiments of the present invention regulate traffic flow across multiple time periods through a credit mechanism, which can cover traffic control under scenarios ranging from sudden back pressure to long-term congestion.

[0084] The embodiments of the present invention provide a physically accurate and scenario-complete verification basis for next-generation RDMA devices.

[0085] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0086] 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 application.

[0087] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A flow control method, characterized in that, Repeat the following steps until the traffic meets the preset termination condition: Determine the current congestion status of the channel based on its current available transmission capacity; Calculate the backpressure control duration based on the current congestion status of the channel; The back pressure state of the control channel is controlled according to the back pressure control duration.

2. The flow control method according to claim 1, characterized in that, The step of determining the current congestion status of the channel based on the current available transmission capacity of the channel includes: When the current available transmission capacity of a channel drops to a set safety threshold within a set time period, and the duration of the drop is shorter than the set time threshold, the current congestion state of the channel is determined to be the first congestion state.

3. The flow control method according to claim 1, characterized in that, The step of determining the current congestion status of the channel based on the current available transmission capacity of the channel includes: When the duration for which the real-time transmission rate exceeds the set rate threshold is greater than the set rate duration threshold, and the current available transmission capacity of the channel is less than the available transmission capacity of the channel at the previous moment, the current congestion state of the channel is determined to be the second congestion state.

4. The flow control method according to claim 1, characterized in that, The step of determining the current congestion status of the channel based on the current available transmission capacity of the channel includes: When the duration for which the current available transmission capacity of the channel is lower than a set security threshold is greater than a set capacity duration threshold, and the increment of the current available transmission capacity of the channel compared to the available transmission capacity of the channel at the previous moment within a unit time is less than a set increment threshold, the current congestion state of the channel is determined to be the third congestion state.

5. A flow control method according to claim 2, characterized in that, The step of calculating the backpressure control duration based on the current congestion state of the channel includes: When the current congestion state of the channel is the first congestion state, the backpressure control duration is the time required for the channel to recover from the current available transmission capacity to the set capacity.

6. The flow control method according to claim 3, characterized in that, The step of calculating the backpressure control duration based on the current congestion state of the channel includes: When the current congestion state of the channel is the second congestion state, the back pressure control duration is obtained by dividing the difference between the real-time transmission volume per unit time and the set transmission volume per unit time by the real-time transmission rate. The real-time transmission volume per unit time is obtained according to the real-time transmission rate, and the set transmission volume per unit time is obtained according to the set rate threshold.

7. A flow control method according to claim 4, characterized in that, The step of calculating the backpressure control duration based on the current congestion state of the channel includes: When the current congestion state of the channel is the third congestion state, the backpressure control duration is the time required for the channel to recover from the current available transmission capacity to the set safety threshold.

8. The flow control method according to claim 1, characterized in that, The step of controlling the channel back pressure state according to the back pressure control duration includes: According to the back pressure control duration, the channel is controlled to be in a back pressure state, wherein the channel in the back pressure state is locked; If the back pressure control duration is met, the control channel is unlocked.

9. A flow control method according to claim 1, characterized in that, The channel includes a read channel and a write channel; The flow control method is executed independently in the read channel and the write channel until the flow meets the preset termination condition.

10. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform the flow control method according to any one of claims 1-9.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the flow control method according to any one of claims 1-9.

12. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the flow control method according to any one of claims 1-9.