Load balancing scheduling method, device, computer equipment, computer readable storage medium and computer program product

By obtaining the real-time load data and expected resource usage of each streaming media server of the video cloud platform, determining the target streaming media and scheduling the video stream request, the problem of unreal-time load monitoring of the video cloud platform is solved, and more accurate load balancing scheduling is achieved.

CN119255006BActive Publication Date: 2025-02-28CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411756817.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-02-28
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

When facing the video stream access needs, existing video cloud platforms have problems such as unreal-time load monitoring and lagging in video stream load indicators, resulting in unbalanced load scheduling.

Method used

By responding to the push streaming request of the video streaming data, the load metric data of each streaming media server is obtained, the target streaming media is determined based on the real-time load data and expected resource usage, and the push streaming request is scheduled to the target streaming media for processing. The expected resource usage is generated by the load resource usage and regression model of the historical video stream, which is used to improve the accuracy of load metric data.

Benefits of technology

Real-time load monitoring and accurate load indicator data acquisition are realized, which improves the accuracy of load balancing scheduling and avoids load imbalance and service abnormalities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119255006B_ABST
    Figure CN119255006B_ABST
Patent Text Reader

Abstract

The present application relates to the field of video cloud technology, and in particular to a load balancing scheduling method, apparatus, computer equipment, computer-readable storage medium, and computer program product. The method comprises: in response to a streaming request for video stream data, obtaining load indicator data of each streaming media server, wherein the load indicator data is determined based on the real-time load data of each streaming media server and the expected resource usage, wherein the expected resource usage represents the load resource usage generated by the historical video streams scheduled to the streaming media server within a preset time range; determining the target streaming media from each streaming media server according to the load indicator data; and scheduling the streaming request to the target streaming media for processing. The use of this method can solve the problem of lagging load indicator monitoring and achieve the technical effect of improving the accuracy of load balancing scheduling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video cloud technology, and in particular to a load balancing scheduling method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] When facing the demand for video stream access, the existing video cloud platform needs to consider the load balancing of the streaming media servers in the current resource pool to avoid problems such as idle resources (idle resources cannot provide services), limited access, and service anomalies (such as packet loss) caused by uneven load.

[0003] In traditional technologies, it is usually necessary to dynamically monitor the load of streaming media. In each scheduling request, the streaming media server with the lowest load is selected for scheduling, so that load balancing can be achieved after multiple scheduling. However, when the number of accesses to the video cloud platform is large, the scheduling method in traditional technologies cannot achieve completely real-time load monitoring, and after the video stream is scheduled, the load pressure on the streaming media server will not be immediately reflected in the load indicators, which can easily lead to the problem of uneven load scheduling. Summary of the invention

[0004] Based on this, it is necessary to provide a load balancing scheduling method, device, computer equipment, computer readable storage medium and computer program product that can solve the problems of unreal-time load monitoring and lagging video stream load indicators in traditional technologies in response to the above technical problems.

[0005] In a first aspect, the present application provides a load balancing scheduling method, comprising:

[0006] In response to a streaming request for video streaming data, load indicator data of each streaming media server is obtained, wherein the load indicator data is determined based on real-time load data of each streaming media server and expected resource usage, wherein the expected resource usage represents the load resource usage generated by historical video streams scheduled to the streaming media server within a preset time range;

[0007] Determining target streaming media from each of the streaming media servers according to the load indicator data;

[0008] The streaming request is dispatched to the target streaming media for processing.

[0009] In one embodiment, the method for determining the expected resource usage includes:

[0010] Get historical streaming information;

[0011] When the amount of information of the historical streaming information reaches a preset threshold, a regression model between video parameters and load resources required by the video parameters is established according to the historical streaming information;

[0012] Determining effective video parameters of the historical video stream according to the video parameters of the historical video stream and the streaming success rate of the historical streaming information;

[0013] The regression model is used to generate expected resource usage corresponding to the effective video parameters.

[0014] In one embodiment, the method for determining the expected resource usage includes:

[0015] Get historical streaming information;

[0016] When the amount of information of the historical streaming information is less than a preset threshold, obtaining average load data of the video stream in the current resource pool;

