Bandwidth allocation method and device, computer equipment, storage medium and program product

By preallocating bandwidth for cross-computer room traffic according to priority and generating shared bandwidth, network congestion caused by cross-computer room traffic preemption is solved, and high reliability and effectiveness of data transmission of service systems are achieved.

CN119835167AInactive Publication Date: 2025-04-15CHINA TELECOM CLOUD TECH CO LTD

Patent Information

Application Number
CN202411718944.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-04-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In cross-computer room deployment, different types of cross-computer room traffic preemption bandwidth results in the sum of transmitted service system traffic greater than the entire bandwidth under high load conditions, resulting in network congestion and packet loss, reducing the reliability of service system data transmission.

Method used

By preallocating bandwidth for traffic of different priority levels according to the priority of traffic, and for any priority traffic, the first shared bandwidth is divided from the bandwidth preallocated for traffic of the priority, and the second shared bandwidth is divided from the bandwidth preallocated for traffic of the priority lower than the priority, and the shared bandwidth is generated for traffic transmission with traffic of the priority lower than the priority, so as to dynamically use the shared bandwidth for traffic demand of high priority traffic when the bandwidth of high priority traffic changes.

Benefits of technology

It ensures the real-time and reliability of key services, significantly reduces network congestion and packet loss, and improves the reliability and effectiveness of data transmission in the service system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119835167A_ABST
    Figure CN119835167A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer networks, and discloses a bandwidth allocation method and device, computer equipment, a storage medium and a program product, and the method comprises the steps: determining the priority of a to-be-transmitted data packet based on the type of the to-be-transmitted data packet; based on the priority of the to-be-transmitted data packet, determining the priority of the flow formed by the to-be-transmitted data packet; pre-allocating bandwidths for the flows with different priorities; for the flow of any priority, dividing a first shared bandwidth from the bandwidths pre-allocated for the flow of the priority, dividing a second shared bandwidth from the bandwidths pre-allocated for the flow of the priority lower than the priority, and generating a shared bandwidth based on the first shared bandwidth and the second shared bandwidth; and if the bandwidth occupied by the flow of the priority reaches a first bandwidth threshold value, allocating the shared bandwidth to the flow of the priority, and performing flow transmission by utilizing the bandwidth pre-allocated for the flow of the priority and the shared bandwidth. According to the invention, the data transmission reliability of the service system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer networks, and in particular to a bandwidth allocation method, device, computer equipment, storage medium and program product. Background Art

[0002] In the era of cloud computing, cross-computer room deployment is becoming more and more common in order to ensure high availability and disaster recovery capabilities of business systems. This deployment needs to solve two core problems: cross-computer room scheduling of business system service traffic and cross-computer room consistency synchronization of data.

[0003] In order to solve the above problems, traffic across computer rooms has become very common, including traffic on the control plane and data plane. The size of the network bandwidth has become a key factor in determining the effectiveness of traffic across computer rooms.

[0004] In the related art, different types of cross-computer room traffic grab bandwidth to achieve traffic transmission, which is likely to cause the total traffic of the transmitted business system to be greater than the entire bandwidth under high load conditions, resulting in network congestion and packet loss, and reducing the reliability of data transmission in the business system. Summary of the invention

[0005] In view of this, the present invention provides a bandwidth allocation method to solve the problem in the related art that different types of cross-computer room traffic grab bandwidth to achieve traffic transmission, resulting in the total traffic of the transmitted business system being greater than the entire bandwidth under high load conditions, causing network congestion and packet loss, and reducing the reliability of data transmission in the business system.

[0006] In a first aspect, the present invention provides a bandwidth allocation method, the method comprising:

[0007] Determining the priority of the data packets to be transmitted based on the types of the data packets to be transmitted, wherein data packets to be transmitted of the same type have the same priority;

[0008] Based on the priorities of the data packets to be transmitted, determining the priority of the traffic composed of the data packets to be transmitted, wherein a plurality of data packets to be transmitted of the same type constitute one traffic;

[0009] Pre-allocate bandwidth for traffic of different priorities;

[0010] For traffic of any priority, a first shared bandwidth is divided from the bandwidth pre-allocated for the traffic of the priority, and a second shared bandwidth is divided from the bandwidth pre-allocated for traffic of a priority lower than the priority, and a shared bandwidth for the traffic of the priority and the traffic of the priority lower than the priority is generated based on the first shared bandwidth and the second shared bandwidth;

[0011] When the bandwidth occupied by the traffic of this priority reaches the first bandwidth threshold of this priority, the shared bandwidth is allocated to the traffic of this priority, and the traffic is transmitted using the bandwidth pre-allocated for the traffic of this priority and the shared bandwidth.

[0012] The bandwidth allocation method provided in this embodiment pre-allocates bandwidth for traffic of different priorities according to the priority of the traffic, and for traffic of any priority, divides a first shared bandwidth from the bandwidth pre-allocated for the traffic of the priority, and divides a second shared bandwidth from the bandwidth pre-allocated for traffic of a priority lower than the priority, and generates a shared bandwidth for the traffic of the priority and the traffic of the priority lower than the priority based on the first shared bandwidth and the second shared bandwidth, so that when the bandwidth required by the traffic of the priority changes, the shared bandwidth is dynamically used for traffic transmission, thereby ensuring the real-time and reliability of key services, significantly reducing network congestion and packet loss, and improving the reliability and effectiveness of data transmission of the business system.

[0013] In an optional embodiment, the method further includes:

[0014] For traffic of any priority, a first bandwidth threshold of the priority is determined based on the bandwidth pre-allocated for the traffic of the priority and the first shared bandwidth divided from the bandwidth pre-allocated for the traffic of the priority.

[0015] The bandwidth allocation method provided in this embodiment determines the first bandwidth threshold of the priority level by pre-allocating the bandwidth for the traffic of the priority level and the first shared bandwidth divided from the pre-allocated bandwidth for the traffic of the priority level, and then dynamically uses the shared bandwidth for traffic transmission according to the first bandwidth threshold, thereby ensuring the transmission of high-priority traffic, reducing the occurrence of network congestion, and improving the reliability of data transmission of the business system.

[0016] In an optional implementation manner, when the bandwidth occupied by the traffic of the priority level reaches the first bandwidth threshold of the priority level, allocating the shared bandwidth to the traffic of the priority level includes:

[0017] When the bandwidth occupied by the traffic of the priority level reaches the first bandwidth threshold of the priority level, the shared bandwidth is allocated to the traffic of the priority level in order from low to high priority based on the priority level of the shared bandwidth;

