Gradient bandwidth adjusting method and device based on flow dimension
Through the gradient bandwidth adjustment method based on the flow dimension, the problem that the bandwidth scheduling algorithm in the existing technology cannot accurately control the ultra-high code rate room bandwidth is solved, and the target computer room bandwidth is accurately adjusted and maximized utilization, ensuring the live streaming Stable transmission and high-quality playback experience.
Patent Information
- Application Number
- CN202411443014.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-21
AI Technical Summary
The existing bandwidth scheduling algorithms cannot accurately control bandwidth when processing ultra-high bit rate rooms, resulting in jitter in the computer room, affecting transmission quality, and may lead to bandwidth overflow and playback stuttering.
Put forward a gradient bandwidth adjustment method based on the dimension of the dimension. By obtaining the user's playback request, determine the bandwidth information of the target computer room, divide the gradient state, and adjust it according to the difference bandwidth and the preset coefficient to ensure the smooth scheduling and maximization of the bandwidth and maximize the width. Utilization rate.
A precise adjustment of the bandwidth of the target room, avoiding the jitter and bandwidth overflow of the computer room, and ensuring the stable transmission and high -quality playback experience of the live broadcast stream.
Smart Images

Figure CN119342252A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method and device for adjusting gradient bandwidth based on flow dimension. Background Art
[0002] In the live broadcast scenario, CDN (Content Delivery Network) is used. The downstream is responsible for distributing the live streaming audio and video streams, and the live streaming of the upstream push point is distributed into a tree structure to meet the requests of large-scale users and improve the user viewing experience. To ensure the quality of user playback, edge nodes can be allocated to users based on the principle of proximity, but at the same time, the total bandwidth of the computer room needs to be controlled to avoid problems such as playback freezes for all users in the computer room when the bandwidth overflows.
[0003] The existing bandwidth scheduling algorithm is based on window values within a certain range. Different window values are allocated according to different bit rates. For example, when the bit rate is greater than 4000kbps, 4 window values are allocated to it, when the bit rate is between 2000-4000kbps, 2 window values are allocated to it, and when the bit rate is less than 2000kbps, 1 window value is allocated to it. The window value is determined based on the remaining bandwidth of the computer room, and the corresponding window value is allocated to the user. For example, if the total bandwidth of the computer room is in units of 1M, the corresponding window value is converted according to the concurrency. If the current remaining bandwidth of the computer room is 10G and the concurrency is 20, the window value is 10*1000 / 20=500, that is, each instance can schedule 500 window values in the current cycle. However, when there is a special ultra-high bit rate room, the original window value cannot accurately control the bandwidth to be allocated. At the same time, the rising curve of the bandwidth curve will show strong jitter, which is easy to cause jitter problems in the computer room and affect the transmission quality. When the bandwidth reaches its peak, the remaining bandwidth will be 0, causing the bandwidth to be unable to maintain a horizontal curve, showing up and down fluctuations, and repeatedly reaching the top. The remaining bandwidth cannot continue to be scheduled. Summary of the invention
[0004] In view of the above problems, embodiments of the present application are proposed to provide a method and device for adjusting gradient bandwidth based on flow dimension that overcomes the above problems or at least partially solves the above problems.
[0005] According to a first aspect of an embodiment of the present application, a method for adjusting gradient bandwidth based on flow dimension is provided, which includes:
[0006] Obtain any user's request for playing the live stream, and determine the target computer room to be allocated to the user based on the request;
[0007] Determine the gradient state of the target computer room in the current cycle according to the bandwidth information of the target computer room, and determine the difference bandwidth of the target computer room in the current cycle according to the bandwidth information of the target computer room;
[0008] The adjustment bandwidth of the target computer room in the current period is determined according to the gradient state of the current period and the difference bandwidth of the current period, so as to adjust the target computer room according to the adjustment bandwidth.
[0009] Optionally, obtaining a playback request of a live stream from any user, and determining a target computer room to be allocated to the user according to the playback request further includes:
[0010] Get any user's request to play the live stream; the play request carries IP request information;
[0011] The region information and / or the operator information is determined according to the IP request information, and the target computer room is determined according to the region information and / or the operator information.
[0012] Optionally, the method further comprises:
[0013] Each period is obtained by dividing the preset time length, and the difference bandwidth of the first period is determined according to the average bandwidth and the average number of playback requests of the target computer room.
[0014] Optionally, determining the gradient state of the target computer room in the current period according to the bandwidth information of the target computer room further includes:
[0015] The remaining bandwidth of the target computer room in the current cycle is matched with the preset bandwidth gradient condition to determine the gradient state of the target computer room in the current cycle.
[0016] Optionally, determining the difference bandwidth of the target computer room in the current period according to the bandwidth information of the target computer room further includes:
[0017] The adjusted bandwidth of the target computer room in the previous cycle, the used bandwidth of the previous cycle, and the used bandwidth of the current cycle are obtained, the sum of the adjusted bandwidth of the previous cycle and the used bandwidth of the previous cycle is calculated, and the difference bandwidth of the current cycle is obtained according to the absolute value of the difference between the sum and the used bandwidth of the current cycle.
[0018] Optionally, if the gradient state is the first gradient state; determining the adjustment bandwidth of the target computer room in the current period according to the gradient state of the current period and the difference bandwidth of the current period, so as to adjust the target computer room according to the adjustment bandwidth further includes:
[0019] The adjusted bandwidth of the target computer room in the current period is obtained according to the difference bandwidth of the current period and the first preset coefficient.
[0020] Optionally, if the gradient state is the second gradient state; determining the adjustment bandwidth of the target computer room in the current period according to the gradient state of the current period and the difference bandwidth of the current period, so as to adjust the target computer room according to the adjustment bandwidth further includes:
[0021] The adjusted bandwidth of the target computer room in the current cycle is obtained according to the difference bandwidth of the current cycle, the second preset coefficient and the difference bandwidth mean; the difference bandwidth mean is determined according to the average value of the difference bandwidth of each cycle from the first cycle to the current cycle.
[0022] Optionally, if the gradient state is the third gradient state; determining the adjustment bandwidth of the target computer room in the current cycle according to the gradient state of the current cycle and the difference bandwidth of the current cycle, so as to adjust the target computer room according to the adjustment bandwidth further includes:
[0023] The adjusted bandwidth of the target computer room in the current period is determined based on the difference bandwidth of the current period.
[0024] Optionally, the method further comprises:
[0025] If the adjusted bandwidth is greater than the remaining bandwidth of the target computer room in the current period, the adjusted bandwidth of the target computer room in the current period is determined according to the remaining bandwidth of the target computer room in the current period.
[0026] Optionally, the method further comprises:
[0027] If the gradient state is the third gradient state, a target scheduler matching the target computer room is determined according to a preset probability algorithm, so that users corresponding to the target scheduler are allocated to the target computer room; wherein one scheduler corresponds to multiple users.
[0028] According to a second aspect of an embodiment of the present application, a flow dimension-based gradient bandwidth adjustment device is provided, comprising:
[0029] A stream request module, adapted to obtain a playback request of a live stream from any user, and determine a target computer room to be allocated to the user according to the playback request;
[0030] A gradient state module, adapted to determine the gradient state of the target computer room in the current cycle according to the bandwidth information of the target computer room, and to determine the difference bandwidth of the target computer room in the current cycle according to the bandwidth information of the target computer room;
[0031] The adjustment module is adapted to determine the adjustment bandwidth of the target computer room in the current period according to the gradient state of the current period and the difference bandwidth of the current period, so as to adjust the target computer room according to the adjustment bandwidth.
[0032] According to a third aspect of an embodiment of the present application, there is provided a computing device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0033] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the above-mentioned gradient bandwidth adjustment method based on flow dimension.
[0034] According to a fourth aspect of an embodiment of the present application, a computer storage medium is provided, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to perform operations corresponding to the above-mentioned gradient bandwidth adjustment method based on flow dimension.
[0035] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, comprising at least one executable instruction, wherein the executable instruction enables a processor to perform operations corresponding to the above-mentioned flow dimension-based gradient bandwidth adjustment method.
[0036] According to the flow dimension-based gradient bandwidth adjustment method and device provided in the present application, the bandwidth of the target computer room is adjusted in the live stream dimension, the target computer room is determined according to the playback request of the live stream, and the gradient state of the target computer room is determined according to the bandwidth information division of the target computer room. With respect to the gradient state of the target computer room, a smooth peak is achieved and the effect of maximizing the utilization of the computer room is maintained, thereby ensuring stability and resource utilization.
[0037] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0039] Figure 1 A flow chart of a gradient bandwidth adjustment method based on flow dimension according to an embodiment of the present application is shown;
[0040] Figure 2 Schematic diagrams of curves corresponding to different gradient states are shown;
[0041] Figure 3 A flow chart of a gradient bandwidth adjustment method based on flow dimension according to another embodiment of the present application is shown;
[0042] Figure 4 A schematic diagram of a tree-structured CDN node is shown;
[0043] Figure 5 A schematic structural diagram of a gradient bandwidth adjustment device based on flow dimension according to an embodiment of the present application is shown;
[0044] Figure 6A schematic diagram of the structure of a computing device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0045] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0046] First, the terms involved in one or more embodiments of the present application are explained.
[0047] Stream: refers to a live streaming screen in a live broadcast room, with a unique identifier. Different resolutions belong to different streams.
[0048] Bandwidth overflow: refers to the situation where the actual bandwidth used by the dispatched computer room exceeds the maximum value of the computer room, causing network packet loss and resulting in viewing lag.
[0049] Gradient bandwidth algorithm: The entire bandwidth control is divided into multiple stages and different calculation methods are used to calculate the available bandwidth.
[0050] Figure 1 A flow chart of a gradient bandwidth adjustment method based on flow dimension according to an embodiment of the present application is shown. Figure 1 As shown, the method comprises the following steps:
[0051] Step S101, obtaining a playback request for a live stream from any user, and determining a target computer room to be allocated to the user according to the playback request.
[0052] When a user enters the live broadcast room to watch a live broadcast, he or she will initiate a request to play the live stream so that the stream can be pulled from the CDN, that is, the live stream can be obtained for playback. CDN can obtain any user's request to play the live stream and assign the corresponding target computer room to the user based on the playback request. The target computer room is the computer room where the edge node of the CDN that distributes the live stream to the user is located. When assigning the target computer room, the physical distance between the target computer room and the user is considered. The target computer room that is physically close to the user can be selected to facilitate the transmission of the live stream between the user and reduce transmission delay.
[0053] This embodiment adjusts the bandwidth based on the live streaming dimension. Based on the real-time live streaming needs of users, it can specifically consider the bandwidth required for the live streaming and the current remaining bandwidth (available bandwidth) of the target computer room, and accurately adjust the bandwidth of the target computer room. While ensuring the live streaming needs of users (such as bit rate, etc.) and the quality of live streaming playback (such as no lag, no jitter, etc.), the bandwidth utilization of the target computer room is maximized.
[0054] Step S102: determining the gradient state of the target computer room in the current period according to the bandwidth information of the target computer room, and determining the difference bandwidth of the target computer room in the current period according to the bandwidth information of the target computer room.
[0055] After the target computer room is determined according to the playback request of the live stream, that is, after it is determined that the bandwidth of the target computer room needs to be adjusted, the bandwidth information of the target computer room is obtained to determine the gradient state of the current cycle of the target computer room. Here, each cycle can be divided according to the preset time length, and the adjustment bandwidth of the target computer room can be adjusted in units of cycles, so that it can be adjusted in real time and accurately according to the changing bandwidth conditions. The preset time length can be, for example, 10 seconds, that is, every 10 seconds is a cycle, and the adjustment bandwidth of the target computer room of the current cycle is adjusted in units of cycles.
[0056] The gradient state is determined according to the bandwidth information of the target computer room and is used to characterize the usage of the target computer room in the current cycle. The gradient state can include multiple different gradient states, such as the first gradient state, the second gradient state, the third gradient state, etc. Figure 2 As shown, the gradient state can be Figure 2 As shown by the red curve in the middle, the first gradient state is Figure 2 The state shown by number 1 is a rapidly rising gradient state. At this time, the remaining bandwidth of the target computer room is large, and more live streaming playback requests from users can be received. The bandwidth utilization rate will increase rapidly to meet the rapidly increasing live streaming needs of users; the second gradient state is Figure 2 The state shown by number 2 is a gradient state of oscillation and increase. At this time, after the target computer room passes through the first gradient state, the bandwidth usage increases rapidly and is close to the overall bandwidth peak of the target computer room. At this time, the bandwidth usage of the target computer room only needs to maintain a slight oscillation and increase. The third gradient state is Figure 2 The state shown by number 3 is a gradient state of oscillation and maintenance of stability. At this time, the bandwidth used by the target computer room basically reaches the bandwidth peak of the target computer room, and its available bandwidth is less. In the third gradient state, the bandwidth that naturally disappears during the period is appropriately supplemented to make it fit the peak value, and the maximum bandwidth utilization of the target computer room has been reached. Figure 2 The white curve in the middle is the target curve for the bandwidth used by the target computer room. Under different gradient states, the red curve and the white curve are overlapped to achieve the maximum utilization of the bandwidth of the target computer room.
[0057] According to the bandwidth information of the target computer room, such as the maximum bandwidth provided by the target computer room and the current cycle export bandwidth (i.e., the bandwidth used by the target computer room when obtaining the playback request of the live stream), the difference between the two is calculated to obtain the remaining bandwidth of the target computer room. According to the remaining bandwidth of the target computer room, the gradient state of the target computer room in the current cycle can be determined. For example, according to the implementation situation, combined with the maximum bandwidth and remaining bandwidth of the target computer room, different remaining bandwidths can be set to correspond to different gradient states. For example, when the remaining bandwidth is greater than or equal to 2G, it is set to the first gradient state, when the remaining bandwidth is greater than or equal to 500M and less than 2G, it is set to the second gradient state, when the remaining bandwidth is less than 500M, it is set to the third gradient state, etc. The above is an example, which is set according to the implementation situation and is not limited here.
[0058] In addition to determining the gradient state of the target computer room in the current cycle according to the bandwidth information of the target computer room, it is also necessary to further determine the differential bandwidth of the target computer room in the current cycle according to the bandwidth information of the target computer room. The cycle can be divided according to the response of the target computer room to the playback request. Except for the first cycle, the differential bandwidth of the current cycle can be determined according to the adjustment bandwidth of the previous cycle of the target computer room, the use bandwidth of the previous cycle and the use bandwidth of the current cycle. Specifically, the adjustment bandwidth of the previous cycle of the target computer room, the use bandwidth of the previous cycle and the use bandwidth of the current cycle are obtained, and the sum of the two is obtained according to the adjustment bandwidth of the previous cycle and the use bandwidth of the previous cycle. The difference is calculated between the sum of the two and the use bandwidth of the current cycle. Here, the difference takes the absolute value. If the sum of the adjustment bandwidth of the previous cycle and the use bandwidth of the previous cycle is greater than the use bandwidth of the current cycle, the difference is the sum of the adjustment bandwidth of the previous cycle and the use bandwidth of the previous cycle minus the difference of the use bandwidth of the current cycle. Otherwise, the difference is the difference between the use bandwidth of the current cycle minus the sum of the adjustment bandwidth of the previous cycle and the use bandwidth of the previous cycle, thereby obtaining the differential bandwidth of the current cycle.
[0059] An initial value can be pre-set for the difference bandwidth of the first period. The initial value can be determined based on the average bandwidth and the average number of playback requests of the target computer room. For example, based on the average bandwidth used in the target computer room during a preset time period and the average number of playback requests obtained during the preset time period, the difference bandwidth can be obtained by multiplying the average bandwidth by the average number of playback requests.
[0060] Step S103, determining the adjustment bandwidth of the target computer room in the current period according to the gradient state of the current period and the difference bandwidth of the current period, so as to adjust the target computer room according to the adjustment bandwidth.
[0061] When the gradient status of the target computer room in the current cycle is different, the adjustment bandwidth of the corresponding target computer room needs to be adjusted using different adjustment strategies to ensure that the target computer room can provide appropriate adjustment bandwidth for the current cycle to facilitate responding to the user's live stream playback request.
[0062] Specifically, according to the gradient state of the current cycle of the target computer room, if the target computer room is in the first gradient state, it is necessary to quickly adjust the available bandwidth of the target computer room to access the live streaming playback requests of more users. Therefore, the adjustment bandwidth can be adjusted according to a large multiple of the difference bandwidth, such as using 10 times the difference bandwidth as the adjustment bandwidth of the current cycle, so as to respond to the live streaming playback requests of more users more quickly. If the target computer room is in the second gradient state, when adjusting, the difference bandwidth can be adjusted with a smaller weight, and adjusted according to the average of the difference bandwidth of the previous cycles to obtain the adjusted bandwidth. If the target computer room is in the third gradient state, the bandwidth usage of the target computer room reaches the peak value of the available bandwidth, and the adjustment bandwidth can be directly determined according to the difference bandwidth, and the unused bandwidth of the target computer room can be appropriately filled.
[0063] According to the different gradient states of the target computer room in the current cycle, different adjustment strategies can be used to determine the adjusted bandwidth of the target computer room in the current cycle. Based on the adjusted bandwidth, the bandwidth that can be used by the target computer room in the current cycle can be determined. Based on the live stream dimension, the target computer room is informed to adjust the bandwidth in real time according to the adjusted bandwidth, so as to maximize the bandwidth utilization of the target computer room while ensuring that users have a better experience in watching live broadcasts.
[0064] According to the flow dimension-based gradient bandwidth adjustment method provided in the present application, the bandwidth of the target computer room is adjusted in the live stream dimension, the target computer room is determined according to the playback request of the live stream, and the gradient state of the target computer room is determined according to the bandwidth information division of the target computer room. Based on the gradient state of the target computer room, a smooth peak is achieved and the effect of maximizing the utilization of the computer room is maintained, thereby ensuring stability and resource utilization.
[0065] Figure 3 A flow chart of a gradient bandwidth adjustment method based on flow dimension according to an embodiment of the present application is shown. Figure 3 As shown, the method comprises the following steps:
[0066] Step S301, obtaining a playback request for a live stream from any user carrying IP request information, determining region information and / or operator information according to the IP request information, and determining a target computer room according to the region information and / or operator information.
[0067] This embodiment is based on the live streaming dimension. According to the user-triggered playback request for the live streaming, the target computer room is determined, and the bandwidth usage of the target computer room is adjusted in real time. When determining the target computer room according to the playback request, first determine the corresponding region information, operator information, etc. according to the IP request information carried in the playback request. For example, according to the IP request information, the region information is determined to be xx, and the operator information is determined to be A, etc. The target computer room is determined by matching the region information and operator information determined by the IP request information with the region and operator of the edge nodes of different CDNs. A tree structure is used between the edge nodes of the CDN and the anchors, such as Figure 4 As shown in the figure, the anchor is the root node, and the leaf nodes are the edge nodes of each operator, such as operator A edge, operator B edge, operator C edge, etc. If the live broadcast stream is popular and the operators are widely distributed, a multi-level tree structure can be constructed for convergence, such as Figure 4 The two-layer secondary nodes, three-line secondary nodes and single-line secondary nodes shown are set according to the implementation situation and are not limited here.
[0068] When matching based on regional information and operator information, in order to quickly determine the target data center, a data center list can be pre-built. The data center list contains edge node identifiers, regions, and operators of different CDNs, so that the corresponding CDN edge node identifiers can be quickly determined by searching the data center list to match regional information and operator information, and the corresponding target data center can be determined based on the identifiers. The above is an example, and the specific settings are based on the implementation situation, and are not limited here.
[0069] Step S302, dividing the periods according to the preset time length.
[0070] When adjusting the bandwidth of the target computer room, the bandwidth usage of the target computer room can be divided into bandwidth usage of different periods. On the one hand, the bandwidth usage of the past periods can be used to adjust the bandwidth usage of the current period to ensure smooth adjustment of the bandwidth usage of the target computer room. On the other hand, adjustments are made in units of periods to ensure timeliness of adjustments.
[0071] The cycle division can be set according to the implementation situation. For example, the preset duration is 10s, and each 10s is a cycle. The bandwidth information of the target computer room for a cycle can be obtained, including the maximum bandwidth provided by the target computer room, the bandwidth used during the cycle, the remaining bandwidth during the cycle, the adjusted bandwidth during the cycle, etc.
[0072] Step S303, matching the remaining bandwidth of the target computer room in the current period with the preset bandwidth gradient condition to determine the gradient state of the target computer room in the current period.
[0073] When adjusting the bandwidth of the target computer room, this embodiment determines the gradient state of the target computer room in the current period according to the remaining bandwidth of the target computer room in the current period. Under different gradient states, the remaining bandwidth of the target computer room is different, that is, the bandwidth that can be used is different. It is necessary to make different adjustments to the bandwidth of the target computer room according to different gradient states, so as to adapt to the bandwidth usage of the target computer room in the current period.
[0074] The gradient state can be pre-divided according to the bandwidth information of the target computer room, such as pre-setting a preset bandwidth gradient condition, such as when the remaining bandwidth is greater than or equal to 2G, it is set to the first gradient state, when the remaining bandwidth is greater than or equal to 500M and less than 2G, it is set to the second gradient state, when the remaining bandwidth is less than 500M, it is set to the third gradient state, etc. The above is an example, and the specific setting is based on the implementation situation and is not limited here.
[0075] The remaining bandwidth of the target computer room in the current cycle is obtained, the remaining bandwidth is matched with the preset bandwidth gradient condition, and the gradient state of the target computer room in the current cycle is determined, so that the bandwidth of the target computer room in the current cycle can be adjusted according to the gradient state.
[0076] Step S304, obtain the adjusted bandwidth of the target computer room in the previous cycle, the used bandwidth of the previous cycle and the used bandwidth of the current cycle, calculate the sum of the adjusted bandwidth of the previous cycle and the used bandwidth of the previous cycle, and obtain the difference bandwidth of the current cycle based on the absolute value of the difference between the sum and the used bandwidth of the current cycle.
[0077] For the current cycle of the target computer room, it is also necessary to determine the differential bandwidth of the current cycle. The differential bandwidth is used to adjust the bandwidth. The differential bandwidth is used as the basis for adjustment. Different adjustment strategies are adopted according to different gradient states. The final adjustment bandwidth is determined based on the differential bandwidth.
[0078] The difference bandwidth of the current cycle is related to the adjusted bandwidth of the target computer room in the previous cycle, the used bandwidth of the previous cycle, and the used bandwidth of the current cycle. The adjusted bandwidth of the previous cycle is the calculated bandwidth that the target computer room can release for live streaming in the previous cycle. The accessed users can be determined based on the adjusted bandwidth to ensure that users are provided with a good live streaming experience and avoid problems such as live streaming freezes. The used bandwidth of the previous cycle is the bandwidth actually used by the target computer room in the previous cycle, and the used bandwidth of the current cycle is the bandwidth actually used by the target computer room in the current cycle.
[0079] According to the current cycle, determine the previous cycle of the current cycle, obtain the adjusted bandwidth of the previous cycle, the used bandwidth of the previous cycle, and the used bandwidth of the current cycle. The difference bandwidth of the current cycle = |the sum of the adjusted bandwidth of the previous cycle + the used bandwidth of the previous cycle - the used bandwidth of the current cycle|. Here, the difference bandwidth of the current cycle takes the absolute value.
[0080] For the first cycle, since there is no previous cycle of the first cycle, the difference bandwidth of the first cycle can be determined in advance based on the average bandwidth and the average number of playback requests of the target computer room, such as by statistically determining the average bandwidth used in the target computer room within a preset time period (i.e., averaging multiple used bandwidths) and the average number of playback requests obtained within the preset time period (i.e., averaging multiple numbers of playback requests), and then the difference bandwidth of the first cycle is obtained by multiplying the average bandwidth by the average number of playback requests. Alternatively, a preset initial value can be set according to the implementation situation, which is not limited here.
[0081] Step S305: determining the adjustment bandwidth of the target computer room in the current period according to the gradient state of the current period and the difference bandwidth of the current period, so as to adjust the target computer room according to the adjustment bandwidth.
[0082] After determining the gradient state of the current cycle and obtaining the difference bandwidth of the current cycle, according to the specific gradient state, such as the gradient state is the first gradient state, which is a rapidly rising gradient state, the target computer room has a large amount of remaining bandwidth, and the target computer room can obtain the adjusted bandwidth of the current cycle according to the product of the difference bandwidth of the current cycle and the first preset coefficient. The first preset coefficient uses a larger coefficient, such as 10, and the obtained adjusted bandwidth is larger, which is convenient for meeting the rapidly rising live streaming needs of users and connecting more users. Furthermore, after obtaining the adjusted bandwidth, further judgment is required. If the adjusted bandwidth is greater than the remaining bandwidth of the target computer room in the current cycle, the adjusted bandwidth of the target computer room in the current cycle needs to be determined based on the remaining bandwidth of the target computer room in the current cycle, that is, the remaining bandwidth of the target computer room in the current cycle is used as the adjusted bandwidth of the target computer room in the current cycle to avoid overflow of the adjusted bandwidth and the target computer room cannot provide the corresponding bandwidth. If the gradient state is the second gradient state, which is an oscillating upward gradient state, the bandwidth usage of the target computer room has been quickly uploaded and is close to the maximum available bandwidth of the target computer room. It is sufficient to maintain a slight oscillation increase. It can be adjusted according to the differential bandwidth of the current cycle, the second preset coefficient, and the differential bandwidth mean, such as the differential bandwidth of the current cycle * the second preset coefficient + the differential bandwidth mean = the adjusted bandwidth of the target computer room in the current cycle. The second preset coefficient uses a smaller coefficient, such as 0.1, and the obtained adjusted bandwidth of the target computer room in the current cycle is adjusted within the range of the differential bandwidth mean. The differential bandwidth mean is determined based on the average value of the differential bandwidth of multiple cycles from the first cycle to the current cycle. Further, if the obtained adjusted bandwidth is greater than the remaining bandwidth of the target computer room in the current cycle, it is used as the adjusted bandwidth of the target computer room in the current cycle based on the remaining bandwidth of the target computer room in the current cycle to avoid overflow of the adjusted bandwidth. If the gradient state is the third gradient state, which is a gradient state of oscillation and stabilization, the target computer room's bandwidth usage basically reaches the target computer room's maximum available bandwidth, and the remaining bandwidth is small. In the third gradient state, the bandwidth that naturally disappears during the cycle can be appropriately supplemented, and the target computer room's current cycle adjustment bandwidth can be determined based on the difference bandwidth of the current cycle. Further, if the obtained adjustment bandwidth is greater than the remaining bandwidth of the target computer room's current cycle, it is used as the target computer room's current cycle adjustment bandwidth according to the remaining bandwidth of the target computer room's current cycle to avoid adjustment bandwidth overflow.
[0083] Furthermore, if the gradient state is the third gradient state, the adjustment bandwidth of the target computer room is small at this time, and it may not be able to meet all playback requests, that is, it is impossible to allocate users corresponding to all playback requests. The target scheduler that matches the target computer room can be determined according to the preset probability algorithm. One scheduler can correspond to multiple users. The preset probability algorithm, such as the classical probability algorithm, is used to screen out the target scheduler, and only the users corresponding to the target scheduler are allocated to the target computer room, ensuring that the target computer room can provide good live streaming playback effects for the users corresponding to the target scheduler. For users who are not the target schedulers, you can consider allocating them to other computer rooms, etc., which will not be explained in detail here.
[0084] To facilitate a better understanding of this embodiment, the maximum available bandwidth of the target computer room is 16.2G, the difference bandwidth of the first cycle is 1G, and the adjustment strategies of each gradient state are: first gradient state: U=D*10, second gradient state: U=D*0.1+∑D(n) / n, third gradient state: U=D as an example, refer to the following Table 1:
[0085] Table 1
[0086]
[0087]
[0088] Among them, each row of values except the header in Table 1 represents a cycle, the first row is the first cycle, the first row of difference bandwidth D is the difference bandwidth of the first cycle, and the preset initial value is 1G. After that, the difference bandwidth D of each row is determined according to the difference between the sum of the adjustment bandwidth U and the use bandwidth O of the previous row and the use bandwidth O of the current row. The maximum available bandwidth M is the maximum bandwidth value that the target computer room can provide for use, the use bandwidth O is the bandwidth actually used by the target computer room during the cycle, and the remaining bandwidth C is the difference between the maximum available bandwidth M and the use bandwidth O. The first to third rows are the first gradient state, the fourth to sixth rows are the second gradient state, and the seventh to ninth rows are the third gradient state. The adjusted bandwidth U is obtained according to the adjustment strategy of each gradient state, and it is also necessary to compare it with the remaining bandwidth C. If it is greater than the remaining bandwidth C, the adjusted bandwidth U is adjusted to the value corresponding to the remaining bandwidth C. According to the adjustment formulas of each gradient state exemplified above, the adjusted bandwidth U can be calculated according to the difference bandwidth D respectively. For example, the first row adjusted bandwidth U = difference bandwidth D*10 = 10G. The second row, the difference bandwidth D = 10 + 2-7.6 = 4.4G, the adjusted bandwidth U should be the difference bandwidth D * 10, the value obtained is 44G, which is greater than the remaining bandwidth C, and the adjusted bandwidth U is adjusted to the value 8.6G corresponding to the remaining bandwidth C. The third row, the difference bandwidth D = 8.6 + 7.6 - 11.8 = 4.4G, the adjusted bandwidth U should be the difference bandwidth D * 10, the value obtained is 44G, which is greater than the remaining bandwidth C, and the adjusted bandwidth U is adjusted to the value 4.4G corresponding to the remaining bandwidth C. The fourth row, the difference bandwidth D = 4.4 + 11.8 - 14.2 = 2G, the adjusted bandwidth U should be the difference bandwidth D * 0.1 + (1 + 4.4 + 4.4 + 2) / 4 = 3.15G, which is greater than the remaining bandwidth C, and the adjusted bandwidth U is adjusted to the value 2G corresponding to the remaining bandwidth C. The fifth row, the difference bandwidth D = 2 + 14.2-15.5 = 0.7G, the adjustment bandwidth U should be the difference bandwidth D * 0.1 + (1 + 4.4 + 4.4 + 2 + 0.7) / 5 = 2.57G, which is greater than the remaining bandwidth C, and the adjustment bandwidth U is adjusted to the value of 0.7G corresponding to the remaining bandwidth C. The sixth row, the difference bandwidth D = 0.7 + 15.5-15.8 = 0.4G, the adjustment bandwidth U should be the difference bandwidth D * 0.1 + (1 + 4.4 + 4.4 + 2 + 0.7 + 0.4) / 6 = 2.19G, which is greater than the remaining bandwidth C, and the adjustment bandwidth U is adjusted to the value of 0.4G corresponding to the remaining bandwidth C. The seventh row, the difference bandwidth D = 0.4 + 15.8-16 = 0.2G, the adjustment bandwidth U should be the difference bandwidth D, that is, 0.2G. In the eighth row, the difference bandwidth D = 0.2 + 16-16.2 = 0G, and the adjustment bandwidth U should be the difference bandwidth D, that is, 0G. In the ninth row, the difference bandwidth D = 0 + 16.2-16.2 = 0G, and the adjustment bandwidth U should be the difference bandwidth D, that is, 0G. The above is an example, and the first preset coefficient and the second preset coefficient can also be set according to the implementation situation, which is not limited here.
[0089] According to the gradient bandwidth adjustment method based on the stream dimension provided by the present application, the target computer room is determined according to the playback request of the live stream, and the bandwidth of the target computer room is adjusted in real time according to the live stream dimension. During the adjustment, the gradient state of the target computer room in the current cycle is determined according to the remaining bandwidth of the target computer room, and the bandwidth of the target computer room in the current cycle is adjusted in a targeted manner based on different gradient states, so that the bandwidth usage of the target computer room can be smoothly adjusted and the maximum utilization rate of the bandwidth of the target computer room is achieved. When the adjusted bandwidth of the target computer room is greater than the remaining bandwidth, the remaining bandwidth value is used as the adjusted bandwidth of the target computer room to avoid overflow. When the target computer room is in the third gradient state, considering that the bandwidth usage of the target computer room has basically reached the peak, the target scheduler is calculated using the classical probability algorithm to perform user diversion to ensure that users can watch the live broadcast normally.
[0090] Figure 5 FIG. 1 shows a schematic diagram of a structure of a gradient bandwidth adjustment device based on a flow dimension provided by an embodiment of the present application. Figure 5 As shown, the device comprises:
[0091] The stream request module 510 is adapted to obtain a playback request of any user for a live stream, and determine a target computer room to be allocated to the user according to the playback request;
[0092] The gradient state module 520 is adapted to determine the gradient state of the target computer room in the current cycle according to the bandwidth information of the target computer room, and to determine the difference bandwidth of the target computer room in the current cycle according to the bandwidth information of the target computer room;
[0093] The adjustment module 530 is adapted to determine the adjustment bandwidth of the target computer room in the current period according to the gradient state of the current period and the difference bandwidth of the current period, so as to adjust the target computer room according to the adjustment bandwidth.
[0094] Optionally, the stream request module 510 is further adapted to:
[0095] Get any user's request to play the live stream; the play request carries IP request information;
[0096] The region information and / or the operator information is determined according to the IP request information, and the target computer room is determined according to the region information and / or the operator information.
[0097] Optionally, the device further includes: a period module 540, adapted to obtain each period according to a preset duration, and determine a difference bandwidth of the first period according to an average bandwidth and an average number of playback requests of the target computer room.
[0098] Optionally, the gradient state module 520 is further adapted to:
[0099] The remaining bandwidth of the target computer room in the current cycle is matched with the preset bandwidth gradient condition to determine the gradient state of the target computer room in the current cycle.
[0100] Optionally, the gradient state module 520 is further adapted to:
[0101] The adjusted bandwidth of the target computer room in the previous cycle, the used bandwidth of the previous cycle, and the used bandwidth of the current cycle are obtained, the sum of the adjusted bandwidth of the previous cycle and the used bandwidth of the previous cycle is calculated, and the difference bandwidth of the current cycle is obtained according to the absolute value of the difference between the sum and the used bandwidth of the current cycle.
[0102] Optionally, if the gradient state is the first gradient state, the adjustment module 530 is further adapted to:
[0103] The adjusted bandwidth of the target computer room in the current period is obtained according to the difference bandwidth of the current period and the first preset coefficient.
[0104] Optionally, if the gradient state is the second gradient state, the adjustment module 530 is further adapted to:
[0105] The adjusted bandwidth of the target computer room in the current cycle is obtained according to the difference bandwidth of the current cycle, the second preset coefficient and the difference bandwidth mean; the difference bandwidth mean is determined according to the average value of the difference bandwidth of each cycle from the first cycle to the current cycle.
[0106] Optionally, if the gradient state is the third gradient state, the adjustment module 530 is further adapted to:
[0107] The adjusted bandwidth of the target computer room in the current period is determined based on the difference bandwidth of the current period.
[0108] Optionally, the device further comprises: a comparison module 550 adapted to determine the adjusted bandwidth of the target computer room in the current period according to the residual bandwidth of the target computer room in the current period if the adjusted bandwidth is greater than the residual bandwidth of the target computer room in the current period.
[0109] Optionally, the device also includes: a probability module 560, adapted to determine a target scheduler matching the target computer room according to a preset probability algorithm if the gradient state is a third gradient state, so that a user corresponding to the target scheduler is allocated to the target computer room; wherein one scheduler corresponds to multiple users.
[0110] The description of each module above refers to the corresponding description in the method embodiment and will not be repeated here.
[0111] According to the flow dimension-based gradient bandwidth adjustment device provided in the present application, the bandwidth of the target computer room is adjusted in the live stream dimension, the target computer room is determined according to the playback request of the live stream, and the gradient state of the target computer room is determined according to the bandwidth information division of the target computer room. With respect to the gradient state of the target computer room, a smooth peak is achieved and the effect of maximizing the utilization of the computer room is maintained, thereby ensuring stability and resource utilization.
[0112] The present application also provides a non-volatile computer storage medium, which stores at least one executable instruction, and the executable instruction can execute operations corresponding to the gradient bandwidth adjustment method based on flow dimension in any of the above method embodiments.
[0113] The present application also provides a computer program product, which includes at least one executable instruction or computer program, and the executable instruction or computer program can enable a processor to perform operations corresponding to the flow dimension-based gradient bandwidth adjustment method in any of the above method embodiments.
[0114] Figure 6 A schematic diagram of the structure of a computing device according to an embodiment of the present application is shown. The specific embodiment of the present application does not limit the specific implementation of the computing device.
[0115] like Figure 6 As shown, the computing device may include: a processor (processor) 602 , a communication interface (Communications Interface) 604 , a memory (memory) 606 , and a communication bus 608 .
[0116] in:
[0117] The processor 602 , the communication interface 604 , and the memory 606 communicate with each other via a communication bus 608 .
[0118] The communication interface 604 is used to communicate with other devices such as clients or other servers.
[0119] The processor 602 is used to execute the program 610, and specifically can execute the relevant steps in the above-mentioned embodiment of the gradient bandwidth adjustment method based on the flow dimension.
[0120] Specifically, the program 610 may include program codes, which include computer operation instructions.
[0121] The processor 602 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the present application. The one or more processors included in the computing device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0122] The memory 606 is used to store the program 610. The memory 606 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0123] The program 610 can be specifically used to enable the processor 602 to execute the gradient bandwidth adjustment method based on the flow dimension in any of the above-mentioned method embodiments. The specific implementation of each step in the program 610 can refer to the corresponding descriptions in the corresponding steps and units in the above-mentioned gradient bandwidth adjustment embodiment based on the flow dimension, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above-mentioned method embodiment, which will not be repeated here.
[0124] The algorithm or display provided here is not inherently related to any specific computer, virtual system or other device. Various general systems can also be used together with the teaching based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the application is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the application described here, and the above description of specific languages is to disclose the preferred embodiment of the application.
[0125] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0126] Similarly, it should be understood that in order to streamline the present application and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following intention: the claimed application requires more features than the features clearly stated in each claim. More specifically, as reflected in the claims below, the inventive aspects are less than all the features of the single embodiment disclosed above. Therefore, the claims following the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present application.
[0127] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0128] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present application and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0129] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components of the present application. The present application can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing a part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0130] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be constructed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.
Claims
1. A gradient bandwidth adjustment method based on flow dimension, comprising: Obtaining a playback request for a live stream from any user, and determining a target computer room to be allocated to the user according to the playback request; Determine the gradient state of the target computer room in the current period according to the bandwidth information of the target computer room, and determine the difference bandwidth of the target computer room in the current period according to the bandwidth information of the target computer room; The adjustment bandwidth of the target computer room in the current period is determined according to the gradient state of the current period and the difference bandwidth of the current period, so as to adjust the target computer room according to the adjustment bandwidth.
2. The method according to claim 1, wherein: The obtaining of a playback request of any user for the live stream and determining a target computer room to be allocated to the user according to the playback request further comprises: Obtaining a playback request for a live stream from any user; the playback request carries IP request information; The region information and / or operator information is determined according to the IP request information, and a target computer room is determined according to the region information and / or operator information.
3. The method according to claim 1, wherein: The method further comprises: Each period is obtained by dividing according to a preset time length, and a difference bandwidth of the first period is determined according to the average bandwidth and the average number of playback requests of the target computer room.
4. The method according to any one of claims 1 to 3, wherein: Determining the gradient state of the target computer room in the current cycle according to the bandwidth information of the target computer room further includes: The remaining bandwidth of the target computer room in the current period is matched with a preset bandwidth gradient condition to determine the gradient state of the target computer room in the current period.
5. The method according to any one of claims 1 to 3, wherein: Determining the difference bandwidth of the target computer room in the current period according to the bandwidth information of the target computer room further includes: The adjusted bandwidth of the target computer room in the previous cycle, the used bandwidth of the previous cycle, and the used bandwidth of the current cycle are obtained, the sum of the adjusted bandwidth of the previous cycle and the used bandwidth of the previous cycle is calculated, and the difference bandwidth of the current cycle is obtained according to the absolute value of the difference between the sum and the used bandwidth of the current cycle.
6. The method according to claim 5, wherein: If the gradient state is the first gradient state; determining the adjustment bandwidth of the current cycle of the target computer room according to the gradient state of the current cycle and the difference bandwidth of the current cycle, so as to adjust the target computer room according to the adjustment bandwidth further includes: The adjusted bandwidth of the target computer room in the current period is obtained according to the difference bandwidth of the current period and the first preset coefficient.
7. The method according to claim 5, wherein: If the gradient state is the second gradient state; determining the adjustment bandwidth of the current cycle of the target computer room according to the gradient state of the current cycle and the difference bandwidth of the current cycle, so as to adjust the target computer room according to the adjustment bandwidth further includes: The adjusted bandwidth of the target computer room in the current period is obtained according to the difference bandwidth of the current period, the second preset coefficient and the difference bandwidth mean; the difference bandwidth mean is determined according to the average value of the difference bandwidth of each period from the first period to the current period.
8. The method according to claim 5, wherein: If the gradient state is the third gradient state; determining the adjustment bandwidth of the current cycle of the target computer room according to the gradient state of the current cycle and the difference bandwidth of the current cycle, so as to adjust the target computer room according to the adjustment bandwidth further includes: The adjusted bandwidth of the target computer room in the current period is determined based on the difference bandwidth of the current period.
9. The method according to any one of claims 1 to 8, wherein: The method further comprises: If the adjusted bandwidth is greater than the remaining bandwidth of the target computer room in the current period, the adjusted bandwidth of the target computer room in the current period is determined according to the remaining bandwidth of the target computer room in the current period.
10. The method according to any one of claims 1 to 9, wherein: The method further comprises: If the gradient state is the third gradient state, a target scheduler matching the target computer room is determined according to a preset probability algorithm, so that users corresponding to the target scheduler are allocated to the target computer room; wherein one scheduler corresponds to multiple users.
11. A gradient bandwidth adjustment device based on flow dimension, comprising: A stream request module, adapted to obtain a playback request of a live stream from any user, and determine a target computer room to be allocated to the user according to the playback request; A gradient state module, adapted to determine the gradient state of the target computer room in the current cycle according to the bandwidth information of the target computer room, and to determine the difference bandwidth of the target computer room in the current cycle according to the bandwidth information of the target computer room; The adjustment module is adapted to determine the adjustment bandwidth of the target computer room in the current period according to the gradient state of the current period and the difference bandwidth of the current period, so as to adjust the target computer room according to the adjustment bandwidth.
12. A computing device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the gradient bandwidth adjustment method based on flow dimension as described in any one of claims 1-10.
13. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to perform operations corresponding to the gradient bandwidth adjustment method based on flow dimension as described in any one of claims 1 to 10.
14. A computer program product, comprising at least one executable instruction, wherein the executable instruction enables a processor to perform operations corresponding to the gradient bandwidth adjustment method based on flow dimension as described in any one of claims 1-10.