[0017] An expected resource usage corresponding to the historical video stream is generated according to the average load data.

[0018] In one embodiment, the method for acquiring the load indicator data includes:

[0019] Collecting real-time load data of each of the streaming media servers;

[0020] Using a load sliding window, read the current expected resource usage with time validity from a plurality of data buckets of each of the streaming media servers, each of the data buckets being used to store the expected resource usage within a corresponding preset unit time period;

[0021] The load index data of each of the streaming media servers is generated according to the real-time load data and the currently expected resource usage with time validity.

[0022] In one embodiment, the method of using the load sliding window to read the current expected resource usage with time validity from a plurality of data buckets of each of the streaming media servers includes:

[0023] A plurality of valid data buckets with current validity are dynamically maintained in the load sliding window, and the expected resource usage with current validity is obtained by reading from the valid data buckets.

[0024] In one of the embodiments, after dispatching the streaming request to the target streaming media for processing, the method further includes:

[0025] Generate the expected resource usage of the target streaming media according to the video streaming data;

[0026] The expected resource usage of the target streaming media is used to update the load indicator data of the target streaming media.

[0027] In a second aspect, the present application also provides a load balancing scheduling device, including:

[0028] An indicator acquisition module, for obtaining load indicator data of each streaming media server in response to a streaming request for video streaming data, wherein the load indicator data is determined based on real-time load data of each streaming media server and expected resource usage, wherein the expected resource usage represents the load resource usage generated by historical video streams scheduled to the streaming media server within a preset time range;

[0029] A target determination module, used for determining target streaming media from each of the streaming media servers according to the load indicator data;

[0030] A balanced scheduling module, used for scheduling the streaming request to the target streaming media for processing;

[0031] The usage prediction module is used to obtain historical streaming information; when the information volume of the historical streaming information reaches a preset threshold, a regression model between video parameters and load resources required by the video parameters is established according to the historical streaming information; based on the video parameters of the historical video stream and the streaming success rate of the historical streaming information, the effective video parameters of the historical video stream are determined; and the expected resource usage corresponding to the effective video parameters is generated using the regression model.

[0032] In one of the embodiments, the usage prediction module is also used to obtain the average load data of the video stream in the current resource pool when the amount of information of the historical streaming information is less than the preset threshold; and generate the expected resource usage corresponding to the historical video stream based on the average load data.

[0033] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the load balancing scheduling method described in any one of the embodiments of the first aspect is implemented.

[0034] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the load balancing scheduling method described in any one of the embodiments of the first aspect is implemented.

[0035] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the load balancing scheduling method described in any one of the embodiments of the first aspect is implemented.

[0036] The above-mentioned load balancing scheduling method, device, computer equipment, computer-readable storage medium and computer program product obtain the load indicator data of each streaming media server by responding to the push request of video stream data, determine the target streaming media from each streaming media server according to the load indicator data, and schedule the push request to the target streaming media for processing, wherein the load indicator data is determined based on the real-time load data of each streaming media server and the expected resource usage, and the expected resource usage represents the load resource usage generated by the historical video streams scheduled to the streaming media server within a preset time range. The expected resource usage can be used to solve the lag problem that may exist in the real-time load data, thereby achieving the technical effect of improving the accuracy of the load indicator data, thereby improving the accuracy of load balancing scheduling. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0038] Figure 1 An application environment diagram of a load balancing scheduling method in an embodiment;

[0039] Figure 2 A schematic diagram of a load balancing scheduling method in one embodiment;

[0040] Figure 3 A schematic diagram of a flow chart of a step of generating expected resource usage in one embodiment;

[0041] Figure 4 A schematic flow chart of a step of generating expected resource usage in another embodiment;

[0042] Figure 5 A schematic diagram of a flow chart of a load indicator data determination step in one embodiment;

[0043] Figure 6 is a schematic diagram of a load sliding window in one embodiment;

[0044] Figure 7 It is an application scenario diagram of a load balancing scheduling method in another embodiment;

[0045] Figure 8 is a structural block diagram of a load balancing scheduling device 800 in one embodiment;

