Decentralized video processing method, device, and electronic device

Through the decentralized video processing method, the video streaming transcoding task is automatically dispatched by cluster equipment, and the problems of high video processing costs and lagging video playback in the existing technology are solved, and efficient video streaming transcoding and playback are achieved.

CN115695919BActive Publication Date: 2025-03-21CHINA TELECOM CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211190538.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-28
Publication Date
2025-03-21
Estimated Expiration
2042-09-28

AI Technical Summary

Technical Problem

The existing video processing methods are costly and difficult at the hardware and network levels, and do not support the encoding and decoding of multiple video streams. The video decoding efficiency is affected by the performance of the host device, resulting in stuttering video playback.

Method used

The decentralized video processing method is adopted to perform transcoding of video streams through cluster devices, and no complex cluster deployment of codec equipment is required, and tasks are automatically scheduled to the terminal device with the most matching computing power.

Benefits of technology

It reduces the hardware and maintenance costs of video processing, solves the problem of lag in video playback, and realizes efficient video streaming transcoding and playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115695919B_ABST
    Figure CN115695919B_ABST
Patent Text Reader

Abstract

The present application discloses a decentralized video processing method and device, which belongs to the field of video processing technology. The method includes: in response to a video playback instruction, obtaining the video stream information of the first video stream targeted by the video playback instruction; determining the amount of computing power required to execute the first transcoding task of the first video stream according to the video stream information; determining the scheduling result according to the amount of computing power, the cluster node computing power list and the cluster node transcoding task list stored locally in the current network terminal; broadcasting the scheduling result to schedule the target network terminal to transcode the first video stream to obtain a second video stream for playback. This method shares computing power through peer network terminals in a local area network, and optimally matches the amount of computing power required for the transcoding task with the computing power index of the network terminal to improve the transcoding speed of the video stream, thereby avoiding the problem of video transcoding playback jamming caused by the poor performance of the browser's host device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video processing technology, and in particular to a decentralized video processing method, device, electronic device, and computer-readable storage medium. Background Art

[0002] In the video surveillance industry, most of the original video streams are RTSP protocols, and more and more new encoding technologies such as H265 are used. Video streams using these encoding technologies cannot be played directly in the browser. To solve this problem, the industry generally has two solutions. The first solution is to build a platform-based encoding and decoding cluster, where the platform pulls the original video stream, and the server cluster transcodes the original video stream into a video stream that can be played directly in the browser, and then provides it to the user side through the public network. The second solution is to use a WebAssembly-based encoding and decoding component to transcode and play the original video in the browser.

[0003] The video processing solutions in the prior art have at least the following defects: The first solution requires the preparation of high-computing-power servers and high-bandwidth networks at the hardware level, and requires professional engineers to select, build, and maintain the software, as well as secondary development to open the decoding capabilities to users in the form of interfaces. The environment deployment and system maintenance costs are high and difficult. The second solution does not support the encoding and decoding of multiple video streams, and the efficiency of video decoding is affected by the performance of the host device running the browser, resulting in slow decoding speed and video playback jams.

[0004] It can be seen that the video processing method in the prior art still needs to be improved. Summary of the invention

[0005] The embodiments of the present application provide a decentralized video processing method and device, that is, an electronic device, which can realize transcoding of video streams through cluster devices without the need for complex cluster deployment of codec devices and does not require maintenance by professionals. It is not only easy to implement and does not require maintenance, but can also solve the problem of video transcoding and playback jams caused by poor performance of the browser's host device.

[0006] In a first aspect, an embodiment of the present application discloses a decentralized video processing method, including:

[0007] In response to a video playback instruction, obtaining video stream information of a first video stream targeted by the video playback instruction;

[0008] Determine, according to the video stream information, the amount of computing power required to execute the first transcoding task of the first video stream;

[0009] Determine a scheduling result including a scheduling matching relationship between the first transcoding task and the target network terminal according to the amount of the computing power, a cluster node computing power list and a cluster node transcoding task list stored locally in the current network terminal;

[0010] The scheduling result is broadcasted to schedule the target network terminal to perform the first transcoding task to transcode the first video stream to obtain a second video stream for playback.

[0011] Optionally, determining, according to the video stream information, an amount of computing power required to execute the first transcoding task of the first video stream includes:

[0012] The amount of computing power required to execute the first transcoding task of the first video stream is determined according to one or more of the following information included in the video stream information: video frame rate, encoding protocol, transmission protocol, and video resolution.

[0013] Optionally, the cluster node computing power list includes: computing power indicators of each network terminal in the cluster to which the current network terminal belongs; the cluster node transcoding task list includes: scheduling matching relationships between the network terminals in the cluster and the second transcoding tasks, and the amount of computing power required to execute each of the second transcoding tasks;

[0014] The determining, according to the amount of the computing power, the cluster node computing power list and the cluster node transcoding task list stored locally in the current network terminal, a scheduling result including a scheduling matching relationship between the first transcoding task and the target network terminal comprises:

[0015] According to the amount of computing power required to execute the first transcoding task, the amount of computing power required to execute each of the second transcoding tasks, and the computing power size indicated by the computing power indicator of each network terminal in the cluster, and in accordance with the principle that the amount of computing power is positively correlated with the computing power size, determining the scheduling matching relationship between the first transcoding task and each of the second transcoding tasks and each of the network terminals;

[0016] A scheduling result is obtained according to the matching relationship.

[0017] Optionally, the cluster node computing power list includes: computing power indicators of each network terminal in the cluster to which the current network terminal belongs; the cluster node transcoding task list includes: scheduling matching relationships between the network terminals in the cluster and the second transcoding tasks, and the amount of computing power required to execute each of the second transcoding tasks;

[0018] The determining, according to the amount of the computing power, the cluster node computing power list and the cluster node transcoding task list stored locally in the current network terminal, a scheduling result including a scheduling matching relationship between the first transcoding task and the target network terminal comprises:

[0019] Acquire idle network terminals in the cluster according to the cluster node computing power list and the scheduling matching relationship;

[0020] Determine the idle network terminal whose computing power indicator satisfies the amount of computing power required to execute the first transcoding task as the target network terminal, and obtain a scheduling matching relationship between the first transcoding task and the target network terminal;

[0021] A scheduling result is obtained according to the scheduling matching relationship.

[0022] Optionally, the cluster node computing power list is updated by the following method:

[0023] In response to receiving computing power information broadcasted in the local area network, obtaining a network terminal identifier and a computing power index carried in the computing power information; and incrementally recording a corresponding relationship between a corresponding network terminal and the computing power index in a cluster node computing power list according to the network terminal identifier and the computing power index;

[0024] In response to not receiving the broadcast information of the designated network terminal in the cluster node computing power list within a preset time period, deleting the correspondence between the designated network terminal and the computing power indicator from the cluster node computing power list.

[0025] Optionally, the method further includes:

[0026] Execute a preset calculation operation and obtain the execution time of executing the preset calculation operation;

[0027] Determine the computing power index of the current network terminal according to the execution time;

[0028] The computing power information carrying the computing power indicator is broadcasted, so that each network terminal in the cluster to which the current network terminal belongs updates the cluster node computing power list locally stored by each network terminal based on the broadcasted computing power information.