[0018] The higher the priority of the traffic corresponding to the bandwidth used to generate the shared bandwidth, the higher the priority of the shared bandwidth.

[0019] The bandwidth allocation method provided in this embodiment can allocate the bandwidth according to the priority of the shared bandwidth from low to high when the bandwidth required by the traffic of a certain priority exceeds the first bandwidth threshold, thereby ensuring that the shared bandwidth of the lower priority is occupied first and the transmission of the traffic of the higher priority is ensured, thereby improving the data transmission performance.

[0020] In an optional embodiment, the method further includes:

[0021] In the case where the total bandwidth value of the shared bandwidth allocated to the traffic of this priority exceeds the bandwidth pre-allocated to the traffic of this priority, the shared bandwidth is refused to be further allocated to the traffic of this priority.

[0022] The bandwidth allocation method provided in this embodiment refuses to continue allocating shared bandwidth to traffic of this priority when the total bandwidth value of the shared bandwidth allocated to the traffic of this priority exceeds the bandwidth pre-allocated to the traffic of this priority, thereby preventing traffic of a certain priority from excessively occupying bandwidth resources and ensuring that traffic of other priorities also has sufficient bandwidth available.

[0023] In an optional embodiment, the method further includes:

[0024] When the bandwidth occupied by the traffic of the priority level is lower than the second bandwidth threshold of the priority level, determining whether the traffic of the priority level is allocated with the shared bandwidth;

[0025] If the shared bandwidth is allocated to the traffic of the priority level, the shared bandwidth is released in descending order of priority based on the priority of the allocated shared bandwidth.

[0026] The bandwidth allocation method provided in this embodiment releases the shared bandwidth allocated to the traffic of this priority when the bandwidth occupied by the traffic of this priority is lower than the second bandwidth threshold, so that the shared bandwidth can be reallocated to other required traffic, thereby improving the overall utilization rate of bandwidth resources.

[0027] In an optional embodiment, the method further includes:

[0028] In the case that the traffic of the priority level occupies all the shared bandwidth but still cannot be fully transmitted, determining whether there is any remaining bandwidth pre-allocated for the traffic of a priority level lower than the priority level;

[0029] If there is remaining bandwidth in the bandwidth pre-allocated for traffic of a priority lower than the priority, a third shared bandwidth is divided from the remaining bandwidth, the third shared bandwidth is allocated to the traffic of this priority, and the traffic is transmitted using the bandwidth pre-allocated for the traffic of this priority, the shared bandwidth and the third shared bandwidth.

[0030] The bandwidth allocation method provided in this embodiment allocates a third shared bandwidth from the remaining bandwidth pre-allocated for lower priority traffic for use by high priority traffic when traffic with a certain priority level requires more bandwidth and the existing bandwidth allocated to the traffic with this priority level is insufficient. This ensures the transmission of high priority traffic without affecting the transmission requirements of low priority traffic, thereby improving the stability and reliability of data transmission in the business system.

[0031] In a second aspect, the present invention provides a bandwidth allocation device, the device comprising:

[0032] A first determining module, configured to determine the priority of the data packets to be transmitted based on the types of the data packets to be transmitted, wherein data packets to be transmitted of the same type have the same priority;

[0033] A second determination module is used to determine the priority of the flow composed of the data packets to be transmitted based on the priority of the data packets to be transmitted, wherein a plurality of data packets to be transmitted of the same type constitute one flow;

[0034] A first allocation module, used for pre-allocating bandwidth for traffic of different priorities;

[0035] A generating module, configured to divide, for traffic of any priority, a first shared bandwidth from a bandwidth pre-allocated for traffic of the priority, divide a second shared bandwidth from a bandwidth pre-allocated for traffic of a priority lower than the priority, and generate a shared bandwidth for traffic of the priority and traffic of a priority lower than the priority based on the first shared bandwidth and the second shared bandwidth;

[0036] The second allocation module is used to allocate the shared bandwidth to the traffic of this priority when the bandwidth occupied by the traffic of this priority reaches the first bandwidth threshold of this priority, and use the bandwidth pre-allocated for the traffic of this priority and the shared bandwidth to transmit the traffic.

[0037] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the bandwidth allocation method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0038] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the bandwidth allocation method of the first aspect or any corresponding embodiment thereof.

[0039] In a fifth aspect, the present invention provides a computer program product, including computer instructions, where the computer instructions are used to enable a computer to execute the bandwidth allocation method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 is a schematic diagram of a flow chart of a bandwidth allocation method according to an embodiment of the present invention;

[0042] Figure 2 is a schematic diagram of generating a shared bandwidth according to an embodiment of the present invention;

[0043] Figure 3 is a flow chart of another bandwidth allocation method according to an embodiment of the present invention;

[0044] Figure 4 It is a schematic diagram of adjusting bandwidth when traffic of any priority level occupies all the shared bandwidth but cannot be fully transmitted according to an embodiment of the present invention;

[0045] Figure 5 is a flow chart of another bandwidth allocation method according to an embodiment of the present invention;

[0046] Figure 6 is a structural block diagram of a bandwidth allocation device according to an embodiment of the present invention;

[0047] Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0049] In the era of cloud computing, distributed deployment scenarios have gradually replaced previous centralized deployment scenarios. In order to ensure high availability, business systems generally choose cross-computer room deployment to provide cross-computer room disaster recovery capabilities and ensure the service availability of business systems in extreme scenarios.

[0050] When deployed across computer rooms, business systems face two core issues: one is the cross-computer room scheduling of the business system’s service traffic, and the other is the consistent synchronization of the business system’s data across computer rooms.

[0051] In order to solve the above problems, east-west traffic across computer rooms has become very common, including control plane traffic and data plane traffic. Therefore, the size of the network bandwidth across computer rooms becomes very important. The size of the network bandwidth determines the effectiveness of traffic across computer rooms. However, since the bandwidth cost across computer rooms is generally expensive, it will directly lead to the construction cost of the business system. Generally speaking, the bandwidth across computer rooms will not be too large.

[0052] Among them, network bandwidth refers to the amount of data that can be transmitted per unit time (generally 1 second). The larger the bandwidth, the stronger the traffic capacity per unit time. As an important indicator to measure network characteristics, network bandwidth is valued in many scenarios involving network communication.

