Transmission flow control method and device, equipment and storage medium

By detecting queue status and network bandwidth in the mobile network and determining the data transmission waiting time, the data transmission restriction problem caused by changes in network transmission bottleneck points is solved, and efficient support for data transmission of important services is achieved.

CN119892737APending Publication Date: 2025-04-25GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510061081.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

When the information on network transmission bottleneck points in mobile networks changes, the terminal cannot identify new network information in time, resulting in the highest priority data still being restricted by old information and cannot meet the data transmission requests of important services.

Method used

By detecting that the first queue and/or the second queue are not empty, based on the data amount transmitted by the first network bandwidth, the waiting time for the next transmission of the highest priority data is determined, so that the data amount is adjusted, ensuring that important data can be transmitted at one time and avoiding being restricted by the network bandwidth.

Benefits of technology

It realizes that when network bandwidth changes, the data transmission requests of the most important services are met to the greatest extent, ensure that important data is transmitted accurately and avoid data transmission failures caused by old information limitations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892737A_ABST
    Figure CN119892737A_ABST
Patent Text Reader

Abstract

The invention discloses a transmission flow control method and device, equipment and a storage medium, and the method comprises the steps: executing one-time transmission of first data of a first queue under the condition that the first queue is detected not to be empty; when it is detected that the first queue and / or the second queue are / is not empty, based on the data size of the first data and the first network bandwidth, first waiting time for transmitting data of the second queue with the highest priority based on the first network bandwidth next time is determined, so that adjustment of the data size of the first data is completed within the first waiting time; wherein the priority of the first queue is higher than that of the second queue, and different second queues correspond to different priorities. Therefore, the transmission of the data of the first queue with the highest priority in all the queues is not limited by the first network bandwidth, and the data in the first queue is transmitted at one time, so that the data transmission request of the most important service is met to the greatest extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to flow control technology, and in particular to a transmission flow control method and apparatus, device, and storage medium. Background Art

[0002] At present, network transmission flow control is to select the queue with the highest priority from the queues with data, take out the data from it, and transmit it, so that the needs of the high-priority queue data are met first when network resources are insufficient. The so-called insufficient network resources refer to the bottleneck points on the entire network transmission path due to physical and other factors. However, the network transmission bottleneck point information of the mobile network is usually changing, and the terminal cannot always grasp the accurate information of the bottleneck point. When the network transmission bottleneck point information changes, even the highest priority data is still restricted by the old information. For example, a network failure occurs and the bottleneck point bandwidth is 8kb / s. The network transmission flow control strategy is synchronously limited to 8kb / s. The network demand of the most important business of the terminal is 10kb / s. Later, the bandwidth of the network bottleneck point is restored. Before the new network information is recognized, all network demands on the terminal, even the most important business, will still be limited to the total bandwidth of 8kb / s, that is, the data transmission request of the most important business cannot be met. Summary of the invention

[0003] The present application provides a transmission flow control method and apparatus, equipment, and storage medium.

[0004] The technical solution of this application is implemented as follows:

[0005] In a first aspect, a transmission flow control method is provided, the method comprising:

[0006] When detecting that the first queue is not empty, performing a one-time transmission of the first data of the first queue;

[0007] In the case where it is detected that the first queue and / or the second queue is not empty, determining, based on the data volume of the first data transmitted by the first network bandwidth, a first waiting time for the next transmission of data of the second queue with the highest priority based on the first network bandwidth, so that the data volume of the first data is adjusted within the first waiting time;

[0008] The priority of the first queue is higher than the priority of the second queue, and different second queues correspond to different priorities.

[0009] In a second aspect, a transmission flow control device is provided, the device comprising:

[0010] an execution unit, configured to execute a one-time transmission of the first data of the first queue when detecting that the first queue is not empty;

[0011] a determining unit, configured to determine, when detecting that the first queue and / or the second queue is not empty, a first waiting time for the next transmission of data of the second queue with the highest priority based on the first network bandwidth based on the data volume of the first data transmitted by the first network bandwidth, so that the data volume of the first data is adjusted within the first waiting time;

[0012] The priority of the first queue is higher than the priority of the second queue, and different second queues correspond to different priorities.

[0013] According to a third aspect, an electronic device is provided, comprising: a processor and a memory configured to store a computer program that can be run on the processor, wherein the processor is configured to execute the steps of the method of the first aspect when running the computer program.

[0014] According to a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program implements the steps of the method according to the first aspect when executed by a processor.

[0015] According to a fifth aspect, a computer program product is provided, comprising a computer program, wherein the computer program implements the steps of the method according to the first aspect when executed by a processor.