[0029] Optionally, the method further includes:

[0030] In response to receiving the scheduling result broadcasted by the other network terminal, updating the cluster node transcoding task list locally stored by the current network terminal according to the scheduling matching relationship carried in the received scheduling result;

[0031] According to the updated cluster node transcoding task list, corresponding transcoding tasks are executed.

[0032] In a second aspect, an embodiment of the present application discloses a decentralized video processing device, including:

[0033] A video stream information acquisition module, configured to acquire, in response to a video playback instruction, video stream information of a first video stream targeted by the video playback instruction;

[0034] A computing power quantity determination module, used to determine the amount of computing power required to execute the first transcoding task of the first video stream according to the video stream information;

[0035] a transcoding scheduling result determination module, configured to determine a scheduling result including a scheduling matching relationship between the first transcoding task and the target network terminal according to the amount of the computing power, a cluster node computing power list and a cluster node transcoding task list stored locally in the current network terminal;

[0036] The scheduling transcoding module is used to broadcast the scheduling result to schedule the target network terminal to perform the first transcoding task to transcode the first video stream to obtain a second video stream for playback.

[0037] Optionally, the computing power quantity determination module is further used to:

[0038] The amount of computing power required to execute the first transcoding task of the first video stream is determined according to one or more of the following information included in the video stream information: video frame rate, encoding protocol, transmission protocol, and video resolution.

[0039] Optionally, the cluster node computing power list includes: computing power indicators of each network terminal in the cluster to which the current network terminal belongs; the cluster node transcoding task list includes: scheduling matching relationships between the network terminals in the cluster and the second transcoding tasks, and the amount of computing power required to execute each of the second transcoding tasks;

[0040] The transcoding scheduling result determination module is further used to:

[0041] According to the amount of computing power required to execute the first transcoding task, the amount of computing power required to execute each of the second transcoding tasks, and the computing power indicated by the computing power indicator of each network terminal in the cluster, and in accordance with the principle that the amount of computing power is positively correlated with the computing power, determine the scheduling matching relationship between the first transcoding task and each of the second transcoding tasks and each of the network terminals; and, based on the matching relationship, obtain a scheduling result.

[0042] Optionally, the cluster node computing power list includes: computing power indicators of each network terminal in the cluster to which the current network terminal belongs; the cluster node transcoding task list includes: scheduling matching relationships between the network terminals in the cluster and the second transcoding tasks, and the amount of computing power required to execute each of the second transcoding tasks;

[0043] The transcoding scheduling result determination module is further used to:

[0044] According to the cluster node computing power list and the scheduling matching relationship, the idle network terminals in the cluster are obtained; then, the idle network terminals whose computing power indicators meet the number of computing power required to execute the first transcoding task are determined as the target network terminals, and the scheduling matching relationship between the first transcoding task and the target network terminal is obtained; and, according to the scheduling matching relationship, a scheduling result is obtained.

[0045] Optionally, the device further includes: a cluster node computing power list updating module, configured to:

[0046] In response to receiving computing power information broadcast in the local area network, obtaining the network terminal identifier and computing power index carried in the computing power information; incrementally recording the corresponding relationship between the corresponding network terminal and the computing power index in the cluster node computing power list according to the network terminal identifier and the computing power index; or,

[0047] In response to not receiving the broadcast information of the designated network terminal in the cluster node computing power list within a preset time period, deleting the correspondence between the designated network terminal and the computing power indicator from the cluster node computing power list.

[0048] Optionally, the device further comprises:

[0049] The terminal computing power acquisition module is used to execute a preset computing operation and obtain the execution time of the preset computing operation; and determine the computing power index of the current network terminal according to the execution time;

[0050] The terminal computing power collection module is also used to broadcast computing power information carrying the computing power indicator, so that each network terminal in the cluster to which the current network terminal belongs updates the cluster node computing power list locally stored by each network terminal based on the broadcasted computing power information.

[0051] Optionally, the device further comprises:

[0052] A transcoding module is used to update the cluster node transcoding task list stored locally at the current network terminal in response to receiving the scheduling results broadcast by the other network terminals according to the scheduling matching relationship carried in the received scheduling results; and to execute corresponding transcoding tasks according to the updated cluster node transcoding task list.

[0053] In a third aspect, an embodiment of the present application further discloses an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the decentralized video processing method described in the embodiment of the present application when executing the computer program.

[0054] In a fourth aspect, an embodiment of the present application discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the decentralized video processing method disclosed in the embodiment of the present application.

[0055] The decentralized video processing method disclosed in the embodiment of the present application obtains video stream information of a first video stream targeted by the video playback instruction in response to a video playback instruction; determines the amount of computing power required to execute a first transcoding task for the first video stream based on the video stream information; determines a scheduling result including a scheduling matching relationship between the first transcoding task and a target network terminal based on the amount of computing power, a cluster node computing power list and a cluster node transcoding task list stored locally in the current network terminal; broadcasts the scheduling result to schedule the target network terminal to execute the first transcoding task to transcode the first video stream to obtain a second video stream for playback, which can effectively solve the problem of video transcoding and playback jams caused by poor performance of the browser's host device.

[0056] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0058] Figure 1 It is one of the flow charts of the decentralized video processing method disclosed in the embodiment of the present application;

[0059] Figure 2 It is a schematic diagram of the cluster structure in the decentralized video processing method disclosed in the embodiment of the present application;

[0060] Figure 3 This is the second flowchart of the decentralized video processing method disclosed in the embodiment of the present application;

[0061] Figure 4 It is a schematic diagram of an application scenario of the decentralized video processing method disclosed in the embodiment of the present application;

[0062] Figure 5It is one of the structural schematic diagrams of the decentralized video processing device disclosed in the embodiment of the present application;

[0063] Figure 6 This is the second structural schematic diagram of the decentralized video processing device disclosed in the embodiment of the present application;

[0064] Figure 7 A block diagram schematically shows an electronic device for executing the method according to the present application; and

[0065] Figure 8 A storage unit for holding or carrying a program code for implementing the method according to the present application is schematically shown. DETAILED DESCRIPTION

[0066] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0067] The present invention provides a technical solution for forming a self-organizing, decentralized encoding and decoding cluster without the need for professional personnel or professional server support, but only using ordinary terminal devices (capable of running a browser that supports WebAssembly and having network intercommunication, such as computers, tablet computers, Raspberry Pi products, etc. within a local area network). In addition, the technical solution can dispatch different transcoding tasks to the most suitable network terminal device within the cluster according to the computing power requirements of the video transcoding tasks, thereby giving full play to the computing power of all network terminal devices in the local area network.

[0068] The solution described in the present invention only requires the installation of the same software on ordinary network terminals, that is, the self-organizing construction system of the present invention, which can self-organize and build a video encoding and decoding cluster, automatically rate the computing power of the terminals in the cluster, and assign different transcoding tasks to the network terminal devices with the most matching computing power.

[0069] Below, the specific implementation of the decentralized video processing method disclosed in the embodiment of the present application is illustrated by examples.

[0070] like Figure 1 As shown, a decentralized video processing method disclosed in an embodiment of the present application includes: steps 110 to 140.