[0053] In the related technology, different types of cross-computer room traffic grab bandwidth to achieve traffic transmission, which is likely to cause the total traffic of the transmitted business system to be greater than the entire bandwidth under high load conditions, such as when the transmission traffic of the business system is at its peak, resulting in network congestion and packet loss, which will affect the reliability, availability and timeliness of the business system data transmission.

[0054] The embodiment of the present invention provides a bandwidth allocation method, which pre-allocates bandwidth for traffic of different priorities according to the priority of the traffic, divides a first shared bandwidth from the bandwidth pre-allocated for the traffic of any priority, divides a second shared bandwidth from the bandwidth pre-allocated for the traffic of a priority lower than the priority, and generates a shared bandwidth for the traffic of the priority and the traffic of the priority lower than the priority based on the first shared bandwidth and the second shared bandwidth, so that when the bandwidth required by the traffic of the priority changes, the shared bandwidth is dynamically used for traffic transmission to ensure the real-time and reliability of key services, significantly reduce network congestion and packet loss, and improve the reliability of data transmission of the business system.

[0055] It should be noted that the bandwidth allocation method provided in the embodiment of the present invention substantially realizes the control of traffic. Traffic control is a method of controlling network traffic by software or hardware. By introducing the concept of Quality of Service (QoS), different types of network data packets are marked to determine the priority of data packet passage, thereby ensuring that high-priority traffic can pass normally and low-priority traffic will be blocked, thereby ensuring that the entire bandwidth will not be overwhelmed by instantaneous traffic peaks, thereby ensuring the high availability of classified applications.

[0056] According to an embodiment of the present invention, an embodiment of a bandwidth allocation method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0057] In this embodiment, a bandwidth allocation method is provided, which can be used for distributed business systems. It should be noted that the application scenario of the bandwidth allocation method can be a distributed cross-resource pool, a cross-computer room shared bandwidth scenario, a cross-computer room data backup scenario, a cross-computer room disaster recovery scenario, and a scenario of how to ensure the traffic bandwidth of important core systems when sharing a fixed bandwidth in a general scenario. Figure 1 is a flow chart of a bandwidth allocation method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0058] Step S101: determining the priority of the data packets to be transmitted based on the types of the data packets to be transmitted, wherein data packets to be transmitted of the same type have the same priority.

[0059] Among them, when the business system transmits data packets, the data packets are classified according to the characteristics of the data packets to determine the type of the data packets. The characteristics of the data packets can be the source IP address, destination IP address, protocol type, port number, application layer protocol, etc.

[0060] According to the predefined type and priority matching rule, the priority of the data packet to be transmitted is determined according to the type of the data packet to be transmitted.

[0061] The predefined type and priority matching rules can be set by technical personnel according to the priorities of different business systems, and can also be set according to the importance of different business systems.

[0062] It should be noted that, by parsing the data packet to be transmitted, the header information of the data packet to be transmitted is obtained, and the characteristics of the data packet are obtained from the header information.

[0063] Step S102, based on the priorities of the data packets to be transmitted, determining the priority of the traffic composed of the data packets to be transmitted, wherein a plurality of data packets to be transmitted of the same type constitute one traffic.

[0064] Among them, after determining the priority of the data packets to be transmitted, if the data packets to be transmitted of the same type have the same priority, multiple data packets to be transmitted of the same type are aggregated together to form a flow, and the priority of the flow is the same as the priority of any data packet to be transmitted that constitutes the flow.

[0065] It should be noted that traffic can be marked according to its priority, or different traffic can be colored to facilitate identification of traffic of different priorities.

[0066] Step S103: pre-allocate bandwidth for traffic of different priorities.

[0067] Among them, this embodiment pre-allocates bandwidth for traffic of different priorities according to the rules preset by the technicians, so that the traffic of different priorities uses the pre-allocated bandwidth for traffic transmission.

[0068] Exemplarily, when traffic includes four priorities, the preset rule may be:

[0069] 15% of the bandwidth is allocated to the first priority traffic, where the first priority is the highest priority traffic, and the transmission of this level of traffic needs to be guaranteed first. This level of traffic has the highest level of preemption capability.

[0070] 25% of the bandwidth is allocated to the second priority traffic, where the second priority is the secondary priority traffic, which has a secondary level of preemption capability while ensuring the transmission of the first priority traffic.

[0071] 40% of the bandwidth is allocated to the third priority traffic, wherein the third priority is the second priority traffic, which has the second level of preemption capability while ensuring the transmission of the first priority and second priority traffic.

[0072] 20% of the bandwidth is allocated to the fourth priority traffic, where the fourth priority is the lowest priority traffic and needs to be able to provide bandwidth preemption guarantee for other priorities at any time.

[0073] It can be understood that the above examples are merely illustrative descriptions, and the bandwidth allocated to traffic of different priorities can be determined based on actual conditions.

[0074] Step S104: For traffic of any priority, a first shared bandwidth is divided from the bandwidth pre-allocated for the traffic of that priority, and a second shared bandwidth is divided from the bandwidth pre-allocated for traffic of a priority lower than the priority, and based on the first shared bandwidth and the second shared bandwidth, a shared bandwidth for the traffic of that priority and the traffic of a priority lower than the priority is generated.

[0075] Exemplarily, the description continues with traffic including four priorities. Figure 2 is a schematic diagram of generating a shared bandwidth according to an embodiment of the present invention, such as Figure 2 As shown, for the traffic of the first priority, the first shared bandwidth is divided from the bandwidth pre-allocated for the traffic of the priority. The second shared bandwidth is divided from the bandwidth pre-allocated for the traffic of a priority lower than the priority. Since the priorities lower than the first priority include three priorities, three shared bandwidths can be generated, one of which is the first and second shared bandwidths. By dividing the second shared bandwidth from the bandwidth pre-allocated for the traffic of the second priority, based on the first shared bandwidth and the second shared bandwidth, the shared bandwidth of the first priority and the second priority is generated, that is, the first and second shared bandwidths in the figure.

[0076] The other shared bandwidth is the first and third level shared bandwidth. The second shared bandwidth is divided from the bandwidth pre-allocated for the third priority traffic. Based on the first shared bandwidth and the second shared bandwidth, the shared bandwidth of the first priority and the third priority is generated, that is, the first and third level shared bandwidth in the figure.

[0077] Another shared bandwidth is the first and fourth level shared bandwidth. The second shared bandwidth is divided from the bandwidth pre-allocated for the fourth priority traffic. Based on the first shared bandwidth and the second shared bandwidth, the shared bandwidth of the first priority and the fourth priority is generated, that is, the first and fourth level shared bandwidths in the figure.

