CN113194042A - Control method and device for flow transmission speed and storage medium - Google Patents

Control method and device for flow transmission speed and storage medium Download PDF

Info

Publication number
CN113194042A
CN113194042A CN202110296748.0A CN202110296748A CN113194042A CN 113194042 A CN113194042 A CN 113194042A CN 202110296748 A CN202110296748 A CN 202110296748A CN 113194042 A CN113194042 A CN 113194042A
Authority
CN
China
Prior art keywords
speed
reference speed
flow reference
server
traffic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110296748.0A
Other languages
Chinese (zh)
Other versions
CN113194042B (en
Inventor
金泽宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xunlei Computer Shenzhen Co ltd
Original Assignee
Xunlei Computer Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xunlei Computer Shenzhen Co ltd filed Critical Xunlei Computer Shenzhen Co ltd
Priority to CN202110296748.0A priority Critical patent/CN113194042B/en
Publication of CN113194042A publication Critical patent/CN113194042A/en
Application granted granted Critical
Publication of CN113194042B publication Critical patent/CN113194042B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/25Flow control; Congestion control with rate being modified by the source upon detecting a change of network conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)

Abstract

The application discloses a control method, a device and a storage medium for flow transmission speed, wherein the control method comprises the following steps: determining a current flow reference speed based on the flow transmission speed of the client and the server for executing the tasks according to the historical set time length of the client and the server and the flow transmission speed of the client and the server for executing the tasks currently; matching the current flow reference speed with a plurality of preset speed intervals, and determining the speed interval to which the current flow reference speed belongs; and adjusting the traffic transmission speed of the server at the next moment according to the speed adjustment mode corresponding to the speed interval. By means of the method, the operation cost of the server can be reduced on the premise that the user internet experience is guaranteed.

Description