[0071] Step 110: In response to a video play instruction, obtain video stream information of a first video stream targeted by the video play instruction.

[0072] The decentralized video processing method described in the embodiment of the present application is applied to a network terminal, which may be a computer, a tablet computer, a smart phone, a Raspberry Pi product, etc. The network terminal needs to access a local area network and be able to run a browser that supports WebAssembly. In this way, after accessing the local area network, the network terminal can automatically form a cluster with other network terminals in the local area network by sending preset broadcast information and receiving preset broadcast information. The network terminals in the cluster can share video stream transcoding resources, that is, they can provide video stream transcoding services to each other.

[0073] by Figure 2 Take the cluster structure shown in as an example, Figure 2 The network terminals 210, 220, 230, and 240 are peer network terminals connected to the switch 200 in the local area network. The network terminals 210, 220, 230, and 240 are pre-installed with WebAssembly plug-ins to support running browsers. When the network terminals 210, 220, 230, and 240 are autonomously organized into a cluster, the network terminals 210, 220, 230, and 240 will each serve as a cluster node in the cluster to provide transcoding computing power for each terminal device in the cluster.

[0074] Taking the video surveillance field as an example, when a network terminal in the cluster detects a user trigger and plays the selected surveillance video through a browser, the network terminal (hereinafter referred to as the "current network device") first obtains the video stream information of the real-time video stream corresponding to the surveillance video (hereinafter referred to as the "first video stream"). In some embodiments of the present application, the video stream information includes but is not limited to: video stream pull address, video frame rate, encoding protocol, transmission protocol, resolution and other information.

[0075] Wherein, the video stream pull address is the storage address of the video stream to be played (such as a server, a video storage device, etc.). The video stream stored in the video stream pull address is a video stream of a preset encoding protocol. The encoding protocol included in the video stream information is used to indicate the encoding protocol of the real-time video stream (such as H265, RTSP encoding protocol, etc.). The video frame number is used to indicate the playback frame rate of the video. The transmission protocol is used to indicate the network transmission protocol of the video stream.

[0076] In some embodiments of the present application, the video stream information can be obtained using the ffprobe tool pre-installed in the network terminal. ffprobe is a tool for reading video streams or video information. For example, using the "ffprobe-show_streams stream address" command, the video stream information of the video stream specified by the stream address can be obtained.

[0077] Step 120: Determine the amount of computing power required to execute the first transcoding task of the first video stream according to the video stream information.

[0078] After the current network terminal obtains the video stream information of the first video stream to be played, it further determines the amount of computing power required to perform a transcoding task (referred to as a "first transcoding task" in the text) when transcoding the first video stream based on the video stream information.

[0079] In the implementation of this application, computing power is used to represent the computing power of network devices. The amount of computing power is a quantitative representation of the size of the computing power. That is, in the embodiment of this application, the amount of computing power is a quantitative representation of the size of the computing power required to perform the video stream transcoding task. For example, for video streams with higher resolutions, more computing power is required, that is, the network terminal is required to have stronger computing power, and accordingly, the amount of computing power determined is larger; for another example, for video streams with lower video frame rates, less computing power is required, that is, the network terminal is not required to have strong computing power, and accordingly, the amount of computing power determined is smaller.

[0080] In an embodiment of the present application, "points" can be used as the unit of computing power, and the corresponding relationship between 1 point of computing power and the first time duration consumed by the network terminal to perform a preset operation can be determined. For example, when the first time duration is 1 second, the computing power of the network terminal can be determined to be 1 point of computing power. Afterwards, the number of points of computing power (i.e., the amount of computing power) required to transcode the specified video stream is determined based on the proportional relationship between the second time consumed by the network terminal to transcode the specified video stream and the first time.

[0081] In some embodiments of the present application, determining the amount of computing power required to execute the first transcoding task of the first video stream based on the video stream information includes: determining the amount of computing power required to execute the first transcoding task of the first video stream based on one or more of the following information included in the video stream information: video frame rate, encoding protocol, transmission protocol, video resolution.

[0082] For example, the aforementioned network terminal can be used to transcode a video stream of a specified duration with different video frame rates, different resolutions, and different encoding protocols (such as H265, RTSP, etc.), and the time consumed by transcoding can be recorded as the second duration. By analyzing the second duration, the corresponding relationship between the video stream information such as video frame rate, resolution, encoding protocol, and the amount of computing power can be defined according to the analysis result. For example, when a 1-minute H265 real-time video stream with a resolution of 1080P and a frame rate of 60 requires the network terminal to decode for 10 seconds, the amount of computing power required for decoding a 1-minute H265 real-time video stream with a resolution of 1080P and a frame rate of 60 can be defined as 10 points. For another example, when a 1-minute H265 real-time video stream with a resolution of 1080P and a frame rate of 30 requires the network terminal to decode for 5 seconds, the amount of computing power required for decoding a 1-minute H265 real-time video stream with a resolution of 1080P and a frame rate of 30 can be defined as 5 points. In this way, after the video stream information of the video stream to be played is obtained, the point value of the computing power required for transcoding the video stream to be played can be determined according to the video stream information and the corresponding relationship.

[0083] In some embodiments of the present application, the computing power of different network terminals can be evaluated by the time taken by different network terminals to execute the same preset operation.

[0084] Step 130 , determining a scheduling result including a scheduling matching relationship between the first transcoding task and the target network terminal according to the amount of the computing power, the cluster node computing power list and the cluster node transcoding task list stored locally by the current network terminal.

[0085] In some embodiments of the present application, a network terminal can automatically join a cluster automatically formed by multiple network terminals in the local area network by broadcasting computing power information to other network terminals in the local area network. In the cluster, each network terminal needs to broadcast information at a preset time interval to maintain a computing power sharing state with other network terminals in the cluster.

[0086] At the same time, each network terminal that joins the cluster will store a cluster node computing power list locally to record the network terminals included in the cluster as cluster nodes, as well as the computing power index of each network terminal. The computing power index is used to indicate the computing power size of the corresponding network terminal, for example, the computing power index can be the amount of computing power.

[0087] In some embodiments of the present application, each network terminal joining the cluster will also locally store a cluster node transcoding task list for storing the current scheduling information of each network device in the cluster, for example, storing the scheduling matching relationship between each network terminal in the cluster and the second transcoding task (for example, the network terminal is in an idle state, or is in a state of being scheduled to execute a second transcoding task), and the amount of computing power required to execute each of the second transcoding tasks (for example, for a network terminal in a state of being scheduled to execute a second transcoding task, the cluster will store the corresponding relationship between the network terminal and the second transcoding task, as well as the amount of computing power required to execute the second transcoding task).

[0088] After obtaining the amount of computing power required for the first transcoding task of the first video stream, it is possible to further determine the network terminal suitable for executing the first transcoding task as the target network terminal based on the paid scheduling status of the network terminal recorded in the cluster node transcoding task list and the computing power size of each network terminal recorded in the cluster node computing power list, and determine the scheduling matching relationship between the first transcoding task and the target network terminal.

[0089] In the embodiment of the present application, if the target network terminal is currently in an idle state, there is no need to adjust the scheduling matching relationship corresponding to other network terminals. In this case, only the scheduling matching relationship between the first transcoding task and the target network terminal can be used as the scheduling result.