[0078] The bandwidth that can be used for the first priority traffic, namely the first priority bandwidth, includes the first priority preset bandwidth, the first and second level shared bandwidth, namely the one / two shared bandwidth, the first and third level shared bandwidth, namely the one / three shared bandwidth, and the first and fourth level shared bandwidth, namely the one / fourth shared bandwidth.

[0079] The first priority preset bandwidth may be a difference between a bandwidth pre-allocated for traffic of the first priority and a first shared bandwidth allocated therefrom.

[0080] It can be understood that, for the traffic of the second priority, the second and third level shared bandwidths and the second and fourth level shared bandwidths are generated in the aforementioned manner.

[0081] The bandwidth that can be used for the second priority traffic, namely the second priority bandwidth, includes the second priority preset bandwidth, the first and second level shared bandwidth, namely the first / second shared bandwidth, the second and third level shared bandwidth, namely the second / third shared bandwidth, and the second and fourth level shared bandwidth, namely the second / fourth shared bandwidth.

[0082] The second priority preset bandwidth may be a difference between a bandwidth allocated to the second priority traffic and a first shared bandwidth allocated therefrom.

[0083] For the third priority traffic, the third and fourth level shared bandwidths are generated in the aforementioned manner.

[0084] The bandwidth that can be used for the third priority traffic, namely the third priority bandwidth, includes the third priority preset bandwidth, the first and third level shared bandwidth, namely the first / third shared bandwidth, the second and third level shared bandwidth, namely the second / third shared bandwidth, and the third and fourth level shared bandwidth, namely the third / fourth shared bandwidth.

[0085] The third priority preset bandwidth may be the difference between the bandwidth allocated to the third priority traffic and the first shared bandwidth divided therefrom.

[0086] For the traffic of the fourth priority, since there is no traffic with a lower priority than the fourth priority, the bandwidth that can be used by the traffic of the fourth priority is the fourth priority preset bandwidth.

[0087] It should be noted that the first shared bandwidth may be 2% and the second shared bandwidth may be 5%. That is, the upper priority class allocates 2% bandwidth and the lower priority class allocates 5% bandwidth, which together constitute the shared bandwidth of the upper priority class and the lower priority class.

[0088] It should be noted that bandwidth sharing is implemented based on a sliding window approach.

[0089] Step S105 , when the bandwidth occupied by the traffic of the priority level reaches the first bandwidth threshold of the priority level, the shared bandwidth is allocated to the traffic of the priority level, and the traffic is transmitted using the bandwidth pre-allocated for the traffic of the priority level and the shared bandwidth.

[0090] The bandwidth occupied by traffic of each priority is monitored through the bandwidth monitoring module. When the bandwidth occupied by traffic of any priority reaches the first bandwidth threshold of the priority, the shared bandwidth available for the traffic of the priority is allocated to the traffic of the priority, so as to transmit the traffic based on the pre-allocated bandwidth and the shared bandwidth for the traffic of the priority.

[0091] It can be understood that when the shared bandwidth is allocated to the traffic of the priority level, the traffic is essentially transmitted based on the preset bandwidth of the priority level and the shared bandwidth.

[0092] The bandwidth allocation method provided in this embodiment pre-allocates bandwidth for traffic of different priorities according to the priority of the traffic. For any priority of traffic, a first shared bandwidth is divided from the bandwidth pre-allocated for the traffic of the priority, and a second shared bandwidth is divided from the bandwidth pre-allocated for the traffic of a lower priority than the priority. Based on the first shared bandwidth and the second shared bandwidth, a shared bandwidth for the traffic of the priority and the traffic of the lower priority is generated, so that when the bandwidth required by the traffic of the priority changes, the shared bandwidth is dynamically used for traffic transmission, which can not only ensure traffic sharing, but also ensure the real-time and reliability of key services, significantly reduce network congestion and packet loss, and improve the reliability and effectiveness of data transmission in the business system. The passage of core traffic is guaranteed by dynamic expansion of bandwidth on demand.

[0093] In this embodiment, a bandwidth allocation method is provided, which can be used in a distributed service system. Figure 3 is a flow chart of a bandwidth allocation method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0094] Step S301: Determine the priority of the data packets to be transmitted based on the type of the data packets to be transmitted, wherein data packets to be transmitted of the same type have the same priority. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0095] Step S302: Based on the priorities of the data packets to be transmitted, the priorities of the traffic composed of the data packets to be transmitted are determined, wherein a plurality of data packets to be transmitted of the same type constitute a traffic. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0096] Step S303: Allocate bandwidth to traffic of different priorities. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.

[0097] Step S304: for any priority level of traffic, a first shared bandwidth is divided from the bandwidth allocated for the traffic of the priority level, a second shared bandwidth is divided from the bandwidth allocated for the traffic of a lower priority level than the priority level, and a shared bandwidth for the traffic of the priority level and the traffic of a lower priority level than the priority level is generated based on the first shared bandwidth and the second shared bandwidth. For details, see Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.

[0098] Step S305 , when the bandwidth occupied by the traffic of the priority level reaches the first bandwidth threshold of the priority level, the shared bandwidth is allocated to the traffic of the priority level, and the traffic is transmitted using the bandwidth allocated to the traffic of the priority level and the shared bandwidth.

[0099] Specifically, the above step S305 includes:

[0100] Step S3051, when the bandwidth occupied by the traffic of the priority reaches the first bandwidth threshold of the priority, based on the priority of the shared bandwidth, the shared bandwidth is allocated to the traffic of the priority in order from low to high priority.

[0101] The higher the priority of the traffic corresponding to the bandwidth used to generate the shared bandwidth, the higher the priority of the shared bandwidth.

[0102] Continuing with the example of traffic including four priorities, when the bandwidth occupied by the traffic of the first priority reaches the first bandwidth threshold of the first priority, the first and fourth level shared bandwidths are first allocated to the traffic of the first priority. If at this time the bandwidth occupied by the traffic of the first priority still reaches the first bandwidth threshold of the first priority, the first and third level shared bandwidths are allocated to the traffic of the first priority. If at this time the bandwidth occupied by the traffic of the first priority still reaches the first bandwidth threshold of the first priority, the first and second level shared bandwidths are allocated to the traffic of the first priority.

[0103] If, after the first and fourth level shared bandwidths are allocated to the first priority traffic, the bandwidth occupied by the first priority traffic no longer reaches the first bandwidth threshold of the first priority, the first and third level shared bandwidths and the first and second level shared bandwidths will no longer be allocated to the first priority traffic.