[0016] The present application provides a transmission flow control method and apparatus, device, and storage medium, the method comprising: when it is detected that the first queue is not empty, performing a one-time transmission of the first data of the first queue; wherein the first data volume includes at least one data packet; when it is detected that the first queue and / or the second queue are not empty, based on the data volume of the first data transmitted by the first network bandwidth, determining the first waiting time for the next transmission of the data of the second queue with the highest priority based on the first network bandwidth, so that the adjustment of the data volume of the first data is completed in the first waiting time; wherein the priority of the first queue is higher than the priority of the second queue, and different second queues correspond to different priorities. In this way, the transmission of the data of the first queue with the highest priority among all queues will not be limited by the first network bandwidth, and the data in the first queue will be directly transmitted once, so as to meet the data transmission request of the most important business to the greatest extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 The flow chart of the transmission flow control method in the embodiment of the present application is as follows Figure 1 ;

[0018] Figure 2 The flow chart of the transmission flow control method in the embodiment of the present application is as follows Figure 2 ;

[0019] Figure 3 The flow chart of the transmission flow control method in the embodiment of the present application is as follows Figure 3 ;

[0020] Figure 4 The flow chart of the transmission flow control method in the embodiment of the present application is as follows Figure 4 ;

[0021] Figure 5 The flow chart of the transmission flow control method in the embodiment of the present application is as follows Figure 5 ;

[0022] Figure 6 The flow chart of the transmission flow control method in the embodiment of the present application is as follows Figure 6 ;

[0023] Figure 7 This is a schematic diagram of the structure of the transmission flow control device in the embodiment of the present application;

[0024] Figure 8 It is a schematic diagram of the structure of the electronic device in the embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing this embodiment and are not intended to limit this application.

[0027] In the following description, references to “some embodiments,” “this embodiment,” “this embodiment,” and examples, etc., describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.

[0028] If similar descriptions of "first / second" appear in the application documents, the following instructions are added. In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the present embodiment described here can be implemented in an order other than that illustrated or described here.

[0029] In this embodiment, the term "and / or" is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, object A and / or object B may represent three situations: object A exists alone, object A and object B exist at the same time, and object B exists alone.

[0030] The present application provides a method for controlling transmission flow. Figure 1 The flow chart of the transmission flow control method in the embodiment of the present application is as follows Figure 1 , applied to electronic devices, including but not limited to smartphones, tablets and desktop computers. Figure 1 As shown, the transmission flow control method includes the following steps:

[0031] S101: When it is detected that the first queue is not empty, perform a one-time transmission of first data of the first queue.

[0032] It should be noted that a first queue and at least one second queue are pre-set at a specific position in the network transmission process, the priority of the first queue is higher than the priority of the second queue, different second queues correspond to different priorities, and when data to be transmitted is found at this position, it is placed in a queue of corresponding priority according to the importance of the data. Since the priority of the first queue is higher than the priority of the second queue, the importance of the data stored in the first queue is higher than the importance of the data stored in the second queue.

[0033] Furthermore, it will first detect whether the highest priority queue among all queues, that is, the first queue, has data to be transmitted, that is, whether the first queue is empty. If it is not empty, all data in the first queue, that is, the first data, will be obtained, and then the first data in the first queue will be transmitted at one time. In other words, the transmission of the first data in the first queue will not be limited by the bandwidth of the first network, and the first data in the first queue will be directly transmitted at one time, thereby ensuring that important data can be transmitted accurately and without error.

[0034] Exemplarily, no matter what the first network bandwidth is, if the first queue includes 10M data, the 10M data is obtained for one-time transmission; or, if the first queue includes 5M data, the 5M data is obtained for one-time transmission; or, if the first queue includes 30M data, the 30M data is obtained for one-time transmission.

[0035] S102: When it is detected that the first queue and / or the second queue is not empty, based on the data volume of the first data and the first network bandwidth, determine the first waiting time for the next transmission of the data of the second queue with the highest priority based on the first network bandwidth, so that the data volume of the first data is adjusted within the first waiting time; wherein the priority of the first queue is higher than the priority of the second queue, and different second queues correspond to different priorities.

[0036] In the embodiment of the present application, after executing the one-time transmission of the first data of the first queue, it is immediately detected whether there is a queue with data; if there is, it can be the first queue and / or the second queue, based on the ratio of the data volume of the first data to the first network bandwidth, the first waiting time for the next transmission of the data of the second queue with the highest priority based on the first network bandwidth is determined, so that the transmission of the data of the second queue with the highest priority is not executed within the first waiting time, thereby completing the compensation or adjustment of the data volume of the first data within the first waiting time; if there is no, it ends. In this way, it is ensured that the important data in the first queue can be transmitted accurately.

