Scheduling method for streaming media

By receiving and analyzing the cloud data request of the media on the client, determine the size of the request consumption resources, collect the performance data of the streaming media server, use the enhanced learning optimization stream load, and generate target push strategies through the genetic algorithm to solve the traditional streaming media scheduling The problem of uneven scheduling in the strategy, the non -timely load information feedback, and the high load of the data source have been achieved, which realize the uninterrupted Shangyun transmission and efficient streaming media server performance.

CN119383177APending Publication Date: 2025-01-28HAINAN KELIQIANFANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411660679.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

Traditional streaming media scheduling strategies have problems such as unbalanced polling scheduling, untimely feedback on load information, excessive load source load, and delayed or packet loss in media data transmission.

Method used

By receiving and analyzing the cloud data request of the media on the client, determine the size of the request consumption resources, collect the performance data of the streaming media server, use the enhanced learning optimization stream load, and generate target push strategies through the genetic algorithm to optimize streaming media scheduling.

Benefits of technology

The uninterrupted Shangyun transmission is achieved, the efficiency and throughput of streaming media servers are improved, the use of resource utilization and task processing energy is optimized, and the problem of delay and packet loss is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383177A_ABST
    Figure CN119383177A_ABST
Patent Text Reader

Abstract

The invention provides a scheduling method for streaming media, and the method comprises the steps: S11, receiving and analyzing a cloud data request on client media, so as to obtain plug-flow video information of a media server; s12, determining the size of resources consumed by a request according to the plug-flow video information; s13, collecting performance data of the streaming media server in a preset period, and optimizing and calculating a streaming load of the streaming media server through reinforcement learning; s14, according to the size of the resource consumed by the request and the flow load, generating a target flow pushing strategy through a genetic algorithm; and S15, calling a cloud server interface, and pushing the cloud data requested by the client to a cloud server. According to the method, the size of the resources consumed by the cloud request and the flow load are determined, the optimal flow pushing strategy is determined by applying the genetic algorithm, and the stability and reliability of data transmission are enhanced, so that the efficiency of the cloud data request is improved, and all-weather uninterrupted cloud transmission is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of streaming media scheduling, and in particular to a scheduling method for streaming media. Background Art

[0002] With the development of Internet technology, the media data is streamed by connecting the sender and the receiver through the streaming media server, meeting the needs of media transmission scenarios with high real-time requirements. How to choose a suitable streaming media server has become the focus of attention in the transmission of media data streams. In the IoT device security monitoring system, it is often necessary to manage many camera monitoring devices, view device monitoring, operate device monitoring to view real-time road conditions, and store and manage videos of important checkpoints. In the process of streaming media data push, affected by factors such as network status and device performance, some clients will experience freezes and jitters when making cloud requests.

[0003] At present, the traditional streaming media scheduling strategy has the problems of unbalanced traditional polling scheduling and untimely feedback of actual streaming media load information, which leads to overload or downtime of a single streaming media distribution unit, affecting the overall operation; and there are multiple references to real-time media data sources, which leads to increased data source load and unnecessary impact on data source performance; in addition, there is a complex network between the streaming media and the client. If the streaming media forwarding server is not selected, the media data may pass through redundant networks, resulting in slow media data transmission, low efficiency, delay or packet loss problems. Summary of the invention

[0004] In view of this, an object of the present invention is to provide a scheduling method for streaming media, to optimize the scheduling of streaming media, and to achieve all-weather uninterrupted cloud transmission.

[0005] To achieve the above-mentioned object of the invention, the present invention provides a scheduling method for streaming media, the method comprising:

[0006] S11, receiving and parsing the client's media cloud data request to obtain the streaming video information of the media server;

[0007] S12, determining the size of the resource consumption requested according to the streaming video information;

[0008] S13, collecting performance data of the streaming media server within a preset period, optimizing and calculating the streaming load of the streaming media server through reinforcement learning;

[0009] S14, generating a target streaming strategy through a genetic algorithm according to the size of the resource consumption of the request and the streaming load;

[0010] S15. Call the cloud server interface to push the cloud data requested by the client to the cloud server.

[0011] Further, in step S12, the size of the resource consumption requested is determined according to the streaming video information, specifically including:

[0012] S21, obtain the main M3U8 file of the push stream video in the streaming media server, record the response content returned by the main M3U8 file in the server, and select a sub-M3U8 stream from the main M3U8 file according to the ABR strategy;

