A long link traffic shaping method based on traffic-aware computing
Through the method based on traffic perception calculation, the data sending time is dynamically adjusted, which solves the problem that traditional traffic shaping methods are difficult to cope with the dynamic changes in traffic in long-link scenarios, and realizes traffic smoothing and bandwidth optimization, improving the stability and efficiency of data transmission.
Patent Information
- Application Number
- CN202510286379.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-04-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In long-link scenarios, traditional traffic shaping methods are based on static rules and parameter settings, making it difficult to flexibly deal with dynamic changes in traffic, resulting in limitations in the face of long-term connections, burst traffic changes and bandwidth usage.
Using a method based on traffic perception calculation, by determining the data volume and transmission time of the data traffic, the time interval between the previous data traffic transmission time and the current data traffic transmission time is calculated, and the data transmission time is dynamically adjusted to ensure that each data packet is sent at the optimal time.
Effectively adapt to fluctuations in network traffic, prevent network congestion, achieve traffic smoothing, optimize bandwidth usage, reduce the impact of burst traffic on the network, improve overall transmission efficiency, and ensure the stability and efficiency of data transmission.
Smart Images

Figure CN119788613A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data transmission, and specifically relates to a long link traffic shaping method, device, equipment and storage medium based on traffic-aware computing. Background Art
[0002] In modern network communications, the stability and efficiency of data transmission are extremely important. Especially in simulation environments, long-term data transmission between the client and the server requires a stable connection. In this application scenario, data transmission usually has the characteristics of long duration and large traffic fluctuations. Therefore, the reasonable allocation of network resources and traffic management become the key to achieving stable and efficient communication.
[0003] Existing traffic management technologies mainly rely on short-link solutions, which transmit data by frequently creating and destroying connections. This approach is more suitable in low-traffic scenarios.
[0004] However, in the case of long connections, traditional traffic shaping methods are often based on static rules and parameter settings, which are difficult to flexibly respond to dynamic changes in traffic. This method has limitations when dealing with long connections, sudden traffic changes, and bandwidth usage. Summary of the invention
[0005] The present application aims to provide a long link traffic shaping method, apparatus, device and storage medium based on traffic-aware computing, which at least solves the problem of long response time caused by data blocking during data transmission.
[0006] In a first aspect, an embodiment of the present application discloses a long link traffic shaping method based on traffic-aware computing, which is applied to a data transmission device, including: Determine the data volume of the first target data flow and the second sending time of the second target data flow; the first target data flow is the data flow to be sent; the second target data flow is the data flow sent before the first target data flow and adjacent to the first target data flow; Determine, according to the data volume, a sending time interval between the second sending time and the sending time of sending the first target data flow in a target sending scenario; Determining a first sending time of the first target data flow according to the sending time interval and the second sending time; The first target data flow is sent according to the first sending time.
[0007] In a second aspect, the embodiment of the present application further discloses a long link traffic shaping device based on traffic perception calculation, which is applied to a data transmission device, including: A parameter acquisition module is used to determine the data volume of a first target data flow and a second sending time of a second target data flow; the first target data flow is the data flow to be sent; the second target data flow is the data flow sent before the first target data flow and adjacent to the first target data flow An interval calculation module, used to determine, according to the data volume, a sending time interval for sending the first target data flow in a target sending scenario; a time determination module, configured to determine a first sending time of the first target data flow according to the sending time interval and the second sending time; A data sending module is used to send the first target data flow according to the first sending time.
[0008] In a third aspect, an embodiment of the present application further discloses an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0009] In a fourth aspect, an embodiment of the present application further discloses a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0010] In summary, in the embodiments of the present application, by clarifying the data flow and the sending time, the precise control of the data transmission process is achieved; then, the time interval between the previous data flow sending time and the current data flow sending time can be calculated according to the data volume, and the data sending time can be dynamically adjusted to effectively adapt to the fluctuation of network traffic, prevent network congestion, and achieve traffic smoothing; then, the sending time of the data flow is determined by the dynamically calculated sending time interval, ensuring that each data packet is sent at the best time, optimizing bandwidth usage, reducing the impact of burst traffic on the network, and improving the overall transmission efficiency; finally, data is sent according to the calculated best sending time, ensuring the stability and efficiency of data transmission, reducing transmission delays, preventing excessive bandwidth occupation, and avoiding network congestion. Therefore, based on the dynamic calculation method based on traffic perception and the message delivery scheme combining message queues with scheduled tasks in the embodiments of the present application, the problems of data congestion and long response time existing in the prior art are solved, and the stability and efficiency of data transmission are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In the attached picture: Figure 1 It is a flow chart of the steps of a long link traffic shaping method based on traffic perception calculation provided by an embodiment of the present application; Figure 2It is a flowchart of another method for long link traffic shaping based on traffic perception calculation provided by an embodiment of the present application; Figure 3 is a schematic diagram of a data packet sending queue in an embodiment of the present application; Figure 4 It is the data flow process during the traffic shaping process under the embodiment of the present application; Figure 5 It is a block diagram of a long link traffic shaping device based on traffic perception calculation provided by an embodiment of the present application; Figure 6 is a block diagram of an electronic device according to an embodiment of the present application; Figure 7 It is a block diagram of an electronic device of another embodiment provided by the embodiments of the present application. DETAILED DESCRIPTION
[0012] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0013] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0014] In view of the problems existing in the existing technology, such as Figure 1 As shown, a long link traffic shaping method based on traffic-aware computing is provided in an embodiment of the present application and is applied to data transmission equipment.
[0015] The method may include the following steps: Step 101, determine the data volume of the first target data flow and the second sending time of the second target data flow.
[0016] The first target data flow is the data flow to be sent; the second target data flow is the data flow sent before the first target data flow and adjacent to the first target data flow.
[0017] In some embodiments of the present application, in order to accurately control the data transmission process, it is necessary to identify the first target data flow to be sent and the second target data flow sent adjacent to it, and to clarify the data volume and sending time of the two. The first target data flow refers to the data flow to be sent currently, and the second target data flow refers to the adjacent data flow sent before the first target data flow. In this way, the time node of data transmission can be clarified, laying the foundation for subsequent time interval calculation and dynamic adjustment.
[0018] In a specific example, a set of data transmission tasks is set in the simulation environment, where the first target data flow is the data packet to be sent, and the second target data flow is the data packet that has just been sent. First, the byte size and sending time of the two data packets are determined. Through this method, the sending time and data volume of each data packet can be accurately recorded and analyzed, thereby providing accurate data support for the subsequent calculation of the sending time interval, and ultimately achieving precise control of the data transmission process.
[0019] Step 102: Determine, according to the data volume, a sending time interval between the second sending moment and the sending moment of sending the first target data flow in a target sending scenario.
[0020] In some embodiments of the present application, in order to dynamically adjust the data transmission time, it is necessary to calculate the time interval between the two sending moments according to the data volume of the first target data flow and the second target data flow. The sending time interval refers to the time difference between the second sending moment and the sending moment of the first target data flow. In this way, it is possible to flexibly adjust according to the actual data volume, avoid network congestion, and achieve smooth transmission of traffic.
[0021] In a specific example, it is monitored in the simulation environment that the second target data flow is sent at a certain moment. Next, it is necessary to determine the sending time interval of the first target data flow. Assuming that the data volume of the first target data flow is 1MB, according to the preset bandwidth utilization rate and the expected sending rate, the time interval from the second sending moment to the sending moment of the first target data flow is calculated to be 2 seconds. Through this method, the sending time can be dynamically adjusted according to the actual network conditions and data flow, the transmission efficiency can be optimized, and the data packet can be ensured to be sent at the best time.
[0022] Step 103: Determine a first sending time of the first target data flow according to the sending time interval and the second sending time.
[0023] In some embodiments of the present application, in order to ensure that each data packet is sent at the best time, the calculated sending time interval is added to the second sending time, thereby determining the sending time of the first target data flow. In this way, the sending time can be dynamically adjusted to optimize bandwidth usage, reduce the impact of burst traffic on the network, and improve overall transmission efficiency.
[0024] In a specific example, the sending time of the second target data flow is determined to be 10:00:00 in the simulation environment, and the sending time interval is calculated to be 2 seconds. The sending time interval (2 seconds) is added to the second sending time (10:00:00), and the sending time of the first target data flow is determined to be 10:00:02. This method can ensure that each data packet is sent within an appropriate time interval, thereby optimizing the stability and efficiency of data transmission.
[0025] Step 104: Send the first target data flow according to the first sending time.
[0026] In some embodiments of the present application, in order to ensure the stability and efficiency of data transmission, the first sending time calculated in the previous step is used as a trigger point, and the first target data flow is accurately sent at the set time. In this way, it can ensure that the data packet is transmitted at the best time, reduce transmission delay, prevent excessive bandwidth occupation, and avoid network congestion.
[0027] In a specific example, the sending time of the first target data flow is determined to be 10:00:02 in the simulation environment. When the time reaches 10:00:02, the first target data flow is sent according to the predetermined plan. In this way, data is ensured to be transmitted at the best time, the stability and efficiency of data transmission are optimized, the transmission delay is reduced, and network congestion is prevented.
[0028] In summary, in the embodiments of the present application, by clarifying the data flow and the sending time, the precise control of the data transmission process is achieved; then, the time interval between the previous data flow sending time and the current data flow sending time can be calculated according to the data volume, and the data sending time can be dynamically adjusted to effectively adapt to the fluctuation of network traffic, prevent network congestion, and achieve traffic smoothing; then, the sending time of the data flow is determined by the dynamically calculated sending time interval, ensuring that each data packet is sent at the best time, optimizing bandwidth usage, reducing the impact of burst traffic on the network, and improving the overall transmission efficiency; finally, data is sent according to the calculated best sending time, ensuring the stability and efficiency of data transmission, reducing transmission delays, preventing excessive bandwidth occupation, and avoiding network congestion. Therefore, based on the dynamic calculation method based on traffic perception and the message delivery scheme combining message queues with scheduled tasks in the embodiments of the present application, the problems of data congestion and long response time existing in the prior art are solved, and the stability and efficiency of data transmission are improved.
[0029] Figure 2 This is another long link traffic shaping method based on traffic-aware computing provided in an embodiment of the present application, which is applied to data transmission equipment.
[0030] The method may include the following steps: Step 201, determine the data volume of the first target data flow and the second sending time of the second target data flow.
[0031] The first target data flow is the data flow to be sent; the second target data flow is the data flow sent before the first target data flow and adjacent to the first target data flow.
[0032] The method shown in this step has been explained in step 101 and will not be repeated here.
[0033] Step 202: Determine, according to the data volume, a sending time interval between the second sending moment and the sending moment of sending the first target data flow in a target sending scenario.
[0034] The method shown in this step has been explained in step 102 and will not be repeated here.
[0035] Optionally, step 202 includes the following sub-steps: Sub-step 2021, selecting from a plurality of preset sending scenarios to determine a target sending scenario.
[0036] Among them, the target sending scenario has a corresponding target sending rate.
[0037] In some embodiments of the present application, in order to select a suitable sending strategy according to different application requirements, a scenario that best meets the current data transmission requirements is selected from multiple preset sending scenarios. The target sending scenario refers to a sending scenario corresponding to a specific transmission environment and requirement, and each scenario has its specific target sending rate. In this way, it is possible to flexibly respond to various transmission requirements and ensure the efficiency and stability of data transmission.
[0038] In a specific example, three transmission scenarios are preset in the simulation environment: high bandwidth scenario, medium bandwidth scenario, and low bandwidth scenario. The target transmission rates for each scenario are 1000KB / s, 500KB / s, and 100KB / s, respectively. According to the current network conditions and data transmission requirements, the medium bandwidth scenario is selected as the target transmission scenario. In this way, the most appropriate transmission scenario can be selected according to actual needs and network conditions to ensure high efficiency and stability during data transmission.
[0039] Optionally, in some experimental scenarios, sub-step 2021 may determine the target sending scenario by manual selection: Sub-step 20211, in response to a selection operation among multiple sending scenarios, determining a target sending scenario among the sending scenarios.
[0040] In some embodiments of the present application, in order to select a suitable sending strategy according to actual application requirements, multiple preset sending scenarios can be selected through the operation interface, and the selected target sending scenario can be confirmed. In this process, the sending scenario refers to different network transmission environments and requirements preset by the system. In this way, it is possible to flexibly respond to different network transmission conditions and ensure the efficiency and stability of data transmission.
[0041] In a specific example, three sending scenarios are preset in the simulation environment: high bandwidth scenario, medium bandwidth scenario, and low bandwidth scenario. Each scenario corresponds to different network transmission requirements and target transmission rates. The medium bandwidth scenario is selected as the target sending scenario through the operation interface. In this way, the most appropriate sending scenario can be flexibly selected according to the actual network conditions and transmission requirements to ensure the efficiency and stability of data transmission.
[0042] Optionally, in some application scenarios, sub-step 2021 may determine the target sending scenario by analyzing historical data. In this case, sub-step 2021 includes the following sub-steps: Sub-step 20212, obtaining the historical sending rate at multiple times before the second sending time.
[0043] In some embodiments of the present application, in order to determine the appropriate transmission scenario by analyzing the past network transmission situation, it is necessary to collect and record the data transmission rate at multiple times before the second transmission moment. In this process, the historical transmission rate refers to the actual data transmission speed recorded by the system over a period of time in the past. In this way, historical data can be used for analysis to provide a reliable basis for subsequent transmission scenario selection, ensuring the efficiency and stability of data transmission.
[0044] In a specific example, the data transmission rate per minute in the past hour is recorded in the simulation environment. These historical transmission rates show the actual transmission performance of the network in different time periods. These historical data are collected and stored for subsequent analysis. In this way, the transmission rules of the network can be understood based on historical data, and more accurate decisions can be made in the subsequent transmission scenario selection to ensure the efficiency and stability of data transmission.
[0045] Sub-step 20213, selecting a target sending scenario from multiple sending scenarios based on multiple historical sending rates.
[0046] In some embodiments of the present application, in order to determine the most suitable transmission scenario according to the actual network transmission situation, the system analyzes the multiple historical transmission rates obtained in the previous step and matches them with the preset transmission scenarios to select the target transmission scenario. In this way, the most suitable transmission scenario can be selected using historical data to ensure the efficiency and stability of data transmission.
[0047] In a specific example, the data transmission rate per minute over the past hour was recorded in a simulation environment, showing the actual transmission performance during peak and off-peak hours. These historical data can be matched with the three preset transmission scenarios of high bandwidth, medium bandwidth, and low bandwidth, and finally the medium bandwidth scenario is selected as the target transmission scenario based on the historical transmission rate. In this way, the transmission scenario that best suits the current network conditions can be selected based on historical data, thereby optimizing the efficiency and stability of data transmission.
[0048] Sub-step 2022, determining the ratio of the data volume to the target sending rate as the sending time interval.
[0049] The target sending rate is a sending rate corresponding to a target sending scenario.
[0050] In some embodiments of the present application, in order to dynamically adjust the data transmission time to match the actual network bandwidth, the data volume of the first target data flow is divided by the target transmission rate to obtain the transmission time interval. In this way, the data transmission time interval can be flexibly adjusted according to different transmission scenarios, thereby optimizing data transmission efficiency and preventing network congestion.
[0051] In a specific example, a medium bandwidth scenario is selected in the simulation environment, and its target sending rate is 500KB / s. Assuming that the data volume of the first target data flow is 1000KB, the data volume (1000KB) is divided by the target sending rate (500KB / s), and the sending time interval is calculated to be 2 seconds. In this way, the sending time interval can be flexibly adjusted according to the data volume and the target sending rate, thereby optimizing the efficiency and stability of data transmission.
[0052] Step 203: When the preset maximum time interval is smaller than the sending time interval, the value of the sending time interval is updated with the value of the maximum time interval.
[0053] In some embodiments of the present application, in order to prevent excessive delays during data transmission, the calculated sending time interval is compared with the preset maximum time interval. If the preset maximum time interval is less than the sending time interval, the sending time interval is replaced by the maximum time interval. The maximum time interval refers to the longest data transmission delay that the system can tolerate. In this way, the timeliness of data transmission can be ensured, and excessive delays can be prevented from affecting the overall efficiency of data transmission.
[0054] In a specific example, the sending time interval calculated in the simulation environment is 3 seconds, while the preset maximum time interval is 2 seconds. By comparing the two time intervals, it is found that the preset maximum time interval is smaller than the sending time interval, so the original 3-second sending time interval is replaced with the maximum time interval of 2 seconds. This method can ensure that in the case of network congestion, the sending of data packets will not exceed the delay range that the system can tolerate, ensuring the timeliness and stability of data transmission.
[0055] Step 204: Determine a first sending time of the first target data flow according to the sending time interval and the second sending time.
[0056] The method shown in this step has been explained in step 103 and will not be repeated here.
[0057] Optionally, step 204 includes the following sub-steps: Sub-step 2041, determining the sum of the sending time interval and the second sending time as the first sending time.
[0058] In some embodiments of the present application, in order to ensure that the data packet is sent at the best time point, the sending time interval calculated in the previous step is added to the second sending time to determine the first sending time of the first target data flow. In this way, it can ensure that the data packet is sent at the appropriate time, optimize the use of network bandwidth, prevent network congestion, and improve the efficiency and stability of data transmission.
[0059] In a specific example, the sending time interval is calculated to be 3 seconds in the simulation environment, and the sending time of the second target data flow is 00:00:10. The experimenter adds the sending time interval (3 seconds) and the second sending time (00:00:10) to determine the sending time of the first target data flow to be 00:00:13. This method can ensure that each data packet is sent at the most appropriate time, optimize the stability and efficiency of data transmission, and prevent network congestion.
[0060] Step 205: Send the first target data flow according to the first sending time.
[0061] The method shown in this step has been described in step 104 and will not be repeated here.
[0062] Optionally, step 205 includes the following sub-steps: Sub-step 2051, encapsulates the first target data flow and the first sending time, and adds the first target data packet obtained after encapsulation into a sending queue.
[0063] In some embodiments of the present application, in order to ensure that the data packet is accurately sent at the appropriate time, the first target data flow and the corresponding first sending time are encapsulated into a data packet, and the data packet is added to the sending queue. In this way, the data packet can be prepared in advance to ensure that it is sent within the scheduled time, thereby improving the efficiency and stability of data transmission.
[0064] In a specific example, Figure 3 As shown in the figure, in the simulation environment, it is assumed that a long link data flow is sent from the client to the server through the TCP link in a time period of 0-40ms (the arrow in the figure indicates the direction of data flow). This long link data flow is divided into multiple parts for transmission, and the size of each part determines the corresponding transmission time. Each part of the data flow has a corresponding transmission time, so each part of the data flow and the corresponding transmission time will be encapsulated into a complete data packet and added to the transmission queue (each point on the time axis in the figure represents a data packet to be sent). In this way, data packets can be prepared in advance and ensured to be accurately sent in each data packet, thereby optimizing the efficiency and stability of data transmission and avoiding data packet delays and losses.
[0065] Sub-step 2052, in response to the arrival of the first sending time, sending the first target data packet from the sending queue.
[0066] In some embodiments of the present application, in order to ensure that the data packet is accurately sent at the predetermined time point, when the system detects that the current time reaches or exceeds the predetermined first sending time, the corresponding first target data packet is immediately extracted from the sending queue and sent. In this process, the sending queue is a queue structure for storing data packets to be sent. In this way, it can be ensured that the data packet is sent at the set time, thereby improving the timeliness and reliability of data transmission.
[0067] In a specific example, Figure 3 As shown in the figure, multiple data packets to be sent are set in the simulation environment, each with a predetermined sending time, and have been added to the sending queue. When the system time reaches the sending time corresponding to each data packet, the system detects that the sending moment has arrived, and immediately extracts and sends the data packet from the sending queue. In this way, the data packet is ensured to be sent at the predetermined time point, which optimizes the timeliness and reliability of data transmission and avoids delays or omissions of data packets.
[0068] Optionally, after obtaining the traffic perception data results, the message sending time offset in each interval period can be calculated by the following formula according to the actual network bandwidth limitation and the expected target sending rate: Time send =Time last +MAX(byteSize / v,Time max ); Among them, Time send Indicates the first sending time, Time last : indicates the second sending time, byteSize indicates the data volume of the first target data flow, v indicates the target sending rate, Time max Indicates the maximum time interval.
[0069] like Figure 4 As shown, it is a schematic diagram of the data flow process in the traffic shaping process under the embodiment of the present application: S1, traffic perception: Perceive the size and time interval of data traffic. By monitoring and analyzing data flows, the size, direction, and change trend of traffic can be perceived.
[0070] S2, time calculation: Calculate the offset of the sending time based on the expected rate and maximum delay input. Dynamically adjust the data sending time window to avoid network congestion and achieve traffic smoothing.
[0071] S3, message delivery: The main function is to ensure that data packets are sent at the best time point, thereby optimizing the efficiency and stability of data transmission: S3.1, data packaging and establishment of scheduled tasks: Pack data and establish corresponding scheduled tasks, combine scheduled tasks and message queues to send data, realize bandwidth time-sharing occupation, and enhance the stability of link data transmission; S3.2, data packets are added to the message queue: the packaged data packets are added to the message queue and are ready to be sent. According to the calculated sending time and the scheduled task, the message will be triggered to be sent at the appropriate time.
[0072] In summary, in the embodiments of the present application, by clarifying the data flow and the sending time, the precise control of the data transmission process is achieved; then, the time interval between the previous data flow sending time and the current data flow sending time can be calculated according to the data volume, and the data sending time can be dynamically adjusted to effectively adapt to the fluctuation of network traffic, prevent network congestion, and achieve traffic smoothing; then, the sending time of the data flow is determined by the dynamically calculated sending time interval, ensuring that each data packet is sent at the best time, optimizing bandwidth usage, reducing the impact of burst traffic on the network, and improving the overall transmission efficiency; finally, data is sent according to the calculated best sending time, ensuring the stability and efficiency of data transmission, reducing transmission delays, preventing excessive bandwidth occupation, and avoiding network congestion. Therefore, based on the dynamic calculation method based on traffic perception and the message delivery scheme combining message queues with scheduled tasks in the embodiments of the present application, the problems of data congestion and long response time existing in the prior art are solved, and the stability and efficiency of data transmission are improved.
[0073] refer to Figure 5 , which shows a long link traffic shaping device 30 based on traffic perception calculation provided by an embodiment of the present application, applied to a data transmission device, including: The parameter acquisition module 301 is used to determine the data volume of the first target data flow and the second sending time of the second target data flow; the first target data flow is the data flow to be sent; the second target data flow is the data flow sent before the first target data flow and adjacent to the first target data flow The interval calculation module 302 is used to determine, according to the data volume, a sending time interval for sending a first target data flow in a target sending scenario; A time determination module 303, configured to determine a first sending time of a first target data flow according to the sending time interval and the second sending time; The data sending module 304 is used to send the first target data flow according to the first sending time.
[0074] Optionally, the interval calculation module 302 includes: A scenario selection submodule is used to select from a plurality of preset sending scenarios to determine a target sending scenario; the target sending scenario has a corresponding target sending rate; The rate calculation submodule is used to determine the ratio of the data volume to the target sending rate as the sending time interval; the target sending rate is the sending rate corresponding to the target sending scenario.
[0075] Optionally, the scene selection submodule includes: The manual selection unit is used to determine a target sending scenario among the sending scenarios in response to a selection operation among the multiple sending scenarios.
[0076] Optionally, the scene selection submodule includes: A history acquisition unit, used to acquire the historical sending rates at multiple moments before the second sending moment; The automatic selection unit is used to select a target sending scenario from multiple sending scenarios according to multiple historical sending rates.
[0077] Optionally, the long link traffic shaping device 30 based on traffic perception calculation further includes: The updating module is used to update the value of the sending time interval with the value of the maximum time interval when the preset maximum time interval is smaller than the sending time interval.
[0078] Optionally, the time determination module 303 includes: The summing submodule is used to determine the sum of the sending time interval and the second sending time as the first sending time.
[0079] Optionally, the data sending module 304 includes: An encapsulation submodule, used for encapsulating the first target data flow and the first sending time, and adding the first target data packet obtained after encapsulation into a sending queue; The sending submodule is used to send a first target data packet from the sending queue in response to the arrival of a first sending time.
[0080] In summary, in the embodiments of the present application, by clarifying the data flow and the sending time, the precise control of the data transmission process is achieved; then, the time interval between the previous data flow sending time and the current data flow sending time can be calculated according to the data volume, and the data sending time can be dynamically adjusted to effectively adapt to the fluctuation of network traffic, prevent network congestion, and achieve traffic smoothing; then, the sending time of the data flow is determined by the dynamically calculated sending time interval, ensuring that each data packet is sent at the best time, optimizing bandwidth usage, reducing the impact of burst traffic on the network, and improving the overall transmission efficiency; finally, data is sent according to the calculated best sending time, ensuring the stability and efficiency of data transmission, reducing transmission delays, preventing excessive bandwidth occupation, and avoiding network congestion. Therefore, based on the dynamic calculation method based on traffic perception and the message delivery scheme combining message queues with scheduled tasks in the embodiments of the present application, the problems of data congestion and long response time existing in the prior art are solved, and the stability and efficiency of data transmission are improved.
[0081] Reference Figure 6 , the electronic device 500 may include one or more of the following components: a processing component 502 , a memory 504 , a power component 506 , a multimedia component 508 , an audio component 510 , an input / output (I / O) interface 512 , a sensor component 514 , and a communication component 516 .
[0082] The processing component 502 generally controls the overall operation of the electronic device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.
[0083] The memory 504 is used to store various types of data to support the operation of the electronic device 500. Examples of such data include instructions for any application or method operating on the electronic device 500, contact data, phone book data, messages, pictures, multimedia, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0084] The power supply component 506 provides power to the various components of the electronic device 500. The power supply component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 500.
[0085] The multimedia component 508 includes an interface that provides an output interface between the electronic device 500 and the user. In some embodiments, the interface may include a liquid crystal display (LCD) and a touch panel (TP). If the interface includes a touch panel, the interface may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the electronic device 500 is in an operating mode, such as a shooting mode or a multimedia mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0086] The audio component 510 is used to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), and when the electronic device 500 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is used to receive an external audio signal. The received audio signal can be further stored in the memory 504 or sent via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.
[0087] The input / output I / O interface 512 provides an interface between the processing component 502 and the peripheral interface module, which may be a keyboard, a click wheel, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0088] The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the electronic device 500. For example, the sensor assembly 514 can detect the open / closed state of the electronic device 500, the relative positioning of components, such as the display and keypad of the electronic device 500, and the sensor assembly 514 can also detect the position change of the electronic device 500 or a component of the electronic device 500, the presence or absence of user contact with the electronic device 500, the orientation or acceleration / deceleration of the electronic device 500, and the temperature change of the electronic device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 514 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0089] The communication component 516 is used to facilitate wired or wireless communication between the electronic device 500 and other devices. The electronic device 500 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0090] In an exemplary embodiment, the electronic device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to implement the methods provided in the embodiments of the present application.
[0091] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, and the instructions can be executed by a processor 520 of an electronic device 500 to perform the above method. For example, the non-transitory storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0092] Figure 7FIG. 6 is a block diagram of an electronic device 600 according to another embodiment of the present invention. For example, the electronic device 600 may be provided as a server.
[0093] Reference Figure 7 , the electronic device 600 includes a processing component 622, which further includes one or more processors, and a memory resource represented by a memory 632, for storing instructions that can be executed by the processing component 622, such as an application. The application stored in the memory 632 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 622 is configured to execute instructions to perform the method provided in the embodiment of the present application.
[0094] The electronic device 600 may also include a power supply component 626 configured to perform power management of the electronic device 600, a wired or wireless network interface 650 configured to connect the electronic device 600 to a network, and an input / output (I / O) interface 658. The electronic device 600 may operate based on an operating system stored in the memory 632, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0095] It should be noted that, for the sake of simplicity, the method embodiments of the present application are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described action sequence, because according to the embodiments of the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.
[0096] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0097] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A long link traffic shaping method based on traffic-aware computing, characterized in that: Applied to data transmission equipment, including: Determine the data volume of the first target data flow and the second sending time of the second target data flow; the first target data flow is the data flow to be sent; the second target data flow is the data flow sent before the first target data flow and adjacent to the first target data flow; Determine, according to the data volume, a sending time interval between the second sending time and the sending time of sending the first target data flow in a target sending scenario; Determining a first sending time of the first target data flow according to the sending time interval and the second sending time; The first target data flow is sent according to the first sending time.
2. The long link traffic shaping method based on traffic-aware computing according to claim 1, characterized in that: The determining, according to the data volume, in a target sending scenario, a sending time interval between the second sending moment and the sending moment of sending the first target data flow, includes: Selecting from a plurality of preset sending scenarios to determine a target sending scenario; the target sending scenario has a corresponding target sending rate; The ratio of the data volume to the target sending rate is determined as the sending time interval; the target sending rate is the sending rate corresponding to the target sending scenario.
3. The long link traffic shaping method based on traffic-aware computing according to claim 2, characterized in that: The selecting from a plurality of preset sending scenarios to determine a target sending scenario includes: In response to a selection operation among a plurality of sending scenarios, a target sending scenario among the sending scenarios is determined.
4. The long link traffic shaping method based on traffic-aware computing according to claim 2, characterized in that: The selecting from a plurality of preset sending scenarios to determine a target sending scenario includes: Acquire historical sending rates at multiple time points before the second sending time point; The target sending scenario is selected from a plurality of the sending scenarios according to the plurality of the historical sending rates.
5. The long link traffic shaping method based on traffic-aware computing according to claim 1, characterized in that: The long link traffic shaping method based on traffic-aware computing also includes: In the case that the preset maximum time interval is smaller than the sending time interval, the value of the sending time interval is updated with the value of the maximum time interval.
6. The long link traffic shaping method based on traffic-aware computing according to claim 1, characterized in that: The determining, according to the sending time interval and the second sending time, a first sending time of the first target data flow includes: The sum of the sending time interval and the second sending time is determined as the first sending time.
7. The long link traffic shaping method based on traffic-aware computing according to claim 1, characterized in that: The sending the first target data flow according to the first sending time includes: Encapsulating the first target data flow and the first sending time, and adding the first target data packet obtained after encapsulation to a sending queue; In response to the arrival of a first sending time, the first target data packet is sent from the sending queue.
8. A long link traffic shaping device based on traffic perception calculation, characterized in that: Applied to data transmission equipment, including: A parameter acquisition module is used to determine the data volume of a first target data flow and a second sending time of a second target data flow; the first target data flow is the data flow to be sent; the second target data flow is the data flow sent before the first target data flow and adjacent to the first target data flow An interval calculation module, used to determine, according to the data volume, a sending time interval for sending the first target data flow in a target sending scenario; a time determination module, configured to determine a first sending time of the first target data flow according to the sending time interval and the second sending time; A data sending module is used to send the first target data flow according to the first sending time.
9. An electronic device, characterized in that: include: A processor, a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method as claimed in any one of claims 1 to 7.