Control method and device for flow transmission speed and storage medium
Technical Field
The present application relates to the field of network technologies, and in particular, to a method and an apparatus for controlling a traffic transmission speed, and a storage medium.
Background
With the continuous development of the internet industry, the quality of network access by users is continuously improved, and the proportion of bandwidth cost in the overall operation cost is continuously increased. In some end products, the user experience is severely affected due to poor network quality.
In the prior art, in order to achieve the optimal transmission rate, a server agent usually provides value-added services by deploying an acceleration server to supply a high-speed and stable data source; or invite the user to participate in the sharing plan, with the user node providing P2P (Peer-to-Peer) acceleration.
However, if the acceleration traffic is almost entirely from the acceleration server, the server agent may reduce the server cost by limiting the transmission speed of the free user, which may overwhelm the user experience and defeat the motivation of the user to use the acceleration server; if a user is invited to participate in the sharing plan, under the condition that the user bandwidth is small and a lot of user nodes can be accelerated, the server is preferentially selected to accelerate due to the excellent performance of the server, so that most of the user nodes cannot participate, a large burden is caused on the server side, and the operation cost is high.
Disclosure of Invention
The technical problem mainly solved by the application is to provide a method, a device and a storage medium for controlling traffic transmission speed, and the method, the device and the storage medium can solve the problems that user experience cannot be guaranteed and the operation cost of a server is high by acquiring the current traffic reference speed of a client and controlling the traffic transmission speed of the server based on the current traffic reference speed.
In order to solve the above technical problem, a first technical solution adopted by the present application is to provide a method for controlling a traffic transmission speed, including: determining a current flow reference speed based on the flow transmission speed of the client and the server for executing the tasks according to the historical set time length of the client and the server and the flow transmission speed of the client and the server for executing the tasks currently; matching the current flow reference speed with a plurality of preset speed intervals, and determining the speed interval to which the current flow reference speed belongs; and adjusting the traffic transmission speed of the server at the next moment according to the speed adjustment mode corresponding to the speed interval.
The method comprises the following steps of determining the current flow reference speed based on the flow transmission speed of the tasks executed by the client and the server in the historical set duration and the flow transmission speed of the tasks currently executed by the client and the server, and comprises the following steps: determining an initial flow reference speed based on the flow transmission speed of the historical set time length execution task of the client and the server; comparing the initial flow reference velocity with a flow reference velocity preceding the initial flow reference velocity; and adjusting the initial flow reference speed by using the comparison result and the flow transmission speed of the currently executed task, and determining the adjusted speed as the current flow reference speed.
Wherein, the step of adjusting the initial flow reference speed by using the comparison result and the flow transmission speed of the current execution task and determining the adjusted speed as the current flow reference speed comprises the following steps: determining the state of the initial flow reference speed by using the comparison result; wherein the states include a steady state and an observed state; determining an adjusting mode of the flow reference speed at the next moment based on the state of the initial flow reference speed; and adjusting the initial flow reference speed by using an adjusting mode to obtain the current flow reference speed.
Wherein the step of determining the state of the initial flow reference speed using the comparison result comprises: judging whether the quantity of the flow reference speeds before the initial flow reference speed reaches a preset quantity or not; if the number does not reach the preset number, determining the state as an observation state; if the quantity reaches the preset quantity, determining that the state is a stable state in response to that the difference value between the initial flow reference speed and the flow reference speed at the previous moment is smaller than the preset value, and the difference value between the average value of the initial flow reference speed and the first flow reference speed in the preset quantity is smaller than the preset value; and if the quantity reaches the preset quantity, determining that the state is the observation state in response to that the difference value between the initial flow reference speed and the flow reference speed at the previous moment is not less than the preset value or/and the difference value between the initial flow reference speed and the first flow reference speed in the preset quantity is not less than the preset value and the average value between the initial flow reference speed and the first flow reference speed in the preset quantity.
Wherein, before the step of judging whether the number of the flow reference speeds before the initial flow reference speed reaches the preset number, the method comprises the following steps: and in response to the difference value between the initial flow reference speed and the flow reference speed immediately before the initial flow reference speed being not less than the preset value, abandoning the flow reference speed before the initial flow reference speed, and determining the initial flow reference speed as the first flow reference speed.
The method comprises the following steps of adjusting the initial flow reference speed by using an adjusting mode to obtain the current flow reference speed, wherein the step comprises the following steps of: acquiring a difference value between the flow transmission speed of the current execution task and an initial flow reference speed; if the state is the observation state, in response to the fact that the flow transmission speed of the currently executed task is larger than the initial flow reference speed, the initial flow reference speed is increased by a first proportion of a difference value, and the increased flow reference speed is determined as the current flow reference speed; in response to the fact that the flow transmission speed of the currently executed task is smaller than the initial flow reference speed, the initial flow reference speed is decreased by a second proportion of the difference value, and the decreased flow reference speed is determined as the current flow reference speed; wherein the first proportion is greater than the second proportion; if the state is a stable state, in response to the fact that the flow transmission speed of the currently executed task is larger than the initial flow reference speed, the initial flow reference speed is increased by a third proportion of the difference value, and the increased flow reference speed is determined as the current flow reference speed; in response to the fact that the flow transmission speed of the currently executed task is smaller than the initial flow reference speed, the initial flow reference speed is decreased by a third proportion of the difference value, and the decreased flow reference speed is determined as the current flow reference speed; wherein the third ratio is less than or equal to the second ratio.
The step of matching the current flow reference speed with a plurality of preset speed intervals and determining the speed interval to which the current flow reference speed belongs includes: responding to the fact that the current flow reference speed is larger than a first preset speed, and dividing the current flow reference speed into a first speed interval; responding to the fact that the current flow reference speed is smaller than a first preset speed but larger than a second preset speed, and dividing the current flow reference speed into a second speed interval; responding to the current flow reference speed which is smaller than the second preset speed but larger than the third preset speed, and dividing the current flow reference speed into a third speed interval; and responding to the fact that the current flow reference speed is smaller than a third preset speed, and dividing the current flow reference speed into a fourth speed interval.
The step of adjusting the traffic transmission speed of the server at the next moment according to the speed adjustment mode corresponding to the speed interval includes: responding to the speed interval as a first speed interval, and reducing the traffic transmission speed of the server by a first set proportion; responding to the second speed interval as the speed interval, and maintaining the traffic transmission speed of the server; responding to the speed interval as a third speed interval, and increasing the flow transmission speed of the server by a second set proportion; and in response to the speed interval being the fourth speed interval, canceling the limitation on the traffic transmission speed of the server.
Wherein, in response to the speed interval being the first speed interval, the step of reducing the traffic transmission speed of the server by a first set proportion includes: reducing the number of connections from the client to the server so as to reduce the traffic transmission speed of the server according to a first set proportion; responding to the speed interval as a third speed interval, and increasing the traffic transmission speed of the server by a second set proportion, wherein the step comprises the following steps: increasing the number of connections from the client to the server so as to increase the traffic transmission speed of the server according to a second set proportion; in response to the speed interval being the fourth speed interval, canceling the limitation on the traffic transmission speed of the server, including: the number of connections of the client to the server is increased to a maximum number of connections.
In order to solve the above technical problem, a second technical solution adopted by the present application is to provide a control device for a traffic transmission speed, including: a memory for storing program data, the stored program data when executed implementing the steps in the method for controlling a traffic transmission speed as set forth in any one of the above; a processor for executing program instructions stored in the memory to implement the steps in the method for controlling the transmission speed of a traffic flow as described in any one of the above.
In order to solve the above technical problem, a third technical solution adopted by the present application is to provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program, when executed by a processor, implements the steps in the method for controlling a traffic transmission speed according to any one of the above.
The beneficial effect of this application is: the method is different from the prior art, and the method for controlling the traffic transmission speed is capable of reducing the operation cost of the server on the premise of ensuring the internet surfing experience of a user by acquiring the current traffic reference speed of the client and controlling the traffic transmission speed of the server based on the current traffic reference speed.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart illustrating an embodiment of a method for controlling traffic transmission speed according to the present application;
FIG. 2 is a flowchart illustrating one embodiment of step S11 of FIG. 1;
FIG. 3 is a flowchart illustrating one embodiment of step S23 of FIG. 2;
FIG. 4 is a flowchart illustrating one embodiment of step S31 of FIG. 3;
FIG. 5 is a flowchart illustrating one embodiment of step S33 of FIG. 3;
FIG. 6 is a specific diagram illustrating a predetermined number of flow reference speed variation trends of the present application;
FIG. 7 is another specific illustration of the present application of a predetermined number of flow reference speed profiles;
FIG. 8 is a detailed schematic diagram of the present application dividing a plurality of speed intervals;
fig. 9 is a schematic structural diagram of an embodiment of a control device for traffic transmission speed according to the present application;
FIG. 10 is a schematic structural diagram of an embodiment of a computer-readable storage medium according to the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, the "plural" includes at least two in general, but does not exclude the presence of at least one.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that the terms "comprises," "comprising," or any other variation thereof, as used herein, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a method for controlling a traffic transmission speed according to an embodiment of the present application. As shown in fig. 1, in the present embodiment, the method includes:
s11: and determining the current flow reference speed based on the flow transmission speed of the client and the server for executing the tasks according to the historical set time length and the flow transmission speed of the client and the server for executing the tasks currently.
Referring to fig. 2, fig. 2 is a flowchart illustrating an embodiment of step S11 in fig. 1. As shown in fig. 2, in the present embodiment, the step of determining the current traffic reference speed based on the traffic transmission speed of the client and the server for performing the task in the historical set time length and the traffic transmission speed of the client and the server for currently performing the task specifically includes:
s21: and determining an initial flow reference speed based on the flow transmission speed of the tasks executed by the historical set time length of the client and the server.
In this embodiment, the traffic reference speed refers to the maximum bandwidth that can be reached by the client bandwidth and the acceleration server acting together, i.e. the estimated upper bandwidth limit.
In the present embodiment, the traffic transfer rate is an actual traffic transfer rate provided by the client and the server together.
The traffic transmission speed of the historical set time period execution task is an average value of traffic transmission speeds received in a time (previous time) closest to the current time, and is a value closest to the actual traffic transmission speed.
The time may be 3s, 5s or other time, which is not limited in the present application.
In this embodiment, the initial traffic reference speed is calculated according to the traffic transmission speed received in real time at the previous time.
S22: the initial flow reference speed is compared to a flow reference speed that precedes the initial flow reference speed.
In this embodiment, since the flow reference speed is dynamically changed, before the initial flow reference speed is adjusted, the change trend of the flow reference speed at the previous several moments needs to be obtained, the state of the initial flow reference speed is determined according to the change trend, and finally, the initial flow reference speed is adjusted based on the state of the initial flow reference speed to obtain the current flow reference speed.
S23: and adjusting the initial flow reference speed by using the comparison result and the flow transmission speed of the currently executed task, and determining the adjusted speed as the current flow reference speed.
Referring to fig. 3, fig. 3 is a flowchart illustrating an embodiment of step S23 in fig. 2. As shown in fig. 3, in the present embodiment, the step of adjusting the initial traffic reference speed by using the comparison result and the traffic transmission speed of the currently executed task, and determining the adjusted speed as the current traffic reference speed specifically includes:
s31: determining the state of the initial flow reference speed by using the comparison result; wherein the states include a steady state and an observed state.
In this embodiment, the steady state means that the change in the flow rate reference speed is very slight over a period of time or it is directly considered that it does not change; the observation state refers to a state in which the flow rate reference speed is largely changed over a period of time.
Specifically, referring to fig. 4, fig. 4 is a flowchart illustrating an embodiment of step S31 in fig. 3. As shown in fig. 4, in the present embodiment, the step of determining the state of the initial flow rate reference speed using the comparison result specifically includes:
s41: and judging whether the quantity of the flow reference speeds before the initial flow reference speed reaches a preset quantity or not.
In this embodiment, the premise of determining whether the number of the flow reference speeds before the initial flow reference speed reaches the preset number is that, between the preset number of flow reference speeds, a difference between two consecutive flow reference speeds is smaller than a preset value, and in response to that, a difference between the initial flow reference speed and the flow reference speed immediately before the initial flow reference speed is smaller than a preset value. And if the difference value between the initial flow reference speed and the flow reference speed immediately before the initial flow reference speed is not smaller than the preset value, abandoning the flow reference speed before the initial flow reference speed, and determining the initial flow reference speed as the first flow reference speed.
Specifically, since the change of the flow reference speed in the steady state is very slight, the difference between the flow reference speeds at the previous and subsequent times in the steady state is small and usually lower than the preset value, and if the difference between the flow reference speed in response to the initial flow reference speed and the flow reference speed at the previous time is not smaller than the preset value, indicating that the change of the flow reference speed in the time is large, the initial flow reference speed is directly determined to be in the observation state.
In the present embodiment, the preset value is 5%.
In other embodiments, the preset value may be 3%, 4% or other values, which is not limited in this application.
S42: and if the number does not reach the preset number, determining the state as the observation state.
In this embodiment, determining the state of the initial flow reference speed requires observing the change trend of the flow reference speed over a period of time, so that there is a certain requirement on the length of the observation queue of the flow reference speed. If the number does not reach the preset number, the further observation is still needed, and at the moment, the initial flow reference speed is directly judged to be in an observation state.
In the present embodiment, the predetermined number is 5.
In other embodiments, the preset number may also be 8, 10 or other numbers, which is not limited in this application.
S43: and if the quantity reaches the preset quantity, determining that the state is a stable state in response to that the difference value between the initial flow reference speed and the flow reference speed at the previous moment is less than the preset value, and the difference value between the average value of the initial flow reference speed and the first flow reference speed in the preset quantity is less than the preset value.
In this embodiment, it is determined that the initial flow reference speed is in a stable state and two conditions need to be satisfied, one of which is whether the number of flow reference speeds before the initial flow reference speed reaches a preset number; the difference between the average value of the initial flow reference speed and the first flow reference speed in the preset number is smaller than the preset value, and the initial flow reference speed can be judged to be in a stable state only if the two conditions are met simultaneously.
Wherein, the first condition shows that the difference value between two continuous flow reference speeds in the observation queue is less than the preset value, and shows that the change value of the flow reference speed is not large; the second condition is that the overall variation trend of the plurality of flow reference speeds in the preset number is smooth.
Specifically, please refer to fig. 6, fig. 6 is a specific diagram illustrating a variation trend of the flow reference speed with a predetermined number according to the present application. As shown in fig. 6, in the observation queue, the flow reference speed is in a state of rising and falling, and the change trend is generally smooth, so that the difference between the 5 th flow reference speed (i.e. the initial flow reference speed) and the 1 st flow reference speed is less than 5%. And when the difference between the 5 th flow reference speed and the 1 st flow reference speed is less than 5%, the difference between the average value of the two and the 1 st flow reference speed is also necessarily less than 5%, and the condition is met, and the initial flow reference speed is judged to be in a stable state.
S44: and if the quantity reaches the preset quantity, determining that the state is the observation state in response to that the difference value between the initial flow reference speed and the flow reference speed at the previous moment is not less than the preset value or/and the difference value between the initial flow reference speed and the first flow reference speed in the preset quantity is not less than the preset value and the average value between the initial flow reference speed and the first flow reference speed in the preset quantity.
If the difference value between the initial flow reference speed and the flow reference speed immediately before the initial flow reference speed is not smaller than the preset value, the first condition is not met; and if the difference value between the average value of the initial flow reference speed and the first flow reference speed in the preset number is not less than the preset value, the second condition is not met, and if one of the two conditions is not met, the initial flow reference speed is judged to be in an observation state.
Since the difference is an absolute value and cannot represent the direction of change, the difference between two consecutive flow reference speeds is less than a preset value, and does not represent the average value of the initial flow reference speed at the end of the queue and the first flow reference speed in the preset number, and the difference between the initial flow reference speed at the end of the queue and the first flow reference speed in the preset number is less than the preset value. If all traffic reference speeds in the queue are either rising or falling, then condition two is likely not satisfied.
Specifically, please refer to fig. 7, fig. 7 is another specific diagram illustrating a variation trend of the reference speed of the preset amount of the flow rate. As shown in fig. 7, in the observation queue, the flow reference speed is in a state of continuously decreasing, although the difference between two consecutive flow reference speeds is less than 5%, the difference between the 5 th flow reference speed (i.e. the initial flow reference speed) and the 1 st flow reference speed is greater than 5%, and whether the difference between the average value of the two and the 1 st flow reference speed is less than 5% depends on the magnitude of each decrease, if the magnitude of each decrease is small enough, for example, 1% decrease each time, if the 1 st flow reference speed is a, the 5 th flow reference speed is 0.96a, the average value of the two is 0.98a, and the difference between the two and the 1 st flow reference speed is 2%, less than 5%, the condition can still be satisfied; if the reduction amplitude is slightly large each time, for example, each time is reduced by 4.5%, if the 1 st flow reference speed is a, the 5 th flow reference speed is 0.85a, the average value of the two is 0.925a, and the difference value from the 1 st flow reference speed is 7.5%, which is greater than 5%, the condition cannot be met, and at this time, the initial flow reference speed is determined to be in the observation state.
S32: and determining the adjustment mode of the flow reference speed at the next moment based on the state of the initial flow reference speed.
In the embodiment, after the state of the initial flow reference speed is determined to be a stable state, the initial flow reference speed is adjusted according to the adjustment mode of the stable state; and after the state of the initial flow reference speed is determined to be an observation state, adjusting the initial flow reference speed according to an adjustment mode of the observation state.
S33: and adjusting the initial flow reference speed by using an adjusting mode to obtain the current flow reference speed.
Referring to fig. 5, fig. 5 is a flowchart illustrating an embodiment of step S33 in fig. 3. As shown in fig. 5, in the present embodiment, the step of adjusting the initial flow rate reference speed by using an adjustment method to obtain the current flow rate reference speed specifically includes:
s51: and acquiring a difference value between the flow transmission speed of the currently executed task and the initial flow reference speed.
S52: if the state is the observation state, in response to the fact that the flow transmission speed of the currently executed task is larger than the initial flow reference speed, the initial flow reference speed is increased by a first proportion of a difference value, and the increased flow reference speed is determined as the current flow reference speed; in response to the fact that the flow transmission speed of the currently executed task is smaller than the initial flow reference speed, the initial flow reference speed is decreased by a second proportion of the difference value, and the decreased flow reference speed is determined as the current flow reference speed; wherein the first ratio is greater than the second ratio.
In this embodiment, if the traffic transmission speed in response to the currently executed task is greater than the initial traffic reference speed, it indicates that the estimated upper limit of the bandwidth is lower than the actual traffic transmission speed, and in order to approach the actual traffic transmission speed as soon as possible, and the speed of the increase needs to be faster, the initial traffic reference speed needs to be increased by a larger proportion, so that the current traffic reference speed approaches the actual traffic transmission speed as close as possible; if the traffic transmission speed in response to the currently executed task is lower than the initial traffic reference speed, it indicates that the estimated upper bandwidth limit is higher than the actual traffic transmission speed.
In the present embodiment, the first ratio is 50% and the second ratio is 10%.
In other embodiments, the first ratio and the second ratio may be other values, and it is only necessary that the first ratio is greater than the second ratio, which is not limited in the present application.
S53: if the state is a stable state, in response to the fact that the flow transmission speed of the currently executed task is larger than the initial flow reference speed, the initial flow reference speed is increased by a third proportion of the difference value, and the increased flow reference speed is determined as the current flow reference speed; in response to the fact that the flow transmission speed of the currently executed task is smaller than the initial flow reference speed, the initial flow reference speed is decreased by a third proportion of the difference value, and the decreased flow reference speed is determined as the current flow reference speed; wherein the third ratio is less than or equal to the second ratio.
In the present embodiment, the third ratio is 10% or less than 10%.
Further, after entering the stable state, if it is observed that the traffic transmission speed in the short period is greater than 120% of the traffic reference speed at the corresponding moment, and the average value of the traffic transmission speeds in the long period is also greater than 110% of the average value of the traffic reference speeds, it is determined that the stable state is broken due to the fact that the actual traffic transmission speed is increased too fast, and the stable state is reentered into the observation state.
Here, the short period refers to 5s, and the long period refers to 30 seconds.
In this embodiment, it is determined that the steady state is exited only if the flow rate transmission rate is greater than the flow rate reference rate by a value exceeding a certain ratio in both the short period and the long period.
Further, after entering the stable state, if it is observed that the flow transmission speed in the short period is less than 80% of the flow reference speed at the corresponding moment, and the average value of the flow transmission speeds in the long period is also less than 90% of the average value of the flow reference speeds, it is determined that the stable state is broken due to the fact that the actual flow transmission speed is decreased too fast, and the stable state is reentered into the observation state.
In this embodiment, after the steady state is destroyed, the speed control of the acceleration server is directly cancelled, and after the flow reference speed enters the steady state, the flow transmission speed of the server is controlled by taking a speed control measure.
In other embodiments, if the steady state is destroyed by a speed increase, the trend is to reduce the server speed, so the increase is mainly due to the potential release of the user shared connection, the traffic transmission speed of the server can be limited at a slow speed, and the traffic transmission speed of the server is further limited after the actual traffic transmission speed is observed to be still increased.
S12: and matching the current flow reference speed with a plurality of preset speed intervals, and determining the speed interval to which the current flow reference speed belongs.
Specifically, please refer to fig. 8, fig. 8 is a specific diagram illustrating a plurality of speed intervals according to the present application. As shown in fig. 8, in response to the current flow rate reference speed being greater than the first preset speed v1, dividing the current flow rate reference speed into a first speed section a; in response to the current flow reference speed being less than the first preset speed v1 but greater than the second preset speed v2, dividing the current flow reference speed into a second speed interval B; in response to the current flow reference speed being less than the second preset speed v2 but greater than the third preset speed v3, dividing the current flow reference speed into a third speed interval C; and dividing the current flow reference speed into a fourth speed interval D in response to the current flow reference speed being less than the third preset speed v 3.
The first preset speed v1 is greater than the second preset speed v2, and the second preset speed v2 is greater than the third preset speed v 3.
In the present embodiment, the first preset speed v1 is 95% of the actual transport flow rate, the second preset speed v2 is 88% of the actual transport flow rate, and the third preset speed v3 is 80% of the actual transport flow rate.
S13: and adjusting the traffic transmission speed of the server at the next moment according to the speed adjustment mode corresponding to the speed interval.
In response to the speed interval being the first speed interval A, reducing the traffic transmission speed of the server by a first set proportion; responding to the second speed interval B of the speed interval, and maintaining the traffic transmission speed of the server; responding to the speed interval as a third speed interval C, and increasing the flow transmission speed of the server by a second set proportion; and in response to the speed interval being the fourth speed interval, canceling the limitation on the traffic transmission speed of the server.
Wherein the first set proportion is 1%, and the second set proportion is 1%.
In other embodiments, the first set ratio and the second set ratio may be other values, which is not limited in the present application.
In the embodiment, when the flow reference speed is higher, the connection from some clients to the server is closed, and the upper limit of the connection is locked to prevent the generation of new connection; and when the traffic reference speed is lower, the connection from the client to the server is released, and the traffic transmission speed of the server is increased by creating a new connection.
In this embodiment, if the speed interval to which the client belongs is the first speed interval a, it indicates that the traffic reference speed is greater than 95% of the actual transmission traffic speed, and in this speed interval, the bandwidth upper limit provided by the client and the server together is very large, so that the user experience can be ensured.
In the present embodiment, the traffic transmission speed of the server is reduced by the first set ratio by reducing the number of connections from the client to the server.
Specifically, all connections from the client to the server are arranged according to the traffic transmission speed of the current moment of the connection, and the connections are sequentially closed according to the arrangement sequence from low to high until the traffic transmission speed of the server is reduced according to a first set proportion.
For example, the traffic transmission speed of the server is reduced by 1%, if the current traffic transmission speed of the server is b, the traffic transmission speed of the server at the next moment is 0.99b, and the difference quota is 0.01b, 0.01b is less than or equal to the traffic transmission speed of the server connection 1 to be closed + the traffic transmission speed of the server connection 2 to be closed + … + the traffic transmission speed of the server connection n to be closed; wherein the traffic transmission speed of the server connection to be closed 1 < the traffic transmission speed of the server connection to be closed 2 < … < the traffic transmission speed of the server connection to be closed n.
If the number of currently controlled server connections is too large (>50), some extra low speed connections are additionally closed from low to high (speed <10KB/s), and the upper limit of the number of closed connections is one twelfth of the number of controlled server connections.
In this embodiment, if the speed interval is the second speed interval B, it indicates that the traffic reference speed is 88% to 95% of the actual transmission traffic speed, and in this speed interval, the upper limit of the bandwidth provided by the client and the server together is large, so that the user experience can be ensured.
In this embodiment, if the speed interval is the third speed interval C, it indicates that the traffic reference speed is 80% to 88% of the actual transmission traffic speed, and in this speed interval, the upper limit of the bandwidth provided by the client and the server together is small, and the user experience cannot be guaranteed.
In this embodiment, the traffic transmission speed of the server is increased by the second set ratio by increasing the number of connections from the client to the server.
Specifically, a difference value between the target speed and the flow transmission speed of the current server is obtained, if the difference value is greater than 3 times of the connection equalizing speed of the server, 1 connection is added, and 1 connection limit is added every time when the remaining difference value is greater than 500k until the maximum connection number is full.
The server connection average speed refers to the ratio of the total traffic transmission speed provided by the server to the total connection number. For example, if there are only 5 connections from the client to the server in total, and the total traffic transmission speed of the server is c, then the server connection averaging speed is c/5.
In this embodiment, if the speed interval to which the client belongs is the fourth speed interval, it indicates that the traffic reference speed is less than 80% of the actual transmission traffic speed, and in this speed interval, the upper limit of the bandwidth provided by the client and the server together is very small, and the user experience cannot be guaranteed at all.
In other embodiments, the controlled connections may be collected based on a tcp (Transmission Control Protocol) reception Control method, so as to integrally Control the reception behavior of the client, so that the traffic Transmission speed of the server approaches the target value. The receiving action of the overall control client means that the server sends all data, but the control client receives only one part of the data, and the rest data is stored in the protocol station.
In another embodiment, the quota may be set autonomously, and the length of the data request in the connection may be controlled to make the traffic transmission speed of the server approach the target value. The control of the length of the data request in the connection means that the client requests a part of data from the server based on the quota, and the server only sends corresponding data according to the request.
Further, if the actual transmission traffic speed of the client is mainly provided by the server, for example, 80% of the actual transmission traffic speed is provided by the traffic transmission speed of the server, it can be determined that there are few traffic resources except for the server connection, and the client has substantially no speed-up potential, then the logic of the control method of the present application is not executed.
Further, a bottom-keeping speed of the flow reference speed is set, and if the actual flow transmission speed is lower than the bottom-keeping speed or lower than the bottom-keeping speed of a set proportion, the fact that the client side basically has no speed-raising potential is judged, the logic of the control method is not executed.
For example, the present application sets the guaranteed base rate of the traffic reference rate to 800KB/s, and if the actual traffic transmission rate is below 800KB/s or below 720KB/s (below 90% guaranteed base rate), the logic of the control method of the present application does not execute.
Different from the prior art, in the embodiment, by observing the state of the initial traffic reference speed, and in this state, based on the comparison result between the initial traffic reference speed and the traffic transmission speed of the task currently executed by the client, the initial traffic reference speed is adjusted to obtain the current traffic reference speed of the client, and the traffic transmission speed of the server is controlled based on the current traffic reference speed.
Correspondingly, the application provides a control device for the flow transmission speed.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an embodiment of a control device for traffic transmission speed according to the present application. As shown in fig. 9, in the present embodiment, the control device 90 includes a memory 91 and a processor 92.
In this embodiment, the memory 91 is used for storing program data, and the program data can realize the steps in the control method of the flow rate transmission speed corresponding to the control device 90 in any of the above-described method embodiments when executed; the processor 92 is configured to execute the program instructions stored in the memory 91 to implement the steps of the method for controlling the traffic transmission speed corresponding to the control device 90 in any of the above-described method embodiments.
Specifically, the processor 92 is configured to control itself and the memory 91 to implement the steps in any of the above-described embodiments of the traffic transmission speed control method. The processor 92 may also be referred to as a CPU (Central Processing Unit). The processor 92 may be an integrated circuit chip having signal processing capabilities. The Processor 92 may also be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 92 may be commonly implemented by a plurality of integrated circuit chips.
Different from the prior art, in the embodiment, by observing the state of the initial traffic reference speed, and in this state, based on the comparison result between the initial traffic reference speed and the traffic transmission speed of the task currently executed by the client, the initial traffic reference speed is adjusted to obtain the current traffic reference speed of the client, and the traffic transmission speed of the server is controlled based on the current traffic reference speed.
Accordingly, the present application provides a computer-readable storage medium.
Referring to fig. 10, fig. 10 is a schematic structural diagram of an embodiment of a computer-readable storage medium according to the present application.
The computer-readable storage medium 100 includes a computer program 1001 stored on the computer-readable storage medium 100, and when the computer program 1001 is executed by the processor, the steps in any of the method embodiments described above or the steps correspondingly executed by the relevant apparatus in the method embodiments described above are implemented.
In particular, the integrated unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium 100. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a computer-readable storage medium 100 and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned computer-readable storage medium 100 includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a module or a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some interfaces, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the purpose of illustrating embodiments of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application or are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (11)