[0013] S22, obtaining a TS file list contained in the selected sub-M3U8 stream, recording the response content returned by the sub-M3U8 stream in the server, and obtaining TS files from the TS file list according to a set order;

[0014] S23, calculate the size of TS file by the response content returned in the server by the main M3U8 file and the sub-M3U8 stream;

[0015] S24. Select the TS file to be uploaded to the cloud according to the real-time network status of the server.

[0016] Further, in step S23, the size of the TS file is calculated by the response content returned by the main M3U8 file and the sub-M3U8 stream in the server, specifically including:

[0017] Calculate the size of the TS file using the average bitrate of each sub-M3U8 stream provided in the main M3U8 file response and the video duration of each TS file listed in the sub-M3U8 stream response:

[0018] S=B*T

[0019] Among them, S is the estimated size of the TS file, B is the average bit rate of the video stream to which the TS file belongs, and T is the video length of the TS file.

[0020] Furthermore, in step S13, performance data of the streaming media server within a preset period is collected including response time, load, and request processing speed.

[0021] Further, in step S13, the stream load of the streaming media server is calculated, which specifically includes:

[0022] S31. Based on the response time, determine a preset time weight corresponding to the response time;

[0023] S32. Based on the load amount, determine a preset load weight corresponding to the load amount;

[0024] S33, based on the request processing speed, determining a preset speed weight corresponding to the request processing speed;

[0025] S34, calculating the stream load of the streaming media server based on the size of the resource consumed by the request, the preset time weight, the preset load weight and the preset speed weight.

[0026] Furthermore, in step S13, the stream load of the streaming media server is optimized by reinforcement learning, specifically including:

[0027] S41, inputting the response time, load and request processing speed of the streaming media server into the reinforcement learning model as a state vector;

[0028] S42, using different strategies for adjusting resource allocation of streaming media servers as action inputs into a reinforcement learning model;

[0029] S43. Minimizing the streaming load of the streaming media server is used as the reward function objective of the reinforcement learning model.

[0030] Furthermore, in step S14, a target streaming strategy is generated by a genetic algorithm, which specifically includes:

[0031] S51, receiving multiple concurrent requests sent by the client, determining whether the number of received requests reaches a preset processing threshold, if yes, proceeding to the next step, if no, calling a weighted least connection number algorithm to process the concurrent requests;

[0032] S52: Generate a corresponding cloud-based task set based on the size of the resource consumption requested;

[0033] S53, initializing the node set and fitness function of the genetic algorithm, and after each preset cycle, dynamically adjusting the parameter α in the fitness function according to the flow load to guide the search direction of the genetic algorithm;

[0034] S54, check whether there is a data item of 0 in the node set, if not, execute the next step, if yes, request to implement the weighted least connection number algorithm to generate the target streaming strategy;

[0035] S55. The algorithm is gradually optimized through the set number of iterations to converge to the optimal individual, the chromosome information of the optimal individual is decoded, and the cloud data request from the client media is assigned to the corresponding cloud server for processing.

[0036] Compared with the prior art, the present invention has the following beneficial effects:

[0037] The present invention provides a scheduling method for streaming media. By determining the size of resource consumption by a request, a genetic algorithm can obtain a comprehensive and detailed perspective on the performance of a streaming media server, thereby being able to evaluate the overall performance of the streaming media server under a changeable network environment, thereby generating a target streaming strategy. By optimizing and calculating the stream load of the streaming media server through reinforcement learning, the fitness function of the genetic algorithm is dynamically adjusted. The genetic algorithm can guide the optimization of the resource allocation scheme according to the actual performance status of the streaming media, thereby achieving better resource utilization and task processing energy, so that the present invention can improve the efficiency and throughput of the streaming media server, and ultimately achieve all-weather uninterrupted cloud request transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0039] Figure 1 A schematic flow chart of a scheduling method for streaming media provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0041] Reference Figure 1 This embodiment provides a scheduling method for streaming media, the method comprising:

[0042] S11. Receive and parse the client's media cloud data request to obtain the streaming video information of the media server.

[0043] Specifically, the client sends the media data it wants to upload to the cloud through the network platform interface, and parses the received upload request to identify the type, size, format, and other information of the media data that the client wants to upload to the cloud. While parsing the client request, the streaming media server is configured to prepare to receive and process the media data requested to be uploaded to the cloud. This step can improve the accuracy of data processing and transmission efficiency, and ensure that the streaming media video information can be uploaded to the cloud smoothly and securely.