[0037] Exemplarily, if the first network bandwidth is 9M / s and the data volume of the first data in the first queue is 11M, then the ratio of 11M to 9M / s is the first waiting time. Alternatively, if the first network bandwidth is 9M / s and the data volume of the first data in the first queue is 9M, then the ratio of 9M to 9M / s is the first waiting time. Alternatively, if the first network bandwidth is 9M / s and the data volume of the first data in the first queue is 7M, then the ratio of 7M to 9M / s is the first waiting time.

[0038] In the embodiment of the present application, the transmission of data in the first queue with the highest priority among all queues will not be limited by the bandwidth of the first network. The data in the first queue will be directly transmitted once, thereby satisfying the data transmission requests of the most important services to the greatest extent.

[0039] In some embodiments of the present application, after determining the first waiting time for the next transmission of the data of the second queue with the highest priority based on the first network bandwidth, the method further includes the following steps S201 to S202:

[0040] S201: When it is detected that the first queue is not empty, perform a one-time transmission of second data of the first queue.

[0041] In the embodiment of the present application, it is intended to express that after executing the one-time transmission action of the first data of the first queue, it is detected again whether there is a queue with data. At this time, if it is detected that the first queue is not empty, that is, there is data, all the data in the first queue, that is, the second data, are obtained, and then the one-time transmission of the second data of the first queue is performed. In other words, the transmission of the second data of the first queue will not be limited by the bandwidth of the first network, and there is no need to wait. As long as there is data, it will be transmitted all at once, thereby ensuring that important data can be transmitted accurately and without error.

[0042] S202: When detecting that the first queue and / or the second queue is not empty, based on the data volume of the second data and the first network bandwidth, updating the first waiting time, and using the new first waiting time as the first waiting time for the next transmission of the highest priority second queue data based on the first network bandwidth.

[0043] In the embodiment of the present application, after executing the one-time transmission of the second data of the first queue, it is detected again whether there is a queue with data; if there is, it can be the first queue and / or the second queue, based on the ratio of the data volume of the second data to the first network bandwidth, a waiting time is determined, the waiting time is added to the first waiting time determined last time, and a new first waiting time is obtained, and the first waiting time determined last time is updated with the new first waiting time, that is, the new first waiting time is used as the first waiting time for the next transmission of the data of the second queue with the highest priority based on the first network bandwidth; if it does not exist, it ends. In this way, the transmission of the data of the second queue with the highest priority is not executed within the new first waiting time, so that the compensation or adjustment of the data volume of the first data and the data volume of the second data are completed within the new first waiting time. In this way, it is ensured that the important data in the first queue can be transmitted accurately.

[0044] In some embodiments of the present application, after determining the first waiting time or the new first waiting time for the next transmission of the data of the second queue with the highest priority based on the first network bandwidth, the method further includes the following steps S301 to S302:

[0045] S301: When it is detected that the first queue is empty, determine whether a first condition is satisfied based on a first counted waiting time and a first waiting time.

[0046] In an embodiment of the present application, it is checked again whether the first queue with the highest priority among all queues has data to be transmitted. If there is no data transmission, that is, it is empty, the first waiting time is counted, and then based on the first waiting time and the first waiting time, it is determined whether the first condition is met. The first condition can be understood as the data transmission condition for the second queue with the highest priority.

[0047] It should be noted that, when the first queue is detected to be empty for the first time, the first waiting time and the first waiting time are the initial values, i.e., zero, and the first condition is met at this time, and S302 is executed. That is, when the first queue is empty and the second queue is not empty, based on the first network bandwidth, the third data of the second queue with the highest priority is transmitted.

[0048] S302: When the first condition is met and it is detected that the second queue is not empty, transmission of the third data of the second queue with the highest priority is performed based on the first network bandwidth.

[0049] In an embodiment of the present application, if the first condition is met, it means that the data transmission condition of the second queue with the highest transmission priority is met. Further, if it is detected that the second queue has data to be transmitted, that is, it is not empty, then the second queue with the highest priority is determined from at least one second queue with data, and based on the first network bandwidth, the third data of the second queue with the highest priority is obtained and transmitted.