[0090] In some other embodiments of the present application, if the target network terminal is currently in a scheduled state, that is, the target network terminal has currently established a scheduling matching relationship with other transcoding tasks (such as the aforementioned second transcoding task), it is necessary to comprehensively consider the computing power of each network terminal, as well as the amount of computing power described in the first transcoding task and the second transcoding task, to adjust the scheduling matching relationship and obtain a new scheduling matching relationship between the network terminal and the transcoding task. In this case, the adjusted scheduling matching relationship can be used as the scheduling result.

[0091] In the embodiment of the present application, only the newly added or adjusted scheduling matching relationship may be used as the scheduling result, or the scheduling matching relationship of all current network terminals and transcoding tasks may be used as the scheduling result.

[0092] Step 140: broadcast the scheduling result to schedule the target network terminal to perform the first transcoding task to transcode the first video stream to obtain a second video stream for playback.

[0093] In some embodiments of the present application, the scheduling result is broadcasted to schedule the target network terminal to execute the first transcoding task to transcode the first video stream to obtain a second video stream for playback, including: broadcasting the scheduling result so that the target network terminal updates the scheduling matching relationship in the locally stored cluster node transcoding task list according to the scheduling result, and determines the first transcoding task that matches itself according to the updated cluster node transcoding task list, and then executes the first transcoding task to transcode the first video stream to obtain a second video stream for playback.

[0094] After the current network terminal obtains the scheduling result, the scheduling result can be broadcasted in the local area network by broadcasting a scheduling message, so as to notify each network terminal in the cluster to timely update the locally stored cluster node transcoding task list.

[0095] After each network terminal in the cluster receives the broadcast scheduling message, it updates the scheduling matching relationship recorded in the locally stored cluster node transcoding task list according to the scheduling result carried in the scheduling information, and executes the corresponding transcoding task according to the scheduling matching relationship recorded in the updated cluster node transcoding task list to obtain the transcoded video stream.

[0096] In the embodiment of the present application, since the network terminals (i.e., cluster nodes) in the cluster maintain a cluster node transcoding task list, it is possible to determine which video stream transcoding task it currently needs to perform based on the scheduling matching relationship recorded in the updated cluster node transcoding task list, and each network terminal knows which video stream transcoding task it is currently performing, and of course also knows which video stream it is transcoding. Figure 2 Taking the network terminal 220 in as an example, if the network terminal 220 is transcoding the video stream corresponding to "rtsp: / / 207.194.83.47:9013 / 9b112c3" (which can be understood as executing the aforementioned second transcoding task), for the scheduling matching relationship that may exist in the updated cluster node transcoding task list, the scheduling process based on the scheduling results is illustrated below.

[0097] When the network terminal 220 has a scheduling matching relationship with the video stream corresponding to "rtsp: / / 207.194.83.47:9013 / 9b112c3" in the updated cluster node transcoding task list, that is, the video stream corresponding to the transcoding task has not changed, the network terminal 220 continues to perform the transcoding task of the original video stream. When the network terminal 220 does not have a scheduling matching relationship with any video stream in the updated cluster node transcoding task list, the network terminal 220 stops the transcoding task of the original video stream and enters the idle state. When in the updated cluster node transcoding task list, the network terminal 220 and the video stream "rtsp: / / 107.94.183.147:6012 / 8xc12b6" have a scheduling matching relationship, that is, the video stream corresponding to the transcoding task changes, the network terminal 220 stops executing the transcoding task of the original video stream (that is, the video stream corresponding to "rtsp: / / 207.194.83.47:9013 / 9b112c3"), and starts executing the transcoding task of the video stream corresponding to "rtsp: / / 107.94.183.147:6012 / 8xc12b6" (which can be understood as the aforementioned first transcoding task).

[0098] In some embodiments of the present application, after the network terminal in the cluster completes the transcoding task corresponding to itself, it can notify the current network terminal to access the target network terminal to pull the second video stream obtained by transcoding by broadcasting a transcoding completion message. In other embodiments of the present application, after the network terminal in the cluster completes the transcoding task corresponding to itself, it can also actively push the second video stream obtained by transcoding to the current network terminal. In other embodiments of the present application, the network terminal can also reach the second video stream obtained by transcoding to the browser used to perform video playback by other means. In the embodiments of the present application, the specific implementation method of the network terminal performing the transcoding task reaching the second video stream obtained by transcoding to the browser or network terminal used to perform video playback is not limited.

[0099] After obtaining the second video stream obtained by transcoding the first video stream, the current network terminal can play the video based on the second video stream through the browser.

[0100] In order to understand this solution more clearly, Figure 3 and Figure 4 The specific implementation methods of each step of the decentralized video processing method disclosed in the embodiment of the present application are further illustrated.

[0101] In an embodiment of the present application, the cluster node computing power list is dynamically updated. That is, when a network terminal in a local area network is running the decentralized video processing method, the network terminal can broadcast the computing power information of the network device itself according to the user's trigger, or automatically broadcast the computing power information of the network device itself after connecting to the local area network, so that the network terminals in the local area network can synchronously update the locally stored cluster node computing power list according to the computing power information broadcast by other network terminals.

[0102] like Figure 3 As shown, the method further includes: step 105.

[0103] Step 105: Update the cluster node computing power list.

[0104] In an embodiment of the present application, the cluster node computing power list is updated by the following two methods.

[0105] The first method is to obtain the network terminal identifier and computing power index carried in the computing power information in response to receiving the computing power information broadcast in the local area network; and based on the network terminal identifier and the computing power index, incrementally record the corresponding relationship between the corresponding network terminal and the computing power index in the cluster node computing power list.

[0106] Among them, the computing power information broadcast by the network terminal includes but is not limited to: its own host name, IP address, mac address, and computing power index. The network terminal broadcasts its own computing power information to other network terminals in the local area network by broadcasting messages, and at the same time, receives computing power information broadcast by other network terminals by receiving broadcast messages. Every time the network terminal receives a piece of computing power information broadcast by a network terminal that is newly connected to the local area network or newly opened with the shared computing power function, it can add a correspondence between the network terminal and the computing power index to the locally stored cluster node computing power list according to the received computing power information, so as to update the locally stored cluster node computing power list. In this way, each network terminal in the local area network can promptly discover the computing power nodes newly added to the cluster according to the computing power information broadcast in the local area network, and update the locally stored cluster node computing power list.

[0107] The second method is to delete the corresponding relationship between the designated network terminal and the computing power indicator from the cluster node computing power list in response to not receiving the broadcast information of the designated network terminal in the cluster node computing power list within a preset time period, wherein the designated network terminal is a network terminal other than itself.

[0108] When the network terminals in the cluster are offline or the user turns off the function of sharing computing power (such as exiting the application of the decentralized video processing method disclosed in the embodiment of the present application), it is also necessary to promptly update the cluster node computing power list stored by each network terminal in the cluster. In some embodiments of the present application, the status of each network terminal in the cluster can be determined by the information broadcast by each network terminal in the cluster node computing power list. For example, if network terminal A does not receive any information broadcast by network terminal B within a preset time, it can be considered that network terminal B has exited the cluster. In this case, network terminal A deletes the corresponding relationship between network terminal B and network terminal B's computing power from the locally stored cluster node computing power list to update the cluster node computing power list stored locally by network terminal A.