[0046] Fig. 9FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0048] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0049] The load balancing scheduling method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Specifically, the server 104 can respond to the push stream request of the video stream data sent by the terminal 102, and obtain the load index data of each currently available streaming media server. Among them, the load index data is determined based on the real-time load data of each streaming media server and the expected resource usage. The expected resource usage characterizes the load resource usage generated by the historical video streams scheduled to the streaming media server within a preset time range. The server 104 can determine the target streaming media from each streaming media server based on the load index data, and schedule the push stream request of the video stream data to the target streaming media for processing.

[0050] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart TVs, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.

[0051] In an exemplary embodiment, Figure 2 As shown, a load balancing scheduling method is provided, which is applied to Figure 1The server 104 in the example is used as an example to illustrate the method, which includes the following steps S202 to S206. Among them:

[0052] Step S202, in response to a streaming request for video streaming data, obtaining load indicator data of each streaming media server.

[0053] The push stream request can be used to represent the request process in which the client encapsulates the collected and encoded audio and video stream data into Real-Time Messaging Protocol (RTMP) packets and sends these packets to the server via the RTMP. The purpose of the push stream request is to upload the video stream data to the server so that other users can obtain the uploaded video stream data by sending a pull stream request to the server.

[0054] A streaming media server can be used to characterize the core coefficient of a streaming media application. Its main function is to receive real-time video streams from video acquisition and compression software using a specified streaming protocol, and then broadcast them live to the client using the streaming protocol.

[0055] The load index data may be determined based on the real-time load data of each streaming media server and the expected resource usage. The load index data may include, but is not limited to, any one or more of the resource usage of the central processing unit (CPU), the resource usage of the memory, the resource usage of the disk, the number of network connections, the frequency of input / output operations, and the like.

[0056] The expected resource usage can represent the load resource usage generated by the historical video streams scheduled to the streaming media server within a preset time range. Since the time for the historical video streams to be scheduled to the streaming media server is short, the real-time load data update of the streaming media server may be delayed, so the expected resource usage can be used to more accurately evaluate the load pressure of the streaming media server at future moments. The preset time range can be used to represent a time range with a preset time interval from the moment when the load index data is obtained, for example, five seconds before the moment when the load index data is obtained.

[0057] For example, the server can respond to the video streaming data push request sent by the client and query whether there is a streaming media server that is currently idle or whose current load has not reached the maximum limit. Each streaming media server that is idle or whose current load has not reached the maximum limit is used as a stream object to be pushed for the current video streaming data, and the load indicator data of each stream object to be pushed is obtained from the local database or each streaming media server.

[0058] Step S204: determining target streaming media from each streaming media server according to the load indicator data.

[0059] Optionally, in some embodiments, the server may compare the load index data of each streaming media server and select the streaming media server with the smallest load index data as the target streaming media. Alternatively, in other embodiments, when the load index data includes multiple types of index data, the server may also store the weight or priority corresponding to each index data. For example, when streaming media server A (CPU resource usage is 40%, memory resource usage is 60%) is compared with streaming media server B (CPU resource usage is 60%, memory resource usage is 40%), if the weight or priority of CPU resource usage is higher, then streaming media server A is selected as the target streaming media, otherwise, streaming media server B is selected as the target streaming media.

[0060] Step S206: dispatch the streaming request to the target streaming media for processing.

[0061] Exemplarily, the server may dispatch a streaming request for video stream data to a target streaming media for processing, so as to instruct the target streaming media to receive and store the video stream data.

[0062] In the above-mentioned load balancing scheduling method, by responding to the streaming request of video stream data, the load indicator data of each streaming media server is obtained, the target streaming media is determined from each streaming media server according to the load indicator data, and the streaming request is scheduled to the target streaming media for processing, wherein the load indicator data is determined based on the real-time load data of each streaming media server and the expected resource usage, and the expected resource usage represents the load resource usage generated by the historical video streams scheduled to the streaming media server within a preset time range, and the expected resource usage can be used to solve the lag problem that may exist in the real-time load data, thereby achieving the technical effect of improving the accuracy of the load indicator data, thereby improving the accuracy of load balancing scheduling.

