Bandwidth allocation method and device, electronic equipment and storage medium

By combining the bandwidth full state and flow rate data, the bandwidth demand state of the optical circuit terminal is determined, which solves the problem of inaccurate bandwidth allocation in the prior art, and improves the stability and resource utilization efficiency of the network.

CN120111006APending Publication Date: 2025-06-06AMLOGIC (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311632929.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-30
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

When existing optical circuit terminals allocate bandwidth, they lack accuracy, resulting in network blockage and waste of resources.

Method used

By obtaining the bandwidth full state of the current detection cycle, the flow rate data of the previous detection cycle, and the flow rate data of the current detection cycle, the current bandwidth demand state is determined, and the target bandwidth is determined based on the state.

Benefits of technology

Improves the accuracy of bandwidth allocation and reduces the probability of packet loss, network blocking and resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120111006A_ABST
    Figure CN120111006A_ABST
Patent Text Reader

Abstract

The invention relates to a bandwidth allocation method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a first bandwidth full-occupying state of a current detection period, the first bandwidth full-occupying state comprising a full-occupying state or a non-full-occupying state; determining a current bandwidth demand state based on a first flow rate of data of a previous detection period, a second flow rate of data of a current detection period and the first bandwidth full occupation state; and determining a target bandwidth of the current detection period based on the bandwidth demand state. According to the invention, the bandwidth demand state is determined from multiple perspectives of the flow rate and the bandwidth full-occupying state of the current detection period, and the accuracy of determining the target bandwidth of the current detection period can be improved. And the probability of packet loss, network congestion and resource waste is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of network technology, and in particular to a bandwidth allocation method and device, an electronic device, and a storage medium. Background Art

[0002] Network traffic monitoring is widely used in network management, intrusion monitoring, protocol analysis, traffic engineering and other fields.

[0003] One of the functions of traffic monitoring is to allocate appropriate bandwidth for data transmission in a timely manner to ensure normal transmission of services within limited bandwidth and avoid network congestion due to excessive data volume.

[0004] Currently, optical line terminals can monitor traffic, but the accuracy of bandwidth allocation needs to be improved. Summary of the invention

[0005] In view of this, the present disclosure proposes a bandwidth allocation solution.

[0006] According to one aspect of the present disclosure, a bandwidth allocation method is provided, including: obtaining a first bandwidth occupancy status of a current detection cycle, the first bandwidth occupancy status including: a full state or a non-full state; determining a current bandwidth demand state based on a first flow rate of data from a previous detection cycle, a second flow rate of data from a current detection cycle, and the first bandwidth occupancy status; and determining a target bandwidth for the current detection cycle based on the bandwidth demand state.

[0007] In a possible implementation, obtaining the first bandwidth full state of the current detection cycle includes: obtaining the flow count and idle count of the current detection cycle; determining the flow change state of the current detection cycle compared with the data of the previous detection cycle based on the first flow rate and the second flow rate, the flow change state including: a changed state, or an unchanged state; when the flow is in the unchanged state and the bandwidth of the previous detection cycle is in the full state, determining the first bandwidth full state as the full state; or, when a first ratio of the second flow rate to the first flow rate is greater than a flow rate difference threshold, determining a second ratio of the flow count to the idle count; when the second ratio is greater than the full threshold, determining the first bandwidth full state as the full state; or, when the first ratio is greater than the flow rate difference threshold, the idle count is zero, and the flow count is not zero, determining the first bandwidth full state as the full state.

[0008] In a possible implementation, the bandwidth demand state includes: traffic increase, and the current bandwidth demand state is determined based on the first flow rate of the previous detection cycle data, the second flow rate of the current detection cycle data, and the first bandwidth occupancy state, including: based on the first flow rate and the second flow rate, determining the traffic change state of the current detection cycle compared with the previous detection cycle data, the traffic change state includes: a changed state, or an unchanged state; when the second flow rate is greater than the first flow rate, and the traffic is in the changed state, and the bandwidth is in the not occupied state, the bandwidth demand state is determined as the traffic increase.

[0009] In a possible implementation, the bandwidth demand state includes: traffic decrease, and the current bandwidth demand state is determined based on the first flow rate of the previous detection cycle data, the second flow rate of the current detection cycle data, and the first bandwidth occupancy state, including: based on the first flow rate and the second flow rate, determining the traffic change state of the current detection cycle compared with the previous detection cycle data, the traffic change state includes: a changed state, or an unchanged state; when the second flow rate is less than the first flow rate, and the traffic is in the changed state, and the bandwidth is in the not occupied state, the bandwidth demand state is determined as the traffic decrease.

[0010] In a possible implementation, the bandwidth demand state includes: the flow rate remains unchanged, and the current bandwidth demand state is determined based on the first flow rate of the previous detection cycle data, the second flow rate of the current detection cycle data, and the first bandwidth occupancy state, including: based on the first flow rate and the second flow rate, determining the flow change state of the current detection cycle compared with the previous detection cycle data, the flow change state includes: a changed state, or an unchanged state; when the flow is in the unchanged state, the bandwidth demand state is determined as the flow rate remains unchanged.

[0011] In one possible implementation, the bandwidth demand state includes: bandwidth full, and determining the current bandwidth demand state based on the first flow rate of the previous detection cycle data, the second flow rate of the current detection cycle data, and the first bandwidth full state includes: when the first bandwidth full state is the full state, determining the bandwidth demand state as the bandwidth full.

[0012] In a possible implementation, the target bandwidth includes: a first target bandwidth, a second target bandwidth, and a third target bandwidth. Determining the target bandwidth of the current detection cycle based on the bandwidth demand state includes: when the bandwidth demand state is an increase in traffic or a decrease in traffic, determining the initial bandwidth according to actual demand; adding preset redundancy to the initial bandwidth to obtain the first target bandwidth; when the bandwidth demand state is that the bandwidth is full, determining the preset maximum bandwidth as the second target bandwidth; when the bandwidth demand state is that the traffic remains unchanged, determining the current bandwidth as the third target bandwidth.

[0013] According to another aspect of the present disclosure, there is provided a bandwidth allocation device, comprising:

[0014] A first bandwidth fullness status acquisition unit, configured to acquire a first bandwidth fullness status of a current detection period, wherein the first bandwidth fullness status includes: a full state or a non-full state;

[0015] a current bandwidth demand state determining unit, configured to determine a current bandwidth demand state based on a first flow rate of data in a previous detection cycle, a second flow rate of data in a current detection cycle, and a state of occupancy of the first bandwidth;

[0016] The current detection period target bandwidth determination unit is configured to determine the target bandwidth of the current detection period based on the bandwidth demand state.

[0017] In a possible implementation manner, the first bandwidth fullness status acquiring unit includes:

[0018] A count acquisition unit, used to acquire the flow count and idle count of the current detection cycle;

[0019] A first flow change state determining unit, configured to determine a flow change state of a current detection cycle compared with data of a previous detection cycle based on the first flow rate and the second flow rate, wherein the flow change state includes: a changed state or an unchanged state;

[0020] a first bandwidth full state determining unit A, configured to determine the first bandwidth full state as the full state when the traffic is in the unchanged state and the bandwidth in the previous detection cycle is in the full state;

[0021] or,

[0022] a second ratio determination unit, configured to determine a second ratio of the flow count to the idle count when a first ratio of the second flow rate to the first flow rate is greater than a flow rate difference threshold;

[0023] A first bandwidth full state determining unit B is configured to determine the first bandwidth full state as the full state when the second ratio is greater than a full threshold;

[0024] or,

[0025] The first bandwidth full state determining unit C is configured to determine the first bandwidth full state as the full state when the first ratio is greater than the flow rate difference threshold, the idle count is zero, and the flow count is not zero.

[0026] In a possible implementation, the bandwidth requirement state includes: traffic increase, and the current bandwidth requirement state determination unit includes:

[0027] A second flow change state determining unit, configured to determine a flow change state of a current detection cycle compared with data of a previous detection cycle based on the first flow rate and the second flow rate, wherein the flow change state includes: a changed state or an unchanged state;

[0028] The flow increase determining unit is used to determine the bandwidth demand state as the flow increase when the second flow rate is greater than the first flow rate, the flow is in the changed state, and the bandwidth is in the unoccupied state.

[0029] In a possible implementation, the bandwidth requirement state includes: traffic decrease, and the current bandwidth requirement state determining unit includes:

[0030] A third flow change state determining unit, configured to determine, based on the first flow rate and the second flow rate, a flow change state of a current detection cycle compared with data of a previous detection cycle, wherein the flow change state includes: a changed state, or an unchanged state;

[0031] The flow rate reduction determining unit is configured to determine the bandwidth demand state as the flow rate reduction when the second flow rate is less than the first flow rate, the flow rate is in the changed state, and the bandwidth is in the unoccupied state.

[0032] In a possible implementation, the bandwidth requirement state includes: the flow rate remains unchanged, and the current bandwidth requirement state determining unit includes:

[0033] a fourth flow change state determining unit, configured to determine, based on the first flow rate and the second flow rate, a flow change state of a current detection cycle compared with data of a previous detection cycle, wherein the flow change state includes: a changed state or an unchanged state;

[0034] The flow unchanged determining unit is used to determine the bandwidth requirement state as the flow unchanged when the flow is in the unchanged state.

[0035] In a possible implementation, the bandwidth requirement state includes: bandwidth is full, and the current bandwidth requirement state determining unit includes:

[0036] A bandwidth fullness determining unit is configured to determine the bandwidth requirement state as the bandwidth fullness when the first bandwidth fullness state is the fullness state.

[0037] In a possible implementation, the target bandwidth includes: a first target bandwidth, a second target bandwidth, and a third target bandwidth, and the current detection period target bandwidth determination unit includes:

[0038] An initial bandwidth determining unit, configured to determine an initial bandwidth according to actual demand when the bandwidth demand state is a flow increase or a flow decrease;

[0039] A first target bandwidth determining unit, configured to add a preset redundancy to the initial bandwidth to obtain a first target bandwidth;

[0040] A second target bandwidth determining unit, configured to determine a preset maximum bandwidth as a second target bandwidth when the bandwidth demand state is that the bandwidth is fully occupied;

[0041] The third target bandwidth determining unit is configured to determine the current bandwidth as the third target bandwidth when the bandwidth demand state is that the flow rate remains unchanged.

[0042] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.

[0043] According to another aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.

[0044] According to another aspect of the present disclosure, a computer program product is provided, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.

[0045] In the disclosed embodiment, the current bandwidth demand state is determined based on the current bandwidth occupancy state, and the data flow rate of the current cycle and the previous cycle. Since the first flow rate and the second flow rate can be used to determine the change trend of the data volume in the current detection cycle compared with the previous detection cycle, the first flow rate, the second flow rate, and the first bandwidth occupancy state are combined to jointly determine the current bandwidth demand state from multiple angles, thereby improving the accuracy of determining the current bandwidth demand state. Therefore, the accuracy of determining the target bandwidth of the current detection cycle can be improved, reducing the probability of packet loss, network congestion, and resource waste.

[0046] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.

[0048] Figure 1 A flowchart of a bandwidth allocation method provided in an embodiment of the present disclosure.

[0049] Figure 2 A schematic diagram of the structure of a bandwidth allocation device provided in an embodiment of the present disclosure.

[0050] Figure 3 A schematic diagram of the structure of an electronic device for bandwidth allocation provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0051] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0052] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0053] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.