[0044] S12: Determine the size of the resource consumption requested according to the streaming video information.

[0045] As a preferred embodiment, determining the size of the resource consumption requested in the streaming video information is crucial to ensuring the efficiency and stability of the streaming media service. First, understanding the resource size helps to reasonably allocate network bandwidth and storage space, and avoid service interruptions or delays due to insufficient resources. Secondly, it allows service providers to control costs and optimize resource utilization efficiency, especially in cloud service environments, where resource consumption is directly related to costs. In addition, accurate resource size information is also crucial for the selection of video encoding and compression strategies, which can ensure the quality and efficiency of video transmission. Finally, it is used as a preparatory part for the subsequent genetic algorithm to achieve optimal resource allocation and task scheduling.

[0046] In step S12, the size of the resource consumption requested is determined according to the streaming video information, specifically including:

[0047] S21. Obtain the main M3U8 file of the pushed video in the streaming media server, record the response content returned by the main M3U8 file in the server, and select a sub-M3U8 stream from the main M3U8 file according to the ABR strategy.

[0048] S22. Obtain a list of TS files contained in the selected sub-M3U8 stream, record the response content returned by the sub-M3U8 stream in the server, and obtain TS files from the TS file list according to a set order.

[0049] S23. Calculate the size of the TS file based on the response content returned by the server using the main M3U8 file and the sub-M3U8 stream.

[0050] S24. Select the TS file to be uploaded to the cloud according to the real-time network status of the server.

[0051] Specifically, when the client initiates a cloud upload request, its first action is to request the main M3U8 file of the video. The main M3U8 file is equivalent to an index or directory, which lists all available sub-M3U8 streams in the video stream and their related information. The client will select the most suitable stream from the sub-M3U8 stream list provided by the main M3U8 file based on various factors, such as resolution, network speed, device performance, etc. This process is automatic and instant, and is designed to ensure that the cloud upload can be as smooth and high-quality as possible under various network environments. After selecting the sub-M3U8 stream, the client will initiate a new request to obtain the list of TS files contained in the stream. These TS files are the actual data units of the video stream, which contain the encoded video and audio data. During the entire cloud upload process, the client will continuously monitor the network conditions and buffer status, and dynamically adjust the bit rate of the requested TS file as needed. If the network conditions deteriorate or the buffer data is insufficient, the client may choose to request a TS file with a lower bit rate to avoid transmission jams or interruptions. On the contrary, if the network conditions improve and there is enough data in the buffer, the client may choose to request a TS file with a higher bit rate to improve the quality of the media data uploaded to the cloud.

[0052] In step S23, the size of the TS file is calculated by the response content returned by the main M3U8 file and the sub-M3U8 stream in the server, specifically including:

[0053] Calculate the size of the TS file using the average bitrate of each sub-M3U8 stream provided in the main M3U8 file response and the video duration of each TS file listed in the sub-M3U8 stream response:

[0054] S=B*T

[0055] Among them, S is the estimated size of the TS file, B is the average bit rate of the video stream to which the TS file belongs, and T is the video length of the TS file.

[0056] Calculating the size of TS files can help understand the amount of media data that may be required for client cloud requests under different network conditions. By estimating the resource size of TS requests, it provides a more comprehensive and detailed perspective for the subsequent genetic algorithm to achieve optimal resource allocation and task scheduling. This method not only takes into account the dynamic characteristics of streaming media transmission, but also optimizes the diversity of request data, so that the genetic algorithm can more accurately respond to streaming media service needs in different scenarios.

[0057] S13, collecting performance data of the streaming media server within a preset period, optimizing and calculating the streaming load of the streaming media server through reinforcement learning. In step S13, the performance data of the streaming media server within a preset period including response time, load volume and request processing speed are collected.

[0058] Optionally, the performance data of the streaming media server within a preset period is collected, and the computing stream load is optimized through reinforcement learning, which can provide continuous performance improvement and resource optimization for streaming media services. By monitoring the response time, load, and request processing speed, the operating status of the server can be captured in real time, and performance bottlenecks can be discovered and resolved in a timely manner. The continuously optimized stream load is used to update the fitness function of the genetic algorithm, which reflects the performance and efficiency of the server when processing streaming media requests, including response time, load, and request processing speed, so that the genetic algorithm can more accurately respond to streaming media service needs in different scenarios, optimize resource allocation and task scheduling, and improve the overall performance of the server and user experience.