[0063] In an exemplary embodiment, Figure 3 As shown, a method for determining expected resource usage is also provided, including the following steps S302 to S308. Among them:

[0064] Step S302, obtaining historical streaming information.

[0065] Step S304: when the amount of historical streaming information reaches a preset threshold, a regression model between video parameters and load resources required by the video parameters is established according to the historical streaming information.

[0066] The historical streaming information can be used to characterize the historical streaming requests received by the server at historical times and the responses to the historical streaming requests. The historical streaming information can include but is not limited to the online success rate, bit rate, packet loss rate, and other information of the historical video streams.

[0067] Exemplarily, the server can collect the results of each streaming media server's streaming, and write the online status of each video stream, including whether it is successfully online, the bit rate / packet loss rate / coding format after going online, and other information into the local database for storage as historical streaming information. The server can obtain all historical streaming information from the local database. When the amount of information in the historical streaming information reaches a preset threshold, the video parameters such as the bit rate and packet loss rate in the historical streaming information are used as independent variables, and the load index of the streaming media server is used as the dependent variable. The linear regression algorithm, the least squares method, the support vector machine algorithm or the large model are used to infer the relationship between the independent variable and the dependent variable, thereby establishing a regression model between the video parameters and the load resources required for the video parameters.

[0068] Step S306, determining effective video parameters of the historical video stream according to the video parameters of the historical video stream and the streaming success rate of the historical streaming information.

[0069] The effective video parameters may represent video parameters of the historical video stream that can be successfully pushed.

[0070] For example, after the video stream is scheduled to the streaming media server, there may be a situation where the stream fails to go online. In this case, the load pressure generated by the video stream on the streaming media can be ignored. Therefore, the server can use the number of streams that have successfully pushed the stream and the total number of pushed streams in the historical push stream information to determine the push stream success rate of the historical push stream information. The video parameters of the historical video stream and the push stream success rate of the historical push stream information are used for calculation processing, and the product of the video parameters and the push stream success rate is used as the effective video parameters of the historical video stream.

[0071] Step S308: Generate expected resource usage corresponding to the effective video parameters using the regression model.

[0072] Exemplarily, the server can input the effective video parameters of the historical video stream into the regression model, process the effective video parameters using the model parameters of the regression model, and generate expected resource usage corresponding to the effective video parameters based on the relationship between the video parameters of the historical streaming information and the load resources consumed by the historical streaming information.

[0073] Optionally, in some implementations, the video bitrate of the video stream can be used to establish a regression model as shown below: expected resource usage = f (historical average bitrate × historical average online success rate), where f can represent the relationship model between video parameters and load resources. Optionally, in other implementations, the video bitrate can also be replaced by video parameters such as video stream encoding format, stream transmission protocol, and packet loss rate.

[0074] In this embodiment, by obtaining historical streaming information, when the amount of information in the historical streaming information reaches a preset threshold, a regression model between video parameters and load resources required by the video parameters is established based on the historical streaming information, and based on the video parameters of the historical video stream and the streaming success rate of the historical streaming information, the effective video parameters of the historical video stream are determined, and the expected resource usage corresponding to the effective video parameters is generated using the regression model, which can improve the generation accuracy of the expected resource usage.

[0075] In an exemplary embodiment, Figure 4 As shown, a method for determining expected resource usage is also provided, including the following steps S402 to S406. Among them:

[0076] Step S402, obtaining historical streaming information.

[0077] Step S404: when the amount of historical streaming information is less than a preset threshold, average load data of the video stream in the current resource pool is obtained.

[0078] For example, since the accuracy of the regression algorithm is related to the amount of sample data, once the amount of historical streaming information is less than a preset threshold, the regression model established using the historical streaming information may have a large error. Therefore, when the amount of historical streaming information obtained is less than a preset threshold, the server can collect the average load data of all video streams in the current resource pool.

[0079] Step S406: Generate expected resource usage corresponding to the historical video stream according to the average load data.

[0080] For example, the server can establish a relationship between the video parameters and the load resources required by the video parameters based on the current average load data and the load resource usage corresponding to the average load data. Substitute the video parameters of the historical video stream into the relationship between the video parameters and the load resources required by the video parameters to obtain the expected resource usage corresponding to the historical video stream.