1. A method for controlling a traffic transmission speed, comprising:
determining a current flow reference speed based on the flow transmission speed of a client and a server for executing a task in a historical set time and the flow transmission speed of the client and the server for currently executing the task;
matching the current flow reference speed with a plurality of preset speed intervals, and determining the speed interval to which the current flow reference speed belongs;
and adjusting the traffic transmission speed of the server at the next moment according to the speed adjustment mode corresponding to the speed interval.
2. The control method according to claim 1, wherein the step of determining the current traffic reference speed based on the traffic transmission speed of the client and the server for executing the task at the historical set time length and the traffic transmission speed of the client and the server for currently executing the task comprises:
determining an initial flow reference speed based on the flow transmission speed of the historical set time length execution task of the client and the server;
comparing the initial flow reference velocity to a flow reference velocity preceding the initial flow reference velocity;
and adjusting the initial flow reference speed by using the comparison result and the flow transmission speed of the currently executed task, and determining the adjusted speed as the current flow reference speed.
3. The control method according to claim 2, wherein the step of adjusting the initial traffic reference speed using the comparison result and the traffic transmission speed of the current execution task, and determining the adjusted speed as the current traffic reference speed comprises:
determining a state of the initial flow reference speed using the comparison result; wherein the states include a steady state and an observed state;
determining an adjusting mode of the next moment flow reference speed based on the state of the initial flow reference speed;
and adjusting the initial flow reference speed by using the adjusting mode to obtain the current flow reference speed.
4. The control method of claim 3, wherein said step of using said comparison to determine said state of said initial flow reference velocity comprises:
judging whether the quantity of the flow reference speeds before the initial flow reference speed reaches a preset quantity or not;
if the number does not reach the preset number, determining that the state is the observation state;
if the number reaches the preset number, determining that the state is the stable state in response to that the difference value between the initial flow reference speed and the flow reference speed immediately before the initial flow reference speed is smaller than a preset value, and the difference value between the average value of the initial flow reference speed and the first flow reference speed in the preset number is smaller than the preset value;
and if the number reaches the preset number, responding to the fact that the difference value between the initial flow reference speed and the flow reference speed at the previous moment is not smaller than a preset value, or/and the difference value between the average value of the initial flow reference speed and the first flow reference speed in the preset number is not smaller than the preset value, and determining that the state is the observation state.
5. The control method according to claim 4, wherein the step of determining whether the number of flow reference speeds before the initial flow reference speed reaches a preset number is preceded by:
and in response to the difference value between the initial flow reference speed and the flow reference speed immediately before the initial flow reference speed is not smaller than the preset value, abandoning the flow reference speed before the initial flow reference speed, and determining the initial flow reference speed as a first flow reference speed.
6. The control method according to claim 3, wherein the step of adjusting the initial flow reference speed by using the adjustment method to obtain the current flow reference speed comprises:
acquiring a difference value between the flow transmission speed of the currently executed task and the initial flow reference speed;
if the state is the observation state, in response to that the flow transmission speed of the currently executed task is greater than the initial flow reference speed, increasing the initial flow reference speed by a first proportion of the difference value, and determining the increased flow reference speed as the current flow reference speed; in response to the current flow transmission speed for executing the task being less than the initial flow reference speed, decreasing the initial flow reference speed by a second proportion of the difference value, and determining the decreased flow reference speed as the current flow reference speed; wherein the first ratio is greater than the second ratio;
if the state is the stable state, in response to that the flow transmission speed of the currently executed task is greater than the initial flow reference speed, increasing the initial flow reference speed by a third proportion of the difference value, and determining the increased flow reference speed as the current flow reference speed; in response to the current traffic transmission speed for executing the task being less than the initial traffic reference speed, decreasing the initial traffic reference speed by the third proportion of the difference value, and determining the decreased traffic reference speed as the current traffic reference speed;
wherein the third ratio is less than or equal to the second ratio.
7. The control method according to claim 1, wherein the step of matching the current flow rate reference speed with a plurality of preset speed intervals and determining the speed interval to which the current flow rate reference speed belongs comprises:
responding to the fact that the current flow reference speed is larger than a first preset speed, and dividing the current flow reference speed into a first speed interval;
responding to the current flow reference speed being smaller than the first preset speed but larger than a second preset speed, and dividing the current flow reference speed into a second speed interval;
responding to the current flow reference speed being smaller than the second preset speed but larger than a third preset speed, and dividing the current flow reference speed into a third speed interval;
and dividing the current flow reference speed into a fourth speed interval in response to the current flow reference speed being smaller than the third preset speed.
8. The control method according to claim 7, wherein the step of adjusting the traffic transmission speed of the server at the next moment according to the speed adjustment manner corresponding to the speed section includes:
in response to the speed interval being the first speed interval, reducing the traffic transmission speed of the server by a first set proportion;
in response to the speed interval being the second speed interval, maintaining the traffic transmission speed of the server;
responding to the speed interval as the third speed interval, and increasing the flow transmission speed of the server by a second set proportion;
and in response to the affiliated speed interval being the fourth speed interval, canceling the limitation on the traffic transmission speed of the server.
9. The control method according to claim 8, wherein the step of decreasing the traffic transmission speed of the server at a first set ratio in response to the belonging speed interval being the first speed interval comprises:
reducing the number of connections from the client to the server so as to reduce the traffic transmission speed of the server according to the first set proportion;
the step of increasing the traffic transmission speed of the server by a second set proportion in response to the speed interval to which the server belongs being the third speed interval includes:
increasing the number of connections from the client to the server so as to increase the traffic transmission speed of the server according to the second set proportion;
the step of canceling the limitation on the traffic transmission speed of the server in response to the speed interval to which the server belongs being the fourth speed interval includes:
and increasing the number of the connections from the client to the server to the maximum number of the connections.
10. A control device for a traffic transmission speed, comprising:
a memory for storing program data which when executed implement the steps in a method of controlling traffic transmission speed according to any one of claims 1 to 9;
a processor for executing the program instructions stored in the memory to implement the steps in the method for controlling traffic transmission speed according to any one of claims 1 to 9.
11. A computer-readable storage medium, having a computer program stored thereon, which, when being executed by a processor, implements the steps of the method for controlling the transmission speed of a traffic according to any one of claims 1 to 9.
CN202110296748.0A 2021-03-19 2021-03-19 Control method and device for flow transmission speed and storage medium Active CN113194042B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110296748.0A CN113194042B (en) 2021-03-19 2021-03-19 Control method and device for flow transmission speed and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110296748.0A CN113194042B (en) 2021-03-19 2021-03-19 Control method and device for flow transmission speed and storage medium