[0104] It should be noted that the higher the priority of the traffic corresponding to the bandwidth used to generate the shared bandwidth, the higher the priority of the shared bandwidth. For example, the first and second level shared bandwidths are generated by the bandwidth allocated to the first priority traffic and the bandwidth allocated to the second priority traffic, and the first and third level shared bandwidths are generated by the bandwidth allocated to the first priority traffic and the bandwidth allocated to the third priority traffic. It can be seen that the priority of the first and second level shared bandwidths is greater than that of the first and third level shared bandwidths.

[0105] The bandwidth allocation method provided in this embodiment can, when the bandwidth required by a flow of a certain priority exceeds a first bandwidth threshold, preemption of shared bandwidth can be performed according to the preemption principle, that is, in order from low to high priority of the shared bandwidth, to ensure that the shared bandwidth of a lower priority is occupied first and the transmission of the flow of a higher priority is ensured, thereby improving data transmission performance.

[0106] In some optional implementations, the bandwidth allocation method further includes:

[0107] Step a1: for traffic of any priority, based on the bandwidth pre-allocated for the traffic of the priority and the first shared bandwidth divided from the bandwidth pre-allocated for the traffic of the priority, determine the first bandwidth threshold of the priority.

[0108] It is understandable that if the traffic of this priority does not occupy the shared bandwidth, based on the bandwidth pre-allocated for the traffic of this priority and the first shared bandwidth divided from the bandwidth pre-allocated for the traffic of this priority, the difference between the bandwidth pre-allocated for the traffic of this priority and the first shared bandwidth is determined, and then the first bandwidth threshold of this priority is determined to be 95% of the difference. It should be noted that the 95% here is only an exemplary description, and it can also be other percentages, which are specifically set by technical personnel.

[0109] If the traffic of this priority level occupies the shared bandwidth, the first bandwidth threshold of this priority level is determined based on the bandwidth pre-allocated for the traffic of this priority level, the first shared bandwidth divided from the bandwidth pre-allocated for the traffic of this priority level, and the shared bandwidth occupied by the traffic of this priority level.

[0110] Specifically, firstly, the difference between the bandwidth pre-allocated for the traffic of the priority and the first shared bandwidth is calculated, then the sum of the difference and the shared bandwidth occupied by the traffic of the priority is calculated, and the first bandwidth threshold of the priority is determined to be 95% of the sum.

[0111] The bandwidth allocation method provided in this embodiment determines the first bandwidth threshold of the priority level by pre-allocating the bandwidth for the traffic of the priority level and the first shared bandwidth divided from the pre-allocated bandwidth for the traffic of the priority level, and then dynamically uses the shared bandwidth for traffic transmission according to the first bandwidth threshold, thereby ensuring the transmission of high-priority traffic, reducing the occurrence of network congestion, and improving the reliability of data transmission of the business system.

[0112] In some optional implementations, the bandwidth allocation method further includes:

[0113] Step b1: when the total bandwidth value of the shared bandwidth allocated to the traffic of this priority exceeds the bandwidth pre-allocated to the traffic of this priority, refuse to continue to allocate shared bandwidth to the traffic of this priority.

[0114] Among them, for any priority level, if the total bandwidth of the shared bandwidth allocated to the traffic of this priority level exceeds the bandwidth pre-allocated to the traffic of this priority level, that is, the bandwidth occupied by the traffic of this priority level exceeds twice the bandwidth pre-allocated to the traffic of this priority level, then the shared bandwidth will no longer be allocated to the traffic of this priority level, that is, the traffic of this priority level will no longer be allowed to occupy bandwidth.

[0115] The bandwidth allocation method provided in this embodiment refuses to continue allocating shared bandwidth to traffic of this priority when the total bandwidth value of the shared bandwidth allocated to the traffic of this priority exceeds the bandwidth pre-allocated to the traffic of this priority, thereby preventing traffic of a certain priority from excessively occupying bandwidth resources and ensuring that traffic of other priorities also has sufficient bandwidth available.

[0116] In some optional implementations, the bandwidth allocation method further includes:

[0117] Step c1: when the bandwidth occupied by the traffic of the priority level is lower than the second bandwidth threshold of the priority level, it is determined whether the traffic of the priority level is allocated with a shared bandwidth.

[0118] The second bandwidth threshold is set by a technician. For example, if the traffic of this priority does not occupy the shared bandwidth, based on the bandwidth pre-allocated for the traffic of this priority and the first shared bandwidth divided from the bandwidth pre-allocated for the traffic of this priority, the difference between the bandwidth pre-allocated for the traffic of this priority and the first shared bandwidth is determined, and then the second bandwidth threshold of this priority is determined to be 70% of the difference. It should be noted that the 70% here is only an exemplary description, and it can also be other percentages, which are specifically set by the technician.

[0119] If the traffic of this priority level occupies the shared bandwidth, the second bandwidth threshold of this priority level is determined based on the bandwidth pre-allocated for the traffic of this priority level, the first shared bandwidth divided from the bandwidth pre-allocated for the traffic of this priority level, and the shared bandwidth occupied by the traffic of this priority level.

[0120] Specifically, firstly, the difference between the bandwidth pre-allocated for the traffic of the priority level and the first shared bandwidth is calculated, then the sum of the difference and the shared bandwidth occupied by the traffic of the priority level is calculated, and the second bandwidth threshold of the priority level is determined to be 70% of the sum.

[0121] Step c2: if the traffic of the priority level is allocated with shared bandwidth, based on the priority of the allocated shared bandwidth, the shared bandwidth is released in descending order of priority.

[0122] It can be understood that, when shared bandwidth is allocated to the traffic of the priority, the shared bandwidth is released in descending order of priority of the allocated shared bandwidth based on the priority of the shared bandwidth.

[0123] For example, if the traffic of the first priority is allocated with shared bandwidth, and the bandwidth occupied by the traffic of this priority is lower than the second bandwidth threshold of this priority, the first and second level shared bandwidths are released first, and then it is determined whether the bandwidth occupied by the traffic of this priority is lower than the second bandwidth threshold of this priority. If it is lower, the first and third level shared bandwidths are released. If it is not lower, the first and third level shared bandwidths are not released.