[0081] In this embodiment, by obtaining historical streaming information, when the amount of information in the historical streaming information is less than a preset threshold, the average load data of the video stream in the current resource pool is obtained, and the expected resource usage corresponding to the historical video stream is generated according to the average load data, thereby improving the flexibility of generating the expected resource usage.

[0082] In an exemplary embodiment, Figure 5 As shown, a method for obtaining load index data is also provided, including the following steps S502 to S506. Among them:

[0083] Step S502: collecting real-time load data of each streaming media server.

[0084] Exemplarily, the server may collect real-time CPU resource usage, memory resource usage, input / output interface usage, etc. of each streaming server, and use the collected usage data as real-time load data of each streaming server.

[0085] Step S504, using the load sliding window, reads the current expected resource usage with time validity from several data buckets of each streaming media server.

[0086] Each data bucket is used to store the expected resource usage within the corresponding preset unit time period. A data bucket is a data structure used to store and manage data. The preset unit time period can be one second. For example, data bucket B1 can be used to store the expected resource usage within the first second. Data bucket B2 can be used to store the expected resource usage within the second second.

[0087] The load sliding window can be used to store the expected load pressure data of the create stream request received by the streaming media server in the recent time period. The create stream request is generated after receiving the scheduling of the video stream.

[0088] The expected resource usage with time validity can be used to characterize the expected resource usage generated by the video stream that still needs to occupy the load resources of the streaming media server.

[0089] Exemplarily, the server can maintain several data buckets for each streaming media server. Each data bucket is used to store the expected resource usage within a preset unit time period corresponding to the data bucket. For example, when the server schedules a video stream to a streaming media server, the expected resource usage corresponding to the currently scheduled video stream can be written into the data bucket corresponding to the streaming media server at that moment. The load sliding window is used to slide over several data buckets of each streaming media server. The expected resource usage of the data bucket within the load sliding window is read as the current expected resource usage with time validity.

[0090] Step S506: Generate load index data of each streaming media server according to the real-time load data and the current expected resource usage with time validity.

[0091] Exemplarily, the server may perform calculations using the real-time load data of each streaming server and the expected resource usage of the streaming server, and use the sum of the real-time load data and the expected resource usage as the load indicator data of each streaming server.

[0092] In this embodiment, by collecting real-time load data of each streaming media server, the load sliding window is used to read the current expected resource usage with a time limit from several data buckets of each streaming media server. Each data bucket is used to store the expected resource usage within a corresponding preset unit time period. Based on the real-time load data and the current expected resource usage with a time limit, load indicator data of each streaming media server is generated. This can avoid concurrent access requests within the load indicator reporting interval from being scheduled to individual streaming media, causing load imbalance and load indicator distortion, and solve the possible lag problem of load indicator data, thereby improving the accuracy of load indicator data.

[0093] In an exemplary embodiment, step S504 includes: dynamically maintaining a number of valid data buckets that are currently time-sensitive in the load sliding window, and reading from the valid data buckets to obtain the currently time-sensitive expected resource usage.

[0094] Exemplarily, the server can dynamically maintain several (including one or more) valid data buckets with current validity in the load sliding window. When there is one valid data bucket, the expected resource usage of the streaming media server with current validity is obtained by reading from the valid data bucket. When there are multiple valid data buckets, the sum of the expected resource usage stored in each valid data bucket is used as the expected resource usage with current validity.

[0095] Optionally, in some embodiments, the server may dynamically maintain the load sliding window in the following manner: perform an operation of detecting invalid data buckets located outside the load sliding window at preset time periods, and delete the detected invalid data buckets. The preset time period is shorter than a preset unit time period. Exemplarily, during the sliding of the load sliding window, the server may create a new independent thread. Use an independent thread to perform an operation of detecting invalid data buckets currently located outside the load sliding window at preset time periods, and delete the detected invalid data buckets. The preset time period for the independent thread to perform invalid data bucket detection is shorter than the preset unit time period to which the expected resource usage stored in the data bucket belongs. Once it is detected that a part of the data bucket is outside the load sliding window, the data bucket is deleted as an invalid data bucket. If no data bucket is detected outside the load sliding window, no data bucket will be deleted.

