Video stream scheduling method, electronic equipment, storage medium and program product
By analyzing the protocol fields of the transmission protocol data packets through deep packet inspection, the download thread characteristics of video applications are extracted, and resource scheduling markers are generated. This solves the problems of insufficient start-up speed and smoothness in existing video stream scheduling methods, and achieves more efficient video stream scheduling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-24
- Publication Date
- 2026-03-24
AI Technical Summary
Existing video stream scheduling methods rely on static scheduling, resulting in low video stream start-up speed and poor playback smoothness, failing to meet the needs of sudden video stream playback requests.
By analyzing the protocol fields of transport protocol data packets through deep packet inspection, the download thread characteristics of video applications are extracted, the protocol field identifier of the target video stream is matched, a resource scheduling tag is generated, and the scheduling of the video stream is adjusted based on the tag, including priority tagging and delayed transmission strategy, and the processor scheduling priority is dynamically adjusted.
It improves the startup speed and playback smoothness of video streams, ensuring that video streams receive priority processing resources when the system load is high, reducing stuttering and latency.
Smart Images

Figure CN121728283A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software technology, and in particular to a video stream scheduling method, electronic device, storage medium, and program product. Background Technology
[0002] With the widespread adoption of mobile internet, users can access information through live streaming or video applications, leading to increasingly higher demands for smooth video playback and fast startup times. Therefore, effectively managing video streams to meet these needs is crucial.
[0003] Currently, the main video stream scheduling methods are static scheduling, which schedules video streams by setting fixed priority rules. For example, a pushed video stream takes precedence over a currently playing video stream.
[0004] However, this method relies on static scheduling. Therefore, it may encounter problems such as playback stuttering when faced with sudden video stream playback requests, resulting in low video stream start-up speed and poor playback smoothness in existing video stream scheduling methods. Summary of the Invention
[0005] This application provides a video stream scheduling method, electronic device, storage medium, and program product to improve the video stream start-up speed and playback smoothness.
[0006] In a first aspect, embodiments of this application provide a video stream scheduling method, the method comprising:
[0007] By analyzing the protocol fields of the transmission protocol data packets through deep packet inspection, the download thread characteristics of video applications can be extracted;
[0008] The protocol field identifier of the target video stream is matched based on the download thread characteristics; the protocol field identifier includes version number, encoding method, and serial number characteristics;
[0009] Based on the protocol field identifier, a resource scheduling tag corresponding to the target video stream is generated;
[0010] Based on the resource scheduling flag, the scheduling of the target video stream is adjusted.
[0011] In one possible implementation, the step of extracting download thread characteristics of a video application by analyzing the protocol fields of transport protocol data packets through deep packet inspection includes:
[0012] Identify video applications using the Hypertext Transfer Protocol (HTTP) request headers;
[0013] Identify live streams based on data packets from the transmission protocol.
[0014] Based on the live stream, extract the download thread characteristics of the video application.
[0015] In one possible implementation, the step of matching the protocol field identifier of the target video stream based on the download thread characteristics includes:
[0016] Extract the version number of the target video stream;
[0017] Based on the version number, the encoding method of the target video stream is analyzed;
[0018] The sequence number feature of the target video stream is obtained through the encoding method described above;
[0019] Based on the download thread characteristics, the version number, encoding method, and sequence number characteristics of the target video stream are matched.
[0020] In one possible implementation, generating a resource scheduling tag corresponding to the target video stream based on the protocol field identifier includes:
[0021] Based on the protocol field identifier, a priority marker is added to the target video stream using firewall rules;
[0022] Add a delayed transmission policy flag by modifying the kernel module;
[0023] Based on the priority identifier and the policy tag, a resource scheduling tag corresponding to the target video stream is generated.
[0024] In one possible implementation, after generating the resource scheduling tag corresponding to the target video stream, the process includes:
[0025] Increase the processor scheduling priority of the target video stream.
[0026] In one possible implementation, after increasing the processor scheduling priority of the target video stream, the method further includes:
[0027] Filter packets from non-target video streams using firewall rules and set delayed sending policies using flow control rules;
[0028] The machine learning model is used to predict the real-time resource requirements of the target video stream and dynamically adjust the processor scheduling priority.
[0029] Secondly, embodiments of this application provide a video stream scheduling device, comprising:
[0030] The extraction module is used to extract the download thread characteristics of video applications by analyzing the protocol fields of the transmission protocol data packets through deep packet inspection.
[0031] The matching module is used to match the protocol field identifier of the target video stream based on the download thread characteristics; the protocol field identifier includes version number, encoding method, and sequence number characteristics;
[0032] The generation module is used to generate a resource scheduling tag corresponding to the target video stream based on the protocol field identifier;
[0033] The adjustment module is used to adjust the scheduling of the target video stream based on the resource scheduling flag.
[0034] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0035] The memory stores computer-executed instructions;
[0036] The processor executes computer execution instructions stored in the memory, causing the processor to perform the method described in any of the first aspects above.
[0037] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in any of the first aspects above.
[0038] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the first aspects above.
[0039] This application provides a video stream scheduling method, electronic device, storage medium, and program product. By analyzing the protocol fields of transport protocol data packets using deep packet inspection, it extracts the download thread characteristics of video applications, achieving accurate identification of these characteristics. The protocol field identifier, which includes version number, encoding method, and sequence number, is matched with the target video stream's protocol field identifier to ensure accuracy. Based on this identifier, a resource scheduling tag corresponding to the target video stream is generated, providing a basis for scheduling priority adjustment and time-slice control. Adjusting the scheduling of the target video stream based on this resource scheduling tag improves the video stream's startup speed and playback smoothness. Attached Figure Description
[0040] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0041] Figure 1 A flowchart illustrating a video stream scheduling method provided in an embodiment of this application;
[0042] Figure 2 A timing diagram illustrating video stream scheduling of download threads provided in an embodiment of this application;
[0043] Figure 3 A flowchart illustrating another video stream scheduling method provided in an embodiment of this application;
[0044] Figure 4 A schematic diagram of a flow control topology provided in this application;
[0045] Figure 5 This is a schematic diagram of the structure of a video stream scheduling device provided in an embodiment of this application;
[0046] Figure 6 A schematic diagram of the structure of the electronic device provided in this application.
[0047] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0048] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0049] In this application, the term "comprising" and its variations can refer to non-limiting inclusion; the term "or" and its variations can refer to "and / or". The terms "first", "second", etc., in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0050] 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, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0051] First, let me explain the terms used in this application:
[0052] Deep Packet Inspection (DPI) is a technology that identifies application types by analyzing the content of data packets (rather than just header information).
[0053] With the widespread adoption of mobile internet, users can access information through live streaming or video applications, leading to increasingly higher demands for smooth video playback and fast startup times. Therefore, effectively managing video streams to meet these needs is crucial.
[0054] Currently, the main video stream scheduling methods are as follows:
[0055] 1. Static scheduling method. This method schedules video streams by setting fixed priority rules. For example, a pushed video stream takes precedence over the currently playing video stream. However, this method relies on static scheduling, so sudden video stream playback requests may cause video stream stuttering and poor playback smoothness.
[0056] Issues such as playback stuttering can lead to low video stream start-up speed and poor playback smoothness in existing video stream scheduling methods.
[0057] 2. Based on a general processor scheduling algorithm. This method is based on a first-come, first-served processor scheduling algorithm, executing video stream requests sequentially according to their order. However, this method does not meet the high real-time requirements of video streams, resulting in a low video stream start-up speed.
[0058] Considering that existing video stream scheduling methods suffer from low video stream start-up speed and poor playback smoothness, this application proposes a method that does not rely on static scheduling and reduces latency caused by waiting for processor scheduling. This method improves both the video stream start-up speed and playback smoothness.
[0059] The execution entity of this video stream scheduling method can be, for example, a video stream processing system. Optionally, the video stream processing system can be any existing electronic device with processing capabilities, such as a terminal or a server. In some embodiments, the video stream processing system can also be deployed in a server cluster or cloud environment. This application does not limit the deployment environment of the video stream processing system.
[0060] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0061] Figure 1 This is a flowchart illustrating a video stream scheduling method provided in an embodiment of this application. Figure 1 As shown,
[0062] S101 extracts the download thread characteristics of video applications by analyzing the protocol fields of the transmission protocol data packets through deep packet inspection.
[0063] In some embodiments, the video streaming system can identify the video application through the Hypertext Transfer Protocol (HTTP) request header. Then, based on the transport protocol data packets, it identifies the live stream. Finally, based on the live stream, it extracts the download thread characteristics of the video application.
[0064] Optionally, the video stream processing system can obtain the Hypertext Transfer Protocol (HTTP) request from the target port via the network gateway node and extract the request header. If the video application initiates an HTTP request, the video stream processing system can also obtain the request header based on the proxy module deployed on the user terminal.
[0065] Optionally, the video stream processing system can determine the video application corresponding to an HTTP request header by parsing the core fields in the HTTP request header and matching them with a preset video application feature library. For example, if the core field of an HTTP request header contains "A / 1.0.0", the video application corresponding to the HTTP request header is determined to be A by matching it with the preset video application feature library.
[0066] Optionally, the video stream processing system can also periodically analyze and summarize the latest video application features through a large language model, add the latest video application features to a preset video application feature library, and update and generate a new video application feature library.
[0067] Optionally, the video stream processing system can obtain transport protocol data packets through network interfaces or hook functions. By parsing the protocol type, port, and payload length of these data packets, the system can identify the live stream. For example, if the protocol transport data packet contains preset commonly used ports for live streams and real-time transport protocol types, the video stream processing system can determine that it is a transport protocol data packet for a live stream.
[0068] Optionally, the video stream processing system can also determine whether a protocol transmission data packet is a live stream protocol transmission data packet based on preset live stream protocol transmission data packet payload length and transmission frequency. For example, if the preset live stream protocol transmission data packet payload length is less than 1500 bytes and the transmission frequency is greater than 100 packets per second, and if a protocol transmission data packet has a payload length of 1800 bytes and a transmission frequency of 50 packets per second, the video stream processing system can determine that the protocol transmission data packet is a live stream transmission protocol data packet.
[0069] Optionally, the video stream processing system can also assign different weights based on features such as port matching, payload length, and transmission frequency in the protocol transmission data packets, and calculate a comprehensive score by weighting. If the comprehensive score is greater than a preset score threshold, it is determined to be a protocol transmission data packet of a live stream.
[0070] Optionally, the video streaming system can determine the download thread corresponding to the video application by parsing the source Internet Protocol Address (IP), source port, destination IP, and destination port in the UDP session generated when the live stream is transmitted via User Datagram Protocol (UDP) using a parsing tool.
[0071] Optionally, the video streaming system can determine the number of download threads and the transmission rate corresponding to the number of UDP sessions by counting the number of UDP sessions associated with the live stream and the number of bytes transmitted per unit time. It can also calculate the concurrency level through periodic sampling based on the number of threads transmitting data and the total number of threads.
[0072] Optionally, the video stream processing system can also construct prompt words based on the aforementioned live stream and input these prompt words into an extraction model to extract the download thread features of the video application. These prompt words can be used to indicate the download thread features of the video application based on the video stream. For example, the extraction model can be any existing machine learning model or deep learning model with feature extraction capabilities. For example, the extracted download thread features may include the number of threads, concurrency, transmission rate, and request interval, etc.
[0073] The above method, using the Hypertext Transfer Protocol (HTTP) request header, allows for the identification of video applications, improving system adaptability. Based on the transport protocol data packets, live streams can be identified, laying the foundation for subsequent extraction of download thread characteristics. Extracting the download thread characteristics of the video application from this live stream improves video stream processing efficiency.
[0074] S102, Match the protocol field identifier of the target video stream according to the characteristics of the download thread. The protocol field identifier includes version number, encoding method and sequence number characteristics.
[0075] For example, the version number could be a field used to identify the protocol version.
[0076] For example, the encoding method can be a field used to identify the audio / video encoding type.
[0077] For example, the sequence number feature could be a field used to identify the order of data packets.
[0078] Optionally, the video stream processing system can pre-define a mapping library between download thread characteristics and protocol field identifiers. Based on the extracted download thread characteristics, the system queries this mapping library to determine the protocol type, version number, encoding method, and sequence number of the target video stream.
[0079] Optionally, the video stream processing system can construct a matching rule table based on the matching data of historical download thread features and protocol field identifiers. According to the download thread features extracted above, the system calculates the cosine similarity between the current process feature vector and the feature vector corresponding to each protocol version number in the matching rule table. The version number with the highest similarity is the protocol field identifier of the target video stream.
[0080] Optionally, the video streaming system can determine the encoding method of the target video stream based on the transmission rate in the download thread characteristics. For example, if the thread transmission rate is 1 megabit per second, the matching encoding method is Advanced Audio Coding (AAC).
[0081] Optionally, the video stream processing system can use parsing tools to analyze the sequence number field of the target video stream data packets, extract the growth pattern, step size, and reset frequency characteristics, and match the transmission behavior characteristics based on the download thread characteristics with the extracted growth pattern, step size, and reset frequency characteristics. For example, if the transmission interval of the download thread characteristics is stable, it can be matched that the sequence number of the target video stream data packets is continuously increasing.
[0082] Optionally, the video stream processing system can also train a classification model using matching data of historical download thread features and protocol field identifiers. Based on the extracted download thread features, a prompt word is constructed and input into the classification model to obtain the protocol field identifier that matches the target video stream. The prompt word is used to match the protocol field identifier of the video stream based on the download thread features.
[0083] As one possible implementation, the video stream processing system can extract the version number of the target video stream. Then, based on the version number, it can parse the encoding method of the target video stream. Next, using the encoding method, it can obtain the sequence number feature of the target video stream. Finally, based on the download thread characteristics, it can match the version number, encoding method, and sequence number feature of the target video stream.
[0084] Optionally, the video stream processing system can obtain the data packets of the target video stream through a local interface, parse the content of the data packets, obtain the fixed offset position of the version number, and extract the version number. For text-based protocols, the video stream processing system can also extract the version number value by matching protocol keywords.
[0085] Optionally, the video stream processing system can predefine a mapping table between version number and encoding method parsing rules. Based on the version number obtained above, it queries the predefine mapping table between version number and encoding method parsing rules, matches the corresponding encoding method parsing rules, and locates the encoding method field in the target video stream data packet according to the encoding method parsing rules.
[0086] Optionally, the video stream processing system can predefine an association library between encoding methods and sequence number features. Based on the aforementioned encoding methods and the transmission protocol type of the target video stream, the system can obtain the sequence number features of the target video stream by querying the predefine association library between encoding methods and sequence number features. These features could include, for example, the growth method, step size, and reset frequency.
[0087] Optionally, the video stream processing system can match the target video stream based on the extracted download linear features, as well as preset matching rules, with the target video stream's version number, encoding method, and sequence number features. For example, if the download thread features are stable transmission rate, connection duration greater than 10 minutes, and concurrency greater than 80%, then the target video stream's version number is X1.0, the encoding method is Y, and the sequence number feature is a continuously increasing sequence number.
[0088] The version number of the target video stream is extracted using the above method, providing a basis for subsequent encoding method analysis. Based on this version number, the encoding method of the target video stream can be analyzed, ensuring the accuracy of encoding method analysis. Through this encoding method, the sequence number feature of the target video stream can be obtained, avoiding the problem of isolated sequence number features. Based on the download thread characteristics, the version number, encoding method, and sequence number feature of the target video stream can be matched, improving matching accuracy.
[0089] S103, Based on the protocol field identifier, generate a resource scheduling tag corresponding to the target video stream.
[0090] For example, resource scheduling tags can be labels used to identify priorities or scheduling policies.
[0091] In some embodiments, the video stream processing system can add a priority flag to the target video stream based on the protocol field identifier via firewall rules. Then, a delayed transmission policy flag is added via the kernel module. Finally, based on the priority identifier and the policy flag, a resource scheduling flag corresponding to the target video stream is generated.
[0092] For example, firewall rules can be rules used to filter and label packets. For instance, a firewall rule could label packets from this target video stream as high-priority packets.
[0093] For example, a kernel module can be a module with extended functionality.
[0094] Optionally, the video stream processing system can add priority markers to data packets corresponding to the target video stream by invoking commands, based on the aforementioned protocol field identifiers and preset firewall rules. The video stream processing system can also add priority markers to data packets automatically based on the protocol field rules or port of the target video stream by configuring firewall rules corresponding to the protocol field identifiers and priority markers in the firewall console.
[0095] Optionally, the video stream processing system can obtain the data packets of the target video stream through the hook functions of the kernel module, and set a delayed transmission policy flag for the data packets based on the aforementioned protocol field identifier and the preset delay policy mapping rules. For example, if the protocol field identifier is combination C, the preset delay policy mapping rules could be a delayed transmission threshold of 10 milliseconds, a transmission queue length of 1024, a retransmission delay of 5 milliseconds, and the delayed transmission policy flags could be delay: 10; queue: 1024; retry_delay: 5.
[0096] Optionally, the video stream processing system can assign different weights to protocol field identifiers, priority markers, and delayed transmission strategy markers, and obtain the overall scheduling priority score of the target video stream through weighted calculation. Based on this overall scheduling priority score and a priority threshold, a resource scheduling marker corresponding to the target video stream is generated.
[0097] For example, a video stream processing system can assign a protocol field identifier weight of 30%, a priority flag weight of 40%, and a delayed transmission strategy flag weight of 30%. If the scores of the protocol field identifier, priority flag, and delayed transmission strategy flag are 90, 95, and 85 respectively, the overall scheduling priority score of the target video stream is 90.5, which is greater than the preset priority threshold of 85. Then, the resource scheduling corresponding to the target video stream is marked as high priority.
[0098] For example, if the overall scheduling priority score is greater than or equal to 85, the resource scheduling corresponding to the target video stream is marked as high priority; if the overall scheduling priority score is less than 85 but greater than 70, the resource scheduling corresponding to the target video stream is marked as medium priority; if the overall scheduling priority score is less than or equal to 70, the resource scheduling corresponding to the target video stream is marked as low priority.
[0099] Optionally, the video stream processing system can also construct a prompt word based on the protocol field identifier, priority flag, and delayed transmission policy flag, and input the prompt word into a machine learning model to output the optimal resource scheduling flag. This prompt word can be used to indicate the optimal resource scheduling flag determined based on the protocol field identifier, priority flag, and delayed transmission policy flag.
[0100] It should be understood that the implementation of the machine learning model based on the protocol field identifier, priority flag, and delayed transmission strategy flag to output the optimal resource scheduling flag can be achieved by referring to any existing deep learning model training method, which will not be elaborated here.
[0101] Using the above method, based on this protocol field identifier, priority markers can be added to the target video stream through firewall rules, achieving priority differentiation, ensuring that high-priority video streams receive resources, and improving the start-up speed of the video stream. Delayed transmission policy markers can be added through the kernel module to avoid stuttering and improve the smoothness of video stream playback. Based on this priority identifier and policy marker, a resource scheduling marker corresponding to the target video stream is generated, providing a basis for subsequent video stream scheduling strategies.
[0102] S104, Based on the resource scheduling flag, adjust the scheduling of the target video stream.
[0103] Optionally, the video stream processing system can parse the resource scheduling tag, extract the scheduling requirements, and adjust the scheduling of the target video stream based on the parsed scheduling requirements and the adjustment strategy.
[0104] For example, to address network resource scheduling needs, the video stream processing system can, for instance, add resources to the corresponding priority queue based on the priority of the resource scheduling tag, and reserve bandwidth channels for the required bandwidth. Regarding resource scheduling needs, the video stream processing system can, for instance, allocate the computing resources required for decoding and parsing based on the encoding method and protocol version of the resource scheduling tag, and set corresponding processor and memory resources based on the required computing resource needs.
[0105] In some embodiments, after generating a resource scheduling tag corresponding to the target video stream, the video stream processing system can increase the processor scheduling priority of the target video stream.
[0106] Optionally, after generating the resource scheduling tag corresponding to the target video stream, the video stream processing system can determine the processor scheduling priority of the target video stream based on the extracted resource scheduling tag field, and improve the processor scheduling priority of the target video stream through the operating system scheduling interface.
[0107] For example, if the target video stream is a real-time interactive stream, the video stream processing system will increase the processor scheduling priority of the target video stream to high processor priority; if the target video stream is a live stream, the video stream processing system will increase the processor scheduling priority of the target video stream to medium processor priority; if the target video stream is a normal stream, the video stream processing system will increase the processor scheduling priority of the target video stream to low processor priority.
[0108] By generating a resource scheduling tag corresponding to the target video stream using the above method, increasing the processor scheduling priority of the target video stream can ensure that the target video stream thread has priority to obtain processor resources when the system load is high, thereby improving the video stream start-up speed and playback smoothness.
[0109] As one possible implementation, after increasing the processor scheduling priority of the target video stream, the video stream processing system can also filter packets from non-target video streams through firewall rules and set delayed transmission policies through flow control rules. Then, a machine learning model is used to predict the real-time resource requirements of the target video stream and dynamically adjust the processor scheduling priority.
[0110] For example, flow control rules can be rules used to control the rate of data packet transmission.
[0111] Optionally, the video stream processing system can pre-store the core identifiers of firewall rules in the target video stream. If the characteristics of a data packet do not match the aforementioned core identifiers, it is determined to be a data packet from a non-target video stream. For example, the video stream processing system can preset the firewall flag to 20 and the protocol field identifier to AAC in the firewall rules. If the firewall flag in a data packet is 25 and the protocol field identifier parsed from the data packet is not AAC, then the data packet is determined to be a non-target video stream data packet.
[0112] Optionally, the video stream processing system can reduce the transmission efficiency of non-target video streams, limit bandwidth, and limit queue length through flow control rules, and set corresponding delay sending strategies, bandwidth limiting strategies, and queue length limiting strategies. For example, it can set a sending delay of 100 milliseconds, limit the maximum bandwidth to 1 megabit per second, and set the queue length to 128.
[0113] Optionally, the video stream processing system can collect feature data and actual resource requirement data from historical video streams to construct a training set. This training set is then used to train a deep learning model, and parameters are adjusted through cross-validation to obtain a deep learning model capable of predicting the real-time resource requirements of the target video stream. Real-time monitoring data and resource scheduling marker features are then input into the deep learning model, which outputs predicted resource requirements, such as processor or memory requirements.
[0114] Optionally, if the real-time resource demand of the target video stream is predicted to increase, the video stream processing system can increase the priority of the target video stream and change its scheduling strategy to real-time scheduling. If the real-time resource demand of the target video stream is predicted to decrease, the video stream processing system can decrease the priority of the target video stream and change its scheduling strategy to normal scheduling. If the real-time resource demand of the target video stream is predicted to remain stable, the video stream processing system can maintain the priority of the target video stream.
[0115] By using the methods described above, after increasing the processor scheduling priority of the target video stream, data packets from non-target video streams are filtered out using firewall rules, and a delayed transmission strategy is set using flow control rules to reduce live stream start-up delays and playback stuttering issues. A machine learning model is used to predict the real-time resource requirements of the target video stream and dynamically adjust the processor scheduling priority to meet the real-time requirements of video stream processing, thereby improving the video stream start-up speed and playback smoothness.
[0116] In this embodiment, deep packet inspection (DIP) is used to analyze the protocol fields of transport protocol data packets to extract the download thread characteristics of the video application, achieving accurate identification of these characteristics. The protocol field identifier of the target video stream is matched based on these download thread characteristics to ensure the accuracy of the identification results. This protocol field identifier includes version number, encoding method, and sequence number features. Based on this protocol field identifier, a resource scheduling tag corresponding to the target video stream is generated, providing a basis for scheduling priority adjustment and time slice control. Based on this resource scheduling tag, the scheduling of the target video stream is adjusted, improving the video stream's start-up speed and playback smoothness.
[0117] Figure 2 This is a timing diagram illustrating a video stream scheduling download thread provided in an embodiment of this application. Figure 2 As shown,
[0118] Optionally, the video stream scheduling download thread includes a video application module, a scene recognition module, a storage module, a core module, and a priority scheduling module.
[0119] Optionally, when the video application starts, its startup status is synchronized to the scene recognition module, which then notifies the storage module of the video application's startup status. The storage module then synchronizes the video application startup status to the core module. Next, the core module reports the video stream download thread information to the storage module, which in turn requests the priority scheduling module to set the priority for the video stream download thread.
[0120] Optionally, when the video application exits, the exit status is synchronized to the scene recognition module, which then notifies the storage module of the video application's exit status. The storage module then synchronizes the video application's exit status to the core module and simultaneously sends a request to the priority scheduling module to cancel the priority scheduling of the video application's video stream download thread.
[0121] Figure 3 This is a flowchart illustrating another video stream scheduling method provided in an embodiment of this application. Figure 3 As shown, the method includes:
[0122] (1) When a user performs the action of opening a video application, the corresponding network data interaction is triggered;
[0123] (2) Obtain the network data packets generated by this operation:
[0124] (3) Extract the user identifier from the network data packets and filter the network data packets by the user identifier;
[0125] (4) Based on the filtered network data packets, filter out protocol data packets according to the User Datagram Protocol (UDP);
[0126] (5) Extract the core data content from the protocol data packet;
[0127] (6) Perform feature matching on the core data content;
[0128] (7) After a successful match, the network data packet is identified as the target video stream, and a Deep Packet Inspection (DPI) marker is generated.
[0129] Optionally, identify video download threads and prioritize their scheduling. When the video application starts, the kernel identifies the video stream download thread through DPI information. Upon receiving information about the video stream download thread, it sets it to the priority scheduling module for priority scheduling; upon receiving information about the video application exiting, the priority scheduling of the video stream download thread must be canceled.
[0130] Optionally, after identifying the UDP stream of the live stream, match it with the downlink Real-time Transport Protocol Packet (RTP). For example, the first and second bytes are the version number (fixed), the third and fourth bytes are the audio and video encoding method (value range from decimal 96 to 126), and the fifth, sixth, seventh, and eighth bytes are the sequence number.
[0131] Optionally, if a user obtains a message based on a live stream from a video application, the video stream processing system generates a DPI marker after recognizing the live stream.
[0132] Optionally, network resource time-slice scheduling can be implemented by using a combination of firewall and flow control to delay data other than specific data for a certain period of time (e.g., 3 seconds) before sending it, thereby ensuring that only specific data can use the network during the delay period.
[0133] Figure 4 A schematic diagram of a flow control topology provided in this application is shown below. Figure 4 As shown, the starting point of this flow control topology is the flow inlet of the local output flow, which first connects to the root queue scheduler, which serves as the root scheduling node for flow control. Then, it enters the sub-queue scheduler through intermediate classification nodes. The sub-queue scheduler outputs the flow branches, resulting in flow classification 2:1, flow classification 2:2, flow classification 2:3, and flow classification 2:4. A delay strategy 4:0 can also be added to flow classification 2:4.
[0134] Figure 5 This is a schematic diagram of the structure of a video stream scheduling device provided in an embodiment of this application, as shown below. Figure 5 As shown, the video stream scheduling device 500 includes: an extraction module 501, a matching module 502, a generation module 503, and an adjustment module 504.
[0135] The extraction module 501 is used to extract the download thread characteristics of the video application by analyzing the protocol fields of the transmission protocol data packets through deep packet inspection.
[0136] The matching module 502 is used to match the protocol field identifier of the target video stream based on the characteristics of the download thread; the protocol field identifier includes version number, encoding method and sequence number characteristics;
[0137] The generation module 503 is used to generate a resource scheduling tag corresponding to the target video stream based on the protocol field identifier;
[0138] The adjustment module 504 is used to adjust the scheduling of the target video stream based on the resource scheduling flag.
[0139] Optionally, the extraction module 501 is also used to identify video applications via the Hypertext Transfer Protocol (HTTP) request header;
[0140] Identify live streams based on data packets from the transmission protocol.
[0141] Based on the live stream, extract the download thread characteristics of the video application.
[0142] Optionally, the matching module 502 is also used to extract the version number of the target video stream;
[0143] Based on the version number, analyze the encoding method of the target video stream;
[0144] This encoding method is used to obtain the sequence number feature of the target video stream;
[0145] Based on the characteristics of the download thread, match the version number, encoding method, and sequence number of the target video stream.
[0146] Optionally, the generation module 503 is also used to add a priority marker to the target video stream based on the protocol field identifier via firewall rules;
[0147] Add a delayed transmission policy flag by modifying the kernel module;
[0148] Based on the priority identifier and the policy tag, a resource scheduling tag corresponding to the target video stream is generated.
[0149] Optionally, the generation module 503 is further configured to increase the processor scheduling priority of the target video stream after generating the resource scheduling tag corresponding to the target video stream.
[0150] Optionally, the generation module 503 is also used to increase the processor scheduling priority of the target video stream, filter data packets of non-target video streams through firewall rules, and set a delayed sending strategy through flow control rules;
[0151] The machine learning model is used to predict the real-time resource requirements of the target video stream and dynamically adjust the processor scheduling priority.
[0152] The video stream scheduling device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0153] Figure 6 A schematic diagram of the structure of the electronic device provided in this application. Figure 6 As shown, the electronic device 600 provided in this embodiment includes at least one processor 601 and a memory 602. Optionally, the device 600 also includes a communication component 603. The processor 601, memory 602, and communication component 603 are connected via a bus 604.
[0154] In a specific implementation, at least one processor 601 executes computer execution instructions stored in memory 602, causing at least one processor 601 to perform the above-described method.
[0155] The specific implementation process of processor 601 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0156] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0157] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0158] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0159] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0160] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0161] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0162] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0163] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0164] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0165] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0166] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0167] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0168] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A video stream scheduling method, characterized in that, include: By analyzing the protocol fields of the transmission protocol data packets through deep packet inspection, the download thread characteristics of video applications can be extracted; The protocol field identifier of the target video stream is matched based on the download thread characteristics; the protocol field identifier includes version number, encoding method, and serial number characteristics; Based on the protocol field identifier, a resource scheduling tag corresponding to the target video stream is generated; Based on the resource scheduling flag, the scheduling of the target video stream is adjusted.
2. The method according to claim 1, characterized in that, The step of extracting download thread characteristics of video applications by analyzing the protocol fields of transport protocol data packets through deep packet inspection includes: Identify video applications using the Hypertext Transfer Protocol (HTTP) request headers; Identify live streams based on data packets from the transmission protocol. Based on the live stream, extract the download thread characteristics of the video application.
3. The method according to claim 1, characterized in that, The protocol field identifier for matching the target video stream based on the download thread characteristics includes: Extract the version number of the target video stream; Based on the version number, the encoding method of the target video stream is analyzed; The sequence number feature of the target video stream is obtained through the encoding method described above; Based on the download thread characteristics, the version number, encoding method, and sequence number characteristics of the target video stream are matched.
4. The method according to claim 1, characterized in that, The step of generating a resource scheduling tag corresponding to the target video stream based on the protocol field identifier includes: Based on the protocol field identifier, a priority marker is added to the target video stream using firewall rules; Add a delayed transmission policy flag by modifying the kernel module; Based on the priority identifier and the policy tag, a resource scheduling tag corresponding to the target video stream is generated.
5. The method according to any one of claims 1-4, characterized in that, After generating the resource scheduling tag corresponding to the target video stream, the process includes: Increase the processor scheduling priority of the target video stream.
6. The method according to claim 5, characterized in that, After increasing the processor scheduling priority of the target video stream, the method further includes: Filter packets from non-target video streams using firewall rules and set delayed sending policies using flow control rules; The machine learning model is used to predict the real-time resource requirements of the target video stream and dynamically adjust the processor scheduling priority.
7. A video stream scheduling device, characterized in that, include: The extraction module is used to extract the download thread characteristics of video applications by analyzing the protocol fields of the transmission protocol data packets through deep packet inspection. The matching module is used to match the protocol field identifier of the target video stream based on the download thread characteristics; the protocol field identifier includes version number, encoding method, and sequence number characteristics; The generation module is used to generate a resource scheduling tag corresponding to the target video stream based on the protocol field identifier; The adjustment module is used to adjust the scheduling of the target video stream based on the resource scheduling flag.
8. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-6.
10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-6.