[0059] In step S13, the stream load of the streaming media server is calculated, which specifically includes:

[0060] S31. Based on the response time, determine a preset time weight corresponding to the response time.

[0061] S32. Based on the load amount, determine a preset load weight corresponding to the load amount.

[0062] S33. Based on the request processing speed, determine a preset speed weight corresponding to the request processing speed.

[0063] S34, calculating the stream load of the streaming media server based on the size of the resource consumed by the request, the preset time weight, the preset load weight and the preset speed weight.

[0064] As a preferred embodiment, the response time, load volume and request processing speed of the streaming media server are combined with preset weights to calculate the streaming load, providing a comprehensive performance evaluation index for the genetic algorithm, which can more accurately identify and adjust the performance of the streaming media server under different load conditions, and achieve optimal resource allocation and task scheduling. In the face of changing network conditions and cloud requests, this method can dynamically adjust the streaming media server configuration to maintain the smoothness and stability of the cloud process.

[0065] In step S13, the stream load of the streaming media server is optimized by reinforcement learning, specifically including:

[0066] S41, inputting the response time, load and request processing speed of the streaming media server into the reinforcement learning model as a state vector.

[0067] S42. Different strategies for adjusting the resource allocation of the streaming media server are used as action inputs into the reinforcement learning model.

[0068] S43. Minimizing the streaming load of the streaming media server is used as the reward function objective of the reinforcement learning model.

[0069] As a preferred embodiment, the reinforcement learning model can dynamically adjust the resource allocation strategy according to the real-time state vector (including response time, load and request processing speed) to adapt to the ever-changing network environment and cloud requests. By minimizing the streaming load of the streaming media server as the reward function target, the reinforcement learning model can effectively reduce the server load, improve service efficiency and response speed, so that the system can automatically learn and adapt to different network conditions, and provide directional guidance for updating the fitness function of the genetic algorithm.

[0070] S14: Generate a target streaming strategy through a genetic algorithm according to the size of the resource consumption of the request and the streaming load. The genetic algorithm can automatically adapt to network conditions and load changes, help find the optimal resource allocation solution, and adjust the streaming strategy in real time to cope with different network environments.

[0071] In step S14, a target streaming strategy is generated by a genetic algorithm, which specifically includes:

[0072] S51, receiving multiple concurrent requests sent by the client, determining whether the number of received requests reaches a preset processing threshold, if yes, proceeding to the next step, if no, calling the weighted least connection algorithm to process the concurrent requests. The weighted least connection algorithm distributes new requests to the streaming media server with the smallest ratio between the current number of connections and the weight, to ensure that the load of each streaming media server is as balanced as possible, wherein the streaming media server with a larger weight and a smaller number of current connections will obtain a higher probability of receiving requests.

[0073] S52: Generate a corresponding cloud-based task set by requesting the size of resource consumption, ensuring that the generation of the cloud-based task set takes into account both the current resource demand and the performance and load of the server, thereby achieving optimal resource allocation and task scheduling.

[0074] S53. Initialize the node set and fitness function of the genetic algorithm. After each preset cycle, dynamically adjust the parameter α in the fitness function by the flow load to guide the search direction of the genetic algorithm. By dynamically adjusting the parameter α in the fitness function, the genetic algorithm can guide the optimization process of the resource allocation scheme according to the actual load and performance requirements of the cluster. Increasing the value of α will increase the weight of the flow load in the fitness evaluation, and vice versa, it will emphasize fast response time. The fitness function is used to measure the pros and cons of the target push strategy in the genetic algorithm in order to better guide the genetic algorithm search process.

[0075] S54, check whether there is a data item of 0 in the node set, if not, execute the next step, if so, request to implement the weighted least connection algorithm to generate the target streaming strategy. In order to ensure that all server nodes have at least a certain amount of load, check the node set to see if there is a data item of 0, avoid some nodes being overloaded while other nodes are idle, so as to achieve a more balanced resource allocation. The weighted least connection algorithm distributes new requests to the streaming media server with the smallest ratio of the current number of connections to the weight, to ensure that the load of each streaming media server is as balanced as possible, among which the streaming media server with a larger weight and a smaller current number of connections will obtain a higher probability of receiving requests.