[0096] Optionally, in some other embodiments, the number of valid data buckets dynamically maintained in the load sliding window is multiple. The server can dynamically maintain the load sliding window in the following manner: when counting multiple valid data buckets in the load sliding window, lazy deletion is used to delete invalid data buckets outside the load sliding window.

[0097] Optionally, in other embodiments, the server may also dynamically maintain the load sliding window in the following manner: when the load sliding window reads a valid data bucket with a time limit at the current time t, a data bucket for storing the expected resource usage at a future time t1 after the current time t may be added, so that the load sliding window can read the corresponding expected resource usage when it slides to time t1.

[0098] Optionally, in some embodiments, Figure 6 As shown, the preset unit time period (step length) corresponding to each data bucket 600 can be 1 second, that is, each data bucket 600 is used to store the expected resource usage of the streaming media server within 1. The load sliding window 610 can slide from left to right, and the data bucket 600 on the left corresponds to an earlier time, and the data bucket 600 on the right corresponds to a later time. The server can use an independent thread to detect the operation of the invalid data bucket outside the load sliding window 610 every 0.6 seconds. That is, the data bucket 600 located on the left side of the load sliding window 610 is used as an invalid data bucket of the expired part. The data bucket 600 located in the load sliding window 610 is used as a valid data bucket with a time limit for the valid part. The data bucket 600 located on the right side of the load sliding window 610 is a data bucket for the future part.

[0099] In this embodiment, the load sliding window is dynamically maintained by performing the operation of detecting invalid data buckets outside the load sliding window at preset time periods, and deleting the detected invalid data buckets, and setting the preset time period to be shorter than the preset unit time period, which can reduce the statistical error of the valid part of the time-effective data buckets, thereby helping to improve the statistical accuracy of the load indicator data. By dynamically maintaining the load sliding window by lazy deletion, the use of the central processing unit can be reduced, and frequent deletion operations can be avoided when the amount of data is large, thereby improving the overall performance of the system. And by dynamically adding new data buckets to dynamically maintain the load sliding window, the load sliding window can obtain the latest expected resource usage in a timely manner.

[0100] In an exemplary embodiment, after step S206, the method further includes: generating an expected resource usage of the target streaming media according to the video streaming data, and updating the load indicator data of the target streaming media using the expected resource usage of the target streaming media.

[0101] Exemplarily, after scheduling the video stream data to the target streaming media, the server can refer to the generation method of the expected resource usage provided in the above embodiment to process the currently scheduled video stream data to generate the expected resource usage of the target streaming media. The server can use the expected resource usage of the target streaming media and the real-time load data of the target streaming media for calculation and processing, and use the sum of the expected resource usage and the real-time load data as the latest load indicator data of the target streaming media.

[0102] In this embodiment, after scheduling the video stream data, the expected resource usage of the target streaming media is generated according to the video stream data, and the load indicator data of the target streaming media is synchronously updated using the expected resource usage of the target streaming media. This can improve the timeliness and accuracy of the load indicator data, and at the same time enable the load of the streaming media server to be updated within the monitoring interval.

[0103] In an exemplary embodiment, Figure 7 As shown, a schematic diagram of an application scenario of a load balancing scheduling method is also provided, including: a traffic scheduling module 700, a load prediction module 720, a load monitoring module 740, a data storage module 760, and a streaming media server 780. The data storage module 760 stores real-time load data 10, a load sliding window 30, and historical streaming information 50.

[0104] Exemplarily, the server can report the historical streaming information 50 to the data storage module 760 and the load indicator data to the load monitoring module 740 through each streaming server 780. The load monitoring module 740 reads the expected resource usage with timeliness in the load sliding window 30 and updates the real-time load data 10 in the data storage module 760. The load prediction module 720 can obtain the corresponding regression model based on the regression algorithm through the historical streaming information 50.

