Network traffic management method, system, electronic device, and storage medium
Patent Information
- Application Number
- CN202311515384.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-14
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2043-11-14
AI Technical Summary
[0004]本发明提供一种网络流量管理方法、系统、电子设备及存储介质,用以解决现有技术中对于网络流量的管理忽略了由于网络拥塞导致的丢包或掉包情况,导致对网络流量的管理的合理性较差的问题
[0039] The beneficial effects of this invention are as follows: This invention provides a network traffic management method, system, electronic device, and storage medium. The method involves: acquiring a data stream to be transmitted; performing packet loss detection on the data stream to obtain packet loss information; determining the cause of packet loss based on the packet loss information; adjusting network resources corresponding to various types of traffic data packets in the data stream to be transmitted based on the packet loss information, obtaining network resource adjustment results; and queuing and sending all traffic data packets based on the network resource adjustment results and the categories of the traffic data packets in the data stream to be transmitted. This approach effectively considers packet loss during data transmission and adjusts network resources accordingly based on packet loss information, thereby improving the allocation of network resources and enhancing the rationality of network resource allocation and traffic management.
Smart Images

Figure CN117812023B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet technology, and in particular to a network traffic management method, system, electronic device, and storage medium. Background Technology
[0002] In modern network applications, network traffic management and optimization are crucial issues. Especially when multiple applications and services share the same network resources, ensuring priority transmission of network traffic for critical services while guaranteeing fairness for other network traffic is a constant challenge for network engineers and operators. Related technologies typically manage network traffic by placing network traffic packets into appropriate queues based on their priority, and then processing or sending the packets in those queues.
[0003] However, the network traffic management in related technologies does not take into account packet loss or packet dropping caused by network congestion. Specifically, network traffic data packets in the data stream received by the terminal may be lost during transmission due to network congestion and other reasons. The related technologies do not take this situation into account, nor do they make corresponding adjustments and optimizations to network traffic management based on this situation, resulting in poor rationality in their network traffic management. Summary of the Invention
[0004] This invention provides a network traffic management method, system, electronic device, and storage medium to solve the problem that existing network traffic management ignores packet loss or packet dropping caused by network congestion, resulting in poor rationality of network traffic management.
[0005] This invention provides a network traffic management method, comprising:
[0006] Obtain the data stream to be transmitted;
[0007] Packet loss detection is performed on the data stream to be transmitted to obtain packet loss information;
[0008] Based on the packet loss information, determine the reason for the packet loss.
[0009] When the packet loss is caused by network congestion, the network resources corresponding to various traffic data packets in the data stream to be transmitted are adjusted based on the packet loss information to obtain the network resource adjustment result.
[0010] Based on the network resource adjustment results and the category of the traffic data packets in the data stream to be transmitted, all the traffic data packets are queued and sent.
[0011] According to a network traffic management method provided by the present invention, when the packet loss is caused by network congestion, the method adjusts the network resources corresponding to various types of traffic data packets in the data stream to be transmitted based on the packet loss information to obtain the network resource adjustment result, including the following steps:
[0012] When the packet loss is caused by network congestion, the category of the dropped data packet is determined based on the packet loss information and the preset traffic category determination rules, and each category corresponds to a certain priority.
[0013] Based on the categories of all the dropped packets, determine the network resources to be reserved.
[0014] Based on the preset complete network resources and the reserved network resources to be configured, the allocatable network resources are obtained;
[0015] Based on the allocable network resources and the categories of traffic data packets in the data stream to be transmitted, resource allocation is performed on each category of traffic data packets to obtain the resource allocation result corresponding to each category of traffic data packets;
[0016] The network resources to be configured and reserved, along with all the resource allocation results, are determined as the network resource adjustment results.
[0017] According to a network traffic management method provided by the present invention, the step of determining the network resources to be reserved based on the categories of all the dropped data packets includes:
[0018] Based on the categories of all the dropped data packets, determine the resources to be retained for each category of dropped data packets;
[0019] The sum of all the resources to be retained is determined as the network resource to be configured and retained.
[0020] According to a network traffic management method provided by the present invention, the steps of allocating resources for each type of traffic data packet based on the allocable network resources and the category of traffic data packets in the data stream to be transmitted, and obtaining the resource allocation result corresponding to each category of traffic data packets, include:
[0021] Based on the category of traffic data packets in the data stream to be transmitted, determine the resource proportion corresponding to each category of traffic data packets;
[0022] Based on the allocable network resources and the resource proportion corresponding to each type of traffic data packet, the resource allocation result corresponding to each type of traffic data packet is obtained.
[0023] According to a network traffic management method provided by the present invention, the steps of queuing and sending all traffic data packets based on the network resource adjustment results and the category of the traffic data packets in the data stream to be transmitted include:
[0024] Based on the category of the traffic data packets in the data stream to be transmitted, each category of traffic data packets is placed into a corresponding queue for queuing, and the queue corresponds one-to-one with the category of the traffic data packets;
[0025] Based on the resource allocation results corresponding to each category of traffic data packets in the network resource adjustment results, the traffic data packets in the corresponding queues are sent.
[0026] According to a network traffic management method provided by the present invention, the step of sending the traffic data packets in the corresponding queue based on the resource allocation results corresponding to each category of traffic data packets in the network resource adjustment results includes:
[0027] During the transmission of the traffic data packets in any queue, the weight of the traffic data packets is adjusted based on the actual dwell time of each traffic data packet in each queue and the target dwell time corresponding one-to-one with the category of the traffic data packets.
[0028] Based on the adjusted weights, the traffic data packets in the queue are sent.
[0029] According to a network traffic management method provided by the present invention, the step of determining the category of the traffic data packets in the data stream to be transmitted includes:
[0030] Based on a preset traffic category determination rule, the category of all traffic data packets in the data stream to be transmitted is determined. The traffic category determination rule includes multiple predefined target fields, each of which corresponds to a category. The step of determining the category of all traffic data packets in the data stream to be transmitted based on the preset traffic category determination rule includes: matching the quintuple of the traffic data packets with all the target fields to determine the category of all traffic data packets in the data stream to be transmitted.
[0031] The present invention also provides a network traffic management system, comprising:
[0032] The data stream receiving module is used to acquire the data stream to be transmitted;
[0033] The packet loss detection module is used to perform packet loss detection on the data stream to be transmitted and obtain packet loss information;
[0034] The packet loss cause determination module is used to determine the cause of packet loss based on the packet loss information;
[0035] The network resource adjustment module is used to adjust the network resources corresponding to various traffic data packets in the data stream to be transmitted based on the packet loss information when the packet loss is caused by network congestion, so as to obtain the network resource adjustment result.
[0036] The processing module is used to queue and send all the traffic data packets based on the network resource adjustment results and the category of the traffic data packets in the data stream to be transmitted.
[0037] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the network traffic management method as described above.
[0038] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the network traffic management method as described above.
[0039] The beneficial effects of this invention are as follows: This invention provides a network traffic management method, system, electronic device, and storage medium. The method involves: acquiring a data stream to be transmitted; performing packet loss detection on the data stream to obtain packet loss information; determining the cause of packet loss based on the packet loss information; adjusting network resources corresponding to various types of traffic data packets in the data stream to be transmitted based on the packet loss information, obtaining network resource adjustment results; and queuing and sending all traffic data packets based on the network resource adjustment results and the categories of the traffic data packets in the data stream to be transmitted. This approach effectively considers packet loss during data transmission and adjusts network resources accordingly based on packet loss information, thereby improving the allocation of network resources and enhancing the rationality of network resource allocation and traffic management. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0041] Figure 1 This is a flowchart illustrating the network traffic management method provided by the present invention;
[0042] Figure 2This is a flowchart illustrating the process of obtaining network resource adjustment results in the network traffic management method provided by the present invention.
[0043] Figure 3 This is a schematic diagram of the network traffic management system provided by the present invention. Figure 1 ;
[0044] Figure 4 This is a schematic diagram of the network traffic management system provided by the present invention. Figure 2 ;
[0045] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0047] The following examples illustrate this approach. Figures 1-5 This invention describes the network traffic management method, system, electronic device, and storage medium provided by the present invention.
[0048] Please refer to Figure 1 The network traffic management method provided in this embodiment includes:
[0049] S110: Obtain the data stream to be transmitted.
[0050] Specifically, the data stream to be transmitted can be a media data stream (such as a video call data stream) or a file data stream. The data stream to be transmitted can be a data stream received from other devices, or it can be a data stream to be transmitted initiated by the user.
[0051] S120: Perform packet loss detection on the data stream to be transmitted to obtain packet loss information.
[0052] It should be noted that this embodiment employs MOD (Mirror on Drop) technology to detect packet loss in the data stream to be transmitted. Packet loss mirroring is a technique that captures dropped data packets and generates corresponding mirror information when packet loss occurs in the network. Packet loss mirroring technology can more quickly and accurately locate anomalies and bottlenecks in the network. By using packet loss mirroring technology, packet loss information can be captured in real time, facilitating subsequent analysis and enabling corresponding adjustments and optimizations to ensure stable traffic transmission. By employing MOD technology, packet loss information can be captured in real time.
[0053] S130: Based on the packet loss information, determine the reason for the packet loss.
[0054] It should be noted that the packet loss information includes: the packet header information, size, timestamp, reason for dropping, and part of the original data of the dropped packet. By determining the reason for packet loss based on this information, it is easier to make corresponding network resource adjustments for packet loss caused by network congestion.
[0055] It's worth mentioning that packet loss can have a variety of causes, such as device malfunction (device malfunction refers to packet loss caused by hardware failures, such as a faulty network card, a physical fault in a switch port, a mismatch between the electrical port of a fiber optic transceiver and the network device interface, or a mismatch in the duplex modes of the interfaces at both ends), routing errors (such as an incorrect default route configuration on the host, causing data packets sent by the host to access other networks to be dropped by the gateway; however, this type of packet loss is normal and expected and will not affect the network), and network congestion. Since device malfunction and routing errors are usually less related to network resources, this embodiment will focus on network congestion as a specific cause of packet loss for further analysis.
[0056] It is also worth mentioning that to determine whether the packet loss is caused by network congestion, it is possible to check for buffer overflows or similar issues. If a buffer overflow or similar issue occurs, then the packet loss can be determined to be caused by network congestion.
[0057] S140: When the packet loss is caused by network congestion, the network resources corresponding to various traffic data packets in the data stream to be transmitted are adjusted based on the packet loss information to obtain the network resource adjustment result.
[0058] It should be noted that if the packet loss is caused by network congestion, then network resources need to be adjusted accordingly. Therefore, by adjusting the network resources corresponding to various types of traffic data packets in the data stream to be transmitted based on the packet loss information when the packet loss is caused by network congestion, and obtaining the network resource adjustment results, it is possible to adjust the resources for different types of traffic data packets in real time based on the packet loss situation, so that the network resources corresponding to different traffic data packets are relatively reasonable.
[0059] S150: Based on the network resource adjustment results and the category of the traffic data packets in the data stream to be transmitted, queue and send all the traffic data packets.
[0060] It should be noted that this embodiment employs CBWFQ (class-based weighted fair queuing) technology to queue and send traffic data packets, thereby improving the rationality of traffic data packet transmission. It's worth mentioning that class-based weighted fair queuing is a technique that classifies network traffic data packets according to different priorities or categories, and then fairly queues and transmits each category of traffic data packets based on set weights. In today's diverse network demands, different categories of traffic data packets typically correspond to different priorities. CBWFQ technology can effectively ensure that higher-priority traffic data packets receive sufficient resources, while also ensuring fair transmission of traffic data packets of other priorities or categories.
[0061] It should also be noted that this embodiment, based on the network resource adjustment results and the category of the traffic data packets in the data stream to be transmitted, utilizes CBWFQ technology to queue and send all traffic data packets, which can improve the rationality of traffic management while realizing real-time adjustment of network resources.
[0062] In some embodiments, please refer to Figure 2 When the packet loss is caused by network congestion, the steps for adjusting the network resources corresponding to various traffic data packets in the data stream to be transmitted, based on the packet loss information, to obtain the network resource adjustment results include:
[0063] S1401: When the packet loss is caused by network congestion, the corresponding category of the dropped data packet is determined based on the packet loss information and the preset traffic category determination rules, and each category corresponds to a corresponding priority.
[0064] It should be noted that the traffic category determination rule includes multiple predefined target fields and the corresponding categories. The target fields can be defined for the five-tuple of a traffic data packet. If the five-tuple of a traffic data packet contains a target field, then the category corresponding to that target field can be determined as the category of the current traffic data packet. It should be mentioned that the five-tuple includes: source IP (Internet Protocol) address, source port, destination IP address, destination port, and transport layer protocol.
[0065] It should be mentioned that in some embodiments, the categories can be directly defined as corresponding priorities, such as priority one, priority two, priority three, etc. Alternatively, a correspondence between different categories and priorities can be established based on the defined categories, such as category one, category two, category three, etc., where category one corresponds to priority one, category two corresponds to priority two, and category three corresponds to priority three, etc., which will not be elaborated further here.
[0066] S1402: Based on the categories of all the dropped packets, determine the network resources to be configured to be reserved.
[0067] It should be noted that, based on the category of all the dropped data packets, that is, based on the priority of all dropped data packets, the reserved network resources to be configured are determined. These reserved network resources are used to send dropped data packets when they are received, thereby ensuring the timely transmission and processing of dropped data packets.
[0068] S1403: Based on the preset complete network resources and the reserved network resources to be configured, obtain the allocatable network resources.
[0069] Specifically, all descriptions of network resources in this embodiment refer to network bandwidth. Complete network resources refer to the full network bandwidth, and reserved network resources refer to the network bandwidth corresponding to the discarded data packets. The difference between the complete network resources and the reserved network resources is the allocable network resource.
[0070] S1404: Based on the allocatable network resources and the categories of traffic data packets in the data stream to be transmitted, resource allocation is performed on each category of traffic data packets to obtain the resource allocation result corresponding to each category of traffic data packets.
[0071] Specifically, based on the allocable network resources and the priority of traffic data packets in the data stream to be transmitted, resources are allocated to each type of traffic data packet to obtain the resource allocation result corresponding to each type of traffic data packet. The resource allocation result obtained through the above steps for each type of traffic data packet is highly reasonable, ensuring that higher-priority traffic data packets obtain sufficient network resources while also ensuring fairness in the resource allocation for other types of traffic data packets.
[0072] S1405: The network resource to be configured and reserved, and all the resource allocation results are determined as the network resource adjustment result.
[0073] In some embodiments, the step of determining the network resources to be reserved based on the categories of all the dropped packets includes:
[0074] S14021: Based on the categories of all the dropped data packets, determine the resources to be retained for each category of dropped data packets.
[0075] It should be noted that the resources to be retained for each type of dropped data packet are obtained based on the categories of all dropped data packets and the pre-set correspondence between categories and resources to be retained.
[0076] S14022: The sum of all the resources to be retained is determined as the network resource to be configured for retention. Specifically, the network resource to be retained is obtained by adding up all categories of resources to be retained.
[0077] In some embodiments, the step of allocating resources for each type of traffic data packet based on the allocable network resources and the category of traffic data packets in the data stream to be transmitted, and obtaining the resource allocation result corresponding to each category of traffic data packets, includes:
[0078] S14041: Based on the category of traffic data packets in the data stream to be transmitted, determine the resource proportion corresponding to each category of traffic data packets.
[0079] It should be noted that, based on the category of the traffic data packets in the data stream to be transmitted, and the correspondence between the category and the resource proportion, the resource proportion corresponding to each category of the traffic data packets is obtained.
[0080] S14042: Based on the allocable network resources and the resource ratio corresponding to each type of traffic data packet, obtain the resource allocation result corresponding to each type of traffic data packet.
[0081] Specifically, the allocable network resources are multiplied by the resource proportion corresponding to each type of traffic data packet to obtain the resource allocation result corresponding to each type of traffic data packet.
[0082] In some embodiments, network resources can be predefined for higher-priority traffic packets (higher-priority categories). The remaining network resources are obtained by calculating the difference between the allocable network resources and the predefined higher-priority network resources. Based on the remaining network resources, resources are allocated to other categories (lower-priority) traffic packets. Furthermore, the resource allocation for other categories (lower-priority) traffic packets can be done by equal distribution or by resource percentage allocation.
[0083] In some embodiments, the step of queuing and sending all traffic data packets based on the network resource adjustment results and the category of the traffic data packets in the data stream to be transmitted includes:
[0084] S1501: Based on the category of the traffic data packets in the data stream to be transmitted, each category of traffic data packets is placed into a corresponding queue for queuing, and the queue corresponds one-to-one with the category of the traffic data packets.
[0085] S1502: Based on the resource allocation results corresponding to each category of traffic data packets in the network resource adjustment results, send the traffic data packets in the corresponding queue.
[0086] It should be noted that by sending traffic data packets in the corresponding queues based on the resource allocation results corresponding to each type of traffic data packet, the rationality of traffic data packet transmission can be guaranteed. For example, if the resource allocation result (allocated bandwidth) of queue one (which includes multiple traffic data packets of category one) is 100M (megabits), and the resource allocation result of queue two (which includes multiple traffic data packets of category two) is 50M, then 100M bandwidth will be used to send the traffic data packets in queue one, and 50M bandwidth will be used to send the traffic data packets in queue two.
[0087] In some embodiments, the step of sending the traffic data packets in the corresponding queue based on the resource allocation result corresponding to each category of traffic data packets in the network resource adjustment result includes:
[0088] S15021: During the transmission of the traffic data packets in any queue, the weight of the traffic data packets is adjusted based on the actual dwell time of each traffic data packet in each queue and the target dwell time corresponding one-to-one with the category of the traffic data packets.
[0089] It should be noted that each data packet in the queue has a corresponding weight. When sending data packets, the transmission order is based on the weight of each data packet. Generally, data packets with higher weights are sent earlier. This embodiment dynamically adjusts the weight of data packets based on the difference between the actual and target retention times, further improving the rationality of data packet transmission. Specifically, when the difference between the actual and target retention times of a data packet is greater than or equal to a preset retention time threshold, the weight of the corresponding data packet is increased, thereby achieving dynamic adjustment of the data packet weights.
[0090] S15022: Based on the adjusted weights, send the traffic data packets in the queue.
[0091] In some embodiments, the step of determining the category of the traffic data packets in the data stream to be transmitted includes:
[0092] Based on a preset traffic category determination rule, the category of all traffic data packets in the data stream to be transmitted is determined. The traffic category determination rule includes multiple predefined target fields, each of which corresponds to a category. The step of determining the category of all traffic data packets in the data stream to be transmitted based on the preset traffic category determination rule includes: matching the quintuple of the traffic data packets with all the target fields to determine the category of all traffic data packets in the data stream to be transmitted.
[0093] It should be noted that in related technologies, the determination of traffic data packet categories typically relies on service type. However, this embodiment, by defining target fields, can effectively improve the comprehensiveness and flexibility of traffic data packet category determination. By using predefined target fields, such as protocol number and port number, the classification of traffic data packets becomes more accurate and detailed.
[0094] In some embodiments, in addition to adjusting network resources based on packet loss information, the method further includes: predicting network problems based on the packet loss information to obtain a network problem prediction result; obtaining a network problem solution corresponding to the network problem prediction result based on the network problem prediction result and preset network problem resolution rules; and executing the network problem solution. This approach effectively achieves automatic handling and optimization of network problems, with a high degree of automation. Network problem solutions include migrating virtual service instances to healthy physical resources.
[0095] In some embodiments, the network traffic management method described above can be combined with MultiPath Transmission Control Protocol (MPTCP) technology to enable more intelligent allocation of network resources and traffic along different paths in a multipath environment, thereby improving the overall network stability and transmission efficiency. It is worth mentioning that MPTCP allows a single transport layer connection to use multiple paths to transmit data, thereby increasing bandwidth and improving reliability.
[0096] In some embodiments, adaptive traffic control technology can be introduced based on the network traffic management method in the above embodiments, so as to automatically adjust the traffic control parameters according to the real-time network status and ensure optimal traffic transmission.
[0097] In some embodiments, the network traffic management method described above can be combined with blockchain technology, that is, the data related to the network traffic management method can be set on the blockchain, and the authenticity and security of the data can be improved by leveraging the immutability of the blockchain.
[0098] In some embodiments, the network traffic management method described above can also be applied to the Internet of Things (IoT) field to ensure efficient and stable transmission of large amounts of device data. In an IoT environment with numerous network devices, using the network traffic management method described above enables adaptive data transmission, reducing the workload of relevant personnel.
[0099] In some embodiments, the network traffic management method described above can be integrated with edge computing technology. Specifically, in an edge computing environment, data processing and analysis are closer to the data source. By utilizing network traffic management methods, traffic optimization can be performed simultaneously with data processing and analysis on edge devices, further improving the local processing efficiency of data.
[0100] It should be noted that the network traffic management method in the above embodiments involves: acquiring the data stream to be transmitted; performing packet loss detection on the data stream to obtain packet loss information; determining the cause of packet loss based on the packet loss information; if the cause of packet loss is network congestion, adjusting the network resources corresponding to various types of traffic data packets in the data stream to be transmitted based on the packet loss information to obtain network resource adjustment results; and queuing and sending all traffic data packets based on the network resource adjustment results and the categories of the traffic data packets in the data stream to be transmitted. This method effectively achieves network resource allocation, improves the rationality of network resource allocation and traffic management, and has high feasibility. Furthermore, by organically combining MOD technology and dynamic resource allocation, it can effectively reduce packet loss and network congestion in the network, thereby providing a more stable and efficient network environment and ensuring network stability.
[0101] The network traffic management system provided by the present invention is described below. The network traffic management system described below can be referred to in correspondence with the network traffic management method described above.
[0102] Please refer to Figure 3 The network traffic management system provided in this embodiment includes:
[0103] The data stream receiving module 310 is used to acquire the data stream to be transmitted.
[0104] Packet loss detection module 320 is used to perform packet loss detection on the data stream to be transmitted and obtain packet loss information;
[0105] The packet loss cause determination module 330 is used to determine the packet loss cause based on the packet loss information;
[0106] The network resource adjustment module 340 is used to adjust the network resources corresponding to various traffic data packets in the data stream to be transmitted based on the packet loss information when the packet loss is caused by network congestion, so as to obtain the network resource adjustment result.
[0107] The processing module 350 is used to queue and send all the traffic data packets based on the network resource adjustment results and the category of the traffic data packets in the data stream to be transmitted. The data stream receiving module 310, the packet loss detection module 320, the packet loss cause determination module 330, the network resource adjustment module 340, and the processing module 350 are connected. The network traffic management system in this embodiment takes into account the packet loss problem during data transmission and makes corresponding network resource adjustments based on the packet loss information, thereby achieving better allocation of network resources, improving the rationality of network resource allocation and traffic management, and reducing costs.
[0108] In some embodiments, the network resource adjustment module 340 is specifically used to determine the category of the dropped data packet based on the packet loss information and a preset traffic category determination rule when the packet loss is caused by network congestion, and each category corresponds to a corresponding priority.
[0109] Based on the categories of all the dropped packets, determine the network resources to be reserved.
[0110] Based on the preset complete network resources and the reserved network resources to be configured, the allocatable network resources are obtained;
[0111] Based on the allocable network resources and the categories of traffic data packets in the data stream to be transmitted, resource allocation is performed on each category of traffic data packets to obtain the resource allocation result corresponding to each category of traffic data packets;
[0112] The network resources to be configured and reserved, along with all the resource allocation results, are determined as the network resource adjustment results.
[0113] In some embodiments, the network resource adjustment module 340 is further configured to determine the resources to be retained for each category of the dropped data packets based on the categories of all the dropped data packets;
[0114] The sum of all the resources to be retained is determined as the network resource to be configured and retained.
[0115] In some embodiments, the network resource adjustment module 340 is further configured to determine the resource proportion corresponding to each type of traffic data packet based on the type of traffic data packets in the data stream to be transmitted;
[0116] Based on the allocable network resources and the resource proportion corresponding to each type of traffic data packet, the resource allocation result corresponding to each type of traffic data packet is obtained.
[0117] In some embodiments, the processing module 350 is specifically used to place each type of traffic data packet into a corresponding queue for queuing based on the type of traffic data packet in the data stream to be transmitted, wherein the queue corresponds one-to-one with the type of traffic data packet;
[0118] Based on the resource allocation results corresponding to each category of traffic data packets in the network resource adjustment results, the traffic data packets in the corresponding queues are sent.
[0119] In some embodiments, the processing module 350 is further configured to adjust the weight of the traffic data packets based on the actual dwell time of each traffic data packet in each queue and the target dwell time corresponding one-to-one with the category of the traffic data packets during the transmission of the traffic data packets in any queue.
[0120] Based on the adjusted weights, the traffic data packets in the queue are sent.
[0121] Please refer to Figure 4 In some embodiments, the system further includes: a traffic classification module 410, used to determine the category of all traffic data packets in the data stream to be transmitted based on a preset traffic category determination rule, wherein the traffic category determination rule includes multiple predefined target fields, each target field corresponding to a category; wherein the step of determining the category of all traffic data packets in the data stream to be transmitted based on the preset traffic category determination rule includes: matching the quintuple of the traffic data packets with all the target fields to determine the category of all traffic data packets in the data stream to be transmitted.
[0122] In some embodiments, the processing module 350 includes: a strategy module 3501, configured to queue all the traffic data packets based on the network resource adjustment results and the category of the traffic data packets in the data stream to be transmitted;
[0123] The network traffic output module 3502 is used to send traffic data packets based on the weight of each traffic data packet in the queue. Specifically, during the sending of traffic data packets in any queue, the weight of each traffic data packet is adjusted based on the actual dwell time of each traffic data packet in each queue and the target dwell time corresponding one-to-one with the category of the traffic data packet; based on the adjusted weight, the traffic data packets in the queue are sent.
[0124] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5 As shown, the electronic device may include a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, communications interface 520, and memory 530 communicate with each other via the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute a network traffic management method, which includes: acquiring a data stream to be transmitted; performing packet loss detection on the data stream to be transmitted to obtain packet loss information; determining the cause of packet loss based on the packet loss information; if the cause of packet loss is network congestion, adjusting the network resources corresponding to various types of traffic data packets in the data stream to be transmitted based on the packet loss information to obtain a network resource adjustment result; and queuing and sending all traffic data packets based on the network resource adjustment result and the type of traffic data packets in the data stream to be transmitted.
[0125] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0126] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the network traffic management method provided by the above methods. The method includes: acquiring a data stream to be transmitted; performing packet loss detection on the data stream to be transmitted to obtain packet loss information; determining the cause of packet loss based on the packet loss information; if the cause of packet loss is network congestion, adjusting the network resources corresponding to various types of traffic data packets in the data stream to be transmitted based on the packet loss information to obtain a network resource adjustment result; and queuing and sending all the traffic data packets based on the network resource adjustment result and the type of the traffic data packets in the data stream to be transmitted.
[0127] The apparatus or system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0128] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A network traffic management method, characterized in that, include: Obtain the data stream to be transmitted; Packet loss detection is performed on the data stream to be transmitted to obtain packet loss information; Based on the packet loss information, determine whether a buffer overflow has occurred. If a buffer overflow has occurred, determine that the packet loss is caused by network congestion. When the packet loss is caused by network congestion, the network resources corresponding to various traffic data packets in the data stream to be transmitted are adjusted based on the packet loss information to obtain the network resource adjustment result; the network resource is network bandwidth. Based on the network resource adjustment results and the category of the traffic data packets in the data stream to be transmitted, all the traffic data packets are queued and sent. When the packet loss is caused by network congestion, the steps for adjusting the network resources corresponding to various traffic data packets in the data stream to be transmitted, based on the packet loss information, to obtain the network resource adjustment results include: When the packet loss is caused by network congestion, the corresponding category of the dropped data packet is determined based on the packet loss information and the preset traffic category determination rules, and each category corresponds to a certain priority. Based on the categories of all the dropped packets, determine the network resources to be reserved. Based on the preset complete network resources and the reserved network resources to be configured, the allocatable network resources are obtained; Based on the allocable network resources and the categories of traffic data packets in the data stream to be transmitted, resource allocation is performed on each category of traffic data packets to obtain the resource allocation result corresponding to each category of traffic data packets; The network resources to be configured and reserved, along with all the resource allocation results, are determined as the network resource adjustment result. Based on the categories of all the dropped packets, the steps for determining the network resources to be reserved include: Based on the categories of all the dropped data packets, determine the resources to be retained for each category of dropped data packets; The sum of all the resources to be retained is determined as the network resource to be configured and retained.
2. The network traffic management method according to claim 1, characterized in that, The steps of allocating resources for each type of traffic data packet based on the allocable network resources and the categories of traffic data packets in the data stream to be transmitted, and obtaining the resource allocation results corresponding to each category of traffic data packets, include: Based on the category of traffic data packets in the data stream to be transmitted, determine the resource proportion corresponding to each category of traffic data packets; Based on the allocable network resources and the resource proportion corresponding to each type of traffic data packet, the resource allocation result corresponding to each type of traffic data packet is obtained.
3. The network traffic management method according to claim 1, characterized in that, Based on the network resource adjustment results and the categories of the traffic data packets in the data stream to be transmitted, the steps of queuing and sending all the traffic data packets include: Based on the category of the traffic data packets in the data stream to be transmitted, each category of traffic data packets is placed into a corresponding queue for queuing, and the queue corresponds one-to-one with the category of the traffic data packets; Based on the resource allocation results corresponding to each category of traffic data packets in the network resource adjustment results, the traffic data packets in the corresponding queues are sent.
4. The network traffic management method according to claim 3, characterized in that, The step of sending the traffic data packets in the corresponding queue based on the resource allocation result corresponding to each category of traffic data packets in the network resource adjustment result includes: During the transmission of the traffic data packets in any queue, the weight of the traffic data packets is adjusted based on the actual dwell time of each traffic data packet in each queue and the target dwell time corresponding to the category of the traffic data packets. This includes increasing the weight of the traffic data packets when the difference between the actual dwell time and the target dwell time of the traffic data packets is greater than or equal to a preset dwell time threshold. Based on the adjusted weights, the traffic data packets in the queue are sent.
5. The network traffic management method according to claim 1, characterized in that, The steps for determining the category of the traffic data packets in the data stream to be transmitted include: Based on a preset traffic category determination rule, the category of all traffic data packets in the data stream to be transmitted is determined. The traffic category determination rule includes multiple predefined target fields and a category corresponding to each target field. The step of determining the category of all traffic data packets in the data stream to be transmitted based on the preset traffic category determination rule includes: matching the quintuple of the traffic data packets with all the target fields to determine the category of all traffic data packets in the data stream to be transmitted.
6. A network traffic management system, characterized in that, include: The data stream receiving module is used to acquire the data stream to be transmitted; The packet loss detection module is used to perform packet loss detection on the data stream to be transmitted and obtain packet loss information; The packet loss cause determination module is used to determine whether a buffer overflow has occurred based on the packet loss information. If a buffer overflow has occurred, the packet loss cause is determined to be network congestion. The network resource adjustment module is used to adjust the network resources corresponding to various traffic data packets in the data stream to be transmitted based on the packet loss information when the packet loss is caused by network congestion, so as to obtain the network resource adjustment result; the network resource is network bandwidth. The network resource adjustment module is further configured to: when the packet loss is caused by network congestion, determine the corresponding category of the dropped data packet based on the packet loss information and a preset traffic category determination rule, wherein each category corresponds to a specific priority; Based on the categories of all the dropped packets, determine the network resources to be reserved. Based on the preset complete network resources and the reserved network resources to be configured, the allocatable network resources are obtained; Based on the allocable network resources and the categories of traffic data packets in the data stream to be transmitted, resource allocation is performed on each category of traffic data packets to obtain the resource allocation result corresponding to each category of traffic data packets; The network resources to be configured and reserved, along with all the resource allocation results, are determined as the network resource adjustment result. The network resource adjustment module is further configured to: determine the resources to be retained for each category of the dropped data packets based on the categories of all the dropped data packets; and determine the sum of all the resources to be retained as the network resources to be configured and retained. The processing module is used to queue and send all the traffic data packets based on the network resource adjustment results and the category of the traffic data packets in the data stream to be transmitted.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the network traffic management method as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the network traffic management method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method and apparatus for reporting network packet-losing message
CN102204164A
Systems and methods for prioritization of data for intelligent discard in a communication network
CN103283249A