[0050] For example, if the first network bandwidth is 9M / s, 1M data is transmitted every 0.1 seconds, and the second queue with the highest priority includes 15M data, then the 1M data in the second queue with the highest priority is first obtained and transmitted, and after 0.1 seconds (based on S401), if S301 and S302 are executed again, the next 1M data in the second queue with the highest priority is obtained again and transmitted, and then 0.1 seconds (based on S401) are waited, and so on, which will not be repeated. In other words, data is transmitted one data packet at a time, and the size of one data packet here is 1M data.

[0051] In some embodiments of the present application, after the transmission of the third data of the second queue with the highest priority is executed, the method further includes the following step S401:

[0052] S401: When it is detected that the first queue and / or the second queue is not empty, determine a first waiting time for the next transmission of the highest priority second queue data based on the first network bandwidth based on the data volume of the third data and the first network bandwidth.

[0053] In the embodiment of the present application, after executing the transmission of the third data of the second queue with the highest priority, it is detected again whether there is a queue with data; if there is, it can be the first queue and / or the second queue, based on the ratio of the data volume of the third data to the first network bandwidth, the first waiting time for the next transmission of the data of the second queue with the highest priority based on the first network bandwidth is obtained; if there is no data, it ends. It should be noted that the second queues with the last priority before and after may be the same queue or different queues.

[0054] In some embodiments of the present application, the method further includes: when the first condition is met and the second queue is detected to be empty, detecting whether the first queue and / or the second queue is not empty.

[0055] That is to say, when the first condition is met and the second queue is detected to be empty, it is checked again whether there is a queue with data. If so, the first waiting time for the next transmission of the data of the second queue with the highest priority based on the first network bandwidth is calculated. At this time, the first waiting time is zero; if not, it ends.

[0056] In some embodiments of the present application, the first condition includes one of the following:

[0057] The first wait time is equal to the first wait time;

[0058] In the embodiment of the present application, no matter what the first waiting time is, it is determined that the first condition is satisfied when the first wait time is equal to the first waiting time.

[0059] When the first waiting time is greater than or equal to a first threshold, the first elapsed waiting time is equal to the first threshold;

[0060] When the first waiting time is less than the first threshold, the first elapsed waiting time is equal to the first waiting time.

[0061] In the embodiment of the present application, the first threshold can be understood as the maximum waiting time, and the first threshold can be set by the developer based on experiments or experience.

[0062] In the embodiment of the present application, no matter how much data is transmitted by the first queue, the data of the second queue with the highest priority in at least one second queue waits for a maximum of the first threshold, and then the data of the second queue with the highest priority is transmitted according to the first network bandwidth. Based on this, when the first waiting time is greater than or equal to the first threshold, the first condition is determined to be satisfied until the first waiting time is equal to the first threshold. Alternatively, when the first waiting time is less than the first threshold, the first condition is determined to be satisfied until the first waiting time is equal to the first waiting time.

[0063] In some embodiments of the present application, the transmission flow control method includes the following steps:

[0064] S501: When it is detected that the first queue is not empty, a one-time transmission of first data in the first queue is performed based on a first network bandwidth.

[0065] It should be noted that a first queue and at least one second queue are pre-set at a specific position in the network transmission process, the priority of the first queue is higher than the priority of the second queue, different second queues correspond to different priorities, and when data to be transmitted is found at this position, it is placed in a queue of corresponding priority according to the importance of the data. Since the priority of the first queue is higher than the priority of the second queue, the importance of the data stored in the first queue is higher than the importance of the data stored in the second queue.

[0066] Furthermore, it will first detect whether the highest priority queue among all queues, that is, the first queue, has data to be transmitted, that is, whether the first queue is empty. If it is not empty, all data in the first queue, that is, the first data, will be obtained, and then the first data in the first queue will be transmitted at one time. In other words, the transmission of the first data in the first queue will not be limited by the bandwidth of the first network, and the first data in the first queue will be directly transmitted at one time, thereby ensuring that important data can be transmitted accurately and without error.

[0067] Exemplarily, no matter what the first network bandwidth is, if the first queue includes 10M data, the 10M data is obtained for one-time transmission; or, if the first queue includes 5M data, the 5M data is obtained for one-time transmission; or, if the first queue includes 30M data, the 30M data is obtained for one-time transmission.

[0068] S502: When it is detected that the first queue and / or the second queue is not empty, based on the data volume of the first data and the first network bandwidth, determine the first waiting time for the next transmission of the data of the second queue with the highest priority based on the first network bandwidth, so that the data volume of the first data is adjusted within the first waiting time; wherein the priority of the first queue is higher than the priority of the second queue, and different second queues correspond to different priorities.