[0109] Since each network terminal in the cluster stores the same cluster node computing power list locally, and each network terminal performs the same judgment operation as network terminal A, after network terminal B has exited the cluster, other network terminals will promptly delete the corresponding relationship between network terminal B and network terminal B's computing power from the locally stored cluster node computing power list to update the cluster node computing power list stored locally by each network terminal.

[0110] In some embodiments of the present application, before each network terminal broadcasts computing power information to other network terminals in the local area network, it first needs to evaluate its own computing power to obtain the computing power index of the network terminal itself.

[0111] like Figure 3 As shown, the method further includes: step 101, step 102 and step 103.

[0112] Step 101: execute a preset calculation operation and obtain the execution time of the preset calculation operation.

[0113] For example, a large number of character strings and their H265 hash values ​​may be preset in the network terminal, and then each character string is obtained, and a hash operation is performed on each character string and each character string, and the execution time required to calculate all hash values ​​is recorded.

[0114] Step 102: Determine the computing power index of the current network terminal according to the execution time.

[0115] The computing power index is an index for measuring the computing power, for example, it can be the amount of computing power.

[0116] In some embodiments of the present application, a preset budget can be executed on the execution time, and the result obtained can be used as the computing power index of the network terminal. For example, a preset positive number is divided by the execution time, and the quotient obtained is used as the computing power index of the network terminal. For example, the method described above can be used, with "points" as the unit of computing power, and the number of execution times contained in 1 second is determined as the number of points of computing power matched by the network terminal. That is, if the network terminal executes one round of the above-mentioned preset calculation operation within 1 second (that is, the execution time is 1 second), it can be considered that the computing power matched by the network terminal is 1 point; if the network terminal executes two rounds of the above-mentioned preset calculation operations within 1 second (that is, the execution time is 0.5 seconds), it can be considered that the computing power matched by the network terminal is 2 points.

[0117] In some other embodiments of the present application, the correspondence between the execution time value range and the computing power index can also be pre-set, and then the value of the computing power index corresponding to the execution time obtained in step 101 is determined according to the corresponding relationship.

[0118] In some other embodiments of the present application, the computing power indicator may also be a computing power level. For example, the computing power level of the network terminals may be divided in advance according to the execution time obtained by each network terminal executing step 101. In this way, network terminals of different computing power levels have different transcoding computing capabilities.

[0119] In an embodiment of the present application, the value of the computing power indicator is positively correlated with the transcoding computing capability of the network terminal.

[0120] Step 103: broadcast computing power information carrying the computing power indicator, so that each network terminal in the cluster to which the current network terminal belongs updates the cluster node computing power list locally stored by each network terminal based on the broadcasted computing power information.

[0121] After obtaining its own computing power index, each network terminal (such as the current network terminal) further generates computing power information based on its own IP address, MAC address, network name and other information, as well as the obtained computing power index, and broadcasts the computing power information to the local area network. In the embodiment of the present application, the IP address and MAC address can be used as the unique identifier of the network terminal.

[0122] In some embodiments of the present application, when the cluster node computing power list is updated, the cluster node transcoding task list also needs to be updated synchronously. Figure 3 As shown, after step 105, the method further includes: step 106.

[0123] Step 106: Update the cluster node transcoding task list.

[0124] For example, when a network terminal exits the cluster, if the network terminal is in an idle state in the cluster node transcoding task list, the scheduling matching relationship corresponding to the network terminal can be directly deleted from the cluster node transcoding task list; if the network terminal is scheduled to perform a transcoding task in the cluster node transcoding task list, it is necessary to reschedule the transcoding task scheduled to the network terminal after deleting the scheduling matching relationship corresponding to the network terminal from the cluster node transcoding task list, and update the cluster node transcoding task list according to the scheduling result obtained by the rescheduling.

[0125] Based on the above description of the creation and update scheme of the cluster node computing power list and the cluster node transcoding task list, the scheduling scheme of the first transcoding task is further explained through the following two specific implementation methods.

[0126] The first method is comprehensive sorting and scheduling.

[0127] As mentioned above, the cluster node computing power list includes: the computing power index of each network terminal in the cluster to which the current network terminal belongs; the cluster node transcoding task list includes: the scheduling matching relationship between the network terminal in the cluster and the second transcoding task, and the amount of computing power required to execute each of the second transcoding tasks; the scheduling result including the scheduling matching relationship between the first transcoding task and the target network terminal is determined based on the amount of computing power, the cluster node computing power list and the cluster node transcoding task list stored locally by the current network terminal, including: according to the amount of computing power required to execute the first transcoding task, the amount of computing power required to execute each of the second transcoding tasks, and the computing power indicated by the computing power index of each network terminal in the cluster, according to the principle that the amount of computing power is positively correlated with the computing power size, the scheduling matching relationship between the first transcoding task and each of the second transcoding tasks and each of the network terminals is determined; based on the matching relationship, a scheduling result is obtained.

[0128] For example, the first transcoding task and each second transcoding task indicated by each scheduling matching relationship in the cluster node transcoding task list can be comprehensively sorted in order of the required computing power from large to small, and at the same time, the network terminals in the cluster node computing power list are arranged in order of computing power indicators from high to low; then, the transcoding task requiring the largest amount of computing power is scheduled to the network terminal with the highest computing power indicator, and the transcoding task requiring the second largest amount of computing power is scheduled to the network terminal with the second highest computing power indicator, and so on, according to the strategy of "high computing power" network terminals processing "high computing power demand" transcoding tasks, the scheduling matching relationship between the network terminal and the transcoding task is re-established. Then, the re-established scheduling matching relationship is used as the scheduling result, and the scheduling result is broadcast to other network terminals in the local area network.

[0129] For example, assuming that in a cluster including 3 network terminals, network terminal 1 matches 15 points of computing power, network terminal 2 matches 9 points of computing power, and network terminal 3 matches 6 points of computing power, the scheduling matching relationship currently recorded in the cluster node transcoding task list is: transcoding task 1 requires 10 points of computing power and is currently scheduled to network terminal 1; transcoding task 2 requires 7 points of transportation capacity and is currently scheduled to network terminal 2. Network terminal 3 is in an idle state. At this time, network terminal 3 generates a new transcoding task 3 (such as the first transcoding task mentioned above), which requires 15 points of transportation capacity. Network terminal 3 executes the above-mentioned comprehensive sorting and scheduling method to schedule tasks with high computing power requirements to network terminals with high computing power for transcoding as much as possible. The re-established scheduling matching relationship between network terminals and transcoding tasks is: transcoding task 3 is scheduled to network terminal 1, transcoding task 1 is scheduled to network terminal 2, and transcoding task 2 is scheduled to network terminal 3.

[0130] The second method is idle adaptation scheduling.

