A distributed audio and video scheduling method and device
By designing a distributed audio and video scheduling method in a distributed audio and video generation system, analyzing user task content and selecting preferred nodes based on semantic matching and load state evaluation, the problem of insufficient computing power of distributed nodes is solved, and more efficient, flexible and scalable audio and video generation is achieved.
Patent Information
- Application Number
- CN202410395084.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-02
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-04-02
AI Technical Summary
The existing distributed audio and video generation process does not consider the possible local computing power deficiency in the audio and video data processing of distributed nodes, which affects the overall generation process.
A distributed audio and video scheduling method is designed, and by pre-establishing an audio and video scheduling network built by multiple servers, analyzing user audio and video tasks content, and selecting preferred distributed nodes for task execution based on semantic matching and load state evaluation.
It realizes more efficient, flexible and scalable audio and video generation, and dynamically evaluates the load conditions of distributed servers, optimizes resource allocation, and avoids the problem of insufficient computing power.
Smart Images

Figure CN118138786B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field related to automotive electronics and electronic measurement, and in particular to a distributed audio and video scheduling method and device. Background Art
[0002] Audio and video generation refers to the process of processing and synthesizing various media materials (such as audio, video, images, etc.) through computer algorithms and technologies to generate new audio and video content. Traditional audio and video generation is often performed on a single computer, which faces problems such as limited processing power, performance bottlenecks and high time costs.
[0003] The background of distributed audio and video generation is to solve the limitations and challenges of traditional audio and video generation. By using distributed computing and cloud computing technologies, the tasks of audio and video generation are distributed to multiple computing nodes or servers for parallel processing, thereby achieving more efficient, flexible and scalable audio and video generation.
[0004] The existing distributed audio and video generation process does not take into account the possible local computing power shortage of each distributed node during the audio and video data processing, which may affect the overall generation process. Therefore, it is necessary to design a method for scheduling distributed audio and video based on this. Summary of the invention
[0005] The purpose of the present invention is to solve at least one of the deficiencies of the prior art and to provide a distributed audio and video scheduling method and device.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] Specifically, a distributed audio and video scheduling method is proposed, including the following:
[0008] Pre-establish an audio and video scheduling network constructed by multiple servers, and each server serves as a distributed node of the audio and video scheduling network;
[0009] Obtain the user's audio and video tasks, and parse the task content from the audio and video tasks;
[0010] Determine, based on the task content, a distributed node in the audio and video scheduling network that can perform the task, recorded as an available distributed node;
[0011] Calculate the server load status of available distributed nodes;
[0012] Selecting a preferred distributed node from available distributed nodes based on the server load status;
[0013] The audio and video tasks are completed by performing task execution through the preferred distributed nodes.
[0014] Further, specifically, parsing the task content in the audio and video task includes:
[0015] Based on the natural language processing (NLP) method, the key information of the audio and video task is extracted from the natural language input by the user by using text processing technology, and then the task content is obtained based on the key information.
[0016] Further, specifically, determining a distributed node capable of executing the task in the audio and video scheduling network based on the task content includes:
[0017] Based on the semantic matching method, the task content is converted into a semantic representation, the semantic representation of the task content is matched with the semantic representation of the distributed node by calculating the semantic similarity, and the distributed nodes with a matching degree higher than the matching threshold are selected as available distributed nodes.
[0018] Furthermore, specifically, the semantic matching method adopted is similarity calculation based on word vectors.
[0019] Further, specifically, calculating the server load status of the available distributed nodes includes,
[0020] For any available distributed node,
[0021] Obtain the real-time program occupancy rate of its central processing unit and the real-time audio and video data processing volume;
[0022] Determine the server load status of the currently available distributed nodes based on the comparison between the real-time program occupancy rate and the real-time audio and video data processing volume and the pre-established judgment line;
[0023] The server load state includes a low load state, a medium load state and a high load state;
[0024] The specific judgment line is established in the following way:
[0025] A two-dimensional coordinate system is established with the CPU program occupancy rate and the audio and video data processing volume as the X-axis and Y-axis respectively;
[0026] The predefined low load state, medium load state and high load state are presented in a two-dimensional coordinate system as low load state points, medium load state points and high load state points;
[0027] The low load state point, the medium load state point and the high load state point are connected in sequence to obtain a preliminary judgment line;
[0028] Optimizing the preliminary discrimination line to obtain the pre-established discrimination line;
[0029] In addition, the corresponding points of the real-time program occupancy rate and the real-time audio and video data processing volume in the two-dimensional coordinate system are called target points. The nearest point from the target point to the pre-established judgment line is calculated as the projection point. The nearest point from the projection point to the low load state point, the medium load state point and the high load state point is calculated. The load state corresponding to the point closest to the projection point from the low load state point, the medium load state point and the high load state point is used to represent the server load state of the current distributed node.
[0030] Further, specifically, the preliminary discrimination line is optimized to obtain the pre-established discrimination line, including:
[0031] Assume that the coordinates of the low load state point, the medium load state point, and the high load state point in the two-dimensional coordinate system are (x 1 ,y 1 ),(x 2 ,y 2 ),(x 3 ,y 3 ), assuming that the sampling point (x, y) in the low load state, medium load state and high load state to any point (x i ,y i ) is d 1 ,d 2 ,d 3 , then the following equation can be established,
[0032]
[0033] D 1 2 -d 3 2 ,d 2 2 -d 3 2 , the x to be optimized i ,y i As the unknown quantity to be solved, it is simplified to the matrix form: Az = b,
[0034] in:
[0035]
[0036] Get the calibration matrix Q(z): Q(z) = ||b-Az|| 2 ;
[0037] Taking the derivative of z we get: Since AA T is a non-singular matrix, then we get z=(A T A)-1 A T b, then solve the optimized (x i ,y i ), the optimized (x i ,y i ) is recorded as (x′ i ,y′ i ), connect the coordinate point (x′ i ,y′ i ), i = 1…3, the coordinate point (x′ 2 ,y′ 2 ) to the coordinate point (x′ 1 ,y′ 1 ) and the coordinate point (x′ 3 ,y′ 3 ) directions, and two rays are drawn out respectively. The two rays are connected with (x′ 2 ,y′ 2 ) is the line segment formed by connecting the two parts is the pre-established judgment line after optimization.
[0038] Further, specifically, selecting a preferred distributed node from available distributed nodes based on the server load status includes:
[0039] The distributed nodes in the low load state and the medium load state among the available distributed nodes are selected as the preferred distributed nodes, and the preferred distributed nodes meet the following rules when being called:
[0040] Priority is given to selecting the preferred distributed nodes in a low-load state. When the number of preferred distributed nodes in a low-load state is insufficient, the preferred distributed nodes in a medium-load state are called.
[0041] Furthermore, the method further comprises:
[0042] When the distributed nodes are running, the server of each distributed node periodically sends a heartbeat signal to inform its survival status. Based on the heartbeat signal, it is judged whether the server is working normally. If the heartbeat signal of a server is not received within a period of time, it is determined that the server and its associated distributed nodes are abnormal.
[0043] The present invention also proposes a distributed audio and video scheduling device, comprising:
[0044] An audio and video scheduling network establishment module is used to pre-establish an audio and video scheduling network constructed by multiple servers, with each server serving as a distributed node of the audio and video scheduling network;
[0045] A task content parsing module is used to obtain the user's audio and video tasks and parse the task content from the audio and video tasks;
[0046] An available distributed node selection module is used to determine the distributed nodes that can perform the task in the audio and video scheduling network based on the task content, which are recorded as available distributed nodes;
[0047] A load status calculation module, used to calculate the server load status of available distributed nodes;
[0048] A preferred distributed node selection module is used to select a preferred distributed node from available distributed nodes based on the server load status;
[0049] The task execution module is used to perform task execution through the preferred distributed nodes to complete the audio and video tasks.
[0050] The beneficial effects of the present invention are:
[0051] The present invention provides a distributed audio and video scheduling method, which processes the audio and video tasks of users in a distributed server manner by establishing an audio and video scheduling network constructed by multiple servers, and takes into account the load conditions of the distributed servers, and dynamically evaluates the load conditions of the distributed servers in combination with the program occupancy rate of the central processing unit and the audio and video data processing volume, and then selects the preferred distributed nodes, and then distributes the audio and video generation tasks to multiple computing nodes or servers for parallel processing, thereby achieving more efficient, more flexible and more scalable audio and video generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The above and other features of the present disclosure will become more obvious by describing in detail the embodiments shown in the accompanying drawings. The same reference numerals in the accompanying drawings of the present disclosure represent the same or similar output voltages. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure. For those skilled in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work. In the accompanying drawings:
[0053] Figure 1 Shown is a flow chart of a distributed audio and video scheduling method of the present invention. DETAILED DESCRIPTION
[0054] The following will be combined with the embodiments and drawings to clearly and completely describe the concept, specific structure and technical effects of the present invention, so as to fully understand the purpose, scheme and effect of the present invention. It should be noted that the embodiments in this application and the features in the embodiments can be combined with each other without conflict. The same reference numerals used throughout the drawings indicate the same or similar parts.
[0055] Reference Figure 1 Embodiment 1: The present invention proposes a distributed audio and video scheduling method, comprising the following steps:
[0056] Step 110: pre-establish an audio and video scheduling network constructed by multiple servers, with each server serving as a distributed node of the audio and video scheduling network;
[0057] Step 120: Obtain the audio and video tasks of the user, and parse the task content from the audio and video tasks;
[0058] Step 130: Determine a distributed node capable of executing the task in the audio and video scheduling network based on the task content, and record it as an available distributed node;
[0059] Step 140, calculating the server load status of the available distributed nodes;
[0060] Step 150: Select a preferred distributed node from available distributed nodes based on the server load status;
[0061] Step 160: Perform task execution by selecting a distributed node to complete the audio and video task.
[0062] In this embodiment 1, by establishing an audio and video scheduling network constructed by multiple servers, the user's audio and video tasks are processed in a distributed server manner. At the same time, taking into account the load of the distributed servers, the load of the distributed servers is dynamically evaluated in combination with the program occupancy rate of the central processing unit and the audio and video data processing volume, and then the preferred distributed nodes are selected, and then the audio and video generation tasks are distributed to multiple computing nodes or servers for parallel processing, thereby achieving more efficient, more flexible and more scalable audio and video generation.
[0063] As a preferred embodiment of the present invention, specifically, parsing the task content in the audio and video task includes:
[0064] Based on the natural language processing (NLP) method, the key information of the audio and video task is extracted from the natural language input by the user by using text processing technology, and then the task content is obtained based on the key information.
[0065] In this preferred embodiment, by using text processing technology, such as lexical analysis, syntactic analysis, entity recognition, etc., the key information of the task is extracted and understood from the natural language input by the user. NLP technology can convert the text input by the user into structured data to facilitate subsequent processing.
[0066] As a preferred embodiment of the present invention, specifically, determining a distributed node capable of executing a task in an audio and video scheduling network based on the task content includes:
[0067] Based on the semantic matching method, the task content is converted into a semantic representation, the semantic representation of the task content is matched with the semantic representation of the distributed node by calculating the semantic similarity, and the distributed nodes with a matching degree higher than the matching threshold are selected as available distributed nodes.
[0068] In this preferred embodiment, the task content is converted into a semantic representation and then matched with the semantic representation of the node. The most suitable node to perform the task is determined by calculating the semantic similarity between the task content and the node. A mature semantic matching method is selected, i.e., similarity calculation based on word vectors, to ensure that a reasonable distributed node capable of performing the task is found.
[0069] As a preferred embodiment of the present invention, specifically, calculating the server load status of the available distributed nodes includes:
[0070] For any available distributed node,
[0071] Obtain the real-time program occupancy rate of its central processing unit and the real-time audio and video data processing volume;
[0072] Determine the server load status of the currently available distributed nodes based on the comparison between the real-time program occupancy rate and the real-time audio and video data processing volume and the pre-established judgment line;
[0073] The server load state includes a low load state, a medium load state and a high load state;
[0074] The specific judgment line is established in the following way:
[0075] A two-dimensional coordinate system is established with the CPU program occupancy rate and the audio and video data processing volume as the X-axis and Y-axis respectively;
[0076] The predefined low load state, medium load state and high load state are presented in a two-dimensional coordinate system as low load state points, medium load state points and high load state points;
[0077] The low load state point, the medium load state point and the high load state point are connected in sequence to obtain a preliminary judgment line;
[0078] Optimizing the preliminary discrimination line to obtain the pre-established discrimination line;
[0079] In addition, the corresponding points of the real-time program occupancy rate and the real-time audio and video data processing volume in the two-dimensional coordinate system are called target points. The nearest point from the target point to the pre-established judgment line is calculated as the projection point. The nearest point from the projection point to the low load state point, the medium load state point and the high load state point is calculated. The load state corresponding to the point closest to the projection point from the low load state point, the medium load state point and the high load state point is used to represent the server load state of the current distributed node.
[0080] In this preferred embodiment, by optimizing the preliminary judgment line, the shortest distance from the pre-established judgment line to the target point can be made more accurate, which can prevent the distributed node server from repeatedly reaching the critical load point during operation, thereby making the current state of the server more clearly distinguishable between the low load state point, the medium load state point and the high load state.
[0081] As a preferred embodiment of the present invention, specifically, optimizing the preliminary discrimination line to obtain the pre-established discrimination line includes:
[0082] Assume that the coordinates of the low load state point, the medium load state point, and the high load state point in the two-dimensional coordinate system are (x 1 ,y 1 ),(x 2 ,y 2 ),(x 3 ,y 3 ), assuming that the sampling point (x, y) in the low load state, medium load state and high load state to any point (x i ,y i ) is d 1 ,d 2 ,d 3 , then the following equation can be established,
[0083]
[0084] D 1 2 -d 3 2 ,d 2 2 -d 3 2 , the x to be optimized i ,y i As the unknown quantity to be solved, it is simplified to the matrix form: Az = b,
[0085] in:
[0086]
[0087] Get the calibration matrix Q(z): Q(z) = ||b-Az|| 2 ;
[0088] Taking the derivative of z we get: Since AA T is a non-singular matrix, then we get z=(A T A) -1 A T b, then solve the optimized (x i ,y i ), the optimized (x i ,y i ) is recorded as (x′ i ,y′ i ), connect the coordinate point (x′ i ,y′ i ), i = 1…3, the coordinate point (x′ 2 ,y′ 2 ) to the coordinate point (x′ 1 ,y′ 1 ) and the coordinate point (x′ 3 ,y′ 3 ) directions, and two rays are drawn out respectively. The two rays are connected with (x′ 2 ,y′ 2 ) is the line segment formed by connecting the two parts is the pre-established judgment line after optimization.
[0089] As a preferred embodiment of the present invention, specifically, selecting a preferred distributed node from available distributed nodes based on the server load status includes:
[0090] The distributed nodes in the low load state and the medium load state among the available distributed nodes are selected as the preferred distributed nodes, and the preferred distributed nodes meet the following rules when being called:
[0091] Priority is given to selecting the preferred distributed nodes in a low-load state. When the number of preferred distributed nodes in a low-load state is insufficient, the preferred distributed nodes in a medium-load state are called.
[0092] As a preferred embodiment of the present invention, the method further comprises:
[0093] When the distributed nodes are running, the server of each distributed node periodically sends a heartbeat signal to inform its survival status. Based on the heartbeat signal, it is judged whether the server is working normally. If the heartbeat signal of a server is not received within a period of time, it is determined that the server and its associated distributed nodes are abnormal.
[0094] In this preferred implementation, the servers of the distributed nodes are also monitored for abnormalities by means of heartbeat detection, which can prevent the problem of server downtime to a certain extent.
[0095] Embodiment 2: The present invention further proposes a distributed audio and video scheduling device, comprising:
[0096] An audio and video scheduling network establishment module is used to pre-establish an audio and video scheduling network constructed by multiple servers, with each server serving as a distributed node of the audio and video scheduling network;
[0097] A task content parsing module is used to obtain the user's audio and video tasks and parse the task content from the audio and video tasks;
[0098] An available distributed node selection module is used to determine the distributed nodes that can perform the task in the audio and video scheduling network based on the task content, which are recorded as available distributed nodes;
[0099] A load status calculation module, used to calculate the server load status of available distributed nodes;
[0100] A preferred distributed node selection module is used to select a preferred distributed node from available distributed nodes based on the server load status;
[0101] The task execution module is used to perform task execution through the preferred distributed nodes to complete the audio and video tasks.
[0102] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
[0103] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional modules.
[0104] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0105] Although the description of the present invention has been quite detailed and specifically describes several described embodiments, it is not intended to be limited to any of these details or embodiments or any particular embodiment, but should be regarded as providing a broad possible interpretation of these claims in view of the prior art by reference to the appended claims, thereby effectively covering the intended scope of the present invention. In addition, the above description of the present invention is based on the embodiments foreseeable by the inventor, and its purpose is to provide a useful description, and those non-substantial changes to the present invention that have not yet been foreseen may still represent equivalent changes to the present invention.
[0106] The above is only a preferred embodiment of the present invention. The present invention is not limited to the above implementation. As long as the technical effect of the present invention is achieved by the same means, it should belong to the protection scope of the present invention. Within the protection scope of the present invention, its technical scheme and / or implementation method can have various modifications and changes.
Claims
1. A distributed audio and video scheduling method, characterized in that: Includes the following: Pre-establish an audio and video scheduling network constructed by multiple servers, and each server serves as a distributed node of the audio and video scheduling network; Obtain the user's audio and video tasks, and parse the task content from the audio and video tasks; Determine, based on the task content, a distributed node in the audio and video scheduling network that can perform the task, recorded as an available distributed node; Calculate the server load status of available distributed nodes; Selecting a preferred distributed node from available distributed nodes based on the server load status; Performing the task by optimizing the distributed nodes to complete the audio and video task; Specifically, the server load status of available distributed nodes is calculated, including: For any available distributed node, Obtain the real-time program occupancy rate of its central processing unit and the real-time audio and video data processing volume; Determine the server load status of the currently available distributed nodes based on the comparison between the real-time program occupancy rate and the real-time audio and video data processing volume and the pre-established judgment line; The server load state includes a low load state, a medium load state and a high load state; The specific judgment line is established in the following way: A two-dimensional coordinate system is established with the CPU program occupancy rate and the audio and video data processing volume as the X-axis and Y-axis respectively; The predefined low load state, medium load state and high load state are presented in a two-dimensional coordinate system as low load state points, medium load state points and high load state points; The low load state point, the medium load state point and the high load state point are connected in sequence to obtain a preliminary judgment line; Optimizing the preliminary discrimination line to obtain the pre-established discrimination line; In addition, the corresponding points of the real-time program occupancy rate and the real-time audio and video data processing volume in the two-dimensional coordinate system are called target points. The nearest point from the target point to the pre-established judgment line is calculated as the projection point. The nearest point from the projection point to the low-load state point, the medium-load state point and the high-load state point is calculated. The load state corresponding to the point closest to the projection point from the low-load state point, the medium-load state point and the high-load state point represents the server load state of the current distributed node. Specifically, the preliminary discrimination line is optimized to obtain the pre-established discrimination line. include, Assume that the coordinates of the low load state point, medium load state point and high load state point in the two-dimensional coordinate system are (x1, y1), (x2, y2), (x3, y3) respectively. Assume that the sampling point (x, y) in the low load state, medium load state and high load state is from any point (x i ,y i ) are d1, d2, d3, then the following equation can be established: D1 2 -d3 2 ,d2 2 -d3 2 , the x to be optimized i ,y i As the unknown quantity to be solved, it is simplified to the matrix form: Az = b, in: Get the calibration matrix Q(z): Q(z) = ||b-Az|| 2 ; Taking the derivative of z we get: Since AA T is a non-singular matrix, then we get z = (A T A) - 1 A T b, then solve the optimized (x i ,y i ), the optimized (x i ,y i ) is recorded as (x′ i ,y′ i ), connect the coordinate point (x′ i ,y′ i ), i = 1…3, draw two rays from the coordinate point (x′2, y′2) to the direction of the coordinate point (x′1, y′1) and the coordinate point (x′3, y′3), and the line segment formed by the two rays and (x′2, y′2) is the pre-established judgment line after optimization.
2. A distributed audio and video scheduling method according to claim 1, characterized in that: Specifically, the task content is parsed from the audio and video task, including: Based on the natural language processing (NLP) method, the key information of the audio and video task is extracted from the natural language input by the user by using text processing technology, and then the task content is obtained based on the key information.
3. A distributed audio and video scheduling method according to claim 2, characterized in that: Specifically, based on the task content, determining a distributed node capable of executing the task in the audio and video scheduling network includes: Based on the semantic matching method, the task content is converted into a semantic representation, the semantic representation of the task content is matched with the semantic representation of the distributed node by calculating the semantic similarity, and the distributed nodes with a matching degree higher than the matching threshold are selected as available distributed nodes.
4. A distributed audio and video scheduling method according to claim 3, characterized in that: Specifically, the semantic matching method adopted is similarity calculation based on word vectors.
5. A distributed audio and video scheduling method according to claim 1, characterized in that: Specifically, selecting a preferred distributed node from available distributed nodes based on the server load status includes: The distributed nodes in the low load state and the medium load state among the available distributed nodes are selected as the preferred distributed nodes, and the preferred distributed nodes meet the following rules when being called: Priority is given to selecting the preferred distributed nodes in a low-load state. When the number of preferred distributed nodes in a low-load state is insufficient, the preferred distributed nodes in a medium-load state are called.
6. A distributed audio and video scheduling method according to claim 1, characterized in that: The method further comprises, When the distributed nodes are running, the server of each distributed node periodically sends a heartbeat signal to inform its survival status. Based on the heartbeat signal, it is judged whether the server is working normally. If the heartbeat signal of a server is not received for a period of time, it is determined that the server and its associated distributed nodes are abnormal.
7. A distributed audio and video scheduling device, characterized in that: A distributed audio and video scheduling method as claimed in claim 1 is applied, comprising: An audio and video scheduling network establishment module is used to pre-establish an audio and video scheduling network constructed by multiple servers, with each server serving as a distributed node of the audio and video scheduling network; A task content parsing module is used to obtain the user's audio and video tasks and parse the task content from the audio and video tasks; An available distributed node selection module is used to determine the distributed nodes that can perform the task in the audio and video scheduling network based on the task content, which are recorded as available distributed nodes; A load status calculation module, used to calculate the server load status of available distributed nodes; A preferred distributed node selection module is used to select a preferred distributed node from available distributed nodes based on the server load status; The task execution module is used to perform task execution through the preferred distributed nodes to complete the audio and video tasks.
Citation Information
Patent Citations
Service positioning method
CN101394428A
Distributed load balancing method and device based on streaming media
CN109600624A
Multi-cloud-based device interaction method, device and readable storage medium
CN117459537A