[0069] In the embodiment of the present application, after executing the one-time transmission of the first data of the first queue, it is immediately detected whether there is a queue with data; if there is, it can be the first queue and / or the second queue, based on the ratio of the data volume of the first data to the first network bandwidth, the first waiting time for the next transmission of the data of the second queue with the highest priority based on the first network bandwidth is determined, so that the transmission of the data of the second queue with the highest priority is not executed within the first waiting time, thereby completing the compensation or adjustment of the data volume of the first data within the first waiting time; if there is no, it ends. In this way, it is ensured that the important data in the first queue can be transmitted accurately.

[0070] Exemplarily, if the first network bandwidth is 9M / s and the data volume of the first data in the first queue is 11M, then the ratio of 11M to 9M / s is the first waiting time. Alternatively, if the first network bandwidth is 9M / s and the data volume of the first data in the first queue is 9M, then the ratio of 9M to 9M / s is the first waiting time. Alternatively, if the first network bandwidth is 9M / s and the data volume of the first data in the first queue is 7M, then the ratio of 7M to 9M / s is the first waiting time.

[0071] S503: Based on the amount of data transmitted by the second network bandwidth, determine a second waiting time for the next transmission of fourth data of at least one non-empty second queue based on the second network bandwidth; wherein the sum of the first network bandwidth and the second network bandwidth is the total network bandwidth for data transmission.

[0072] In an embodiment of the present application, the total network bandwidth of data transmission is measured and divided into two parts, for example, 9:1. The specific ratio can be stored in the bandwidth ratio through parameters when configuring the policy. One part of the processing flow is to select the second queue with the highest priority from the second queue with data and take out the data for transmission; the other part of the processing flow is to use a fair polling method to take one data block at a time from each second queue with data for transmission.

[0073] For example, if the total network bandwidth is 10M / s, then according to 9:1, the first network bandwidth is 9M / s and the second network bandwidth is 1M / s.

[0074] Exemplarily, if the amount of data transmitted based on the second network bandwidth is zero, the second waiting time is zero. If the amount of data transmitted based on the second network bandwidth is not zero, the second waiting time is obtained based on the ratio of the amount of data to the second network bandwidth.

[0075] S504: When it is detected that the first queue is empty, based on the first counted waiting time and the first waiting time, it is determined that the first condition is not satisfied.

[0076] In some embodiments of the present application, the first condition includes one of the following:

[0077] The first wait time is equal to the first wait time;

[0078] In the embodiment of the present application, no matter what the first waiting time is, it is determined that the first condition is satisfied when the first wait time is equal to the first waiting time.

[0079] When the first waiting time is greater than or equal to a first threshold, the first elapsed waiting time is equal to the first threshold;

[0080] When the first waiting time is less than the first threshold, the first elapsed waiting time is equal to the first waiting time.

[0081] In the embodiment of the present application, the first threshold can be understood as the maximum waiting time, and the first threshold can be set by the developer based on experiments or experience.

[0082] In the embodiment of the present application, no matter how much data is transmitted by the first queue, the data of the second queue with the highest priority in at least one second queue waits for a maximum of the first threshold, and then the data of the second queue with the highest priority is transmitted according to the first network bandwidth. Based on this, when the first waiting time is greater than or equal to the first threshold, the first condition is determined to be satisfied until the first waiting time is equal to the first threshold. Alternatively, when the first waiting time is less than the first threshold, the first condition is determined to be satisfied until the first waiting time is equal to the first waiting time.

[0083] S505: Determine that a second condition is satisfied based on the second counted waiting time and the second waiting time.

[0084] In some embodiments of the present application, the second condition includes: the second waiting time is equal to the second waiting time.

[0085] S506: When it is detected that the second queue is not empty, based on the second network bandwidth, perform transmission of fourth data of at least one second queue that is not empty.

[0086] For example, if the second network bandwidth is 1M / s, 0.1M data is transmitted every 0.1 seconds, and the number of non-empty second queues is 4, then 0.1 / 4M data is first obtained from each non-empty second queue and transmitted, and after 0.1 seconds (based on S503), the next 0.1 / 4M data in the second queue with the highest priority is obtained again and transmitted, and after waiting for another 0.1 seconds, the next 0.1 / 4M data in the second queue with the highest priority is obtained again and transmitted, and so on and so forth, which will not be repeated. That is to say, data is transmitted one data packet at a time, and the size of a data packet here is 0.1M data. Since the number of non-empty second queues is 4, each second queue can obtain 0.1 / 4M data.

[0087] In some embodiments of the present application, the method further includes: when the second condition is met and the second queue is detected to be empty, detecting whether the first queue and / or the second queue is not empty.