[0105] The server can respond to the push request of the video stream data through the traffic scheduling module 700, and read the real-time load data 10 of each streaming media server 780 from the data storage module 760. The load prediction module 720 is called to generate the expected resource usage of each streaming media server 780 in a preset unit time period based on the regression model constructed by the historical push information 50, and the load sliding window 30 is updated with the expected resource usage. The expected resource data with timeliness in the load sliding window 30 is read and added to the real-time load data 10 to obtain the load index data of each streaming media server 780. The traffic scheduling module 700 can select the target streaming media from the streaming media server 780 according to the load index data, and schedule the push request of the video stream data to the target streaming media for processing. After the scheduling is completed, the load prediction module 720 can be called to generate the expected resource usage corresponding to the video stream data, and the load sliding window 30 of the data storage module 760 is updated with the expected resource usage.

[0106] In this embodiment, by collecting the historical streaming information of each video stream to establish a regression model for predicting the load resources required for the video stream, the accuracy of generating the expected resource usage can be improved. After each video stream scheduling is completed, the corresponding expected resource usage is generated according to the regression model, and the load index data of the target streaming media is synchronously updated, so that the load of the streaming media server can be updated within the monitoring interval, avoiding the problem of load imbalance caused by the unreal-time reporting of the load index. By using a data bucket to maintain the expected resource usage caused by the access scheduling request of each streaming media server for nearly several seconds, the expected resource usage is added to the real-time load data as the load index data each time the load index data is monitored and reported, which can avoid the problem of subsequent traffic scheduling imbalance caused by the lag of the video stream load index.

[0107] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indications of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0108] Based on the same inventive concept, the embodiment of the present application also provides a load balancing scheduling device for implementing the load balancing scheduling method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more load balancing scheduling device embodiments provided below can refer to the limitations of the load balancing scheduling method above, and will not be repeated here.

[0109] In an exemplary embodiment, Figure 8 As shown, a load balancing scheduling device 800 is provided, including: an indicator acquisition module 802, a target determination module 804 and a balanced scheduling module 806, wherein:

[0110] The indicator acquisition module 802 is used to respond to the streaming request of the video streaming data and obtain the load indicator data of each streaming media server. The load indicator data is determined based on the real-time load data of each streaming media server and the expected resource usage. The expected resource usage represents the load resource usage generated by the historical video streams scheduled to the streaming media server within a preset time range.

[0111] The target determination module 804 is used to determine the target streaming media from each streaming media server according to the load indicator data.

[0112] The balanced scheduling module 806 is used to schedule the streaming request to the target streaming media for processing.

[0113] In an exemplary embodiment, the load balancing scheduling device 800 also includes a usage prediction module for obtaining historical streaming information; when the amount of information in the historical streaming information reaches a preset threshold, a regression model between video parameters and load resources required for the video parameters is established based on the historical streaming information; based on the video parameters of the historical video stream and the streaming success rate of the historical streaming information, the effective video parameters of the historical video stream are determined; and the expected resource usage corresponding to the effective video parameters is generated using the regression model.

[0114] In an exemplary embodiment, the usage prediction module is also used to obtain historical streaming information; when the amount of information in the historical streaming information is less than a preset threshold, obtain the average load data of the video stream in the current resource pool; and generate the expected resource usage corresponding to the historical video stream based on the average load data.

[0115] In an exemplary embodiment, the load balancing scheduling device 800 also includes an indicator determination module for collecting real-time load data of each streaming media server; using a load sliding window to read the current expected resource usage with a time limit from several data buckets of each streaming media server, each data bucket is used to store the expected resource usage within a corresponding preset unit time period; based on the real-time load data and the current expected resource usage with a time limit, load indicator data of each streaming media server is generated.

[0116] In an exemplary embodiment, the indicator determination module is also used to dynamically maintain a number of valid data buckets with current validity periods in the load sliding window, and to read the current expected resource usage with current validity periods from the valid data buckets.

[0117] In an exemplary embodiment, the load balancing scheduling device 800 further includes a synchronization update module for generating an expected resource usage of a target streaming media according to video stream data; and updating the load indicator data of the target streaming media using the expected resource usage of the target streaming media.