[0124] The bandwidth allocation method provided in this embodiment releases the shared bandwidth allocated to the traffic of this priority when the bandwidth occupied by the traffic of this priority is lower than the second bandwidth threshold. That is to say, after the bandwidth occupied by the traffic decreases, the bandwidth is released according to the preset bandwidth return principle, so that the shared bandwidth can be reallocated to other required traffic, ensuring that the bandwidth of low priority will not be occupied all the time, thereby improving the overall utilization rate of bandwidth resources.

[0125] In some optional implementations, the bandwidth allocation method further includes:

[0126] Step d1, when the traffic of the priority level occupies all the shared bandwidth but still cannot be transmitted completely, it is determined whether there is any remaining bandwidth in the bandwidth pre-allocated for traffic of a priority level lower than the priority level.

[0127] The traffic of this priority level will occupy all the shared bandwidth but still cannot be fully transmitted, that is, the traffic of this priority level will occupy all the shared bandwidth, and the bandwidth occupied by the traffic of this priority level reaches the first bandwidth threshold of this priority level.

[0128] Determining whether there is any remaining bandwidth pre-allocated for traffic of a lower priority than the priority level includes:

[0129] If there are multiple priorities lower than the priority, it is determined whether there is any remaining bandwidth in the bandwidth pre-allocated for traffic with a priority lower than the priority in order of priority from low to high.

[0130] Exemplarily, if the first-priority traffic occupies all of its corresponding shared bandwidth but still cannot be fully transmitted, first determine whether there is any remaining bandwidth in the bandwidth pre-allocated to the fourth-priority traffic. If there is no remaining bandwidth in the bandwidth pre-allocated to the fourth-priority traffic, then determine whether there is any remaining bandwidth in the bandwidth pre-allocated to the third-priority traffic. If there is no remaining bandwidth in the bandwidth pre-allocated to the third-priority traffic, then determine whether there is any remaining bandwidth in the bandwidth pre-allocated to the second-priority traffic.

[0131] Step d2: If there is remaining bandwidth in the bandwidth pre-allocated for traffic of a priority lower than the priority, a third shared bandwidth is divided from the remaining bandwidth, and the third shared bandwidth is allocated to the traffic of this priority, and the traffic is transmitted using the bandwidth pre-allocated for the traffic of this priority, the shared bandwidth, and the third shared bandwidth.

[0132] Exemplarily, if there is residual bandwidth in the bandwidth pre-allocated for the traffic of the fourth priority, a third shared bandwidth is divided from the residual bandwidth, and the third shared bandwidth is allocated to the traffic of the first priority, and the traffic is transmitted using the bandwidth pre-allocated for the traffic of the first priority, the shared bandwidth, and the third shared bandwidth. The third shared bandwidth may be 5% of the preset bandwidth of the traffic of the fourth priority.

[0133] If it is still not enough, the fourth shared bandwidth is further divided from the remaining bandwidth of the fourth priority, and the fourth shared bandwidth is allocated to the traffic of the first priority, and the traffic is transmitted using the bandwidth pre-allocated for the traffic of the first priority, the shared bandwidth, the third shared bandwidth, and the fourth shared bandwidth. It can be understood that 5% is divided each time, and this value is only for exemplary description and is not specifically limited here.

[0134] It should be noted that, when the number of times that the traffic of the priority level preempts the shared bandwidth of any priority level exceeds the number threshold, the traffic of the priority level is refused to continue to preempt the bandwidth of the preempted priority level.

[0135] For example, if the number of times that the traffic of the first priority occupies the shared bandwidth of the fourth priority exceeds the number threshold, the traffic of the first priority cannot occupies the bandwidth of the fourth priority even if there is still remaining bandwidth of the fourth priority.

[0136] The number threshold is set by a technician, and illustratively, the number threshold is 5 times.

[0137] It can be understood that when there is no remaining bandwidth for the fourth priority, it is determined whether there is any remaining bandwidth in the bandwidth pre-allocated for the third priority traffic, so that the first priority traffic can continue to preempt the remaining bandwidth of the third priority, and so on.

[0138] Figure 4 FIG. 1 is a schematic diagram of adjusting bandwidth according to an embodiment of the present invention when traffic of any priority level occupies all the shared bandwidth but cannot be transmitted in full. Figure 4 As shown, taking two priority traffic as an example, the initial shared bandwidth of the pre-allocated bandwidth for high priority traffic, i.e., high priority bandwidth, and the pre-allocated bandwidth for low priority traffic, i.e., low priority bandwidth, is 2% of the high priority bandwidth and 5% of the low priority bandwidth. When the high priority traffic occupies all the shared bandwidth, bandwidth adjustment is required to continue to seize the low priority bandwidth, and the bandwidth sliding window moves down to seize 5% of the low priority bandwidth. At this time, the bandwidth available for high priority traffic increases by 5% of the low priority, and the shared bandwidth includes 2% of the high priority bandwidth (original high priority bandwidth), 5% of the low priority bandwidth, and the newly added 5% of the low priority bandwidth, i.e., the bandwidth newly allocated for the low priority.

[0139] The bandwidth allocation method provided in this embodiment allocates a third shared bandwidth from the remaining bandwidth allocated to the lower priority traffic for use by the high priority traffic when the traffic with a certain priority requires more bandwidth and the existing bandwidth allocated to the traffic with this priority is insufficient. This ensures the transmission of the high priority traffic without affecting the transmission requirements of the low priority traffic, thereby improving the stability and reliability of the data transmission of the business system.

[0140] In this embodiment, a bandwidth allocation method is provided. Figure 5 is a flow chart of a bandwidth allocation method according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:

[0141] In the first step, bandwidth division is completed.

[0142] The description of the aforementioned step S303 is not repeated here.

[0143] The second step is to preempt all preset shared bandwidths in the order of priority from low to high.

[0144] The description of the aforementioned step S305 is not repeated here.

[0145] In the third step, if all the pre-set shared bandwidths have not been pre-empted, continue to pre-empt the pre-set shared bandwidths.

[0146] If all preset shared bandwidths are preempted, the preemption module is triggered to start adjusting from the shared bandwidth with the lowest priority.

[0147] Specifically, adjust the sliding shared window with the lowest priority until the sliding shared window with the lowest priority cannot be adjusted, start adjusting the sliding shared window with the next priority until the sliding shared window with the next priority cannot be adjusted, continue adjusting the sliding shared window with a higher priority until it cannot be adjusted, and determine that the adjustment is complete.

[0148] When the sliding sharing window of any priority level can be adjusted, the bandwidth size and shared bandwidth of the priority level are adjusted.