[0131] As mentioned above, the cluster node computing power list includes: the computing power indicators of each network terminal in the cluster to which the current network terminal belongs; the cluster node transcoding task list includes: the scheduling matching relationship between the network terminals in the cluster and the second transcoding tasks, and the amount of computing power required to execute each of the second transcoding tasks; the scheduling result including the scheduling matching relationship between the first transcoding task and the target network terminal is determined based on the amount of computing power, the cluster node computing power list and the cluster node transcoding task list stored locally on the current network terminal, including: obtaining idle network terminals in the cluster based on the cluster node computing power list and the scheduling matching relationship; determining the idle network terminal whose computing power indicator meets the amount of computing power required to execute the first transcoding task as the target network terminal, and obtaining the scheduling matching relationship between the first transcoding task and the target network terminal; and obtaining the scheduling result based on the scheduling matching relationship.

[0132] For example, after obtaining the amount of computing power required for the first transcoding task of the first video stream, the idle network terminals can be obtained by searching the cluster node transcoding task list. Then, the computing power size of the idle network terminals can be further obtained by searching the cluster node computing power list. Then, from the idle network terminals, a network terminal whose computing power size meets the amount of computing power required by the first transcoding task is selected as the target network terminal, thereby determining the scheduling matching relationship between the first transcoding task and the target network terminal.

[0133] In some embodiments of the present application, the scheduling matching relationship between the first transcoding task and the target network terminal can be broadcasted to the local area network as a scheduling result. In some other embodiments of the present application, the scheduling matching relationship between the first transcoding task and the target network terminal can also be added to the cluster node transcoding task list stored locally by the current network terminal to update the scheduling matching relationship in the cluster node transcoding task list stored locally by the current network terminal, and then all the scheduling matching relationships in the updated cluster node transcoding task list are broadcasted to the local area network as a batch of scheduling results.

[0134] In some embodiments of the present application, when the second scheduling method is used to schedule transcoding tasks, if no idle network terminal is found whose computing power indicator satisfies the amount of computing power required to execute the first transcoding task, the first method can be further used to schedule transcoding tasks.

[0135] In other embodiments of the present application, other scheduling methods may also be used to schedule transcoding tasks, which are not listed one by one in the embodiments of the present application.

[0136] In some embodiments of the present application, Figure 3 As shown, when the network terminal plays the role of contributing computing power, the method also includes: step 150 and step 160.

[0137] Step 150: in response to receiving the scheduling result broadcasted by the other network terminal, updating the cluster node transcoding task list locally stored by the current network terminal according to the scheduling matching relationship carried in the received scheduling result.

[0138] For example, when the current network terminal A receives the scheduling result broadcast by the network terminal B, it first updates the cluster node transcoding task list stored locally by the current network terminal A according to the scheduling matching relationship between the network terminal and the transcoding task carried in the received scheduling result. For example, when the scheduling result carries the scheduling matching relationship between all network terminals and transcoding tasks in the cluster, the current network terminal A can update all scheduling matching relationships in the locally stored cluster node transcoding task list according to the received scheduling matching relationship.

[0139] Step 160: Execute corresponding transcoding tasks according to the updated cluster node transcoding task list.

[0140] Afterwards, the current network terminal A further executes corresponding transcoding tasks or enters an idle state according to the updated cluster node transcoding task list.

[0141] In an embodiment of the present application, when executing a transcoding task, the network terminal can use ffmpeg compiled with WebAssembly technology to transcode the video stream corresponding to the transcoding task according to a preset or later configured ffmpeg command to obtain a transcoded video stream.

[0142] Figure 3 The execution order of each step shown in is only a feasible execution order of the decentralized video processing method disclosed in the embodiment of the present application, not the only execution order, and should not be understood as a limitation of the present application. In order to make the application document concise and easy to understand, all feasible execution orders of each step of the decentralized video processing method disclosed in the embodiment of the present application are no longer listed one by one.

[0143] In some other embodiments of the present application, it is also possible to only execute Figure 3 Some of the steps shown in the embodiment of the present invention are not all of the steps. For example, in a certain network terminal, only steps 101, 102, 103, 105, 106, 150, and 160 may be executed. Those skilled in the art should understand that when the network terminals in the cluster are in different states of playing videos or providing computing power, they can selectively execute the steps in the decentralized video processing method disclosed in the embodiment of the present application to achieve the corresponding functions.

[0144] by Figure 4 Taking the application scenario shown as an example, the network terminal 410 and the network terminal 420 are connected to the same local area network through a switch, and the network terminals 410 and 420 perform the decentralized video processing method disclosed in the embodiment of the present application, and after performing the aforementioned steps 101, 102 and 103 to evaluate their own computing power, they notify the other party of their own computing power information by broadcasting their own computing power information. At the same time, after receiving the computing power information broadcast by the other network terminal, the network terminal 410 and the network terminal 420 perform the aforementioned steps 105 and 106 to update the cluster node computing power list and cluster node transcoding task list stored locally. At this time, if the user plays the real-time video stream through the browser running on the network terminal 410, the network terminal 410 executes steps 110 to 140 to broadcast the transcoding task scheduling result of the real-time video stream to the network terminal 420.

[0145] If the network terminal 420 is in an idle state at this time, and the computing power index of the network terminal 420 is higher than that of the network terminal 410, then when the network terminal 410 executes step 130, it will determine that the transcoding task of the real-time video stream (i.e., the aforementioned first transcoding task) is scheduled to the network terminal 420. In this way, after receiving the broadcast scheduling result, the network terminal 420 will execute steps 150 and 160 to execute the transcoding task of the real-time video stream.

[0146] Afterwards, the network terminal 410 may play the video based on the video stream transcoded by the network terminal 420 .

[0147] If the network terminal 410 is in an idle state at this time, and the computing power index of the network terminal 410 is higher than that of the network terminal 420, then the network terminal 410 will determine the transcoding task of the real-time video stream (i.e., the aforementioned first transcoding task) to be scheduled to itself when executing step 130. In this way, after receiving the broadcast scheduling result, the network terminal 410 will execute steps 150 and 160 to execute the transcoding task of the real-time video stream.

[0148] Similarly, if the user plays the real-time video stream through the browser running on the network terminal 420 , the network terminal 420 executes steps 110 to 140 to broadcast the transcoding task scheduling result of the real-time video stream to the network terminal 410 .

[0149] In this way, network terminals that join the cluster within the local area network share computing power and perform transcoding scheduling on a peer-to-peer basis, making full use of the transcoding computing power of each terminal device.

[0150] The decentralized video processing method disclosed in the embodiment of the present application obtains video stream information of a first video stream targeted by the video playback instruction in response to a video playback instruction; determines the computing power required to execute a first transcoding task for the first video stream based on the video stream information; determines a scheduling result including a scheduling matching relationship between the first transcoding task and a target network terminal based on the amount of computing power, a cluster node computing power list and a cluster node transcoding task list stored locally in the current network terminal; broadcasts the scheduling result to schedule the target network terminal to execute the first transcoding task to transcode the first video stream to obtain a second video stream for playback, which can effectively solve the problem of video transcoding and playback jams caused by poor performance of the browser's host device.