[0088] That is to say, when the second condition is met and the second queue is detected to be empty, it is checked again whether there is a queue with data. If so, the second waiting time for the next transmission of at least one non-empty second queue data based on the second network bandwidth is calculated. At this time, the second waiting time is zero; if not, it ends.

[0089] Based on the above embodiments, the present application specifically illustrates a transmission flow control method. Before executing the transmission flow control method, a first queue and at least one second queue are pre-set at a specific position in the network transmission process. The priority of the first queue is higher than the priority of the second queue. Different second queues correspond to different priorities. When data to be transmitted is found at this position, it is placed in a queue of corresponding priority according to the importance of the data. Since the priority of the first queue is higher than the priority of the second queue, the importance of the data stored in the first queue is higher than the importance of the data stored in the second queue. In addition, the total network bandwidth of the data transmission is also measured. Then the total network bandwidth will be divided into two parts, for example, 9:1. The specific ratio can be stored in the bandwidth ratio through parameters when configuring the policy. One part of the processing flow is to select the second queue with the highest priority from the second queue with data and take out the data for transmission; the other part of the processing flow is to use fair polling to take one data block at a time from each second queue with data for transmission.

[0090] For example, the total network bandwidth is 10M / s. According to the ratio of 9:1, the first network bandwidth is 9M / s and the second network bandwidth is 1M / s.

[0091] Based on this, Figure 6 As shown, the transmission flow control method includes the following steps:

[0092] S601: Check whether the first queue is empty.

[0093] If the first queue is not empty, execute S602; if the first queue is empty, execute S605.

[0094] S602: Send data.

[0095] Here, a one-time transmission or sending of the first data of the first queue is performed.

[0096] S603: Check whether there is a queue with data.

[0097] If there is a queue with data, which may be the first queue and / or the second queue, then S604 is executed; if there is no queue with data, then the process ends.

[0098] S604: Calculate the waiting time for sending data next time based on the network bandwidth.

[0099] Specifically, based on the amount of data transmitted by the first network bandwidth, a first waiting time for the next transmission of data of the second queue with the highest priority based on the first network bandwidth is determined. And based on the amount of data transmitted by the second network bandwidth, a second waiting time for the next transmission of data of at least one non-empty second queue based on the second network bandwidth is determined.

[0100] The initial values ​​of the first waiting time and the second waiting time are 0. The initial value of the following first waiting time is 0.

[0101] S605: Determine whether the first counted waiting time is equal to the first waiting time.

[0102] If they are equal, execute S606; if they are not equal, execute S607.

[0103] S606: Detect whether there is a second queue with data.

[0104] If there is a second queue with data, S602 is executed; if there is no second queue with data, S603 is executed.

[0105] Here, if there is a second queue with data, the data of the second queue with the highest priority is transmitted or sent based on the first network bandwidth.

[0106] S607: Determine whether the second counted waiting time is equal to the second waiting time.

[0107] If they are equal, execute S608; if they are not equal, execute S603.

[0108] S608: Detect whether there is a second queue with data.

[0109] If there is a second queue with data, S602 is executed; if there is no second queue with data, S603 is executed.

[0110] Here, if there is a second queue with data, then based on the second network bandwidth, transmission or sending of data of at least one second queue that is not empty is performed.

[0111] That is to say, for the first queue with the highest priority among all queues, once data enters, it will be transmitted and will not be limited by the bandwidth of the first network. However, the amount of data sent will still be calculated into the bandwidth usage, that is, based on the amount of data in the first queue and the bandwidth of the first network, the first waiting time for the next transmission of the data of the second queue with the highest priority based on the first network bandwidth will be determined, and the transmission of the data of the second queue will not be performed during the first waiting time. For example, if the bandwidth of the first network is 5M / s and the first queue includes 6M data, the data of the second queue can be transmitted after waiting for 1.2s. Then, 5M data of the first queue is transmitted in the current second, 1M data of the first queue is transmitted in the next second, and 4M data of the second queue is transmitted.

[0112] In addition, it should be noted that for S605, another implementation method can be used, that is, limiting the rate and time allowed to send, and allowing a maximum of minus 2 seconds of data production, and no additional count will be made for more than 2 seconds. In other words, no matter how much data the privileged priority queue sends, the data of other queues will wait for a maximum of 2 seconds, and then still be transmitted at the original allowed transmission rate.