Publications (2)

Publication Number Publication Date
CN113194042A true CN113194042A (en) 2021-07-30
CN113194042B CN113194042B (en) 2023-02-21

Family

ID=76973494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110296748.0A Active CN113194042B (en) 2021-03-19 2021-03-19 Control method and device for flow transmission speed and storage medium

Country Status (1)

Country Link
CN (1) CN113194042B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050055456A1 (en) * 2003-09-04 2005-03-10 Intel Corporation Method, system, and program for managing a speed at which data is transmitted between network adaptors
US20190313136A1 (en) * 2016-06-12 2019-10-10 Hangzhou Hikvision Digital Technology Co., Ltd. Video Playback Method and Apparatus
CN110401511A (en) * 2019-07-25 2019-11-01 广州市百果园信息技术有限公司 A kind of determination method, apparatus, equipment and the storage medium of transmission rate
CN110708747A (en) * 2019-09-18 2020-01-17 Tcl移动通信科技(宁波)有限公司 Data transmission rate adjusting method, system, storage medium and mobile terminal
CN111314237A (en) * 2020-01-17 2020-06-19 深信服科技股份有限公司 Method, device and equipment for adjusting data packet transmission rate and readable storage medium
CN111432247A (en) * 2020-03-19 2020-07-17 平安科技(深圳)有限公司 Traffic scheduling method, traffic scheduling device, server and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050055456A1 (en) * 2003-09-04 2005-03-10 Intel Corporation Method, system, and program for managing a speed at which data is transmitted between network adaptors
US20190313136A1 (en) * 2016-06-12 2019-10-10 Hangzhou Hikvision Digital Technology Co., Ltd. Video Playback Method and Apparatus
CN110401511A (en) * 2019-07-25 2019-11-01 广州市百果园信息技术有限公司 A kind of determination method, apparatus, equipment and the storage medium of transmission rate
WO2021012869A1 (en) * 2019-07-25 2021-01-28 广州市百果园信息技术有限公司 Transmission rate determination method and device, apparatus, and storage medium
CN110708747A (en) * 2019-09-18 2020-01-17 Tcl移动通信科技(宁波)有限公司 Data transmission rate adjusting method, system, storage medium and mobile terminal
CN111314237A (en) * 2020-01-17 2020-06-19 深信服科技股份有限公司 Method, device and equipment for adjusting data packet transmission rate and readable storage medium
CN111432247A (en) * 2020-03-19 2020-07-17 平安科技(深圳)有限公司 Traffic scheduling method, traffic scheduling device, server and storage medium