[0151] The decentralized video processing method disclosed in the embodiment of the present application automatically forms a cluster by network terminals in a local area network, and then shares the transcoding computing power of each network terminal. Each network terminal acts as a peer node and performs transcoding scheduling for all network terminals according to the same transcoding task scheduling strategy, thereby achieving the best match between the amount of computing power required for the transcoding task and the computing power index of the network terminal, thereby scheduling the transcoding tasks that require high computing power to the network terminals that provide high computing power, so as to improve the transcoding speed of the video stream, thereby avoiding the problem of video transcoding playback jamming due to the poor performance of the browser's host device.

[0152] The decentralized video processing method disclosed in the embodiment of the present application realizes a self-organizing, decentralized transcoding cluster solution. There is no central node in the transcoding cluster. The cluster information is updated by continuously sending broadcasts by the network terminal, which is easy to implement and does not require professional maintenance or deployment of high-configuration hardware. Once a network terminal times out and does not broadcast a message, the network terminal will be automatically removed from the cluster. Each network terminal maintains cluster information and derives the same transcoding task scheduling strategy based on the same algorithm. Each network terminal has the ability to publish and schedule transcoding tasks, making full use of the computing power resources of the network terminals in the local area network, and significantly improving the phenomenon of video stream playback jams.

[0153] Correspondingly, the present application also discloses a decentralized video processing device, such as Figure 5 As shown, the device comprises:

[0154] The video stream information acquisition module 510 is used to obtain the video stream information of the first video stream targeted by the video playback instruction in response to the video playback instruction;

[0155] A computing power quantity determination module 520, configured to determine the amount of computing power required to execute the first transcoding task of the first video stream according to the video stream information;

[0156] The transcoding scheduling result determination module 530 is used to determine the scheduling result including the scheduling matching relationship between the first transcoding task and the target network terminal according to the amount of the computing power, the cluster node computing power list and the cluster node transcoding task list stored locally by the current network terminal;

[0157] The scheduling transcoding module 540 is used to broadcast the scheduling result to schedule the target network terminal to perform the first transcoding task to transcode the first video stream to obtain a second video stream for playback.

[0158] Optionally, the computing power quantity determination module 520 is further configured to:

[0159] The amount of computing power required to execute the first transcoding task of the first video stream is determined according to one or more of the following information included in the video stream information: video frame rate, encoding protocol, transmission protocol, and video resolution.

[0160] Optionally, the cluster node computing power list includes: computing power indicators of each network terminal in the cluster to which the current network terminal belongs; the cluster node transcoding task list includes: scheduling matching relationships between the network terminals in the cluster and the second transcoding tasks, and the amount of computing power required to execute each of the second transcoding tasks;

[0161] The transcoding scheduling result determination module 530 is further configured to:

[0162] According to the amount of computing power required to execute the first transcoding task, the amount of computing power required to execute each of the second transcoding tasks, and the computing power indicated by the computing power indicator of each network terminal in the cluster, and in accordance with the principle that the amount of computing power is positively correlated with the computing power, determine the scheduling matching relationship between the first transcoding task and each of the second transcoding tasks and each of the network terminals; and, based on the matching relationship, obtain a scheduling result.

[0163] Optionally, the cluster node computing power list includes: computing power indicators of each network terminal in the cluster to which the current network terminal belongs; the cluster node transcoding task list includes: scheduling matching relationships between the network terminals in the cluster and the second transcoding tasks, and the amount of computing power required to execute each of the second transcoding tasks;

[0164] The transcoding scheduling result determination module 530 is further configured to:

[0165] According to the cluster node computing power list and the scheduling matching relationship, the idle network terminals in the cluster are obtained; then, the idle network terminals whose computing power indicators meet the number of computing power required to execute the first transcoding task are determined as the target network terminals, and the scheduling matching relationship between the first transcoding task and the target network terminal is obtained; and, according to the scheduling matching relationship, a scheduling result is obtained.

[0166] Optional, such as Figure 6 As shown, the device also includes:

[0167] The cluster node computing power list updating module 505 is used to obtain the network terminal identifier and computing power index carried in the computing power information in response to the computing power information broadcast in the local area network; according to the network terminal identifier and the computing power index, incrementally record the corresponding relationship between the corresponding network terminal and the computing power index in the cluster node computing power list; or,

[0168] The cluster node computing power list updating module 505 is used to delete the correspondence between the specified network terminal and the computing power indicator from the cluster node computing power list in response to not receiving the broadcast information of the specified network terminal in the cluster node computing power list within a preset time period.

[0169] Optional, such as Figure 6 As shown, the device also includes:

[0170] The terminal computing power acquisition module 501 is used to execute a preset computing operation and obtain the execution time of the preset computing operation; and determine the computing power index of the current network terminal according to the execution time;

[0171] The terminal computing power collection module 501 is also used to broadcast computing power information carrying the computing power indicator, so that each network terminal in the cluster to which the current network terminal belongs updates the cluster node computing power list locally stored by each network terminal based on the broadcasted computing power information.

[0172] Optional, such as Figure 6 As shown, the device also includes:

[0173] The transcoding module 550 is used to update the cluster node transcoding task list stored locally in the current network terminal in response to receiving the scheduling results broadcast by the other network terminals according to the scheduling matching relationship carried in the received scheduling results; and, according to the updated cluster node transcoding task list, execute the corresponding transcoding task.

[0174] The decentralized video processing device disclosed in the embodiment of the present application is used to implement the decentralized video processing method described in the embodiment of the present application. The specific implementation methods of each module of the device will not be repeated here, and the specific implementation methods of the corresponding steps in the method embodiment can be referred to.

[0175] A decentralized video processing device disclosed in an embodiment of the present application obtains video stream information of a first video stream targeted by a video playback instruction by responding to a video playback instruction; determines the amount of computing power required to execute a first transcoding task for the first video stream based on the video stream information; determines a scheduling result including a scheduling matching relationship between the first transcoding task and a target network terminal based on the amount of computing power, a cluster node computing power list and a cluster node transcoding task list stored locally on the current network terminal; broadcasts the scheduling result to schedule the target network terminal to execute the first transcoding task to transcode the first video stream to obtain a second video stream for playback, which can effectively solve the problem of video transcoding and playback jams caused by poor performance of the browser's host device.

[0176] The decentralized video processing device disclosed in the embodiment of the present application automatically forms a cluster by network terminals in a local area network, and then shares the transcoding computing power of each network terminal. Each network terminal acts as a peer node and performs transcoding scheduling for all network terminals according to the same transcoding task scheduling strategy, thereby achieving the best match between the amount of computing power required for the transcoding task and the computing power index of the network terminal, thereby scheduling the transcoding tasks that require high computing power to the network terminals that provide high computing power, so as to improve the transcoding speed of the video stream, thereby avoiding the problem of video transcoding playback jamming due to the poor performance of the browser's host device.

[0177] The decentralized video processing device disclosed in the embodiment of the present application is easy to implement, does not require professional maintenance, does not require the deployment of high-configuration hardware, and can significantly improve the phenomenon of video stream playback jamming.

[0178] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0179] The above is a detailed introduction to a decentralized video processing method and device provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and a core idea. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