[0113] Specifically, it is determined whether the first waiting time is greater than or equal to the first threshold. When the first waiting time is greater than or equal to the first threshold, if the first waiting time is equal to the first threshold, S606 is executed; if the first waiting time is less than the first threshold, S607 is executed. When the first waiting time is less than the first threshold, if the first waiting time is equal to the first waiting time, S606 is executed; if the first waiting time is less than the first waiting time, S607 is executed.

[0114] In the embodiment of the present application, in an environment where the network situation is frequently changing, such as a mobile network, the network data transmission request of the most important service (i.e., the data of the first queue) can always be met to the greatest extent, and network resources will not be insufficiently utilized due to network changes. In addition, a portion of the total network bandwidth is used for fair polling transmission to solve the problem that low-priority services are always unable to obtain network resources and are starved.

[0115] In order to implement the method of the embodiment of the present application, based on the same inventive concept, the embodiment of the present application also provides a transmission flow control device, Figure 7 Schematic diagram of the structure of the transmission flow control device in the embodiment of the present application. Figure 7 As shown, the transmission flow control device 70 includes:

[0116] An execution unit 701 is configured to execute a one-time transmission of the first data of the first queue when detecting that the first queue is not empty;

[0117] The determining unit 702 is configured to determine, when detecting that the first queue and / or the second queue is not empty, a first waiting time for the next transmission of data of the second queue with the highest priority based on the first network bandwidth based on the data volume of the first data transmitted by the first network bandwidth, so that the data volume of the first data is adjusted within the first waiting time;

[0118] The priority of the first queue is higher than the priority of the second queue, and different second queues correspond to different priorities.

[0119] In the embodiment of the present application, the transmission of data in the first queue with the highest priority among all queues will not be limited by the bandwidth of the first network. The data in the first queue will be directly transmitted once, thereby satisfying the data transmission requests of the most important services to the greatest extent.

[0120] In some embodiments of the present application, the execution unit 701 is further configured to, when detecting that the first queue is not empty, execute a one-time transmission of the second data of the first queue;

[0121] The determination unit 702 is also used to update the first waiting time based on the data volume of the second data and the first network bandwidth when detecting that the first queue and / or the second queue are not empty, and use the new first waiting time as the first waiting time for the next transmission of the highest priority data of the second queue based on the first network bandwidth.

[0122] In some embodiments of the present application, the determining unit 702 is further configured to determine whether a first condition is satisfied based on the first waiting time and the first waiting time when detecting that the first queue is empty;

[0123] The execution unit 701 is further configured to execute transmission of third data of the second queue with the highest priority based on the first network bandwidth when the first condition is met and it is detected that the second queue is not empty.

[0124] In some embodiments of the present application, the determination unit 702 is also used to determine, based on the data volume of the third data and the first network bandwidth, a first waiting time for the next transmission of the data of the second queue with the highest priority based on the first network bandwidth when detecting that the first queue and / or the second queue is not empty.

[0125] In some embodiments of the present application, the first condition includes one of the following:

[0126] The first wait time is equal to the first wait time;

[0127] When the first waiting time is greater than or equal to a first threshold, the first elapsed waiting time is equal to the first threshold;

[0128] When the first waiting time is less than the first threshold, the first elapsed waiting time is equal to the first waiting time.

[0129] In some embodiments of the present application, the determination unit 702 is further configured to determine, based on the amount of data transmitted by the second network bandwidth, a second waiting time for the next transmission of fourth data of at least one non-empty second queue based on the second network bandwidth; wherein the sum of the first network bandwidth and the second network bandwidth is the total network bandwidth for data transmission;

[0130] The determining unit 702 is further configured to determine whether a second condition is met based on the second counted waiting time and the second waiting time when the first condition is not met;

[0131] The execution unit 701 is further configured to, when the second condition is met and it is detected that the second queue is not empty, execute transmission of fourth data of at least one non-empty second queue based on the second network bandwidth.

[0132] In some embodiments of the present application, the second condition includes: the second waiting time is equal to the second waiting time.

[0133] The present application also provides another electronic device, Figure 8 Schematic diagram of the structure of the electronic device in the embodiment of the present application. Figure 8 As shown, the electronic device 80 includes: a processor 801 and a memory 802 configured to store a computer program that can be run on the processor;

[0134] The processor 801 is configured to execute the method steps in the aforementioned embodiment when running a computer program.

[0135] Of course, in practical applications, Figure 8 As shown, the components in the electronic device 80 are coupled together via a bus system 803. It is understood that the bus system 803 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 803 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 8 Various buses are labeled as bus system 803.