[0076] S55, gradually optimize through the set number of iterations, make the algorithm converge to the optimal individual, decode the chromosome information of the optimal individual, and allocate the cloud data request on the client media to the corresponding cloud server for processing. The chromosome information of the optimal individual is decoded, and the decoding process converts the gene sequence back to the actual resource allocation plan, where each gene corresponds to the allocation of a request.

[0077] S15, calling the cloud server interface to push the client's request to the cloud data to the cloud server. The client communicates with the cloud server through a predefined API (application programming interface).

[0078] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A scheduling method for streaming media, characterized in that: The method comprises: S11, receiving and parsing the client's media cloud data request to obtain the streaming video information of the media server; S12, determining the size of the resource consumption requested according to the streaming video information; S13, collecting performance data of the streaming media server within a preset period, optimizing and calculating the streaming load of the streaming media server through reinforcement learning; S14, generating a target streaming strategy through a genetic algorithm according to the size of the resource consumption of the request and the streaming load; S15. Call the cloud server interface to push the cloud data requested by the client to the cloud server.

2. The method for scheduling streaming media according to claim 1, characterized in that: In step S12, the size of the resource consumption requested is determined according to the streaming video information, specifically including: S21, obtain the main M3U8 file of the push stream video in the streaming media server, record the response content returned by the main M3U8 file in the server, and select a sub-M3U8 stream from the main M3U8 file according to the ABR strategy; S22, obtaining a TS file list contained in the selected sub-M3U8 stream, recording the response content returned by the sub-M3U8 stream in the server, and obtaining TS files from the TS file list according to a set order; S23, calculate the size of TS file by the response content returned in the server by the main M3U8 file and the sub-M3U8 stream; S24. Select the TS file to be uploaded to the cloud according to the real-time network status of the server.

3. The method for scheduling streaming media according to claim 2, characterized in that: In step S23, the size of the TS file is calculated by the response content returned by the main M3U8 file and the sub-M3U8 stream in the server, specifically including: Calculate the size of the TS file using the average bitrate of each sub-M3U8 stream provided in the main M3U8 file response and the video duration of each TS file listed in the sub-M3U8 stream response: S=B*T Among them, S is the estimated size of the TS file, B is the average bit rate of the video stream to which the TS file belongs, and T is the video length of the TS file.

4. The method for scheduling streaming media according to claim 1, characterized in that: In step S13, performance data of the streaming media server within a preset period is collected, including response time, load, and request processing speed.

5. The method for scheduling streaming media according to claim 4, characterized in that: In step S13, the stream load of the streaming media server is calculated, which specifically includes: S31. Based on the response time, determine a preset time weight corresponding to the response time; S32. Based on the load amount, determine a preset load weight corresponding to the load amount; S33, based on the request processing speed, determining a preset speed weight corresponding to the request processing speed; S34, calculating the stream load of the streaming media server based on the size of the resource consumed by the request, the preset time weight, the preset load weight and the preset speed weight.

6. The method for scheduling streaming media according to claim 4, characterized in that: In step S13, the stream load of the streaming media server is optimized by reinforcement learning, specifically including: S41, inputting the response time, load and request processing speed of the streaming media server into the reinforcement learning model as a state vector; S42, using different strategies for adjusting resource allocation of streaming media servers as action inputs into a reinforcement learning model; S43. Minimizing the streaming load of the streaming media server is used as the reward function objective of the reinforcement learning model.

7. The scheduling method for streaming media according to claim 1, characterized in that: In step S14, a target streaming strategy is generated by a genetic algorithm, which specifically includes: S51, receiving multiple concurrent requests sent by the client, determining whether the number of received requests reaches a preset processing threshold, if yes, proceeding to the next step, if no, calling a weighted least connection number algorithm to process the concurrent requests; S52: Generate a corresponding cloud-based task set based on the size of the resource consumption requested; S53, initializing the node set and fitness function of the genetic algorithm, and after each preset cycle, dynamically adjusting the parameter α in the fitness function according to the flow load to guide the search direction of the genetic algorithm; S54, check whether there is a data item of 0 in the node set, if not, execute the next step, if yes, request to implement the weighted least connection number algorithm to generate the target streaming strategy; S55. The algorithm is gradually optimized through the set number of iterations to converge to the optimal individual, the chromosome information of the optimal individual is decoded, and the cloud data request from the client media is assigned to the corresponding cloud server for processing.