[0180] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0181] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in the electronic device according to the embodiment of the present application. The present application can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0182] For example, Figure 7An electronic device that can implement the method according to the present application is shown. The electronic device can be a PC, a mobile terminal, a personal digital assistant, a tablet computer, etc. The electronic device traditionally includes a processor 710 and a memory 720 and a program code 730 stored on the memory 720 and can be run on the processor 710, and the processor 710 implements the method described in the above embodiment when executing the program code 730. The memory 720 can be a computer program product or a computer-readable medium. The memory 720 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory 720 has a storage space 7201 for the program code 730 of the computer program for executing any method step in the above method. For example, the storage space 7201 for the program code 730 can include various computer programs for implementing the various steps in the above method respectively. The program code 730 is a computer-readable code. These computer programs can be read from one or more computer program products or written into the one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. The computer program includes a computer readable code, and when the computer readable code is executed on an electronic device, the electronic device is caused to execute the method according to the above embodiment.

[0183] The embodiment of the present application also discloses a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the decentralized video processing method as described in the first embodiment of the present application are implemented.

[0184] Such a computer program product may be a computer-readable storage medium, which may have a computer-readable storage medium having a Figure 7 The memory 720 in the electronic device shown in the figure is similar to the storage segment, storage space, etc. The program code can be compressed and stored in the computer-readable storage medium in an appropriate form. The computer-readable storage medium is generally as shown in the reference Figure 8 The portable or fixed storage unit. Generally, the storage unit includes computer readable code 730', which is a code read by a processor. When the code is executed by the processor, each step in the method described above is implemented.

[0185] The term "one embodiment", "embodiment" or "one or more embodiments" herein means that a particular feature, structure or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present application. In addition, please note that the examples of the term "in one embodiment" here do not necessarily all refer to the same embodiment.

[0186] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0187] In the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0188] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A decentralized video processing method, characterized in that: The method comprises: In response to a video playback instruction, obtaining video stream information of a first video stream targeted by the video playback instruction; Determine, according to the video stream information, the amount of computing power required to execute the first transcoding task of the first video stream; Determine a scheduling result including a scheduling matching relationship between the first transcoding task and the target network terminal according to the amount of computing power, a cluster node computing power list and a cluster node transcoding task list stored locally in the current network terminal; the cluster node computing power list includes: computing power indicators of each network terminal in the cluster to which the current network terminal belongs; the cluster node transcoding task list includes: scheduling matching relationships between the network terminals in the cluster and the second transcoding tasks, and the amount of computing power required to execute each of the second transcoding tasks; Broadcasting the scheduling result to schedule the target network terminal to perform the first transcoding task to transcode the first video stream to obtain a second video stream for playback; Wherein, determining a scheduling result including a scheduling matching relationship between the first transcoding task and the target network terminal according to the amount of the computing power, a cluster node computing power list and a cluster node transcoding task list stored locally in the current network terminal includes: According to the amount of computing power required to execute the first transcoding task, the amount of computing power required to execute each of the second transcoding tasks, and the computing power size indicated by the computing power indicator of each network terminal in the cluster, and in accordance with the principle that the amount of computing power is positively correlated with the computing power size, determine the scheduling matching relationship between the first transcoding task and each of the second transcoding tasks and each of the network terminals, and obtain a scheduling result according to the scheduling matching relationship; or According to the cluster node computing power list and the scheduling matching relationship, idle network terminals in the cluster are obtained, and the idle network terminals whose computing power indicators meet the number of computing power required to execute the first transcoding task are determined as the target network terminals, and the scheduling matching relationship between the first transcoding task and the target network terminal is obtained. According to the scheduling matching relationship, a scheduling result is obtained.

2. The method according to claim 1, characterized in that The determining, according to the video stream information, the amount of computing power required to execute the first transcoding task of the first video stream includes: The amount of computing power required to execute the first transcoding task of the first video stream is determined according to one or more of the following information included in the video stream information: video frame rate, encoding protocol, transmission protocol, and video resolution.

3. The method according to any one of claims 1 to 2, characterized in that: The cluster node computing power list is updated by the following method: In response to receiving computing power information broadcasted in the local area network, obtaining a network terminal identifier and a computing power index carried in the computing power information; and incrementally recording a corresponding relationship between a corresponding network terminal and the computing power index in a cluster node computing power list according to the network terminal identifier and the computing power index; In response to not receiving the broadcast information of the designated network terminal in the cluster node computing power list within a preset time period, deleting the correspondence between the designated network terminal and the computing power indicator from the cluster node computing power list.

4. The method according to any one of claims 1 to 2, characterized in that: Also includes: Execute a preset calculation operation and obtain the execution time of executing the preset calculation operation; Determine the computing power index of the current network terminal according to the execution time; The computing power information carrying the computing power indicator is broadcasted, so that each network terminal in the cluster to which the current network terminal belongs updates the cluster node computing power list locally stored by each network terminal based on the broadcasted computing power information.

5. The method according to any one of claims 1 to 2, characterized in that: Also includes: In response to receiving a scheduling result broadcasted by other network terminals, updating the cluster node transcoding task list locally stored by the current network terminal according to the scheduling matching relationship carried in the received scheduling result; According to the updated cluster node transcoding task list, corresponding transcoding tasks are executed.

6. A decentralized video processing device, characterized in that: include: A video stream information acquisition module, configured to acquire, in response to a video playback instruction, video stream information of a first video stream targeted by the video playback instruction; A computing power quantity determination module, used to determine the amount of computing power required to execute the first transcoding task of the first video stream according to the video stream information; a transcoding scheduling result determination module, configured to determine a scheduling result including a scheduling matching relationship between the first transcoding task and the target network terminal according to the amount of the computing power, a cluster node computing power list and a cluster node transcoding task list stored locally in the current network terminal; The cluster node computing power list includes: the computing power indicators of each network terminal in the cluster to which the current network terminal belongs; the cluster node transcoding task list includes: the scheduling matching relationship between the network terminals in the cluster and the second transcoding tasks, and the amount of computing power required to execute each of the second transcoding tasks; A scheduling transcoding module, used for broadcasting the scheduling result, so as to schedule the target network terminal to perform the first transcoding task to transcode the first video stream, and obtain a second video stream for playing; Wherein, the transcoding scheduling result determination module is further used to: determine the scheduling matching relationship between the first transcoding task and each second transcoding task and each network terminal according to the amount of computing power required to execute the first transcoding task, the amount of computing power required to execute each second transcoding task, and the computing power size indicated by the computing power indicator of each network terminal in the cluster, in accordance with the principle that the amount of computing power is positively correlated with the computing power size; and obtain the scheduling result according to the matching relationship; or According to the cluster node computing power list and the scheduling matching relationship, the idle network terminals in the cluster are obtained; then, the idle network terminals whose computing power indicators meet the number of computing power required to execute the first transcoding task are determined as the target network terminals, and the scheduling matching relationship between the first transcoding task and the target network terminal is obtained; and, according to the scheduling matching relationship, a scheduling result is obtained.

7. An electronic device comprising a memory, a processor, and a program code stored in the memory and executable on the processor, characterized in that: When the processor executes the program code, the decentralized video processing method described in any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium having a program code stored thereon, characterized in that: When the program code is executed by a processor, the steps of the decentralized video processing method described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Distributed video transcoding method and related device

    CN114071149A