[0149] The description of this step is substantially the same as that of the aforementioned steps d1 and d2. Please refer to the specific description of the aforementioned steps d1 and d2 for details, which will not be repeated here.

[0150] The bandwidth allocation method provided in this embodiment realizes micro-shaping of traffic bandwidth. By providing a variety of preemption strategies and dynamic bandwidth adjustment capabilities, it ensures the transmission of high-priority traffic while trying its best to ensure the transmission of low-priority traffic.

[0151] By dynamically adjusting the allocated bandwidth and releasing the shared bandwidth, the passage of higher priority traffic is prioritized and congestion of higher priority traffic is avoided.

[0152] In this embodiment, a bandwidth allocation system is also provided, which includes a bandwidth preset module, a bandwidth monitoring module, a bandwidth adjustment module and a bandwidth preemption module, wherein the bandwidth preset module is used to set the bandwidth of traffic of different priorities, generate shared bandwidth, set the preemption strategy of shared bandwidth, etc.

[0153] Setting bandwidths of different priorities is the same as the aforementioned step S303, which will not be described again.

[0154] Generating the shared bandwidth is the same as the aforementioned step S304, which will not be described again.

[0155] The preemption strategies for shared bandwidth include basic preemption strategies and basic elastic strategies.

[0156] The basic preemption strategy includes: the above step S305.

[0157] Preemption protection: Each level can preempt up to twice the bandwidth. Preemption times setting: The default number of consecutive preemptions in the same direction is set to 5 times. This value also determines the strategy of moving the shared bandwidth window.

[0158] The basic elasticity strategy includes: if the shared bandwidth is fully preempted, the shared bandwidth window needs to slide in proportion to the priority of the preempted bandwidth; preemption at the same level occurs preferentially within the shared bandwidth window at a lower level.

[0159] The bandwidth monitoring module is used to monitor the usage of the bandwidth allocated to each priority level of traffic, regularly refresh the usage of the allocated bandwidth, and trigger the bandwidth preemption module when the bandwidth usage exceeds a certain threshold (such as 95%). When the bandwidth usage is lower than a certain threshold (such as 70%), the bandwidth preemption module is called to realize bandwidth recovery. The recovery strategy is opposite to the preemption strategy, that is, the preemption strategy preempts in the order of shared bandwidth priority from low to high, and the recovery strategy recovers in the order of shared bandwidth priority from high to low.

[0160] Please refer to the description of the above step S305 and steps c1 and c2 for details, which will not be repeated here.

[0161] The bandwidth monitoring module is also used to trigger the bandwidth preemption module when traffic of a certain priority level has completely preempted all shared bandwidths and the bandwidth usage rate exceeds 95%.

[0162] The bandwidth adjustment module is responsible for adjusting the shared bandwidth based on the sliding window and setting the shared bandwidth according to the pre-allocated bandwidth.

[0163] The bandwidth preemption module calls the bandwidth adjustment module according to the preemption strategy to realize bandwidth preemption and recovery.

[0164] When a certain priority traffic has occupied all the shared bandwidth and the bandwidth usage rate exceeds 95%, the bandwidth preemption module calls the bandwidth adjustment module according to a preset strategy to adjust the shared bandwidth window of the priority traffic as needed.

[0165] Specifically, the bandwidth window with the lowest priority is adjusted first, and the bandwidth window is adjusted according to a preset policy.

[0166] If the bandwidth window of the lowest priority cannot be adjusted, for example, the preemption exceeds the threshold (5 times) or there is no bandwidth left for the lowest priority, the next lower priority will be preempted, and so on, until there is no bandwidth to preempt, or the total amount of bandwidth available for this priority has exceeded the preset value (twice the pre-allocated bandwidth for this priority), then the elastic preemption ends.

[0167] Please refer to the above description of steps d1 and d2 for details, which will not be repeated here.

[0168] The bandwidth allocation system provided in this embodiment implements a more fine-grained preemption logic through shared bandwidth adjustment based on a sliding window, and implements a multi-level preemption strategy based on a multi-window design.

[0169] In this embodiment, a bandwidth allocation device is also provided, which is used to implement the above embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0170] This embodiment provides a bandwidth allocation device, such as Figure 6 As shown, including:

[0171] The first determination module 601 is used to determine the priority of the data packets to be transmitted based on the types of the data packets to be transmitted, wherein the data packets to be transmitted of the same type have the same priority.

[0172] The second determination module 602 is used to determine the priority of the traffic composed of the data packets to be transmitted based on the priorities of the data packets to be transmitted, wherein a plurality of data packets to be transmitted of the same type constitute one traffic.

[0173] The first allocation module 603 is used to pre-allocate bandwidth for traffic of different priorities.

[0174] Generation module 604 is used to divide a first shared bandwidth from the bandwidth pre-allocated for traffic of any priority, divide a second shared bandwidth from the bandwidth pre-allocated for traffic of a priority lower than the priority, and generate a shared bandwidth for traffic of the priority and traffic of a priority lower than the priority based on the first shared bandwidth and the second shared bandwidth.

[0175] The second allocation module 605 is used to allocate shared bandwidth to the traffic of this priority when the bandwidth occupied by the traffic of this priority reaches the first bandwidth threshold of this priority, and use the bandwidth pre-allocated for the traffic of this priority and the shared bandwidth for traffic transmission.

[0176] In some optional implementations, the bandwidth allocation device further includes:

[0177] The third determination module is used to determine, for traffic of any priority, a first bandwidth threshold of the priority based on the bandwidth pre-allocated for the traffic of the priority and the first shared bandwidth divided from the bandwidth pre-allocated for the traffic of the priority.

[0178] In some optional implementations, the second allocation module 605 includes:

[0179] The allocation subunit is used to allocate the shared bandwidth to the traffic of the priority level in descending order based on the priority of the shared bandwidth when the bandwidth occupied by the traffic of the priority level reaches the first bandwidth threshold of the priority level.

[0180] The higher the priority of the traffic corresponding to the bandwidth used to generate the shared bandwidth, the higher the priority of the shared bandwidth.

[0181] In some optional implementations, the bandwidth allocation device further includes:

[0182] The fourth determining module is configured to refuse to continue allocating shared bandwidth to the traffic of the priority level when the total bandwidth value of the shared bandwidth pre-allocated to the traffic of the priority level exceeds the bandwidth allocated to the traffic of the priority level.

[0183] In some optional implementations, the bandwidth allocation device further includes:

[0184] The first judgment module is used to judge whether the traffic of the priority level is allocated with a shared bandwidth when the bandwidth occupied by the traffic of the priority level is lower than the second bandwidth threshold of the priority level.

[0185] The release module is used to release the shared bandwidth in descending order of priority based on the priority of the allocated shared bandwidth if the shared bandwidth is allocated to the traffic of the priority.

[0186] In some optional implementations, the bandwidth allocation device further includes:

[0187] The second judgment module is used to judge whether there is any remaining bandwidth in the bandwidth pre-allocated for traffic with a priority lower than the priority when the traffic with the priority occupies all the shared bandwidth but still cannot be transmitted completely.

[0188] The third allocation module is used to divide the third shared bandwidth from the remaining bandwidth if there is remaining bandwidth in the bandwidth pre-allocated for traffic of a priority lower than the priority, allocate the third shared bandwidth to the traffic of the priority, and use the bandwidth pre-allocated for the traffic of the priority, the shared bandwidth and the third shared bandwidth to transmit the traffic.

[0189] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0190] The bandwidth allocation device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0191] The embodiment of the present invention also provides a computer device having the above Figure 6 The bandwidth allocation device shown.

[0192] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the computer device includes: one or more processors 701, memory 702, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Each component utilizes different buses to communicate with each other, and can be installed on a common mainboard or installed in other ways as required. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 701 is taken as an example.

[0193] The processor 701 may be a central processing unit, a network processor or a combination thereof. The processor 701 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.

[0194] The memory 702 stores instructions executable by at least one processor 701, so that the at least one processor 701 executes the method shown in the above embodiment.

[0195] The memory 702 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 702 may optionally include a memory remotely arranged relative to the processor 701, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0196] The memory 702 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 702 may also include a combination of the above types of memory.

[0197] The computer device also includes a communication interface 703, which is used for the computer device to communicate with other devices or a communication network.

[0198] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0199] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0200] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A bandwidth allocation method, characterized in that: The method comprises: Determining the priority of the data packets to be transmitted based on the types of the data packets to be transmitted, wherein data packets to be transmitted of the same type have the same priority; Determine the priority of the traffic composed of the data packets to be transmitted based on the priorities of the data packets to be transmitted, wherein a plurality of data packets to be transmitted of the same type constitute one traffic; Pre-allocate bandwidth for traffic of different priorities; For traffic of any priority, a first shared bandwidth is divided from the bandwidth pre-allocated for the traffic of the priority, and a second shared bandwidth is divided from the bandwidth pre-allocated for traffic of a priority lower than the priority, and a shared bandwidth for the traffic of the priority and the traffic of the priority lower than the priority is generated based on the first shared bandwidth and the second shared bandwidth; When the bandwidth occupied by the traffic of this priority reaches the first bandwidth threshold of this priority, the shared bandwidth is allocated to the traffic of this priority, and the traffic is transmitted using the bandwidth pre-allocated for the traffic of this priority and the shared bandwidth.

2. The method according to claim 1, characterized in that The method further comprises: For traffic of any priority, a first bandwidth threshold of the priority is determined based on the bandwidth pre-allocated for the traffic of the priority and the first shared bandwidth divided from the bandwidth pre-allocated for the traffic of the priority.

3. The method according to claim 1, characterized in that When the bandwidth occupied by the traffic of the priority reaches the first bandwidth threshold of the priority, allocating the shared bandwidth to the traffic of the priority includes: When the bandwidth occupied by the traffic of the priority level reaches the first bandwidth threshold of the priority level, the shared bandwidth is allocated to the traffic of the priority level in descending order of priority based on the priority level of the shared bandwidth; The higher the priority of the traffic corresponding to the bandwidth used to generate the shared bandwidth, the higher the priority of the shared bandwidth.

4. The method according to claim 1, characterized in that: The method further comprises: In the case where the total bandwidth value of the shared bandwidth allocated to the traffic of this priority exceeds the bandwidth pre-allocated to the traffic of this priority, the shared bandwidth is refused to be further allocated to the traffic of this priority.

5. The method according to claim 1, characterized in that The method further comprises: When the bandwidth occupied by the traffic of the priority level is lower than the second bandwidth threshold of the priority level, determining whether the traffic of the priority level is allocated with the shared bandwidth; If the shared bandwidth is allocated to the traffic of the priority level, the shared bandwidth is released in descending order of priority based on the priority of the allocated shared bandwidth.

6. The method according to claim 1, characterized in that The method further comprises: In the case that the traffic of the priority level occupies all the shared bandwidth but still cannot be fully transmitted, determining whether there is any remaining bandwidth pre-allocated for the traffic of a priority level lower than the priority level; If there is remaining bandwidth in the bandwidth pre-allocated for traffic of a priority lower than the priority, a third shared bandwidth is divided from the remaining bandwidth, the third shared bandwidth is allocated to the traffic of this priority, and the traffic is transmitted using the bandwidth pre-allocated for the traffic of this priority, the shared bandwidth and the third shared bandwidth.

7. A bandwidth allocation device, characterized in that: The device comprises: A first determining module, configured to determine the priority of the data packets to be transmitted based on the types of the data packets to be transmitted, wherein data packets to be transmitted of the same type have the same priority; A second determination module is used to determine the priority of the flow composed of the data packets to be transmitted based on the priority of the data packets to be transmitted, wherein a plurality of data packets to be transmitted of the same type constitute one flow; A first allocation module, used for pre-allocating bandwidth for traffic of different priorities; A generating module, configured to divide, for traffic of any priority, a first shared bandwidth from a bandwidth pre-allocated for traffic of the priority, divide a second shared bandwidth from a bandwidth pre-allocated for traffic of a priority lower than the priority, and generate a shared bandwidth for traffic of the priority and traffic of a priority lower than the priority based on the first shared bandwidth and the second shared bandwidth; The second allocation module is used to allocate the shared bandwidth to the traffic of this priority when the bandwidth occupied by the traffic of this priority reaches the first bandwidth threshold of this priority, and use the bandwidth pre-allocated for the traffic of this priority and the shared bandwidth to transmit the traffic.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the bandwidth allocation method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the bandwidth allocation method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the bandwidth allocation method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and apparatus for allocating reservation bandwidth of traffic

    CN101808033A

  • Guaranteed bandwidth sharing in a traffic shaping system

    US8032653B1

Cited By

  • Data transmission method and device, electronic equipment and storage medium

    CN121239652A

  • A data transmission method and device, electronic equipment and storage medium

    CN121239652B