[0054] One of the functions of traffic monitoring is to allocate appropriate bandwidth for data transmission in a timely manner to ensure the normal transmission of real-time services within the limited bandwidth and avoid network congestion due to excessive data volume.

[0055] Currently, optical line terminals can monitor traffic. They allocate bandwidth only by periodically detecting whether the allocated bandwidth is full. However, in actual applications, the network environment is complex and this method is not accurate.

[0056] For example, in the previous detection cycle, the traffic just occupied the allocated bandwidth, and no new allocation was needed. In the current cycle, although the traffic is increasing, the result of the detection is still that the bandwidth is already occupied. Therefore, the optical line terminal still determines that no new allocation is needed. In this way, the bandwidth is insufficient and packet loss is likely to occur.

[0057] Another example: In the previous detection cycle, although new bandwidth was allocated, the allocated bandwidth did not meet the demand because other terminals in the network had a greater demand for bandwidth. In the next detection cycle, the traffic is still increasing, but the bandwidth is still occupied. In this way, even if other terminals release bandwidth, the optical line terminal still determines that there is no need for new allocation.

[0058] The above shows that the allocated bandwidth is allocated in the previous detection cycle, and there may be many reasons for the allocation, which cannot correctly reflect the current bandwidth demand. In order to reasonably allocate bandwidth and reduce the probability of packet loss, network congestion and resource waste, a reasonable bandwidth allocation method is urgently needed.

[0059] Figure 1 The following is a flow chart of a bandwidth allocation method provided by an embodiment of the present disclosure. Figure 1 As shown, the method includes:

[0060] S11, obtaining a first bandwidth occupancy status of a current detection period, where the first bandwidth occupancy status includes: a full status or a non-full status.

[0061] The first bandwidth occupancy state can indicate whether the bandwidth is fully occupied during the current detection process. The bandwidth here can be the bandwidth allocated in the previous detection cycle. It can also be the bandwidth temporarily allocated between two detection cycles. It can also be the current bandwidth detected when the first bandwidth state is obtained in the current detection cycle.

[0062] S12: Determine a current bandwidth demand state based on a first flow rate of data from a previous detection cycle, a second flow rate of data from a current detection cycle, and the first bandwidth occupancy state.

[0063] In the disclosed embodiment, the bandwidth demand state can be determined periodically. The data flow rate can be detected in each detection cycle. Each detection cycle corresponds to at least one data flow rate. The maximum value of the flow rate of a single detection cycle can be the detected bandwidth. For ease of understanding, the data flow rate of the previous detection cycle is named the first flow rate; the data flow rate of the current detection cycle is named the second flow rate. The first flow rate and the second flow rate can reflect the flow rate changes of two adjacent detection cycles. Different flow rate changes can reflect different traffic changes. Therefore, by combining the first flow rate, the second flow rate, and the first bandwidth occupancy state, the current bandwidth demand state can be jointly determined from multiple angles, thereby improving the accuracy of determining the current bandwidth demand state.

[0064] S13: Determine a target bandwidth of a current detection cycle based on the bandwidth demand state.

[0065] The bandwidth demand status can represent the matching between the bandwidth in the current detection process and the actual bandwidth demand. The bandwidth demand status can reflect whether the bandwidth in the current detection process meets the actual usage demand, or the bandwidth is more than the actual usage demand, or the bandwidth is lower than the actual usage demand. The bandwidth demand status can include the following four states: bandwidth full, traffic increase, traffic decrease, and traffic unchanged.

[0066] In this way, the bandwidth demand status can fully reflect the bandwidth demand of the current detection cycle, and can provide a reliable reference for accurately allocating bandwidth, thereby improving the accuracy of determining the target bandwidth.

[0067] In the disclosed embodiment, the current bandwidth demand state is determined based on the current bandwidth occupancy state, and the data flow rate of the current cycle and the previous cycle. Since the first flow rate and the second flow rate can be used to determine the change trend of the data volume in the current detection cycle compared with the previous detection cycle, the first flow rate, the second flow rate, and the first bandwidth occupancy state are combined to jointly determine the current bandwidth demand state from multiple angles, thereby improving the accuracy of determining the current bandwidth demand state. Therefore, the accuracy of determining the target bandwidth of the current detection cycle can be improved, reducing the probability of packet loss, network congestion, and resource waste.

[0068] In a possible implementation, obtaining the first bandwidth full state of the current detection cycle includes: obtaining the flow count and idle count of the current detection cycle; determining the flow change state of the current detection cycle compared with the data of the previous detection cycle based on the first flow rate and the second flow rate, the flow change state including: a changed state, or an unchanged state; when the flow is in the unchanged state and the bandwidth of the previous detection cycle is in the full state, determining the first bandwidth full state as the full state; or, when a first ratio of the second flow rate to the first flow rate is greater than a flow rate difference threshold, determining a second ratio of the flow count to the idle count; when the second ratio is greater than the full threshold, determining the first bandwidth full state as the full state; or, when the first ratio is greater than the flow rate difference threshold, the idle count is zero, and the flow count is not zero, determining the first bandwidth full state as the full state.

[0069] Messages forwarded in the network may occupy bandwidth. Messages may include normal messages and idle messages. Normal messages are messages used for normal communication between devices, and idle messages are messages sent without sending normal messages. In the disclosed embodiment, the amount of normal message transmission may be counted to obtain a traffic count; the amount of idle message transmission may be counted to obtain an idle count.

[0070] In the disclosed embodiment, the change state of the data flow in the current detection cycle compared with the previous detection cycle can be determined by comparing the numerical values ​​of the first flow rate and the second flow rate. An increase threshold and a decrease threshold can be preset. The increase threshold can represent: the minimum flow increase that needs to be achieved when the flow of two adjacent detection cycles is in a changed state. The decrease threshold can represent: the minimum flow reduction that needs to be achieved when the flow of two adjacent detection cycles is in a changed state. Preferably, the increase threshold can be 0.1, and the decrease threshold can be 0.1.

[0071] When the second flow rate is greater than the first flow rate, and the increase of the second flow rate compared to the first flow rate is less than the increase threshold, the flow change state may be an unchanged state. When the second flow rate is greater than the first flow rate, and the increase of the second flow rate compared to the first flow rate is not less than the increase threshold, the flow change state may be a changed state. In the embodiment of the present disclosure, a first difference between the second flow rate and the first flow rate may be determined, and the ratio of the first difference to the first flow rate is used as the increase of the second flow rate compared to the first flow rate.

[0072] When the second flow rate is not greater than the first flow rate, and the reduction of the second flow rate compared to the first flow rate is less than the reduction threshold, the flow change state may be an unchanged state. When the second flow rate is not greater than the first flow rate, and the reduction of the second flow rate compared to the first flow rate is not less than the reduction threshold, the flow change state may be a changed state. In the embodiment of the present disclosure, a second difference between the first flow rate and the second flow rate may be determined, and the ratio of the second difference to the first flow rate may be used as the reduction of the second flow rate compared to the first flow rate.

[0073] In this way, data jitter can be smoothed out and the accuracy of determining the flow change status can be improved.

[0074] When any one of the following three situations occurs, it can be determined that the first bandwidth full state is a full state.

[0075] First case

[0076] If the traffic volume is unchanged in the current detection cycle compared with the previous detection cycle, it means that the change (increase or decrease) of the data traffic volume from the previous detection cycle to the current detection cycle is not large. Therefore, if the bandwidth in the previous detection cycle is in a full state, it can be determined that the first bandwidth full state is a full state.

[0077] Second case

[0078] If the first ratio of the second flow rate to the first flow rate is greater than the flow rate difference threshold, it means that the second flow rate has a greater change than the first flow rate. The flow rate difference threshold can represent: the maximum value that the first ratio can reach without triggering the calculation of the second ratio. The first ratio is greater than the flow rate difference threshold, which can be divided into three cases (cases AC). Therefore, the flow rate difference threshold can include: a first flow rate difference threshold, a second flow rate difference threshold, and a third flow rate difference threshold.

[0079] The following describes situations AC respectively:

[0080] In case A, the second flow rate is greater than the first flow rate. This case corresponds to the first flow rate difference threshold. Preferably, the first flow rate difference threshold may be 1.086.

[0081] Case B: The second flow rate is not greater than the first flow rate. This case corresponds to the second flow rate difference threshold. Preferably, the second flow rate difference threshold may be 0.9.

[0082] In case C, the minimum bandwidth can be preset. Case C: The minimum bandwidth is allocated, the flow rate is less than the minimum bandwidth, and the second flow rate is not greater than the first flow rate. This case corresponds to the third flow rate difference threshold. Preferably, the third flow rate difference threshold can be 0.85.

[0083] When the first ratio of the second flow rate to the first flow rate is greater than the flow rate difference threshold, the calculation of the second ratio can be triggered. In the embodiment of the present disclosure, the step of calculating the second ratio can be conditionally performed to reduce the probability of misjudging the first bandwidth full state by obtaining the second ratio when the number fluctuates.

[0084] In the embodiments of the present disclosure, a full threshold may be preset, and the full threshold may represent the judgment of whether the bandwidth is full from the data flow level. The full threshold may represent: the maximum value that the second ratio can reach when the bandwidth is not fully occupied. If the second ratio is greater than the full threshold, it means that the bandwidth is fully occupied. Since the bandwidth in the current detection process may be the aforementioned minimum bandwidth, or may be greater than the aforementioned minimum bandwidth, these two situations may correspond to a full threshold respectively. That is, the full threshold may include: a first full threshold and a second full threshold. Among them, the first full threshold is less than the second full threshold.

[0085] The bandwidth in the current detection process may be the aforementioned minimum bandwidth. For the convenience of description, this situation is named as situation D. Situation D corresponds to the first idle full threshold. Preferably, the first idle full threshold may be 7.5.

[0086] The bandwidth in the current detection process is greater than the aforementioned minimum bandwidth. For the convenience of description, this situation is named as situation E. Situation E corresponds to the second idle full threshold. Preferably, the second idle full threshold can be 45.

[0087] In summary, when any one of the situations A, B, and C is met, the operation of determining the second ratio is triggered. Then, if the situation D is met and the second ratio is greater than the first idle full threshold, the first bandwidth full state is determined to be the full state. If the situation E is met and the second ratio is greater than the second idle full threshold, the first bandwidth full state is determined to be the full state.

[0088] The third case

[0089] If the first ratio is greater than the flow rate difference threshold, it means that the second flow rate has a greater change than the first flow rate. If the idle count is zero and the flow count is not zero, it means that the bandwidth is fully occupied by normal messages. Therefore, when the first ratio is greater than the flow rate difference threshold, the idle count is zero, and the flow count is not zero, it means that the bandwidth is not idle. Therefore, in this case, it is determined that the first bandwidth occupancy state is the occupancy state.

[0090] When none of the first case, the second case, and the third case mentioned above is satisfied, it can be determined that the first bandwidth occupied state is a non-occupied state.

[0091] Using the method of the embodiment of the present disclosure, the corresponding full states in various scenarios can be identified. For example, the full state corresponding to the situation where the traffic has not changed from the previous detection cycle to the current detection cycle and the bandwidth continues to be full can be identified; the full state corresponding to the situation where the traffic in the current detection cycle increases to the allocated bandwidth (including the two scenarios of just being full and exceeding the allocated bandwidth) compared to the previous detection cycle can also be identified; the full state corresponding to the situation where, although the traffic in the current detection cycle decreases compared to the previous detection cycle, the traffic decrease is not caused by a decrease in the amount of data can also be identified.

[0092] For example: the three detection cycles from morning to night in chronological order are: the first detection cycle, the second detection cycle, and the third detection cycle. The bandwidth allocated for the first detection cycle is 100 megabits, and the second detection cycle will fully occupy the allocated bandwidth, so the flow rate of the second detection cycle is 100 megabits per second. If the traffic continues to rise, the second detection cycle actually requires 110 megabits of bandwidth, but due to multi-terminal competition, only 90 megabits are allocated for the second detection cycle. In this way, the maximum flow rate of the third detection cycle will not be higher than 90 megabits per second. Although the flow rate of the third detection cycle is lower than that of the second detection cycle, it is not caused by a decrease in actual traffic. The disclosed embodiment can also identify this occupancy state.

[0093] In the embodiment of the present disclosure, in view of the complex characteristics of the network environment, the full status in various scenarios can be identified. Using the method of the embodiment of the present disclosure, the first bandwidth full status can be judged in multiple situations, which improves the accuracy and universality of determining the first bandwidth full status. Moreover, the method of the embodiment of the present disclosure combines the judgment of the bandwidth full status at the flow rate level and the flow level, that is, combines the first flow rate, the second flow rate, the flow count, and the idle count, which can improve the accuracy of determining the first bandwidth full status. In addition, the method of the embodiment of the present disclosure can conditionally trigger the step of determining the second ratio, reduce the probability of this step due to flow rate jitter, and save computing resources.

[0094] In a possible implementation, the bandwidth demand state includes: traffic increase, and the current bandwidth demand state is determined based on the first flow rate of the previous detection cycle data, the second flow rate of the current detection cycle data, and the first bandwidth occupancy state, including: based on the first flow rate and the second flow rate, determining the traffic change state of the current detection cycle compared with the previous detection cycle data, the traffic change state includes: a changed state, or an unchanged state; when the second flow rate is greater than the first flow rate, and the traffic is in the changed state, and the bandwidth is in the not occupied state, the bandwidth demand state is determined as the traffic increase.

[0095] The process of determining the flow change state has been introduced in the previous article and will not be repeated here.

[0096] If the second flow rate is greater than the first flow rate, and the traffic is in a changed state, it means that the traffic in the current detection cycle is increasing compared to the previous detection cycle. Since the bandwidth is not fully occupied, the traffic is increasing but has not yet increased to fully occupy the bandwidth, and there is still surplus in the allocated bandwidth. Therefore, when the second flow rate is greater than the first flow rate, the traffic is in a changed state, and the bandwidth is not fully occupied, the bandwidth demand state is determined to be the traffic increase.

[0097] In the embodiment of the present disclosure, the flow rate and flow rate are used together to jointly judge the flow rate increase, and the judgment result is more accurate. Moreover, the flow rate increase can be divided into two situations: the flow rate increases to the bandwidth being fully occupied, or the flow rate does not increase to the bandwidth being fully occupied. The requirements for the target bandwidth in these two situations are different. Therefore, the embodiment of the present disclosure limits the flow rate increase to the situation where the flow rate does not increase to the bandwidth being fully occupied, which more accurately describes the bandwidth demand state, thereby improving the accuracy of determining the target bandwidth.

[0098] In a possible implementation, the bandwidth demand state includes: traffic decrease, and the current bandwidth demand state is determined based on the first flow rate of the previous detection cycle data, the second flow rate of the current detection cycle data, and the first bandwidth occupancy state, including: based on the first flow rate and the second flow rate, determining the traffic change state of the current detection cycle compared with the previous detection cycle data, the traffic change state includes: a changed state, or an unchanged state; when the second flow rate is less than the first flow rate, and the traffic is in the changed state, and the bandwidth is in the not occupied state, the bandwidth demand state is determined as the traffic decrease.

[0099] The process of determining the flow change state has been introduced in the previous article and will not be repeated here.

[0100] If the second flow rate is less than the first flow rate, and the flow is in a changed state, it means that the flow is decreasing in the current detection cycle compared to the previous detection cycle. Therefore, the bandwidth is not fully occupied, and there is a surplus of the allocated bandwidth. Therefore, when the second flow rate is less than the first flow rate, the flow is in a changed state, and the bandwidth is not fully occupied, the bandwidth demand state is determined as the flow decrease.

[0101] In the embodiment of the present disclosure, the flow rate drop is determined based on the flow rate, flow rate, and the first bandwidth occupancy status, and the determination result is more accurate.

[0102] In a possible implementation, the bandwidth demand state includes: the flow rate remains unchanged, and the current bandwidth demand state is determined based on the first flow rate of the previous detection cycle data, the second flow rate of the current detection cycle data, and the first bandwidth occupancy state, including: based on the first flow rate and the second flow rate, determining the flow change state of the current detection cycle compared with the previous detection cycle data, the flow change state includes: a changed state, or an unchanged state; when the flow is in the unchanged state, the bandwidth demand state is determined as the flow rate remains unchanged.

[0103] The process of determining the flow change state has been introduced in the previous text and will not be repeated here. If the flow is in an unchanged state, the bandwidth demand state is determined to be the flow unchanged. Since the unchanged flow state indicates that there is no need to change the allocated bandwidth. Since the probability of misjudging the flow change state due to data jitter can be reduced in the present disclosure, the accuracy of determining the unchanged flow state can be improved.

[0104] In one possible implementation, the bandwidth demand state includes: bandwidth full, and determining the current bandwidth demand state based on the first flow rate of the previous detection cycle data, the second flow rate of the current detection cycle data, and the first bandwidth full state includes: when the first bandwidth full state is the full state, determining the bandwidth demand state as the bandwidth full.

[0105] The process of determining the flow change state has been introduced above and will not be repeated here. If the first bandwidth occupancy state is the aforementioned occupancy state, the bandwidth demand state is determined to be bandwidth occupancy. The bandwidth occupancy state indicates that the bandwidth needs to be increased. The embodiment of the present disclosure can accurately identify the bandwidth occupancy state.

[0106] In a possible implementation, the target bandwidth includes: a first target bandwidth, a second target bandwidth, and a third target bandwidth. Determining the target bandwidth of the current detection cycle based on the bandwidth demand state includes: when the bandwidth demand state is an increase in traffic or a decrease in traffic, determining the initial bandwidth according to actual demand; adding preset redundancy to the initial bandwidth to obtain the first target bandwidth; when the bandwidth demand state is that the bandwidth is full, determining the preset maximum bandwidth as the second target bandwidth; when the bandwidth demand state is that the traffic remains unchanged, determining the current bandwidth as the third target bandwidth.

[0107] In the embodiment of the present disclosure, a maximum bandwidth may be preset, and when the bandwidth demand state is that the bandwidth is fully occupied, the preset maximum bandwidth is determined as the second target bandwidth. In this way, the current detection cycle obtains the preset maximum bandwidth, which can meet the usage demand.

[0108] When the bandwidth requirement state is that the flow rate remains unchanged, it means that the bandwidth does not need to be changed, so the current bandwidth can be determined as the third target bandwidth.

[0109] When the bandwidth demand state is a traffic increase or traffic decrease, it means that the current bandwidth is not fully occupied. Based on the current bandwidth and the bandwidth demand state, the bandwidth can be adjusted to determine the first target bandwidth. In addition, during the adjustment process, not only is the bandwidth allocated according to demand, but redundancy is also added. In this way, when the traffic increases in the next detection cycle and exceeds the allocated bandwidth, the probability of network congestion or packet loss is reduced. Preferably, the redundancy is 0.2 times the initial bandwidth.

[0110] For example, the allocated bandwidth is 100 Mbps. Although the traffic increases, it increases from 80 Mbps to 90 Mbps, that is, the bandwidth is not fully occupied. The preset floating value can be increased based on 100 Mbps, or the increased floating value can be calculated to obtain the initial bandwidth, plus redundancy.

[0111] For example, the allocated bandwidth is 100 Mbps. If the traffic drops from 100 Mbps to 85 Mbps, the preset floating value can be dropped based on 100 Mbps, or the dropped floating value can be calculated to obtain the initial bandwidth, plus redundancy.

[0112] In the embodiments of the present disclosure, different methods can be used to determine the target bandwidth according to different bandwidth demand states, thereby improving the accuracy of the determined target bandwidth and satisfying the actual usage demand. Furthermore, when the bandwidth demand state is a flow increase or a flow decrease, the target bandwidth can be determined according to the actual demand, and the target bandwidth includes redundancy, thereby reducing the probability of network congestion or packet loss.

[0113] Figure 2 A schematic diagram of the structure of a bandwidth allocation device provided in an embodiment of the present disclosure. The device 200 includes:

[0114] The first bandwidth fullness status acquisition unit 201 is configured to acquire a first bandwidth fullness status of a current detection period, wherein the first bandwidth fullness status includes: a full state or a non-full state;

[0115] A current bandwidth demand state determining unit 202, configured to determine a current bandwidth demand state based on a first flow rate of data in a previous detection cycle, a second flow rate of data in a current detection cycle, and a first bandwidth occupancy state;

[0116] The current detection period target bandwidth determination unit 203 is configured to determine the target bandwidth of the current detection period based on the bandwidth demand state.

[0117] In a possible implementation, the first bandwidth fullness status acquiring unit 201 includes:

[0118] A count acquisition unit, used to acquire the flow count and idle count of the current detection cycle;

[0119] A first flow change state determining unit, configured to determine a flow change state of a current detection cycle compared with data of a previous detection cycle based on the first flow rate and the second flow rate, wherein the flow change state includes: a changed state or an unchanged state;

[0120] a first bandwidth full state determining unit A, configured to determine the first bandwidth full state as the full state when the traffic is in the unchanged state and the bandwidth in the previous detection cycle is in the full state;

[0121] or,

[0122] a second ratio determination unit, configured to determine a second ratio of the flow count to the idle count when a first ratio of the second flow rate to the first flow rate is greater than a flow rate difference threshold;

[0123] A first bandwidth full state determining unit B is configured to determine the first bandwidth full state as the full state when the second ratio is greater than a full threshold;

[0124] or,

[0125] The first bandwidth full state determining unit C is configured to determine the first bandwidth full state as the full state when the first ratio is greater than the flow rate difference threshold, the idle count is zero, and the flow count is not zero.

[0126] In a possible implementation, the bandwidth requirement state includes: traffic increase, and the current bandwidth requirement state determining unit 202 includes:

[0127] A second flow change state determining unit, configured to determine a flow change state of a current detection cycle compared with data of a previous detection cycle based on the first flow rate and the second flow rate, wherein the flow change state includes: a changed state or an unchanged state;

[0128] The flow increase determining unit is used to determine the bandwidth demand state as the flow increase when the second flow rate is greater than the first flow rate, the flow is in the changed state, and the bandwidth is in the unoccupied state.

[0129] In a possible implementation, the bandwidth requirement state includes: traffic decrease, and the current bandwidth requirement state determining unit 202 includes:

[0130] A third flow change state determining unit, configured to determine, based on the first flow rate and the second flow rate, a flow change state of a current detection cycle compared with data of a previous detection cycle, wherein the flow change state includes: a changed state, or an unchanged state;

[0131] The flow rate reduction determining unit is configured to determine the bandwidth demand state as the flow rate reduction when the second flow rate is less than the first flow rate, the flow rate is in the changed state, and the bandwidth is in the unoccupied state.

[0132] In a possible implementation, the bandwidth requirement state includes: the flow rate remains unchanged, and the current bandwidth requirement state determining unit 202 includes:

[0133] a fourth flow change state determining unit, configured to determine, based on the first flow rate and the second flow rate, a flow change state of a current detection cycle compared with data of a previous detection cycle, wherein the flow change state includes: a changed state or an unchanged state;

[0134] The flow unchanged determining unit is used to determine the bandwidth requirement state as the flow unchanged when the flow is in the unchanged state.

[0135] In a possible implementation, the bandwidth requirement state includes: bandwidth is full, and the current bandwidth requirement state determining unit 202 includes:

[0136] A bandwidth fullness determining unit is configured to determine the bandwidth requirement state as the bandwidth fullness when the first bandwidth fullness state is the fullness state.

[0137] In a possible implementation, the target bandwidth includes: a first target bandwidth, a second target bandwidth, and a third target bandwidth, and the current detection period target bandwidth determination unit 203 includes:

[0138] An initial bandwidth determining unit, configured to determine an initial bandwidth according to actual demand when the bandwidth demand state is a flow increase or a flow decrease;

[0139] A first target bandwidth determining unit, configured to add a preset redundancy to the initial bandwidth to obtain a first target bandwidth;

[0140] A second target bandwidth determining unit, configured to determine a preset maximum bandwidth as a second target bandwidth when the bandwidth demand state is that the bandwidth is fully occupied;

[0141] The third target bandwidth determining unit is configured to determine the current bandwidth as the third target bandwidth when the bandwidth demand state is that the flow rate remains unchanged.