[0118] Each module in the above-mentioned load balancing scheduling device 800 can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0119] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig. 9As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store load index data, real-time load data, expected resource usage and other data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a load balancing scheduling method is implemented.

[0120] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0121] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0122] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0123] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0124] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0125] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0126] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A load balancing scheduling method, characterized in that: The method comprises: In response to a streaming request for video streaming data, load indicator data of each streaming media server is obtained, wherein the load indicator data is determined based on real-time load data of each streaming media server and expected resource usage, wherein the expected resource usage represents the load resource usage generated by historical video streams scheduled to the streaming media server within a preset time range; Determining target streaming media from each of the streaming media servers according to the load indicator data; Dispatching the streaming request to the target streaming media for processing; The method for determining the expected resource usage includes: Get historical streaming information; When the amount of information of the historical streaming information reaches a preset threshold, a regression model between video parameters and load resources required by the video parameters is established according to the historical streaming information; Determining effective video parameters of the historical video stream according to the video parameters of the historical video stream and the streaming success rate of the historical streaming information; generating an expected resource usage corresponding to the effective video parameter using the regression model; When the amount of information of the historical streaming information is less than the preset threshold, obtaining average load data of the video stream in the current resource pool; An expected resource usage corresponding to the historical video stream is generated according to the average load data.

2. The method according to claim 1, characterized in that The method for obtaining the load indicator data includes: Collecting real-time load data of each of the streaming media servers; Using a load sliding window, read the current expected resource usage with time validity from a plurality of data buckets of each of the streaming media servers, each of the data buckets being used to store the expected resource usage within a corresponding preset unit time period; The load index data of each of the streaming media servers is generated according to the real-time load data and the currently expected resource usage with time validity.

3. The method according to claim 2, characterized in that The method of using the load sliding window to read the current expected resource usage with time validity from the multiple data buckets of each of the streaming media servers includes: A plurality of valid data buckets with current validity are dynamically maintained in the load sliding window, and the expected resource usage with current validity is obtained by reading from the valid data buckets.

4. The method according to claim 1, characterized in that: After dispatching the streaming request to the target streaming media for processing, the method further includes: Generate the expected resource usage of the target streaming media according to the video streaming data; The expected resource usage of the target streaming media is used to update the load indicator data of the target streaming media.

5. A load balancing scheduling device, characterized in that: The device comprises: An indicator acquisition module, for obtaining load indicator data of each streaming media server in response to a streaming request for video streaming data, wherein the load indicator data is determined based on real-time load data of each streaming media server and expected resource usage, wherein the expected resource usage represents the load resource usage generated by historical video streams scheduled to the streaming media server within a preset time range; A target determination module, used for determining target streaming media from each of the streaming media servers according to the load indicator data; A balanced scheduling module, used for scheduling the streaming request to the target streaming media for processing; A usage prediction module is used to obtain historical streaming information; when the amount of information in the historical streaming information reaches a preset threshold, a regression model between video parameters and load resources required by the video parameters is established according to the historical streaming information; effective video parameters of the historical video stream are determined according to the video parameters of the historical video stream and the streaming success rate of the historical streaming information; and expected resource usage corresponding to the effective video parameters is generated using the regression model; Among them, the usage prediction module is also used to obtain the average load data of the video stream in the current resource pool when the amount of information of the historical streaming information is less than the preset threshold; and generate the expected resource usage corresponding to the historical video stream according to the average load data.

6. The device according to claim 5, characterized in that The device also includes: An indicator determination module is used to collect real-time load data of each of the streaming media servers; use a load sliding window to read the current expected resource usage with a time limit from a number of data buckets of each of the streaming media servers, each of the data buckets is used to store the expected resource usage within a corresponding preset unit time period; generate load indicator data of each of the streaming media servers based on the real-time load data and the current expected resource usage with a time limit.

7. The device according to claim 6, characterized in that The indicator determination module is also used to dynamically maintain a number of currently time-sensitive valid data buckets in the load sliding window, and read the currently time-sensitive expected resource usage from the valid data buckets.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Task scheduling method and device

    CN117632438A

  • Distributed system service scheduling optimization method and device, equipment and medium

    CN118590549A