[0136] In practical applications, the processor may be at least one of an application-specific integrated circuit (ASIC), a digital signal processing device (DSPD), a programmable logic device (PLD), a field-programmable gate array (FPGA), a controller, a microcontroller, and a microprocessor. It is understandable that for different devices, the electronic device used to implement the functions of the processor may also be other, and the embodiments of the present application do not specifically limit this.

[0137] The above-mentioned memory can be a volatile memory (volatile memory), such as a random access memory (RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD); or a combination of the above-mentioned types of memory, and provide instructions and data to the processor.

[0138] In an exemplary embodiment, the present application also provides a computer-readable storage medium for storing a computer program.

[0139] Optionally, the computer-readable storage medium can be applied to any one of the methods in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the processor in each method in the embodiments of the present application. For the sake of brevity, they are not repeated here.

[0140] Illustratively, an embodiment of the present application further provides a computer program product, including a computer program, which can be executed by a processor of an electronic device to complete the steps of any of the aforementioned methods.

[0141] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0142] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0143] In addition, all functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units. A person of ordinary skill in the art may understand that all or part of the steps of implementing the above method embodiments may be completed by hardware related to program instructions, and the above program may be stored in a computer-readable storage medium, which, when executed, executes the steps of the above method embodiments; and the above storage medium includes various media that can store program codes, such as mobile storage devices, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.

[0144] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0145] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0146] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0147] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A transmission flow control method, characterized in that: The method comprises: When detecting that the first queue is not empty, performing a one-time transmission of the first data of the first queue; In the case where it is detected that the first queue and / or the second queue is not empty, determining, based on the data volume of the first data and the first network bandwidth, a first waiting time for the next transmission of the data of the second queue with the highest priority based on the first network bandwidth, so that the data volume of the first data is adjusted within the first waiting time; The priority of the first queue is higher than the priority of the second queue, and different second queues correspond to different priorities.

2. The method according to claim 1, characterized in that After determining the first waiting time for the next transmission of the data of the second queue with the highest priority based on the first network bandwidth, the method further includes: When detecting that the first queue is not empty, performing a one-time transmission of the second data of the first queue; When it is detected that the first queue and / or the second queue is not empty, the first waiting time is updated based on the data volume of the second data and the first network bandwidth, and the new first waiting time is used as the first waiting time for the next transmission of the highest priority data of the second queue based on the first network bandwidth.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: When detecting that the first queue is empty, determining whether a first condition is satisfied based on the first counted waiting time and the first waiting time; When the first condition is met and it is detected that the second queue is not empty, transmission of the third data of the second queue with the highest priority is performed based on the first network bandwidth.

4. The method according to claim 3, characterized in that After executing the transmission of the third data of the second queue with the highest priority, the method further includes: When it is detected that the first queue and / or the second queue is not empty, a first waiting time for the next transmission of the highest priority second queue data based on the first network bandwidth is determined based on the data volume of the third data and the first network bandwidth.

5. The method according to claim 3, characterized in that: The first condition includes one of the following: The first wait time is equal to the first wait time; When the first waiting time is greater than or equal to a first threshold, the first elapsed waiting time is equal to the first threshold; When the first waiting time is less than the first threshold, the first elapsed waiting time is equal to the first waiting time.

6. The method according to claim 3, characterized in that In the case where it is detected that the first queue and / or the second queue is not empty, the method further includes: Based on the amount of data transmitted by the second network bandwidth, determine a second waiting time for the next transmission of fourth data of at least one non-empty second queue based on the second network bandwidth; wherein the sum of the first network bandwidth and the second network bandwidth is the total network bandwidth for data transmission; The method further comprises: If the first condition is not met, determining whether the second condition is met based on the second counted waiting time and the second waiting time; When the second condition is met and it is detected that the second queue is not empty, transmission of fourth data of at least one second queue that is not empty is performed based on the second network bandwidth.

7. The method according to claim 6, characterized in that The second condition includes: the second wait time is equal to the second wait time.

8. A transmission flow control device, characterized in that: The device comprises: an execution unit, configured to execute a one-time transmission of the first data of the first queue when detecting that the first queue is not empty; a determining unit, configured to determine, when detecting that the first queue and / or the second queue is not empty, a first waiting time for the next transmission of data of the second queue with the highest priority based on the first network bandwidth based on the data volume of the first data transmitted by the first network bandwidth, so that the data volume of the first data is adjusted within the first waiting time; The priority of the first queue is higher than the priority of the second queue, and different second queues correspond to different priorities.

9. An electronic device, characterized in that: The electronic device comprises: a processor and a memory configured to store a computer program capable of running on the processor, Wherein, the processor is configured to execute the steps of the method according to any one of claims 1 to 7 when running the computer program.

10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.