[0142] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0143] The embodiment of the present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.

[0144] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.

[0145] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.

[0146] Figure 3 The structure diagram of an electronic device for bandwidth allocation provided by an embodiment of the present disclosure is shown in FIG. 19. For example, the electronic device 1900 may be provided as a server or a terminal device. Figure 3 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.

[0147] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output interface 1958 (I / O interface). The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2003. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM or similar.

[0148] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.

[0149] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0150] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0151] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0152] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0153] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0154] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0155] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0156] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0157] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A bandwidth allocation method, It is characterized in that include: Acquire a first bandwidth occupancy state of a current detection period, where the first bandwidth occupancy state includes: a full state or a non-full state; Determine a current bandwidth demand state based on a first flow rate of data from a previous detection cycle, a second flow rate of data from a current detection cycle, and a first bandwidth occupancy state; Based on the bandwidth requirement state, a target bandwidth of a current detection period is determined.

2. The method according to claim 1, It is characterized in that The obtaining of the first bandwidth occupancy status of the current detection period includes: Get the traffic count and idle count of the current detection cycle; Based on the first flow rate and the second flow rate, determining a flow change state of the current detection cycle compared with the data of the previous detection cycle, the flow change state including: a changed state, or an unchanged state; When the traffic is in the unchanged state and the bandwidth in the previous detection cycle is in the full state, determining the first bandwidth full state as the full state; or, determining a second ratio of the flow count to the idle count when a first ratio of the second flow rate to the first flow rate is greater than a flow rate difference threshold; When the second ratio is greater than a full threshold, determining the first bandwidth full state as the full state; or, When the first ratio is greater than the flow rate difference threshold, the idle count is zero, and the flow count is not zero, the first bandwidth full state is determined as the full state.

3. The method according to claim 1, It is characterized in that The bandwidth demand state includes: traffic increase, the first flow rate based on the previous detection cycle data, the second flow rate of the current detection cycle data, and the first bandwidth occupancy state, determining the current bandwidth demand state, including: Based on the first flow rate and the second flow rate, determining a flow change state of the current detection cycle compared with the data of the previous detection cycle, the flow change state including: a changed state, or an unchanged state; When the second flow rate is greater than the first flow rate, the flow is in the changed state, and the bandwidth is in the unoccupied state, the bandwidth demand state is determined as the flow increase.

4. The method according to claim 1, It is characterized in that The bandwidth demand state includes: flow rate decrease, the first flow rate based on the previous detection cycle data, the second flow rate of the current detection cycle data, and the first bandwidth occupancy state, determining the current bandwidth demand state, including: Based on the first flow rate and the second flow rate, determining a flow change state of the current detection cycle compared with the data of the previous detection cycle, the flow change state including: a changed state, or an unchanged state; When the second flow rate is less than the first flow rate, the traffic is in the changed state, and the bandwidth is in the unoccupied state, the bandwidth demand state is determined as the traffic decrease.

5. The method according to claim 1, It is characterized in that The bandwidth demand state includes: the flow rate is unchanged, the first flow rate based on the previous detection cycle data, the second flow rate based on the current detection cycle data, and the first bandwidth occupancy state, and determining the current bandwidth demand state includes: Based on the first flow rate and the second flow rate, determining a flow change state of the current detection cycle compared with the data of the previous detection cycle, the flow change state including: a changed state, or an unchanged state; When the traffic is in the unchanged state, the bandwidth requirement state is determined as the traffic being unchanged.

6. The method according to claim 1, It is characterized in that The bandwidth demand state includes: bandwidth is full, and the current bandwidth demand state is determined based on the first flow rate of the previous detection cycle data, the second flow rate of the current detection cycle data, and the first bandwidth full state, including: When the first bandwidth occupancy state is the occupancy state, the bandwidth requirement state is determined as the bandwidth being full.

7. The method according to claim 1, It is characterized in that The target bandwidth includes: a first target bandwidth, a second target bandwidth, and a third target bandwidth. The determining the target bandwidth of the current detection period based on the bandwidth demand state includes: When the bandwidth demand state is a flow increase or a flow decrease, determining the initial bandwidth according to actual demand; Adding a preset redundancy to the initial bandwidth to obtain a first target bandwidth; When the bandwidth demand state is that the bandwidth is fully occupied, determining the preset maximum bandwidth as the second target bandwidth; When the bandwidth demand state is that the flow rate remains unchanged, the current bandwidth is determined as the third target bandwidth.

8. A bandwidth allocation device, It is characterized in that include: A first bandwidth fullness status acquisition unit, configured to acquire a first bandwidth fullness status of a current detection period, wherein the first bandwidth fullness status includes: a full state or a non-full state; a current bandwidth demand state determining unit, configured to determine a current bandwidth demand state based on a first flow rate of data in a previous detection cycle, a second flow rate of data in a current detection cycle, and a state of occupancy of the first bandwidth; The current detection period target bandwidth determination unit is configured to determine the target bandwidth of the current detection period based on the bandwidth demand state.

9. An electronic device, It is characterized in that include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the method described in any one of claims 1 to 7 when executing the instructions stored in the memory.

10. A non-volatile computer-readable storage medium having computer program instructions stored thereon, It is characterized in that When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.