Also Published As

Publication number Publication date
CN113194042B (en) 2023-02-21

Similar Documents

Publication Publication Date Title
US10666535B2 (en) Systems and methods for dynamically setting a rate limit for a computing device
US8341283B2 (en) Method and system for peer-to-peer content dissemination
US7280477B2 (en) Token-based active queue management
EP3547625B1 (en) Method and system for sending request for acquiring data resource
US20100271947A1 (en) Adaptive rate control based on overload signals
CN110138756B (en) Current limiting method and system
CN109660467B (en) Method and apparatus for controlling flow
WO2018112877A1 (en) Path calculating and access request distributing methods, devices and systems
CN112714029B (en) Method, device and equipment for scheduling content distribution network bandwidth
CN107682279B (en) Time delay control method, time delay control device, storage medium and program product
CN107920108A (en) A kind of method for pushing of media resource, client and server
CN111343097A (en) Link load balancing method and device, electronic equipment and storage medium
CN113194042B (en) Control method and device for flow transmission speed and storage medium
US20180167431A1 (en) Client-side ack regulation based adaptive streaming method and apparatus
CN114024913B (en) Network performance optimization method, device, equipment and storage medium
CN112350954B (en) Overload protection method, system, computer readable storage medium and electronic device
CN112380011A (en) Dynamic adjustment method and device for service capacity
JP2001202318A (en) Data distribution system
US10154414B2 (en) Resource allocation
Dimitriou et al. Promoting effective service differentiation with Size-oriented Queue Management
Gupta et al. Trust estimation in peer-to-peer network using blue
CN110838989A (en) Method and device for network current limiting based on token
Efraimidis et al. Window-games between TCP flows
US20240064102A1 (en) Packet processing device and packet processing method
CN109032813B (en) Mobile terminal, limiting method for interprocess communication of mobile terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant