WO2024060860A1 - Computing power network-based video transcoding method, apparatus and device and storage medium - Google Patents

Computing power network-based video transcoding method, apparatus and device and storage medium Download PDF

Info

Publication number
WO2024060860A1
WO2024060860A1 PCT/CN2023/111561 CN2023111561W WO2024060860A1 WO 2024060860 A1 WO2024060860 A1 WO 2024060860A1 CN 2023111561 W CN2023111561 W CN 2023111561W WO 2024060860 A1 WO2024060860 A1 WO 2024060860A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
video
transcoding
computing power
transcoded
Prior art date
Application number
PCT/CN2023/111561
Other languages
French (fr)
Chinese (zh)
Inventor
王艳辉
Original Assignee
中移(苏州)软件技术有限公司
中国移动通信集团有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中移(苏州)软件技术有限公司, 中国移动通信集团有限公司 filed Critical 中移(苏州)软件技术有限公司
Publication of WO2024060860A1 publication Critical patent/WO2024060860A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/40Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream

Definitions

  • the present disclosure relates to the field of mobile communication technology, and specifically to a video transcoding method, device, equipment and storage medium based on a computing power network.
  • the mainstream video transcoding system is a centralized transcoding system based on cloud computing.
  • the technical solutions in the related technologies have the following problems: On the one hand, the efficiency of online transcoding is low: Since online transcoding is deployed in the cloud center, all videos that need to be transcoded need to be transmitted to the cloud center for online transcoding calculation, and then pushed to the client side.
  • the computing center of the cloud layer is generally far away from the user, and there will be a relatively large delay.
  • the requirements for latency of live video broadcast are very high, so it will cause high latency and poor user experience.
  • offline transcoding has high requirements for computing resources, but the methods in the related technologies are limited to the utilization of computing resources in offline transcoding clusters, and resources cannot be fully utilized. There is currently no effective solution to this problem.
  • the main purpose of the present disclosure is to provide a video transcoding method, device, equipment and storage medium based on a computing power network.
  • Embodiments of the present disclosure provide a video transcoding method based on computing power network.
  • the method includes:
  • At least one node that meets the computing power resources determine the target node based on the priority value corresponding to each node in the at least one node;
  • the target node is used to transcode the video to be transcoded to obtain a transcoded video.
  • the transcoding includes online transcoding, and the method further includes:
  • the first node represents any node that meets the computing power resources in the edge layer of the computing power network;
  • the first target node is used to perform online transcoding on the video to be transcoded to obtain the first video after online transcoding.
  • determining the first target node based on the first priority value corresponding to each node in the at least one first node includes:
  • the first parameter represents an attribute parameter of the first node related to the fluency of the video to be transcoded
  • the second parameter represents the influence parameter of the first parameter on the fluency of the video to be transcoded
  • the first node corresponding to the smallest first priority value is used as the first target node.
  • the method further includes:
  • the first model is trained to obtain a preset model.
  • the method further includes:
  • the first node corresponding to the minimum second current priority value is updated as the first target node.
  • the method further includes:
  • the first video is played through the first target node.
  • the transcoding includes offline transcoding, and the method further includes:
  • the second node represents any node that meets the computing power resources in the terminal layer, edge layer or cloud layer of the computing power network;
  • the second target node is used to perform offline transcoding on the video to be transcoded to obtain the second video after offline transcoding.
  • determining the second target node based on the second priority value corresponding to each node in the at least one second node includes:
  • the third parameter represents an attribute parameter of the second node related to the fluency of the video to be transcoded
  • the fourth parameter represents the influence parameter of the third parameter on the fluency of the video to be transcoded
  • the second node corresponding to the largest second priority value is used as the second target node.
  • the second target node is used to perform offline transcoding on the video to be transcoded, and the second video after offline transcoding is obtained, including:
  • the video to be transcoded is offline transcoded through the second target node to obtain the second video after offline transcoding.
  • the second target node is used to perform offline transcoding on the video to be transcoded, and the second video after offline transcoding is obtained, including:
  • the video to be transcoded is offline transcoded through the second target node to obtain the second video after offline transcoding.
  • the method further includes:
  • a revenue parameter of the terminal layer is determined.
  • An embodiment of the present disclosure provides a video transcoding device based on a computing power network.
  • the device includes:
  • the first determination module is configured to determine the computing resources corresponding to the video to be transcoded
  • the second determination module is configured to determine the target node based on the priority value corresponding to each node in the at least one node among at least one node that meets the computing power resource;
  • a transcoding module configured to use the target node to transcode the video to be transcoded to obtain a transcoded video.
  • An embodiment of the present disclosure provides a video transcoding device based on a computing power network, including a memory and a processor.
  • the memory stores a computer program that can be run on the processor.
  • the processor executes the program, the above-mentioned any of the methods described.
  • Embodiments of the present disclosure provide a storage medium that stores executable instructions. When the executable instructions are executed by a processor, any one of the methods described above is implemented.
  • the present disclosure provides a method, apparatus, device and storage medium for video transcoding based on a computing network, wherein the method comprises: determining computing resources corresponding to the video to be transcoded; In at least one node of the computing power resources, a target node is determined based on the priority value corresponding to each node in the at least one node; the target node is used to transcode the video to be transcoded to obtain the transcoded video.
  • the technical solution of the embodiment of the present invention is adopted, and the transcoding method based on the computing power network is adopted.
  • the target node is determined in at least one node that meets the computing power resources in the cloud layer, edge layer or terminal layer of the computing power network.
  • the target node is used to transcode the video to be transcoded, which can overcome the problem that the computing center of the cloud layer is generally far away from the user, which not only reduces the delay of video playback, but also maximizes the use of resources and improves resource utilization.
  • FIG1 is a schematic diagram of a transcoding system architecture in a related art of a video transcoding method based on a computing network according to an embodiment of the present disclosure
  • Figure 2 is a schematic flow chart of a video transcoding method based on a computing power network according to an embodiment of the present disclosure
  • Figure 3 is a schematic diagram of the transcoding system architecture of the video transcoding method based on the computing power network according to an embodiment of the present disclosure
  • Figure 4 is a schematic flowchart of the online transcoding implementation process of the video transcoding method based on the computing power network according to the embodiment of the present disclosure
  • Figure 5 is a schematic flowchart of the offline transcoding implementation process of the video transcoding method based on the computing power network according to the embodiment of the present disclosure
  • Figure 6 is a schematic structural diagram of a video transcoding device based on a computing power network according to an embodiment of the present disclosure
  • FIG. 7 is a schematic diagram of the hardware structure of a video transcoding device based on a computing power network according to an embodiment of the present disclosure.
  • FIG. 1 is a schematic diagram of the transcoding system architecture in the related art of a video transcoding method based on computing power network according to an embodiment of the present disclosure.
  • the technical architecture of a typical transcoding system in the related art includes: Source terminal, management node, cloud storage, offline transcoding module and online transcoding module.
  • the source end includes various types of terminals, including personal computers (Personal Computer, PC), mobile phones, cameras, etc.
  • the source end is responsible for collecting video data and uploading it to the cloud platform.
  • the management node is responsible for managing system data, processing business logic, and providing application program (Application Programming Interface, API) interfaces, etc.
  • Cloud storage generally uses object storage.
  • Object storage generally uses central storage.
  • Offline transcoding refers to converting one video file into another or multiple video files with different bitrates to adapt to different network bandwidths, different terminal processing capabilities, and different user needs.
  • Online transcoding refers to converting live streams into multiple live streams with different resolutions or bit rates, so that they can be distributed to different live broadcast platforms.
  • the video continues to be placed in the cloud storage center. Just like uploading, when users download and play, they also face the problem of being far away from the video service address and low playback and download efficiency.
  • the embodiments of the present disclosure provide a video transcoding method, device, equipment and storage medium based on a computing power network, wherein the computing power network system includes three levels: cloud layer, edge layer and terminal layer.
  • the terminal layer is responsible for collecting videos and pushing the collected videos to the edge side in real time.
  • the real-time video is pushed to the client (playing end) through the nearest edge node through edge-to-edge collaboration to ensure the real-time transmission.
  • the three-level computing power of the cloud layer, edge layer and terminal layer can be coordinated uniformly to select the most suitable node for transcoding.
  • the transcoding result is transmitted back to the cloud storage center for storage.
  • the video of the cloud storage center is used as the source station, and each edge node is used as an acceleration node to improve the smoothness of video playback.
  • the terminal layer consumes and contributes computing power, and the system management module provides a computing power-based billing method.
  • the embodiment of the present disclosure proposes a video transcoding method based on computing power network.
  • the functions implemented by this method can be realized by calling the program code by the processor in the video transcoding device based on computing power network.
  • the program code can be saved in In computer storage media, it can be seen that the computing device at least includes a processor and a storage medium.
  • Figure 2 is a schematic flow chart of a video transcoding method based on computing power network according to an embodiment of the present disclosure, as shown in Figure As shown in 2, the method includes:
  • Step 201 Determine the computing resources corresponding to the video to be transcoded
  • Step 202 Among at least one node that meets the computing power resources, determine the target node based on the priority value corresponding to each node in the at least one node;
  • Step 203 Use the target node to transcode the video to be transcoded to obtain a transcoded video.
  • the application scenario of the video transcoding method based on the computing power network can be determined according to the actual situation, and is not limited here.
  • the video transcoding method based on computing power network can be applied to a computing power network service system oriented to video transcoding.
  • the computing power network service system is a video transcoding method oriented to computing power network. system.
  • the video to be transcoded can be determined according to actual conditions and is not limited here.
  • the video to be transcoded may be a live stream that needs to be transcoded online, or a video file that needs to be transcoded offline.
  • the determination process of the computing power resources corresponding to the video to be transcoded can be determined according to the actual situation, and is not limited here.
  • the computing resources corresponding to the video to be transcoded can be determined according to the transcoding template and the parameters of the video to be transcoded.
  • the parameters of the video to be transcoded can be determined according to actual conditions and are not limited here.
  • the parameters of the video to be transcoded may be any one or more of video format, resolution, bit rate and other parameters.
  • the transcoding template can be determined according to actual conditions and is not limited here.
  • the transcoding template may be a template associated with the video to be transcoded.
  • the at least one node may be determined according to actual conditions, and is not limited here.
  • the at least one node may be a node in the cloud layer, edge layer or terminal layer of the computing power network that meets the computing power resources.
  • the number of the at least one node can be determined according to actual conditions and is not limited here.
  • the priority value can be determined according to actual conditions and is not limited here.
  • the priority value may be data characterizing the fluency relationship between each node in the at least one node and the video to be transcoded.
  • Determining the target node based on the priority value corresponding to each node in the nodes may be to determine the target node to be transcoded based on the priority value corresponding to each node in the at least one node in at least one node that meets the computing power resources.
  • the optimal fluency of the video use the node corresponding to the optimal fluency as the target node.
  • the target node can be determined according to the actual situation, and is not limited here.
  • the target node may be a node determined based on the priority value corresponding to each node in the at least one node in the cloud layer, edge layer or terminal layer of the computing power network.
  • the transcoding can be determined according to actual conditions and is not limited here.
  • the transcoding may include online transcoding and offline transcoding.
  • the transcoded video can be determined according to actual conditions and is not limited here.
  • the transcoded video may be a live stream and a video file.
  • the method of using the target node to transcode the video to be transcoded to obtain the transcoded video may be: using the target node to convert the live stream to obtain a plurality of different resolutions. rate or code rate of the live stream; it may also be that the target node is used to convert the one video file to obtain another or multiple video files with different code rates.
  • Embodiments of the present disclosure provide a video transcoding method based on a computing power network.
  • the method includes: determining the computing power resources corresponding to the video to be transcoded; in at least one node that meets the computing power resources, based on the at least The priority value corresponding to each node in a node determines the target node; the target node is used to transcode the video to be transcoded to obtain the transcoded video.
  • the technical solution of the embodiment of the present disclosure is adopted, and the transcoding method based on the computing power network satisfies the requirements of the computing power resources in the cloud layer, edge layer or terminal layer of the computing power network.
  • Determining a target node in at least one node, and using the target node to transcode the video to be transcoded can overcome the problem that the computing center of the cloud layer is generally far away from the user, not only reducing the delay of video playback, but also achieving Maximize the use of resources and improve resource utilization.
  • the transcoding includes online transcoding, and the method further includes:
  • the first node represents any node that meets the computing power resources in the edge layer of the computing power network;
  • the first target node is used to perform online transcoding on the video to be transcoded to obtain the first video after online transcoding.
  • the determination of at least one first node in the computing power network can be determined according to actual conditions, and is not limited here.
  • the at least one first node may be at least one first node that satisfies the computing power resource determined in the edge layer of the computing power network.
  • the at least one first node may be determined in the edge layer of the computing power network.
  • the edge node that satisfies the computing power resources is used as at least one first node in the edge layer of the computing power network.
  • the online transcoding based on the computing power network in this embodiment mainly relies on the edge nodes of the terminal layer and edge layer.
  • the first priority value can be determined according to actual conditions and is not limited here.
  • the first priority value may be data representing the fluency relationship between each node in at least one first node of the edge layer of the computing power network and the video to be transcoded.
  • Determining the first target node based on the first priority value corresponding to each node in the at least one first node may be: determining the first target node based on the first priority value corresponding to each node in the at least one first node. Describe the first optimal fluency of the video to be transcoded; use the first node corresponding to the first optimal fluency as the first target node.
  • the first video can be determined according to actual conditions and is not limited here.
  • the first video may be a live stream that converts the video to be transcoded into multiple different resolutions or code rates. .
  • the method of using the first target node to transcode the video to be transcoded online to obtain the first video after online transcoding may be to use the first target node in the edge layer of the computing power network to transcode the video to be transcoded online.
  • the video to be transcoded is transcoded online to obtain the first video after online transcoding.
  • determining the first target node based on the first priority value corresponding to each node in the at least one first node includes:
  • the first parameter represents an attribute parameter of the first node related to the fluency of the video to be transcoded
  • the second parameter represents the influence parameter of the first parameter on the fluency of the video to be transcoded
  • the first node corresponding to the smallest first priority value is used as the first target node.
  • the first parameter can be determined according to actual conditions and is not limited here.
  • the first parameter may be the distance between the terminal layer of the computing power network and each edge node in the edge layer of the computing power network, each edge node in the edge layer of the computing power network The performance and any one or more parameters of the load of each edge node in the edge layer of the computing power network.
  • the preset model can be determined according to actual conditions and is not limited here.
  • the second parameter can be determined according to actual conditions and is not limited here.
  • the second parameter may be an influencing parameter of the distance between the terminal layer of the computing power network and each edge node in the edge layer of the computing power network, Any one or more of the influencing parameters on the performance of each edge node and the influencing parameters on the load of each edge node in the edge layer of the computing power network.
  • Determining the first priority value corresponding to each node in the at least one first node based on the first parameter and the second parameter may be: based on the first parameter and the second parameter The products are added together to obtain the first priority value corresponding to each node in the at least one first node.
  • determining the first target node based on the first priority value corresponding to each node in the at least one first node can be: determining the fluency of the video to be transcoded based on the first priority value corresponding to each node in the at least one first node; taking the fluency of the video to be transcoded corresponding to the smallest first priority value as the first optimal fluency; and taking the first node corresponding to the first optimal fluency as the first target node.
  • the method further includes:
  • This parameter is used to construct a training sample set
  • the first model is trained to obtain a preset model.
  • the first sample parameter can be determined according to actual conditions and is not limited here.
  • the first sample parameter may be the distance between the terminal layer of the computing power network and each edge node in the edge layer of the computing power network, the distance between each edge node in the edge layer of the computing power network, Any one or more parameters of the performance of edge nodes, the load of each edge node in the edge layer of the computing power network, and the user's experience value.
  • the user's experience value may be a parameter that is positively correlated with the fluency of the video to be transcoded.
  • the second sample parameter can be determined according to actual conditions and is not limited here.
  • the second sample parameter may be an influencing parameter of the distance between the terminal layer of the computing power network and each edge node in the edge layer of the computing power network, the edge layer of the computing power network Any one or more of the influencing parameters on the performance of each edge node in the computing power network and the influencing parameters on the load of each edge node in the edge layer of the computing power network.
  • determining the second parameter corresponding to the first parameter based on the preset model may be to determine the second optimal smoothness based on the user's experience value in the first sample parameter of the preset model. degree; based on the distance between the terminal layer of the computing power network and each edge node in the edge layer of the computing power network in the first sample parameter of the preset model, the distance between the edge nodes in the edge layer of the computing power network Determine the second parameter corresponding to the second optimal fluency based on any one or more parameters of the performance of each edge node and the load of each edge node in the edge layer of the computing power network; The second parameter corresponding to the excellent fluency is used as the second parameter corresponding to the first parameter.
  • the method further includes:
  • the first node corresponding to the smallest second current priority value is updated as the first target node.
  • the calculated first priority value is also constantly changing. Then it is necessary to determine the first current priority value of the first target node, and also need to determine the second current priority value corresponding to each node in the at least one first node in real time, and re-determine the smallest second current priority value. The corresponding first node.
  • the method further includes: determining a switching parameter corresponding to the first current priority value and the minimum second current priority value; wherein the switching parameter represents a proportional parameter of the performance improvement of the switching node. .
  • the preset conditions can be determined according to actual conditions and are not limited here.
  • the preset condition may be to determine whether the switching parameter is greater than a preset threshold.
  • the preset threshold can be determined according to actual conditions and is not limited here.
  • the first node corresponding to the minimum second current priority value is updated as the first target.
  • the node may be, when the switching parameter corresponding to the first current priority value and the minimum second current priority value is greater than a preset threshold, change the first value corresponding to the minimum second current priority value to The node is updated to the first target node.
  • the method further includes:
  • the first video is played through the first target node.
  • playing the first video through the first target node closest to the user can reduce the distance between the terminal layer and the playback end, thereby reducing delay.
  • the first target node if the first target node is far from the user, and if the first target node is not the node closest to the user, determine the first node in the edge layer of the computing power network that is closest to the user. Three target nodes; push the first video to the third target node; play the first video through the third target node.
  • the transcoding includes offline transcoding, and the method further includes:
  • the second node represents any node that meets the computing power resources in the terminal layer, edge layer or cloud layer of the computing power network;
  • the second target node is used to perform offline transcoding on the video to be transcoded to obtain the second video after offline transcoding.
  • the determination of at least one second node in the computing power network can be determined according to actual conditions, and is not limited here.
  • nodes that meet the computing power resources may be determined in the terminal layer, edge layer or cloud layer of the computing power network.
  • the second priority value can be determined according to actual conditions and is not limited here.
  • the second priority value may be data representing the fluency relationship between each node in at least one node in the terminal layer, edge layer, or cloud layer of the computing power network and the video to be transcoded.
  • Determining the second target node based on the second priority value corresponding to each node in the at least one second node may be: determining the second target node based on the second priority value corresponding to each node in the at least one second node. Describe the third optimal fluency of the video to be transcoded; use the second node corresponding to the third optimal fluency as the second target node.
  • the second video can be determined according to actual conditions and is not limited here.
  • the second video may be a video file that converts the video to be transcoded into another or more different code rates.
  • the offline transcoding of the video to be transcoded by using the second target node to obtain the second video after offline transcoding can be performed by using the second target node in the terminal layer, edge layer or cloud layer of the computing power network to offline transcode the video to be transcoded to obtain the second video after offline transcoding.
  • determining the second target node based on the second priority value corresponding to each node in the at least one second node includes:
  • the third parameter represents an attribute parameter of the second node related to the fluency of the video to be transcoded
  • the fourth parameter represents the third parameter pair Parameters that influence the smoothness of the video to be transcoded
  • the second node corresponding to the largest second priority value is used as the second target node.
  • the third parameter can be determined according to actual conditions and is not limited here.
  • the third parameter can be any one or more parameters of the performance of each node in the terminal layer, edge layer or cloud layer of the computing network, the load of each node in the terminal layer, edge layer or cloud layer of the computing network, and the transportation cost of each node in the terminal layer, edge layer or cloud layer of the computing network.
  • the fourth parameter can be determined according to actual conditions and is not limited here.
  • the fourth parameter may be a parameter that affects the performance of each node in the terminal layer, edge layer or cloud layer of the computing power network, and each node in the terminal layer, edge layer or cloud layer of the computing power network. Any one or more of the influencing parameters of the load and the influencing parameters of the transportation cost of each node in the terminal layer, edge layer or cloud layer of the computing power network.
  • Determining the second priority value corresponding to each node in the at least one second node based on the third parameter and the fourth parameter may be, based on the third parameter and the fourth parameter The products are added together to obtain the second priority value corresponding to each node in the at least one second node.
  • determining the second target node based on the second priority value corresponding to each node in the at least one second node may be based on the second priority value corresponding to each node in the at least one second node.
  • the second priority value determines the fluency of the video to be transcoded; the fluency of the video to be transcoded corresponding to the largest second priority value is regarded as the third optimal fluency; the third optimal The second node corresponding to the fluency serves as the second target node.
  • using the second target node to perform offline transcoding on the video to be transcoded to obtain the second video after offline transcoding includes:
  • the video to be transcoded is detached through the second target node. Online transcoding to obtain the second video after offline transcoding.
  • the first scheduling method can be determined according to actual conditions, and is not limited here.
  • the first scheduling method may be to use k8s (Kubernetes) for cluster computing scheduling.
  • the video to be transcoded is offline transcoded through the second target node to obtain the second video after offline transcoding, which may be k8s based on the cloud layer or edge layer.
  • offline transcoding which may be k8s based on the cloud layer or edge layer.
  • create a sub-scheduling unit (pod) perform offline transcoding on the video to be transcoded through the second target node to obtain the second video after offline transcoding.
  • using the second target node to perform offline transcoding on the video to be transcoded to obtain the second video after offline transcoding includes:
  • the video to be transcoded is offline transcoded through the second target node to obtain the second video after offline transcoding.
  • the second scheduling method can be determined according to actual conditions and is not limited here.
  • the second scheduling method may be to use lightweight k3s for computing scheduling.
  • the video to be transcoded is offline transcoded through the second target node to obtain the second video after offline transcoding, which can be: a sub-scheduling unit is created based on the k3s of the terminal layer; the video to be transcoded is offline transcoded through the second target node to obtain the second video after offline transcoding.
  • the method further includes:
  • a revenue parameter of the terminal layer is determined.
  • the first computing power can be determined according to actual conditions and is not limited here.
  • the first computing power may be the computing power contributed by scheduling of the computing power network by the terminal layer of the computing power network.
  • the second computing power can be determined according to actual conditions and is not limited here.
  • the second computing power may be the computing power consumed by the computing power network for transcoding the video to be transcoded collected by the terminal layer of the computing power network.
  • Determining the revenue parameter of the terminal layer based on the first computing power and the second computing power may be: performing a difference based on the first computing power and the second computing power to obtain the terminal The income parameters of the layer.
  • the following description takes the video transcoding method based on the computing power network applied to a computing power network service system for video transcoding as an example.
  • FIG. 3 is a schematic diagram of the transcoding system architecture of the video transcoding method based on the computing power network according to an embodiment of the present disclosure.
  • the entire computing power network service system is divided into three layers, namely the terminal layer, the edge layer and the cloud layer.
  • the terminal layer can be the source layer
  • the edge layer can be the edge computing layer
  • the cloud layer can be the cloud computing center layer.
  • FIG. 4 is a schematic diagram of the online transcoding implementation process of the video transcoding method based on the computing power network according to the embodiment of the present disclosure.
  • Figure 4 shows the process of video access and playback.
  • Online transcoding includes two stages: streaming and playback.
  • the terminal layer selects the most appropriate edge node of the edge layer for streaming or uploading.
  • After the video to be transcoded is online transcoded at the edge node, it is transcoded into a video format suitable for playback on various devices.
  • delay which is the time delay from the playback source to the playback end.
  • Stuttering refers to the frame lag during video playback, which makes people obviously feel "stuck”.
  • the statistics of the number of playback stutters per unit time is called the stuttering rate.
  • the first stage the push stage or the upload stage. Before the push or upload stage, these three parameters are obtained from each edge node of the edge layer in turn.
  • Step 1 Calculate the user’s experience value E1.
  • the calculation method of the user’s experience value E1 is as shown in Equation (1).
  • E1 ⁇ *delay+ ⁇ *lag (1)
  • E1 represents the user experience value
  • delay represents delay
  • lag represents the stuck frame rate
  • ⁇ and ⁇ represent the parameters of delay and stuck frame rate respectively, which can be determined by the user according to the actual situation.
  • the second optimal fluency can be the user's playback experience level. The greater the user's experience value E1, the worse the user's playback experience level.
  • Step 2 Calculate the first priority value E2 of the edge node.
  • the calculation method of the first priority value E2 of the edge node is as shown in Equation (2).
  • E2 ⁇ *d+ ⁇ *l+ ⁇ /p (2)
  • E2 represents the first priority value of the edge node
  • d represents the distance between the source end and the edge node in the edge layer
  • p represents the performance of the edge node
  • l represents the load of the edge node
  • ⁇ , ⁇ , and ⁇ represent respectively The influence parameters of d, l and p on the first priority value.
  • the first priority value E2 of the edge node has a corresponding relationship with the first optimal fluency.
  • the first optimal fluency can be the priority level of the edge node. The larger the first priority value E2 of the edge node, the higher the priority of the edge node. The lower the priority.
  • Step 3 Tune the influencing parameters in E2.
  • the user's experience value E1 is also larger. Because the priority level of the edge node is poor, if the edge node is selected, the user's playback experience level will also be poor.
  • a large amount of data can be training data including E1, d, l, and p; the existing testing method can be a model training method.
  • the source end can first obtain the values of d, p, and l and then obtain the first priority value E2 value of the edge node.
  • Step 4 Determine the source location and switch the edge node to be connected.
  • the calculated first priority value E2 of the edge node is also constantly changing. If the source end calculates that the current optimal edge node is no longer the previously selected edge node, it needs to switch. Because switching requires a relatively large cost. Therefore, it needs to be switched when certain conditions are met.
  • represents the performance improvement ratio of switching nodes.
  • Set the threshold When ⁇ is greater than the threshold, select the edge node corresponding to E2 m , otherwise continue to use the edge node corresponding to E2 o .
  • the threshold can be determined by the user based on the actual situation.
  • the second stage the playback stage. If the playback end is closest to the above-mentioned edge node used for transcoding, then the video of the edge node used for transcoding will be played directly. Among them, the playback end includes users and transcoding machines. If the playback end is far away from the edge node used for transcoding, through edge-to-edge collaboration, the edge node used for transcoding is used as the source station, the stream is pushed to the edge node closest to the user, and then the edge closest to the playback end is played. Node video. In this way, the distance between the source end and the playback end can be shortened to the greatest extent and the delay can be reduced to the greatest extent.
  • Offline transcoding Historical videos recorded for historical videos are transcoded into different formats through offline transcoding to facilitate playback by different clients (players). Offline transcoding does not have high requirements for real-time performance, but has high requirements for computing. Therefore, it is necessary to maximize the use of computing resources at the cloud layer, edge layer, and even terminal layer.
  • the cloud layer and edge layer are relatively large in scale and have strong computing power.
  • K8s can be used for cluster computing scheduling. The computing capabilities of various terminal layers are limited, so lightweight K3s is used for computing scheduling.
  • k3s is a Kubernetes distribution open sourced by rancher. Compared with k8s, k3s has been greatly tailored and optimized.
  • the binary program is less than 50MB, takes up less resources, and only requires 512MB of memory to run. Because of the above advantages of k3s, k3s can be used in web browsers (Edge), Internet of Things (IoT), corporate identification systems (Corporate Identity System, CIS), processors (Advanced RISC Machines, ARM) and other scenarios , which can coordinate and control the computing power of various terminal layers in a unified manner.
  • a two-level Kubernetes + one-level k3s collaborative scheduling pattern has been formed, that is, k8s at the cloud layer and edge layer does cluster computing scheduling, and the terminal layer uses lightweight k3s for computing scheduling.
  • resources can be more flexibly scheduled at the cloud and edge layers, and the computing power of the terminal layer can be incorporated into the entire network to maximize the use of resources within the entire network.
  • FIG5 is a schematic diagram of the offline transcoding implementation process of the video transcoding method based on the computing power network according to an embodiment of the present disclosure.
  • FIG5 is a whole flowchart of offline transcoding.
  • the terminal layer collects the video
  • the recorded historical video is uploaded to the object storage of the cloud layer through the edge node of the edge layer.
  • Each video is associated with a corresponding transcoding template, where the transcoding template is specified by the terminal layer.
  • the computing power network service system calculates the required computing power based on the transcoding template and video parameters. human resources, and then create an offline transcoding task.
  • the third optimal fluency can be the priority level of each node in the three-level network.
  • the corresponding node in the computing power network is triggered for scheduling. If the optimal node is in the cloud layer, the pod is created by k8s in the cloud layer. If the optimal node is at the edge layer, the pod is created by k8s at the corresponding edge layer. If the optimal node is at the terminal layer, the pod is created by K3S at the terminal layer. After the task execution is completed, the corresponding pod will be destroyed.
  • the video stored in the cloud layer is used as the source station, and the cache and transmission optimization of each edge node in the edge layer are used to accelerate the playback experience of users on each playback end.
  • Process 3 Management and transaction process of transcoding computing power.
  • the network service system supports billing based on computing power.
  • Each terminal layer can both provide computing power and consume computing power.
  • the terminal layer is registered in the computing power network, which means it becomes a service grid of the computing power network.
  • the terminal layer itself provides computing power and consumes computing power. Videos collected at the terminal layer need to be transcoded online and transcoded offline and stored in object storage, which represents the consumption of computing power by the terminal layer.
  • the terminal layer as a grid of K3s, can be scheduled by the entire computing power network, which means that the terminal layer can contribute computing power.
  • the computing power network service system has a computing power management module.
  • the embodiment of the present disclosure provides an overall design solution for realizing online video transcoding and offline video transcoding based on computing power network.
  • online transcoding with high real-time requirements, in the upload stage, the calculation formula of the optimal edge node is introduced, and the existing test method is used for learning and optimization, the optimal edge node is selected, and the online process is completed at the edge node of the edge layer.
  • Transcoding In the playback stage, through edge-side collaboration, the content is pushed to the edge node closest to the customer to achieve real-time playback.
  • coordinate three-level resources at the cloud layer, edge layer, and terminal layer schedule through k8s+k3s, specify pods through labels, and select the optimal node for execution. Scheduling. Based on the management and payment methods of computing power, the terminal layer is both a contributor and a consumer of computing power.
  • the transcoding method based on computing power network can reduce the delay and improve the smoothness of playback.
  • the offline transcoding method based on the computing power network can maximize the use of resources and improve resource utilization. Management and billing methods based on computing power can technically reduce transcoding costs to the greatest extent, improve task execution efficiency, and achieve a win-win situation for video transcoding service providers and buyers.
  • the embodiment of the present disclosure uses a three-level computing power network composed of cloud layer, edge layer, and terminal layer.
  • the efficiency of uploading and downloading can be improved through direct transcoding at the edge and edge-to-edge collaboration.
  • computing resources within the entire system can be scheduled to the maximum extent.
  • the connected terminal layer is both a consumer and a contributor of computing power, which can achieve a win-win situation for computing power providers and buyers.
  • FIG. 6 is a schematic structural diagram of a video transcoding device based on a computing power network according to an embodiment of the disclosure. As shown in Figure 6, the device 600 includes:
  • the first determination module 601 is configured to determine the computing resources corresponding to the video to be transcoded
  • the second determination module 602 is configured to determine the target node based on the priority value corresponding to each node in the at least one node among at least one node that meets the computing power resources;
  • the transcoding module 603 is configured to use the target node to transcode the video to be transcoded to obtain a transcoded video.
  • the transcoding includes online transcoding
  • the second determination module 602 further includes: a first determination unit and a second determination unit; wherein,
  • the first determination unit is configured to determine at least one first node in the computing power network; wherein the first node represents any of the computing power resources in the edge layer of the computing power network. node;
  • the second determining unit is configured to determine the first target node based on the first priority value corresponding to each node in the at least one first node;
  • the transcoding module 603 is also configured to use the first target node to perform online transcoding on the video to be transcoded to obtain the first video after online transcoding.
  • the second determining unit is further configured to obtain a first parameter corresponding to each node in the at least one first node; the first parameter represents the relationship between the first node and the Describe attribute parameters related to the smoothness of the video to be transcoded; determine a second parameter corresponding to the first parameter based on a preset model; the second parameter represents the smoothness of the first parameter to the video to be transcoded degree of influence parameters; based on the first parameter and the second parameter, determine the at least one first node The first priority value corresponding to each node; the first node corresponding to the smallest first priority value is used as the first target node.
  • the device 600 further includes: a building module and a training module; wherein,
  • the building module is configured to construct a training sample set based on the first sample parameter and the second sample parameter related to each node in the at least one first node;
  • the training module is configured to use the first sample parameter included in the training sample set as input, and use the second sample parameter included in the training sample set as output to train the first model to obtain the preset Model.
  • the second determining unit is further configured to determine the first target node based on the first priority value corresponding to each node in the at least one first node.
  • the transcoding module 603 is further configured to use the first target node to perform online transcoding on the video to be transcoded, and after obtaining the online transcoded first video, after the When the first target node is closest to the user, the first video is played through the first target node.
  • the transcoding includes offline transcoding
  • the second determination module 602 further includes: a third determination unit and a fourth determination unit; wherein,
  • the third determination unit is configured to determine at least one second node in the computing power network; wherein the second node represents a condition that satisfies the computing power requirements in the terminal layer, edge layer or cloud layer of the computing power network. Any node of human resources;
  • the fourth determination unit is configured to determine the second target node based on the second priority value corresponding to each node in the at least one second node;
  • the transcoding module 603 is also configured to use the second target node to perform offline transcoding on the video to be transcoded to obtain the second video after offline transcoding.
  • the fourth determining unit is further configured to obtain a third parameter corresponding to each node in the at least one second node; the third parameter represents the relationship between the second node and the to-be-determined node. Attribute parameters related to the fluency of the transcoded video; determine a fourth parameter corresponding to the third parameter; the fourth parameter represents the influence parameter of the third parameter on the fluency of the video to be transcoded; based on The third parameter and the fourth parameter determine the second priority value corresponding to each node in the at least one second node; the second node corresponding to the largest second priority value is used as the second priority value.
  • Two target nodes Two target nodes.
  • the transcoding module 603 is further configured to determine to perform offline processing of the video to be transcoded when the second target node is in the cloud layer or edge layer of the computing power network.
  • a first scheduling method for transcoding based on the first scheduling method, the video to be transcoded is offline transcoded through the second target node to obtain the second video after offline transcoding.
  • the transcoding module 603 is further configured to determine to perform offline transcoding on the video to be transcoded when the second target node is in the terminal layer of the computing power network.
  • the second scheduling method based on the second scheduling method, perform offline transcoding on the video to be transcoded through the second target node to obtain the second video after offline transcoding.
  • the device 600 further includes: a first acquisition module, a second acquisition module and a third determination module; wherein,
  • the first acquisition module is configured to acquire the first computing power scheduled by the terminal layer of the computing power network
  • the second acquisition module is configured to acquire the second computing power for transcoding the video to be transcoded
  • the third determination module is configured to determine the revenue parameter of the terminal layer based on the first computing power and the second computing power.
  • the above-mentioned video transcoding method based on computing power network is implemented in the form of a software function module and is sold or used as an independent product, it can also be stored in a computer-readable in the storage medium.
  • the technical implementation of the embodiments of the present disclosure For example, the part that essentially contributes to the existing technology can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium and includes a number of instructions to enable a video transcoding system based on a computing power network.
  • the device (which may be a personal computer, a server, a network device, etc.) executes all or part of the methods described in various embodiments of the present disclosure.
  • the aforementioned storage media include: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), magnetic disk or optical disk and other various media that can store program codes. As such, disclosed embodiments are not limited to any specific combination of hardware and software.
  • embodiments of the present disclosure provide a video transcoding device based on a computing power network, including a memory and a processor.
  • the memory stores a computer program that can be run on the processor.
  • the processor executes the program, , implement any of the above methods.
  • embodiments of the present disclosure provide a storage medium that stores executable instructions.
  • executable instructions When the executable instructions are executed by a processor, any one of the methods described above is implemented.
  • Figure 7 is a schematic structural diagram of a hardware entity of a video transcoding device based on a computing power network according to an embodiment of the present disclosure.
  • the hardware entity of the video transcoding device 700 includes: a processor 701 and Memory 703.
  • the video transcoding device 700 may also include a communication interface 702.
  • the memory 703 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories.
  • the non-volatile memory can be a read-only memory (ROM, Read Only Memory), a programmable read-only memory (PROM, Programmable Read-Only Memory), an erasable programmable read-only memory (EPROM, Erasable Programmable Read-Only Memory).
  • Magnetic surface storage can be disk storage or tape storage.
  • the volatile memory may be random access memory (RAM), which is used as an external cache.
  • RAM Random Access Memory
  • SRAM Static Random Access Memory
  • SSRAM Synchronous Static Random Access Memory
  • DRAM Dynamic Random Access Memory
  • SDRAM Synchronous Dynamic Random Access Memory
  • DDRSDRAM double data rate synchronous dynamic random access memory
  • ESDRAM enhanced Enhanced Synchronous Dynamic Random Access Memory
  • SLDRAM SyncLink Dynamic Random Access Memory
  • DRRAM Direct Rambus Random Access Memory
  • the methods disclosed in the above embodiments of the present disclosure can be applied to the processor 701 or implemented by the processor 701 .
  • the processor 701 may be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the above method can be completed by instructions in the form of hardware integrated logic circuits or software in the processor 701 .
  • the above-mentioned processor 701 can be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • DSP Digital Signal Processor
  • the processor 701 can implement or execute the disclosed methods, steps and logical block diagrams in the embodiments of the present disclosure.
  • a general-purpose processor may be a microprocessor or any conventional processor, etc.
  • the steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly implemented by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software module may be located in a storage medium, and the storage medium is located in the memory 703.
  • the processor 701 reads the information in the memory 703, and completes the steps of the foregoing method in combination with its hardware.
  • the video transcoding device may be one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLD, Complex Programmable Logic Device), Field-Programmable Gate Array (FPGA, Field-Programmable Gate Array), general-purpose processor, controller, microcontroller (MCU, Micro Controller Unit), microprocessor (Microprocessor), or other electronic components , used to execute the aforementioned method.
  • ASICs Application Specific Integrated Circuits
  • DSPs Programmable Logic Devices
  • PLDs Programmable Logic Devices
  • CPLD Complex Programmable Logic Device
  • FPGA Field-Programmable Gate Array
  • general-purpose processor controller, microcontroller (MCU, Micro Controller Unit), microprocessor (Microprocessor), or other electronic components , used to execute the aforementioned method.
  • the disclosed methods and devices can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division.
  • the communication connection between the various components shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, and may be electrical, mechanical or other forms.
  • the units described above as separate components may or may not be physically separated.
  • the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of this embodiment.
  • the above-mentioned integrated units in the embodiments of the present disclosure are implemented in the form of software functional units and sold or used as independent products, they can also be stored in a computer-readable storage medium.
  • the technical embodiments of the embodiments of the present disclosure can be embodied in the form of software products in nature or in part that contribute to the existing technology.
  • the computer software products are stored in a storage medium and include a number of instructions. So that a video transcoding device (which can be a personal computer, a server, a network device, etc.) executes all or part of the methods described in various embodiments of the present disclosure.
  • the aforementioned storage media include: mobile storage devices, ROMs, magnetic disks or optical disks and other media that can store program codes.
  • the video transcoding method, device, monitor and storage medium based on the computing power network recorded in the embodiments of the disclosure are only examples of the embodiments of the disclosure, but are not limited thereto. As long as the video transcoding based on the computing power network is involved, The transcoding method, device, monitor and storage medium are all within the protection scope of the present disclosure.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

Provided in the embodiments of the present disclosure are a computing power network-based video transcoding method, apparatus and device and a storage medium. The method comprises: determining a computing power resource corresponding to a video to be transcoded; in at least one node meeting the computing power resource, determining a target node on the basis of a priority value corresponding to each node of the at least one node; and by means of the target node, transcoding said video, so as to obtain a transcoded video. Compared with a cloud-computing-based transcoding mode, a computing power network-based transcoding mode in the technical solutions of the embodiments of the present invention determines a target node from at least one node, which meets a computing power resource, in cloud layers, edge layers or terminal layers of a computing power network; therefore, transcoding, by means of the target node, a video to be transcoded can reduce time delays; and transcoding, by means of the target node, a video to be transcoded can also utilize resources to the maximum extent, thus increasing the utilization rate of resources.

Description

基于算力网络的视频转码方法、装置、设备及存储介质Video transcoding methods, devices, equipment and storage media based on computing power network
相关申请的交叉引用Cross-references to related applications
本公开基于申请号为202211157805.8、申请日为2022年9月22日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本申请。This disclosure is based on a Chinese patent application with application number 202211157805.8 and a filing date of September 22, 2022, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated into this application by introduction.
技术领域Technical field
本公开涉及移动通信技术领域,具体涉及一种基于算力网络的视频转码方法、装置、设备及存储介质。The present disclosure relates to the field of mobile communication technology, and specifically to a video transcoding method, device, equipment and storage medium based on a computing power network.
背景技术Background technique
目前相关技术中,主流的视频转码系统是基于云计算的集中式转码系统。相关技术中的技术方案有如下问题:一方面在线转码的效率低:由于在线转码部署在云中心,所有需要转码的视频都需要传到云中心计算在线转码,然后给推到客户侧。云层的计算中心一般距离用户较远,会有比较大的延迟。视频直播对时延的要求时很高的,因此会导致时延高,用户体验不佳。另一方面离线转码的资源利用率低:离线转码对计算资源的要求很高,但相关技术中的方式,计算资源的利用仅限于离线转码集群,无法做到资源的充分利用。针对该问题,目前尚无有效解决方案。In the current related technologies, the mainstream video transcoding system is a centralized transcoding system based on cloud computing. The technical solutions in the related technologies have the following problems: On the one hand, the efficiency of online transcoding is low: Since online transcoding is deployed in the cloud center, all videos that need to be transcoded need to be transmitted to the cloud center for online transcoding calculation, and then pushed to the client side. The computing center of the cloud layer is generally far away from the user, and there will be a relatively large delay. The requirements for latency of live video broadcast are very high, so it will cause high latency and poor user experience. On the other hand, the resource utilization rate of offline transcoding is low: offline transcoding has high requirements for computing resources, but the methods in the related technologies are limited to the utilization of computing resources in offline transcoding clusters, and resources cannot be fully utilized. There is currently no effective solution to this problem.
发明内容Contents of the invention
有鉴于此,本公开的主要目的在于提供一种基于算力网络的视频转码方法、装置、设备及存储介质。In view of this, the main purpose of the present disclosure is to provide a video transcoding method, device, equipment and storage medium based on a computing power network.
为达到上述目的,本公开的技术方案是这样实现的:In order to achieve the above objectives, the technical solution of the present disclosure is implemented as follows:
本公开实施例提供基于算力网络的视频转码方法,所述方法包括: Embodiments of the present disclosure provide a video transcoding method based on computing power network. The method includes:
确定待转码视频对应的算力资源;Determine the computing resources corresponding to the video to be transcoded;
在满足所述算力资源的至少一个节点中,基于所述至少一个节点中的每个节点对应的优先值确定目标节点;In at least one node that meets the computing power resources, determine the target node based on the priority value corresponding to each node in the at least one node;
利用所述目标节点对所述待转码视频进行转码,得到转码后的视频。The target node is used to transcode the video to be transcoded to obtain a transcoded video.
在上述方案中,所述转码包括在线转码,所述方法还包括:In the above solution, the transcoding includes online transcoding, and the method further includes:
在所述算力网络中确定至少一个第一节点;其中,所述第一节点表征在所述算力网络的边缘层中满足所述算力资源的任一节点;Determine at least one first node in the computing power network; wherein the first node represents any node that meets the computing power resources in the edge layer of the computing power network;
基于所述至少一个第一节点中的每个节点对应的第一优先值确定第一目标节点;Determine a first target node based on a first priority value corresponding to each node in the at least one first node;
利用所述第一目标节点对所述待转码视频进行在线转码,得到在线转码后的第一视频。The first target node is used to perform online transcoding on the video to be transcoded to obtain the first video after online transcoding.
在上述方案中,所述基于所述至少一个第一节点中的每个节点对应的第一优先值确定第一目标节点,包括:In the above solution, determining the first target node based on the first priority value corresponding to each node in the at least one first node includes:
获取与所述至少一个第一节点中的每个节点对应的第一参数;所述第一参数表征所述第一节点与所述待转码视频的流畅度相关的属性参数;Obtain a first parameter corresponding to each node in the at least one first node; the first parameter represents an attribute parameter of the first node related to the fluency of the video to be transcoded;
基于预设模型确定与所述第一参数对应的第二参数;所述第二参数表征所述第一参数对所述待转码视频的流畅度的影响参数;Determine a second parameter corresponding to the first parameter based on a preset model; the second parameter represents the influence parameter of the first parameter on the fluency of the video to be transcoded;
基于所述第一参数和所述第二参数,确定所述至少一个第一节点中的每个节点对应的第一优先值;Based on the first parameter and the second parameter, determine a first priority value corresponding to each node in the at least one first node;
将最小的所述第一优先值对应的第一节点作为所述第一目标节点。The first node corresponding to the smallest first priority value is used as the first target node.
在上述方案中,所述方法还包括:In the above solution, the method further includes:
基于与所述至少一个第一节点中的每个节点相关的第一样本参数和第二样本参数,构建训练样本集合;constructing a training sample set based on first sample parameters and second sample parameters associated with each of the at least one first node;
以所述训练样本集合包括的第一样本参数为输入,以所述训练样本集合包括的第二样本参数为输出,对第一模型进行训练,得到预设模型。Using the first sample parameters included in the training sample set as input and the second sample parameters included in the training sample set as output, the first model is trained to obtain a preset model.
在上述方案中,在所述基于所述至少一个第一节点中的每个节点对应的第一优先值确定第一目标节点之后,所述方法还包括: In the above solution, after determining the first target node based on the first priority value corresponding to each node in the at least one first node, the method further includes:
确定所述第一目标节点的第一当前优先值;Determine the first current priority value of the first target node;
确定所述至少一个第一节点中每个节点对应的第二当前优先值;Determine the second current priority value corresponding to each node in the at least one first node;
确定所述第二当前优先值中最小的第二当前优先值;Determine the smallest second current priority value among the second current priority values;
在所述第一当前优先值和所述最小的第二当前优先值满足预设条件的情况下,将所述最小的第二当前优先值对应的第一节点更新为所述第一目标节点。When the first current priority value and the minimum second current priority value meet preset conditions, the first node corresponding to the minimum second current priority value is updated as the first target node.
在上述方案中,所述利用所述第一目标节点对所述待转码视频进行在线转码,得到在线转码后的第一视频之后,所述方法还包括:In the above solution, after the first target node is used to perform online transcoding on the video to be transcoded, and the first video after online transcoding is obtained, the method further includes:
在所述第一目标节点距离用户最近的情况下,通过所述第一目标节点对所述第一视频进行播放。When the first target node is closest to the user, the first video is played through the first target node.
在上述方案中,所述转码包括离线转码,所述方法还包括:In the above solution, the transcoding includes offline transcoding, and the method further includes:
在所述算力网络中确定至少一个第二节点;其中,所述第二节点表征在所述算力网络的终端层、边缘层或云层中满足所述算力资源的任一节点;Determine at least one second node in the computing power network; wherein the second node represents any node that meets the computing power resources in the terminal layer, edge layer or cloud layer of the computing power network;
基于所述至少一个第二节点中的每个节点对应的第二优先值确定第二目标节点;Determine the second target node based on the second priority value corresponding to each node in the at least one second node;
利用所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频。The second target node is used to perform offline transcoding on the video to be transcoded to obtain the second video after offline transcoding.
在上述方案中,所述基于所述至少一个第二节点中的每个节点对应的第二优先值确定第二目标节点,包括:In the above solution, determining the second target node based on the second priority value corresponding to each node in the at least one second node includes:
获取与所述至少一个第二节点中的每个节点对应的第三参数;所述第三参数表征第二节点与所述待转码视频的流畅度相关的属性参数;Obtain a third parameter corresponding to each node in the at least one second node; the third parameter represents an attribute parameter of the second node related to the fluency of the video to be transcoded;
确定与所述第三参数对应的第四参数;所述第四参数表征所述第三参数对所述待转码视频的流畅度的影响参数;Determine a fourth parameter corresponding to the third parameter; the fourth parameter represents the influence parameter of the third parameter on the fluency of the video to be transcoded;
基于所述第三参数和所述第四参数,确定所述至少一个第二节点中的每个节点对应的第二优先值;Based on the third parameter and the fourth parameter, determine a second priority value corresponding to each node in the at least one second node;
将最大的所述第二优先值对应的第二节点作为所述第二目标节点。The second node corresponding to the largest second priority value is used as the second target node.
在上述方案中,所述利用所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频,包括: In the above solution, the second target node is used to perform offline transcoding on the video to be transcoded, and the second video after offline transcoding is obtained, including:
在所述第二目标节点在所述算力网络的云层或边缘层中的情况下,确定对所述待转码视频进行离线转码的第一调度方式;When the second target node is in the cloud layer or edge layer of the computing power network, determine a first scheduling method for offline transcoding of the video to be transcoded;
基于所述第一调度方式,通过所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频。Based on the first scheduling method, the video to be transcoded is offline transcoded through the second target node to obtain the second video after offline transcoding.
在上述方案中,所述利用所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频,包括:In the above solution, the second target node is used to perform offline transcoding on the video to be transcoded, and the second video after offline transcoding is obtained, including:
在所述第二目标节点在所述算力网络的终端层中的情况下,确定对所述待转码视频进行离线转码的第二调度方式;When the second target node is in the terminal layer of the computing power network, determine a second scheduling method for offline transcoding of the video to be transcoded;
基于所述第二调度方式,通过所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频。Based on the second scheduling method, the video to be transcoded is offline transcoded through the second target node to obtain the second video after offline transcoding.
在上述方案中,所述方法还包括:In the above solution, the method further includes:
获取所述算力网络的终端层进行调度的第一算力;Obtain the first computing power scheduled by the terminal layer of the computing power network;
获取对所述待转码视频进行转码的第二算力;Obtain the second computing power to transcode the video to be transcoded;
基于所述第一算力和所述第二算力,确定所述终端层的收益参数。Based on the first computing power and the second computing power, a revenue parameter of the terminal layer is determined.
本公开实施例提供一种基于算力网络的视频转码装置,所述装置包括:An embodiment of the present disclosure provides a video transcoding device based on a computing power network. The device includes:
第一确定模块,配置为确定待转码视频对应的算力资源;The first determination module is configured to determine the computing resources corresponding to the video to be transcoded;
第二确定模块,配置为在满足所述算力资源的至少一个节点中,基于所述至少一个节点中的每个节点对应的优先值确定目标节点;The second determination module is configured to determine the target node based on the priority value corresponding to each node in the at least one node among at least one node that meets the computing power resource;
转码模块,配置为利用所述目标节点对所述待转码视频进行转码,得到转码后的视频。A transcoding module configured to use the target node to transcode the video to be transcoded to obtain a transcoded video.
本公开实施例提供一种基于算力网络的视频转码设备,包括存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现上述任一项所述的方法。An embodiment of the present disclosure provides a video transcoding device based on a computing power network, including a memory and a processor. The memory stores a computer program that can be run on the processor. When the processor executes the program, the above-mentioned any of the methods described.
本公开实施例提供一种存储介质,所述存储介质存储有可执行指令,当所述可执行指令被处理器执行时,实现上述任一项所述的方法。Embodiments of the present disclosure provide a storage medium that stores executable instructions. When the executable instructions are executed by a processor, any one of the methods described above is implemented.
本公开实施例提供一种基于算力网络的视频转码方法、装置、设备及存储介质,其中,所述方法包括:确定待转码视频对应的算力资源;在满足所述算 力资源的至少一个节点中,基于所述至少一个节点中的每个节点对应的优先值确定目标节点;利用所述目标节点对所述待转码视频进行转码,得到转码后的视频。相对于基于云计算的转码方式,采用本发明实施例的技术方案,基于算力网络的转码方式,在所述算力网络的云层、边缘层或终端层中满足所述算力资源的至少一个节点中确定目标节点,利用所述目标节点对所述待转码视频进行转码能够克服云层的计算中心一般距离用户较远的问题,不仅实现了降低视频播放的延时,还实现了最大限度地利用资源,提升资源的利用率。The present disclosure provides a method, apparatus, device and storage medium for video transcoding based on a computing network, wherein the method comprises: determining computing resources corresponding to the video to be transcoded; In at least one node of the computing power resources, a target node is determined based on the priority value corresponding to each node in the at least one node; the target node is used to transcode the video to be transcoded to obtain the transcoded video. Compared with the transcoding method based on cloud computing, the technical solution of the embodiment of the present invention is adopted, and the transcoding method based on the computing power network is adopted. The target node is determined in at least one node that meets the computing power resources in the cloud layer, edge layer or terminal layer of the computing power network. The target node is used to transcode the video to be transcoded, which can overcome the problem that the computing center of the cloud layer is generally far away from the user, which not only reduces the delay of video playback, but also maximizes the use of resources and improves resource utilization.
附图说明Description of drawings
图1为本公开实施例基于算力网络的视频转码方法相关技术中转码系统架构示意图;FIG1 is a schematic diagram of a transcoding system architecture in a related art of a video transcoding method based on a computing network according to an embodiment of the present disclosure;
图2为本公开实施例基于算力网络的视频转码方法实现流程示意图;Figure 2 is a schematic flow chart of a video transcoding method based on a computing power network according to an embodiment of the present disclosure;
图3为本公开实施例基于算力网络的视频转码方法转码系统架构示意图;Figure 3 is a schematic diagram of the transcoding system architecture of the video transcoding method based on the computing power network according to an embodiment of the present disclosure;
图4为本公开实施例基于算力网络的视频转码方法在线转码实现流程示意图;Figure 4 is a schematic flowchart of the online transcoding implementation process of the video transcoding method based on the computing power network according to the embodiment of the present disclosure;
图5为本公开实施例基于算力网络的视频转码方法离线转码实现流程示意图;Figure 5 is a schematic flowchart of the offline transcoding implementation process of the video transcoding method based on the computing power network according to the embodiment of the present disclosure;
图6为本公开实施例基于算力网络的视频转码装置的组成结构示意图;Figure 6 is a schematic structural diagram of a video transcoding device based on a computing power network according to an embodiment of the present disclosure;
图7为本公开实施例基于算力网络的视频转码设备的一种硬件实体结构示意图。FIG. 7 is a schematic diagram of the hardware structure of a video transcoding device based on a computing power network according to an embodiment of the present disclosure.
具体实施方式Detailed ways
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对公开的具体技术方案做进一步详细描述。以下实施例用于说明本公开,但不用来限制本公开的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure more clear, the specific technical solutions disclosed will be further described in detail below in conjunction with the drawings in the embodiments of the present disclosure. The following examples serve to illustrate the disclosure but are not intended to limit the scope of the disclosure.
图1为本公开实施例基于算力网络的视频转码方法相关技术中转码系统架构示意图,如图1所示,相关技术中一种典型的转码系统的技术架构包括:源 端、管理节点、云存储、离线转码模块和在线转码模块。其中,源端包括各种类型的终端,包括个人计算机(Personal Computer,PC)、手机、摄像头等。源端负责采集视频数据,上传到云平台。管理节点负责管理系统的数据,处理业务逻辑,提供应用程序(Application Programming Interface,API)接口等。云存储一般使用对象存储。对象存储一般使用中心存储的方式。用户先将视频文件手动选择传入自己对象存储。然后选择文件进行转码。转码时,转码集群先从云存储中心下载视频文件,转码完成后,再存回对象存储。离线转码是指将一个视频文件转换成另一个或多个不同码率的视频文件,以适应不同的网络带宽、不同的终端处理能力和不同的用户需求。在线转码是指将直播流转换成多种多个不同分辨率或码率的直播流,从而可以分发到不同的直播平台。Figure 1 is a schematic diagram of the transcoding system architecture in the related art of a video transcoding method based on computing power network according to an embodiment of the present disclosure. As shown in Figure 1, the technical architecture of a typical transcoding system in the related art includes: Source terminal, management node, cloud storage, offline transcoding module and online transcoding module. Among them, the source end includes various types of terminals, including personal computers (Personal Computer, PC), mobile phones, cameras, etc. The source end is responsible for collecting video data and uploading it to the cloud platform. The management node is responsible for managing system data, processing business logic, and providing application program (Application Programming Interface, API) interfaces, etc. Cloud storage generally uses object storage. Object storage generally uses central storage. The user first manually selects the video file and transfers it to his own object storage. Then select the files to transcode. When transcoding, the transcoding cluster first downloads the video file from the cloud storage center, and then stores it back to the object storage after the transcoding is completed. Offline transcoding refers to converting one video file into another or multiple video files with different bitrates to adapt to different network bandwidths, different terminal processing capabilities, and different user needs. Online transcoding refers to converting live streams into multiple live streams with different resolutions or bit rates, so that they can be distributed to different live broadcast platforms.
在相关技术中的转码方式中,在视频转码完成以后,继续将视频放在云存储中心。同上传一样,用户下载和播放时同样面临距离视频服务地址远,播放和下载效率低下的问题。In the transcoding method in the related technology, after the video transcoding is completed, the video continues to be placed in the cloud storage center. Just like uploading, when users download and play, they also face the problem of being far away from the video service address and low playback and download efficiency.
针对以上相关技术的不足,本公开实施例提供一种基于算力网络的视频转码方法、装置、设备及存储介质,所述算力网络系统包括云层、边缘层、终端层三级。终端层负责采集视频,将采集到的视频实时推送到边缘侧。通过在边缘层进行在线转码,通过边边协同,将实时视频通过最近的边缘节点推送到客户端(播放端),保证传输的实时性。针对实时性的要求不高的离线转码,可以统一协调云层、边缘层、终端层三级算力,选择最合适的节点进行转码。将转码的结果回传给云层存储中心进行存储,在播放时,将云层存储中心的视频作为源站,各边缘节点作为加速节点,提升视频的播放流畅度。整个系统中,终端层既消耗算力又贡献算力,系统管理模块提供基于算力的计费方式。In view of the deficiencies of the above-mentioned related technologies, the embodiments of the present disclosure provide a video transcoding method, device, equipment and storage medium based on a computing power network, wherein the computing power network system includes three levels: cloud layer, edge layer and terminal layer. The terminal layer is responsible for collecting videos and pushing the collected videos to the edge side in real time. By performing online transcoding at the edge layer, the real-time video is pushed to the client (playing end) through the nearest edge node through edge-to-edge collaboration to ensure the real-time transmission. For offline transcoding with low real-time requirements, the three-level computing power of the cloud layer, edge layer and terminal layer can be coordinated uniformly to select the most suitable node for transcoding. The transcoding result is transmitted back to the cloud storage center for storage. When playing, the video of the cloud storage center is used as the source station, and each edge node is used as an acceleration node to improve the smoothness of video playback. In the entire system, the terminal layer consumes and contributes computing power, and the system management module provides a computing power-based billing method.
本公开实施例提出一种基于算力网络的视频转码方法,该方法所实现的功能可以通过基于算力网络的视频转码设备中的处理器调用程序代码来实现,当然程序代码可以保存在计算机存储介质中,可见,该计算设备至少包括处理器和存储介质。The embodiment of the present disclosure proposes a video transcoding method based on computing power network. The functions implemented by this method can be realized by calling the program code by the processor in the video transcoding device based on computing power network. Of course, the program code can be saved in In computer storage media, it can be seen that the computing device at least includes a processor and a storage medium.
图2为本公开实施例基于算力网络的视频转码方法实现流程示意图,如图 2所示,所述方法包括:Figure 2 is a schematic flow chart of a video transcoding method based on computing power network according to an embodiment of the present disclosure, as shown in Figure As shown in 2, the method includes:
步骤201:确定待转码视频对应的算力资源;Step 201: Determine the computing resources corresponding to the video to be transcoded;
步骤202:在满足所述算力资源的至少一个节点中,基于所述至少一个节点中的每个节点对应的优先值确定目标节点;Step 202: Among at least one node that meets the computing power resources, determine the target node based on the priority value corresponding to each node in the at least one node;
步骤203:利用所述目标节点对所述待转码视频进行转码,得到转码后的视频。Step 203: Use the target node to transcode the video to be transcoded to obtain a transcoded video.
在步骤201中,所述基于算力网络的视频转码方法的应用场景可以根据实际情况确定,在此不做限定。作为一种示例,所述基于算力网络的视频转码方法可以应用于一种面向视频转码的算力网络服务系统,所述算力网络服务系统是一种面向算力网络的视频转码系统。In step 201, the application scenario of the video transcoding method based on the computing power network can be determined according to the actual situation, and is not limited here. As an example, the video transcoding method based on computing power network can be applied to a computing power network service system oriented to video transcoding. The computing power network service system is a video transcoding method oriented to computing power network. system.
所述待转码视频可以根据实际情况确定,在此不做限定。作为一种示例,所述待转码视频可以是需要进行在线转码的直播流,也可以是需要进行离线转码的视频文件。The video to be transcoded can be determined according to actual conditions and is not limited here. As an example, the video to be transcoded may be a live stream that needs to be transcoded online, or a video file that needs to be transcoded offline.
所述待转码视频对应的算力资源的确定过程可以根据实际情况确定,在此不做限定。作为一种示例,可以根据转码模板和所述待转码视频的参数,确定所述待转码视频对应的算力资源。其中,所述待转码视频的参数可以根据实际情况确定,在此不做限定。作为一种示例,所述待转码视频的参数可以是视频格式、分辨率、码率等参数中任意一种或多种。所述转码模板可以根据实际情况确定,在此不做限定。作为一种示例,所述转码模板可以是所述待转码视频关联的模板。The determination process of the computing power resources corresponding to the video to be transcoded can be determined according to the actual situation, and is not limited here. As an example, the computing resources corresponding to the video to be transcoded can be determined according to the transcoding template and the parameters of the video to be transcoded. The parameters of the video to be transcoded can be determined according to actual conditions and are not limited here. As an example, the parameters of the video to be transcoded may be any one or more of video format, resolution, bit rate and other parameters. The transcoding template can be determined according to actual conditions and is not limited here. As an example, the transcoding template may be a template associated with the video to be transcoded.
在步骤202中,所述至少一个节点可以根据实际情况确定,在此不做限定。作为一种示例,所述至少一个节点可以是所述算力网络的云层、边缘层或终端层中满足所述算力资源的节点。所述至少一个节点的个数可以根据实际情况确定,在此不做限定。In step 202, the at least one node may be determined according to actual conditions, and is not limited here. As an example, the at least one node may be a node in the cloud layer, edge layer or terminal layer of the computing power network that meets the computing power resources. The number of the at least one node can be determined according to actual conditions and is not limited here.
所述优先值可以根据实际情况确定,在此不做限定。作为一种示例,所述优先值可以是表征所述至少一个节点中的每个节点与所述待转码视频的流畅度关系的数据。所述在满足所述算力资源的至少一个节点中,基于所述至少一个 节点中的每个节点对应的优先值确定目标节点可以为,在满足所述算力资源的至少一个节点中,基于所述至少一个节点中的每个节点对应的优先值确定所述待转码视频的最优流畅度;将所述最优流畅度对应的节点作为所述目标节点。The priority value can be determined according to actual conditions and is not limited here. As an example, the priority value may be data characterizing the fluency relationship between each node in the at least one node and the video to be transcoded. In at least one node that meets the computing power resources, based on the at least one Determining the target node based on the priority value corresponding to each node in the nodes may be to determine the target node to be transcoded based on the priority value corresponding to each node in the at least one node in at least one node that meets the computing power resources. The optimal fluency of the video; use the node corresponding to the optimal fluency as the target node.
在步骤203中,所述目标节点可以根据实际情况确定,在此不做限定。作为一种示例,所述目标节点可以是基于所述算力网络的云层、边缘层或终端层中所述至少一个节点中的每个节点对应的优先值确定的节点。In step 203, the target node can be determined according to the actual situation, and is not limited here. As an example, the target node may be a node determined based on the priority value corresponding to each node in the at least one node in the cloud layer, edge layer or terminal layer of the computing power network.
所述转码可以根据实际情况确定,在此不做限定。作为一种示例,所述转码可以包括在线转码和离线转码。所述转码后的视频可以根据实际情况确定,在此不做限定。作为一种示例,所述转码后的视频可以是直播流和视频文件。具体地,所述利用所述目标节点对所述待转码视频进行转码,得到转码后的视频可以为,利用所述目标节点对所述直播流进行转换,得到多种多个不同分辨率或码率的直播流;还可以为,利用所述目标节点对所述一个视频文件进行转换,得到另一个或多个不同码率的视频文件。The transcoding can be determined according to actual conditions and is not limited here. As an example, the transcoding may include online transcoding and offline transcoding. The transcoded video can be determined according to actual conditions and is not limited here. As an example, the transcoded video may be a live stream and a video file. Specifically, the method of using the target node to transcode the video to be transcoded to obtain the transcoded video may be: using the target node to convert the live stream to obtain a plurality of different resolutions. rate or code rate of the live stream; it may also be that the target node is used to convert the one video file to obtain another or multiple video files with different code rates.
本公开实施例提供一种基于算力网络的视频转码方法,所述方法包括:确定待转码视频对应的算力资源;在满足所述算力资源的至少一个节点中,基于所述至少一个节点中的每个节点对应的优先值确定目标节点;利用所述目标节点对所述待转码视频进行转码,得到转码后的视频。相对于基于云计算的转码方式,采用本公开实施例的技术方案,基于算力网络的转码方式,在所述算力网络的云层、边缘层或终端层中满足所述算力资源的至少一个节点中确定目标节点,利用所述目标节点对所述待转码视频进行转码能够克服云层的计算中心一般距离用户较远的问题,不仅实现了降低视频播放的延时,还实现了最大限度地利用资源,提升资源的利用率。Embodiments of the present disclosure provide a video transcoding method based on a computing power network. The method includes: determining the computing power resources corresponding to the video to be transcoded; in at least one node that meets the computing power resources, based on the at least The priority value corresponding to each node in a node determines the target node; the target node is used to transcode the video to be transcoded to obtain the transcoded video. Compared with the transcoding method based on cloud computing, the technical solution of the embodiment of the present disclosure is adopted, and the transcoding method based on the computing power network satisfies the requirements of the computing power resources in the cloud layer, edge layer or terminal layer of the computing power network. Determining a target node in at least one node, and using the target node to transcode the video to be transcoded can overcome the problem that the computing center of the cloud layer is generally far away from the user, not only reducing the delay of video playback, but also achieving Maximize the use of resources and improve resource utilization.
在本公开的一种可选实施例中,所述转码包括在线转码,所述方法还包括:In an optional embodiment of the present disclosure, the transcoding includes online transcoding, and the method further includes:
在所述算力网络中确定至少一个第一节点;其中,所述第一节点表征在所述算力网络的边缘层中满足所述算力资源的任一节点;Determine at least one first node in the computing power network; wherein the first node represents any node that meets the computing power resources in the edge layer of the computing power network;
基于所述至少一个第一节点中的每个节点对应的第一优先值确定第一目标节点; Determine the first target node based on the first priority value corresponding to each node in the at least one first node;
利用所述第一目标节点对所述待转码视频进行在线转码,得到在线转码后的第一视频。The first target node is used to perform online transcoding on the video to be transcoded to obtain the first video after online transcoding.
本实施例中,所述在所述算力网络中确定至少一个第一节点可以根据实际情况确定,在此不做限定。作为一种示例,所述至少一个第一节点可以是在所述算力网络的边缘层中确定满足所述算力资源的至少一个第一节点,可以在所述算力网络的边缘层中确定满足所述算力资源的边缘节点,将所述满足所述算力资源的边缘节点作为所述算力网络的边缘层中至少一个第一节点。与相关技术中以云计算为中心的在线转码流程不同,本实施例基于算力网络的在线转码主要依赖终端层和边缘层的边缘节点。In this embodiment, the determination of at least one first node in the computing power network can be determined according to actual conditions, and is not limited here. As an example, the at least one first node may be at least one first node that satisfies the computing power resource determined in the edge layer of the computing power network. The at least one first node may be determined in the edge layer of the computing power network. The edge node that satisfies the computing power resources is used as at least one first node in the edge layer of the computing power network. Different from the cloud computing-centered online transcoding process in related technologies, the online transcoding based on the computing power network in this embodiment mainly relies on the edge nodes of the terminal layer and edge layer.
所述第一优先值可以根据实际情况确定,在此不做限定。作为一种示例,所述第一优先值可以是表征所述算力网络的边缘层的至少一个第一节点中的每个节点与所述待转码视频的流畅度关系的数据。所述基于所述至少一个第一节点中的每个节点对应的第一优先值确定第一目标节点可以为,基于所述至少一个第一节点中的每个节点对应的第一优先值确定所述待转码视频的第一最优流畅度;将所述第一最优流畅度对应的第一节点作为所述第一目标节点。The first priority value can be determined according to actual conditions and is not limited here. As an example, the first priority value may be data representing the fluency relationship between each node in at least one first node of the edge layer of the computing power network and the video to be transcoded. Determining the first target node based on the first priority value corresponding to each node in the at least one first node may be: determining the first target node based on the first priority value corresponding to each node in the at least one first node. Describe the first optimal fluency of the video to be transcoded; use the first node corresponding to the first optimal fluency as the first target node.
所述第一视频可以根据实际情况确定,在此不做限定。作为一种示例,在对所述待转码视频进行在线转码的情况下,所述第一视频可以是将所述待转码视频转换成多种多个不同分辨率或码率的直播流。The first video can be determined according to actual conditions and is not limited here. As an example, in the case of online transcoding of the video to be transcoded, the first video may be a live stream that converts the video to be transcoded into multiple different resolutions or code rates. .
所述利用所述第一目标节点对所述待转码视频进行在线转码,得到在线转码后的第一视频可以为,利用所述算力网络的边缘层中第一目标节点对所述待转码视频进行在线转码,得到在线转码后的第一视频。The method of using the first target node to transcode the video to be transcoded online to obtain the first video after online transcoding may be to use the first target node in the edge layer of the computing power network to transcode the video to be transcoded online. The video to be transcoded is transcoded online to obtain the first video after online transcoding.
在本公开的一种可选实施例中,所述基于所述至少一个第一节点中的每个节点对应的第一优先值确定第一目标节点,包括:In an optional embodiment of the present disclosure, determining the first target node based on the first priority value corresponding to each node in the at least one first node includes:
获取与所述至少一个第一节点中的每个节点对应的第一参数;所述第一参数表征所述第一节点与所述待转码视频的流畅度相关的属性参数;Obtain a first parameter corresponding to each node in the at least one first node; the first parameter represents an attribute parameter of the first node related to the fluency of the video to be transcoded;
基于预设模型确定与所述第一参数对应的第二参数;所述第二参数表征所述第一参数对所述待转码视频的流畅度的影响参数; Determine a second parameter corresponding to the first parameter based on a preset model; the second parameter represents the influence parameter of the first parameter on the fluency of the video to be transcoded;
基于所述第一参数和所述第二参数,确定所述至少一个第一节点中的每个节点对应的第一优先值;Determine a first priority value corresponding to each node in the at least one first node based on the first parameter and the second parameter;
将最小的所述第一优先值对应的第一节点作为所述第一目标节点。The first node corresponding to the smallest first priority value is used as the first target node.
本实施例中,所述第一参数可以根据实际情况确定,在此不做限定。作为一种示例,所述第一参数可以是所述算力网络的终端层与所述算力网络的边缘层中各个边缘节点之间的距离、所述算力网络的边缘层中各个边缘节点的性能以及所述算力网络的边缘层中各个边缘节点的负载中任意一个或多个参数。In this embodiment, the first parameter can be determined according to actual conditions and is not limited here. As an example, the first parameter may be the distance between the terminal layer of the computing power network and each edge node in the edge layer of the computing power network, each edge node in the edge layer of the computing power network The performance and any one or more parameters of the load of each edge node in the edge layer of the computing power network.
所述预设模型可以根据实际情况确定,在此不做限定。作为一种示例,所述预设模型可以表征在所述待转码视频的流畅度与所述第二参数的对应关系。所述基于预设模型确定与所述第一参数对应的第二参数可以为,基于所述预设模型确定与第二最优流畅度对应的第二参数;将所述第二最优流畅度对应的第二参数作为所述第一参数对应的第二参数。The preset model can be determined according to actual conditions and is not limited here. As an example, the preset model may represent the corresponding relationship between the fluency of the video to be transcoded and the second parameter. Determining the second parameter corresponding to the first parameter based on the preset model may include: determining the second parameter corresponding to the second optimal fluency based on the preset model; The corresponding second parameter is used as the second parameter corresponding to the first parameter.
所述第二参数可以根据实际情况确定,在此不做限定。作为一种示例,所述第二参数可以是所述算力网络的终端层与所述算力网络的边缘层中各个边缘节点之间的距离的影响参数、所述算力网络的边缘层中各个边缘节点的性能的影响参数以及所述算力网络的边缘层中各个边缘节点的负载的影响参数中任意一个或多个影响参数。The second parameter can be determined according to actual conditions and is not limited here. As an example, the second parameter may be an influencing parameter of the distance between the terminal layer of the computing power network and each edge node in the edge layer of the computing power network, Any one or more of the influencing parameters on the performance of each edge node and the influencing parameters on the load of each edge node in the edge layer of the computing power network.
所述基于所述第一参数和所述第二参数,确定所述至少一个第一节点中的每个节点对应的第一优先值可以为,基于所述第一参数和所述第二参数的乘积进行加和,得到所述至少一个第一节点中的每个节点对应的第一优先值。Determining the first priority value corresponding to each node in the at least one first node based on the first parameter and the second parameter may be: based on the first parameter and the second parameter The products are added together to obtain the first priority value corresponding to each node in the at least one first node.
在一些实施例中,所述基于所述至少一个第一节点中的每个节点对应的第一优先值确定第一目标节点可以为,基于所述至少一个第一节点中的每个节点对应的第一优先值确定所述待转码视频的流畅度;将最小的所述第一优先值对应的所述待转码视频的流畅度作为所述第一最优流畅度;将所述第一最优流畅度对应的第一节点作为所述第一目标节点。In some embodiments, determining the first target node based on the first priority value corresponding to each node in the at least one first node can be: determining the fluency of the video to be transcoded based on the first priority value corresponding to each node in the at least one first node; taking the fluency of the video to be transcoded corresponding to the smallest first priority value as the first optimal fluency; and taking the first node corresponding to the first optimal fluency as the first target node.
在本公开的一种可选实施例中,所述方法还包括:In an optional embodiment of the present disclosure, the method further includes:
基于与所述至少一个第一节点中的每个节点相关的第一样本参数和第二样 本参数,构建训练样本集合;Based on a first sample parameter associated with each of the at least one first node and a second sample This parameter is used to construct a training sample set;
以所述训练样本集合包括的第一样本参数为输入,以所述训练样本集合包括的第二样本参数为输出,对第一模型进行训练,得到预设模型。Using the first sample parameters included in the training sample set as input and the second sample parameters included in the training sample set as output, the first model is trained to obtain a preset model.
本实施例中,所述第一样本参数可以根据实际情况确定,在此不做限定。作为一种示例,所述第一样本参数可以是所述算力网络的终端层与所述算力网络的边缘层中各个边缘节点之间的距离、所述算力网络的边缘层中各个边缘节点的性能、所述算力网络的边缘层中各个边缘节点的负载以及用户的体验值中任意一个或多个参数。其中,所述用户的体验值可以是与所述待转码视频的流畅度呈正相关的参数。In this embodiment, the first sample parameter can be determined according to actual conditions and is not limited here. As an example, the first sample parameter may be the distance between the terminal layer of the computing power network and each edge node in the edge layer of the computing power network, the distance between each edge node in the edge layer of the computing power network, Any one or more parameters of the performance of edge nodes, the load of each edge node in the edge layer of the computing power network, and the user's experience value. The user's experience value may be a parameter that is positively correlated with the fluency of the video to be transcoded.
所述第二样本参数可以根据实际情况确定,在此不做限定。作为一种示例,所述第二样本参数可以是所述算力网络的终端层与所述算力网络的边缘层中各个边缘节点之间的距离的影响参数、所述算力网络的边缘层中各个边缘节点的性能的影响参数以及所述算力网络的边缘层中各个边缘节点的负载的影响参数中任意一个或多个影响参数。The second sample parameter can be determined according to actual conditions and is not limited here. As an example, the second sample parameter may be an influencing parameter of the distance between the terminal layer of the computing power network and each edge node in the edge layer of the computing power network, the edge layer of the computing power network Any one or more of the influencing parameters on the performance of each edge node in the computing power network and the influencing parameters on the load of each edge node in the edge layer of the computing power network.
在一些实施例中,所述基于预设模型确定与所述第一参数对应的第二参数可以为,基于所述预设模型的第一样本参数中用户的体验值确定第二最优流畅度;基于所述预设模型的第一样本参数中所述算力网络的终端层与所述算力网络的边缘层中各个边缘节点之间的距离、所述算力网络的边缘层中各个边缘节点的性能以及所述算力网络的边缘层中各个边缘节点的负载中任意一个或多个参数,确定与所述第二最优流畅度对应的第二参数;将所述第二最优流畅度对应的第二参数作为所述第一参数对应的第二参数。In some embodiments, determining the second parameter corresponding to the first parameter based on the preset model may be to determine the second optimal smoothness based on the user's experience value in the first sample parameter of the preset model. degree; based on the distance between the terminal layer of the computing power network and each edge node in the edge layer of the computing power network in the first sample parameter of the preset model, the distance between the edge nodes in the edge layer of the computing power network Determine the second parameter corresponding to the second optimal fluency based on any one or more parameters of the performance of each edge node and the load of each edge node in the edge layer of the computing power network; The second parameter corresponding to the excellent fluency is used as the second parameter corresponding to the first parameter.
在本公开的一种可选实施例中,在所述基于所述至少一个第一节点中的每个节点对应的第一优先值确定第一目标节点之后,所述方法还包括:In an optional embodiment of the present disclosure, after determining the first target node based on the first priority value corresponding to each node in the at least one first node, the method further includes:
确定所述第一目标节点的第一当前优先值;Determine the first current priority value of the first target node;
确定所述至少一个第一节点中每个节点对应的第二当前优先值;Determine a second current priority value corresponding to each node in the at least one first node;
确定所述第二当前优先值中最小的第二当前优先值;Determine the smallest second current priority value among the second current priority values;
在所述第一当前优先值和所述最小的第二当前优先值满足预设条件的情况 下,将所述最小的第二当前优先值对应的第一节点更新为所述第一目标节点。When the first current priority value and the minimum second current priority value meet preset conditions Next, the first node corresponding to the smallest second current priority value is updated as the first target node.
本实施例中,考虑到所述算力网络的终端层可能处在不断的移动当中,计算得到的第一优先值也在不断变化。则需要确定所述第一目标节点的第一当前优先值,还需要实时确定所述至少一个第一节点中每个节点对应的第二当前优先值,重新确定最小的所述第二当前优先值对应的第一节点。In this embodiment, considering that the terminal layer of the computing power network may be constantly moving, the calculated first priority value is also constantly changing. Then it is necessary to determine the first current priority value of the first target node, and also need to determine the second current priority value corresponding to each node in the at least one first node in real time, and re-determine the smallest second current priority value. The corresponding first node.
在一些实施例中,所述方法还包括:确定所述第一当前优先值与所述最小的第二当前优先值对应的切换参数;其中,所述切换参数表征切换节点对性能的提升比例参数。In some embodiments, the method further includes: determining a switching parameter corresponding to the first current priority value and the minimum second current priority value; wherein the switching parameter represents a proportional parameter of the performance improvement of the switching node. .
所述预设条件可以根据实际情况确定,在此不做限定。作为一种示例,所述预设条件可以是判断所述切换参数是否大于预设阈值。所述预设阈值可以根据实际情况确定,在此不做限定。The preset conditions can be determined according to actual conditions and are not limited here. As an example, the preset condition may be to determine whether the switching parameter is greater than a preset threshold. The preset threshold can be determined according to actual conditions and is not limited here.
所述在所述第一当前优先值和所述最小的第二当前优先值满足预设条件的情况下,将所述最小的第二当前优先值对应的第一节点更新为所述第一目标节点可以为,在所述第一当前优先值和所述最小的第二当前优先值对应的所述切换参数大于预设阈值的情况下,将所述最小的第二当前优先值对应的第一节点更新为所述第一目标节点。In the case where the first current priority value and the minimum second current priority value meet a preset condition, the first node corresponding to the minimum second current priority value is updated as the first target. The node may be, when the switching parameter corresponding to the first current priority value and the minimum second current priority value is greater than a preset threshold, change the first value corresponding to the minimum second current priority value to The node is updated to the first target node.
在本公开的一种可选实施例中,所述利用所述第一目标节点对所述待转码视频进行在线转码,得到在线转码后的第一视频之后,所述方法还包括:In an optional embodiment of the present disclosure, after the first target node is used to perform online transcoding on the video to be transcoded, and the first video after online transcoding is obtained, the method further includes:
在所述第一目标节点距离用户最近的情况下,通过所述第一目标节点对所述第一视频进行播放。When the first target node is closest to the user, the first video is played through the first target node.
本实施例中,通过距离用户最近的第一目标节点对所述第一视频进行播放,能够减少终端层与播放端的距离,起到了降低延时的作用。In this embodiment, playing the first video through the first target node closest to the user can reduce the distance between the terminal layer and the playback end, thereby reducing delay.
在一些实施例中,如果所述第一目标节点距离用户较远,在所述第一目标节点不是距离用户最近的节点情况下,确定距离用户最近的所述算力网络的边缘层中的第三目标节点;将所述第一视频推送至所述第三目标节点;通过所述第三目标节点对所述第一视频进行播放。In some embodiments, if the first target node is far from the user, and if the first target node is not the node closest to the user, determine the first node in the edge layer of the computing power network that is closest to the user. Three target nodes; push the first video to the third target node; play the first video through the third target node.
在本公开的一种可选实施例中,所述转码包括离线转码,所述方法还包括: In an optional embodiment of the present disclosure, the transcoding includes offline transcoding, and the method further includes:
在所述算力网络中确定至少一个第二节点;其中,所述第二节点表征在所述算力网络的终端层、边缘层或云层中满足所述算力资源的任一节点;Determine at least one second node in the computing power network; wherein the second node represents any node that meets the computing power resources in the terminal layer, edge layer or cloud layer of the computing power network;
基于所述至少一个第二节点中的每个节点对应的第二优先值确定第二目标节点;Determine the second target node based on the second priority value corresponding to each node in the at least one second node;
利用所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频。The second target node is used to perform offline transcoding on the video to be transcoded to obtain the second video after offline transcoding.
本实施例中,所述在所述算力网络中确定至少一个第二节点可以根据实际情况确定,在此不做限定。作为一种示例,可以在所述算力网络的终端层、边缘层或云层中确定满足所述算力资源的节点。In this embodiment, the determination of at least one second node in the computing power network can be determined according to actual conditions, and is not limited here. As an example, nodes that meet the computing power resources may be determined in the terminal layer, edge layer or cloud layer of the computing power network.
所述第二优先值可以根据实际情况确定,在此不做限定。作为一种示例,所述第二优先值可以是表征所述算力网络的终端层、边缘层或云层中至少一个节点中的每个节点与所述待转码视频的流畅度关系的数据。所述基于所述至少一个第二节点中的每个节点对应的第二优先值确定第二目标节点可以为,基于所述至少一个第二节点中的每个节点对应的第二优先值确定所述待转码视频的第三最优流畅度;将所述第三最优流畅度对应的第二节点作为所述第二目标节点。The second priority value can be determined according to actual conditions and is not limited here. As an example, the second priority value may be data representing the fluency relationship between each node in at least one node in the terminal layer, edge layer, or cloud layer of the computing power network and the video to be transcoded. Determining the second target node based on the second priority value corresponding to each node in the at least one second node may be: determining the second target node based on the second priority value corresponding to each node in the at least one second node. Describe the third optimal fluency of the video to be transcoded; use the second node corresponding to the third optimal fluency as the second target node.
所述第二视频可以根据实际情况确定,在此不做限定。作为一种示例,在对所述待转码视频进行离线转码的情况下,所述第二视频可以是将所述待转码视频转换成另一个或多个不同码率的视频文件。The second video can be determined according to actual conditions and is not limited here. As an example, in the case of offline transcoding of the video to be transcoded, the second video may be a video file that converts the video to be transcoded into another or more different code rates.
所述利用所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频可以为,利用所述算力网络的终端层、边缘层或云层中第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频。The offline transcoding of the video to be transcoded by using the second target node to obtain the second video after offline transcoding can be performed by using the second target node in the terminal layer, edge layer or cloud layer of the computing power network to offline transcode the video to be transcoded to obtain the second video after offline transcoding.
在本公开的一种可选实施例中,所述基于所述至少一个第二节点中的每个节点对应的第二优先值确定第二目标节点,包括:In an optional embodiment of the present disclosure, determining the second target node based on the second priority value corresponding to each node in the at least one second node includes:
获取与所述至少一个第二节点中的每个节点对应的第三参数;所述第三参数表征第二节点与所述待转码视频的流畅度相关的属性参数;Obtain a third parameter corresponding to each node in the at least one second node; the third parameter represents an attribute parameter of the second node related to the fluency of the video to be transcoded;
确定与所述第三参数对应的第四参数;所述第四参数表征所述第三参数对 所述待转码视频的流畅度的影响参数;Determine a fourth parameter corresponding to the third parameter; the fourth parameter represents the third parameter pair Parameters that influence the smoothness of the video to be transcoded;
基于所述第三参数和所述第四参数,确定所述至少一个第二节点中的每个节点对应的第二优先值;Based on the third parameter and the fourth parameter, determine a second priority value corresponding to each node in the at least one second node;
将最大的所述第二优先值对应的第二节点作为所述第二目标节点。The second node corresponding to the largest second priority value is used as the second target node.
本实施例中,所述第三参数可以根据实际情况确定,在此不做限定。作为一种示例,所述第三参数可以是所述算力网络的所述算力网络的终端层、边缘层或云层中各个节点的性能、所述算力网络的终端层、边缘层或云层中各个节点的负载以及所述算力网络的终端层、边缘层或云层中各个节点的运输成本中任意一个或多个参数。In this embodiment, the third parameter can be determined according to actual conditions and is not limited here. As an example, the third parameter can be any one or more parameters of the performance of each node in the terminal layer, edge layer or cloud layer of the computing network, the load of each node in the terminal layer, edge layer or cloud layer of the computing network, and the transportation cost of each node in the terminal layer, edge layer or cloud layer of the computing network.
所述第四参数可以根据实际情况确定,在此不做限定。作为一种示例,所述第四参数可以是所述算力网络的终端层、边缘层或云层中各个节点的性能的影响参数、所述算力网络的终端层、边缘层或云层中各个节点的负载的影响参数以及所述算力网络的终端层、边缘层或云层中各个节点的运输成本的影响参数中任意一个或多个影响参数。The fourth parameter can be determined according to actual conditions and is not limited here. As an example, the fourth parameter may be a parameter that affects the performance of each node in the terminal layer, edge layer or cloud layer of the computing power network, and each node in the terminal layer, edge layer or cloud layer of the computing power network. Any one or more of the influencing parameters of the load and the influencing parameters of the transportation cost of each node in the terminal layer, edge layer or cloud layer of the computing power network.
所述基于所述第三参数和所述第四参数,确定所述至少一个第二节点中的每个节点对应的第二优先值可以为,基于所述第三参数和所述第四参数的乘积进行加和,得到所述至少一个第二节点中的每个节点对应的第二优先值。Determining the second priority value corresponding to each node in the at least one second node based on the third parameter and the fourth parameter may be, based on the third parameter and the fourth parameter The products are added together to obtain the second priority value corresponding to each node in the at least one second node.
在一些实施例中,所述基于所述至少一个第二节点中的每个节点对应的第二优先值确定第二目标节点可以为,基于所述至少一个第二节点中的每个节点对应的第二优先值确定所述待转码视频的流畅度;将最大的所述第二优先值对应的所述待转码视频的流畅度作为第三最优流畅度;将所述第三最优流畅度对应的第二节点作为所述第二目标节点。In some embodiments, determining the second target node based on the second priority value corresponding to each node in the at least one second node may be based on the second priority value corresponding to each node in the at least one second node. The second priority value determines the fluency of the video to be transcoded; the fluency of the video to be transcoded corresponding to the largest second priority value is regarded as the third optimal fluency; the third optimal The second node corresponding to the fluency serves as the second target node.
在本公开的一种可选实施例中,所述利用所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频,包括:In an optional embodiment of the present disclosure, using the second target node to perform offline transcoding on the video to be transcoded to obtain the second video after offline transcoding includes:
在所述第二目标节点在所述算力网络的云层或边缘层中的情况下,确定对所述待转码视频进行离线转码的第一调度方式;When the second target node is in the cloud layer or edge layer of the computing power network, determine a first scheduling method for offline transcoding of the video to be transcoded;
基于所述第一调度方式,通过所述第二目标节点对所述待转码视频进行离 线转码,得到离线转码后的第二视频。Based on the first scheduling method, the video to be transcoded is detached through the second target node. Online transcoding to obtain the second video after offline transcoding.
本实施例中,所述第一调度方式可以根据实际情况确定,在此不做限定。作为一种示例,所述第一调度方式可以是使用k8s(Kubernetes)做集群的计算调度。In this embodiment, the first scheduling method can be determined according to actual conditions, and is not limited here. As an example, the first scheduling method may be to use k8s (Kubernetes) for cluster computing scheduling.
所述基于所述第一调度方式,通过所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频可以为,基于所述云层或边缘层的k8s创建子调度单位(pod);通过所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频。Based on the first scheduling method, the video to be transcoded is offline transcoded through the second target node to obtain the second video after offline transcoding, which may be k8s based on the cloud layer or edge layer. Create a sub-scheduling unit (pod); perform offline transcoding on the video to be transcoded through the second target node to obtain the second video after offline transcoding.
在本公开的一种可选实施例中,所述利用所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频,包括:In an optional embodiment of the present disclosure, using the second target node to perform offline transcoding on the video to be transcoded to obtain the second video after offline transcoding includes:
在所述第二目标节点在所述算力网络的终端层中的情况下,确定对所述待转码视频进行离线转码的第二调度方式;When the second target node is in the terminal layer of the computing power network, determine a second scheduling method for offline transcoding of the video to be transcoded;
基于所述第二调度方式,通过所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频。Based on the second scheduling method, the video to be transcoded is offline transcoded through the second target node to obtain the second video after offline transcoding.
本实施例中,所述第二调度方式可以根据实际情况确定,在此不做限定。作为一种示例,所述第二调度方式可以是使用轻量级k3s做计算调度。In this embodiment, the second scheduling method can be determined according to actual conditions and is not limited here. As an example, the second scheduling method may be to use lightweight k3s for computing scheduling.
所述基于所述第二调度方式,通过所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频可以为,基于所述终端层的k3s创建子调度单位;通过所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频。Based on the second scheduling method, the video to be transcoded is offline transcoded through the second target node to obtain the second video after offline transcoding, which can be: a sub-scheduling unit is created based on the k3s of the terminal layer; the video to be transcoded is offline transcoded through the second target node to obtain the second video after offline transcoding.
在本公开的一种可选实施例中,所述方法还包括:In an optional embodiment of the present disclosure, the method further includes:
获取所述算力网络的终端层进行调度的第一算力;Obtaining a first computing power for scheduling by a terminal layer of the computing power network;
获取对所述待转码视频进行转码的第二算力;Obtain the second computing power to transcode the video to be transcoded;
基于所述第一算力和所述第二算力,确定所述终端层的收益参数。Based on the first computing power and the second computing power, a revenue parameter of the terminal layer is determined.
本实施例中,所述第一算力可以根据实际情况确定,在此不做限定。作为一种示例,所述第一算力可以是所述算力网络的终端层被所述算力网络进行调度贡献的算力。 In this embodiment, the first computing power can be determined according to actual conditions and is not limited here. As an example, the first computing power may be the computing power contributed by scheduling of the computing power network by the terminal layer of the computing power network.
所述第二算力可以根据实际情况确定,在此不做限定。作为一种示例,所述第二算力可以是所述算力网络的终端层采集的待转码视频被所述算力网络进行转码消耗的算力。The second computing power can be determined according to actual conditions and is not limited here. As an example, the second computing power may be the computing power consumed by the computing power network for transcoding the video to be transcoded collected by the terminal layer of the computing power network.
所述基于所述第一算力和所述第二算力,确定所述终端层的收益参数可以为,基于所述第一算力和所述第二算力进行求差,得到所述终端层的收益参数。Determining the revenue parameter of the terminal layer based on the first computing power and the second computing power may be: performing a difference based on the first computing power and the second computing power to obtain the terminal The income parameters of the layer.
为了方便理解本公开实施例,以下以基于算力网络的视频转码方法应用于一种面向视频转码的算力网络服务系统为例进行说明。In order to facilitate understanding of the embodiments of the present disclosure, the following description takes the video transcoding method based on the computing power network applied to a computing power network service system for video transcoding as an example.
图3为本公开实施例基于算力网络的视频转码方法转码系统架构示意图,如图3所示,整个算力网络服务系统分为三个层级,分别是终端层、边缘层和云层。其中,终端层可以是源端;边缘层可以是边缘计算层;云层可以是云计算中心层。由这三个层级的计算、存储、网络资源构成了统一管理、统一调度,同时又保证分工明确的统一算力网络,最高效的完成视频在线转码和离线转码的流程。Figure 3 is a schematic diagram of the transcoding system architecture of the video transcoding method based on the computing power network according to an embodiment of the present disclosure. As shown in Figure 3, the entire computing power network service system is divided into three layers, namely the terminal layer, the edge layer and the cloud layer. Among them, the terminal layer can be the source layer; the edge layer can be the edge computing layer; and the cloud layer can be the cloud computing center layer. These three levels of computing, storage, and network resources form a unified computing network with unified management, unified scheduling, and clear division of labor to complete the process of online and offline video transcoding in the most efficient manner.
流程一:在线转码流程。Process 1: Online transcoding process.
与以云计算为中心的在线转码流程不同。基于算力网络的在线转码主要依赖终端层和边缘层的边缘节点。图4为本公开实施例基于算力网络的视频转码方法在线转码实现流程示意图,如图4所示为视频接入和播放的流程。Unlike cloud-centric online transcoding processes. Online transcoding based on computing power network mainly relies on edge nodes at the terminal layer and edge layer. Figure 4 is a schematic diagram of the online transcoding implementation process of the video transcoding method based on the computing power network according to the embodiment of the present disclosure. Figure 4 shows the process of video access and playback.
在线转码包括推流和播放两个阶段。终端层选择最合适的边缘层的边缘节点进行推流或上传,待转码视频在边缘节点进行在线转码后,转码成适合各种设备播放的视频格式。Online transcoding includes two stages: streaming and playback. The terminal layer selects the most appropriate edge node of the edge layer for streaming or uploading. After the video to be transcoded is online transcoded at the edge node, it is transcoded into a video format suitable for playback on various devices.
影响直播用户体验的有两个核心指标。第一:延迟,也就是从播放源到播放端的时间延迟。第二:卡顿,是指视频播放过程中出现画面滞帧,让人们明显感觉到“卡”,单位时间内的播放卡顿次数统计称之为卡顿率。There are two core indicators that affect live broadcast user experience. First: delay, which is the time delay from the playback source to the playback end. Second: Stuttering refers to the frame lag during video playback, which makes people obviously feel "stuck". The statistics of the number of playback stutters per unit time is called the stuttering rate.
而影响以上两个核心指标的参数主要有三个。第一:终端层与边缘层的各个边缘节点的距离。一般来说,距离越长,延迟越大,产生卡顿的可能性越高。第二:边缘层的边缘节点的性能。一般来说,边缘节点的性能越好,延迟越小,产生卡顿的可能性越低。第三:边缘层的边缘节点的负载,一般来说,边缘节 点的负载越高,延迟越小,产生卡顿的可能性越低。There are three main parameters that affect the above two core indicators. First: the distance between the terminal layer and each edge node of the edge layer. Generally speaking, the longer the distance, the greater the delay and the higher the possibility of lagging. Second: the performance of edge nodes in the edge layer. Generally speaking, the better the performance of the edge node, the smaller the delay, and the lower the possibility of lag. Third: The load of edge nodes in the edge layer. Generally speaking, edge nodes The higher the load on the point, the smaller the delay and the lower the possibility of lagging.
第一阶段:推流阶段或上传阶段,在推流或上传阶段前,依次从边缘层的各个边缘节点获取这三个参数。The first stage: the push stage or the upload stage. Before the push or upload stage, these three parameters are obtained from each edge node of the edge layer in turn.
通常来讲,距离越远,传输成本越高,延迟和流畅度也越差。节点性能越高,转码能力越强,延迟和流畅度越强。而节点的负载越高,转码能力越弱,延迟和流畅度越弱。Generally speaking, the farther the distance, the higher the transmission cost, and the worse the delay and smoothness. The higher the node performance, the stronger the transcoding capability, and the stronger the latency and fluency. The higher the load on the node, the weaker the transcoding capability, the weaker the latency and fluency.
第一步:计算用户的体验值E1,用户的体验值E1的计算方法如式(1)所示,
E1=α*delay+β*lag        (1)
Step 1: Calculate the user’s experience value E1. The calculation method of the user’s experience value E1 is as shown in Equation (1).
E1=α*delay+β*lag (1)
式(1)中,E1表示用户的体验值;delay表示延迟;lag表示卡帧率;α、β分别表示延迟和卡帧率的参数,可以用户根据实际情况确定。其中,用户的体验值E1与第二最优流畅度存在对应关系,第二最优流畅度可以是用户的播放体验级别,用户的体验值E1越大,表示用户的播放体验级别越差。In formula (1), E1 represents the user experience value; delay represents delay; lag represents the stuck frame rate; α and β represent the parameters of delay and stuck frame rate respectively, which can be determined by the user according to the actual situation. There is a corresponding relationship between the user's experience value E1 and the second optimal fluency. The second optimal fluency can be the user's playback experience level. The greater the user's experience value E1, the worse the user's playback experience level.
第二步:计算边缘节点的第一优先值E2,边缘节点的第一优先值E2的计算方法如式(2)所示,
E2=δ*d+ε*l+φ/p       (2)
Step 2: Calculate the first priority value E2 of the edge node. The calculation method of the first priority value E2 of the edge node is as shown in Equation (2).
E2=δ*d+ε*l+φ/p (2)
式(2)中,E2表示边缘节点的第一优先值;d表示源端与边缘层中边缘节点的距离;p表示边缘节点的性能;l表示边缘节点的负载;δ、ε、φ分别表示d、l和p对第一优先值的影响参数。其中,边缘节点的第一优先值E2与第一最优流畅度存在对应关系,第一最优流畅度可以是边缘节点的优先级别,边缘节点的第一优先值E2越大,表示边缘节点的优先级别越低。In formula (2), E2 represents the first priority value of the edge node; d represents the distance between the source end and the edge node in the edge layer; p represents the performance of the edge node; l represents the load of the edge node; δ, ε, and φ represent respectively The influence parameters of d, l and p on the first priority value. Among them, the first priority value E2 of the edge node has a corresponding relationship with the first optimal fluency. The first optimal fluency can be the priority level of the edge node. The larger the first priority value E2 of the edge node, the higher the priority of the edge node. The lower the priority.
第三步:对E2中的影响参数进行调优。Step 3: Tune the influencing parameters in E2.
边缘节点的第一优先值E2越大时,用户的体验值E1也越大。因为边缘节点的优先级别差时,如果选择该边缘节点,用户的播放体验级别也是差的。When the first priority value E2 of the edge node is larger, the user's experience value E1 is also larger. Because the priority level of the edge node is poor, if the edge node is selected, the user's playback experience level will also be poor.
设定边缘节点的第一优先值E2和用户的体验值E1之间满足某种线性关系如式(3)所示, It is assumed that the first priority value E2 of the edge node and the user's experience value E1 satisfy a certain linear relationship as shown in formula (3):
E1=λE2           (3)E1=λE2           (3)
代入得到通过大量数据进行利用现有的测试方法进行学习调优,得到这些参数δ、ε、φ值。其中,大量数据可以是包含E1、d、l、p的训练数据;现有的测试方法可以是模型训练方法。Substitute to get Through a large amount of data, existing testing methods are used for learning and tuning, and the values of these parameters δ, ε, and φ are obtained. Among them, a large amount of data can be training data including E1, d, l, and p; the existing testing method can be a model training method.
那么源端在选择边缘节点前,可以先得到d、p、l的值继而得到边缘节点的第一优先值E2值,边缘节点的第一优先值E2越大,那么用户的播放体验级别越差。Then before selecting the edge node, the source end can first obtain the values of d, p, and l and then obtain the first priority value E2 value of the edge node. The greater the first priority value E2 of the edge node, the worse the user's playback experience level will be. .
第四步:判断源端位置,对待连接的边缘节点进行切换处理。Step 4: Determine the source location and switch the edge node to be connected.
考虑到源端可能处在不断的移动当中,计算得到的边缘节点的第一优先值E2值也在不断变化。如果源端计算到当前的最优边缘节点已经不是之前所选择的边缘节点时,需要进行切换。由于切换需要有比较大的代价。因此需要当满足一定条件时才能切换。最终选择节点时遵循以下规则。Considering that the source may be constantly moving, the calculated first priority value E2 of the edge node is also constantly changing. If the source end calculates that the current optimal edge node is no longer the previously selected edge node, it needs to switch. Because switching requires a relatively large cost. Therefore, it needs to be switched when certain conditions are met. Follow the following rules when making the final selection of nodes.
1)计算当前接入边缘节点的第一优先值,当前接入边缘节点的第一优先值计算方法如式(4)所示,
E2o=δ*doo*lo+φ/po       (4)
1) Calculate the first priority value of the current access edge node. The calculation method of the first priority value of the current access edge node is as shown in Equation (4),
E2 o =δ*d oo *l o +φ/p o (4)
2)计算所有边缘节点中最小的第一优先值,所有边缘节点中最小的第一优先值计算方法如式(5)所示,
E2m=Min(δ*d+ε*l+φ/p)      (5)
2) Calculate the smallest first priority value among all edge nodes. The calculation method for the smallest first priority value among all edge nodes is as shown in Equation (5),
E2 m =Min(δ*d+ε*l+φ/p) (5)
3)确定最终选择的边缘节点,当终端层首次接入时,选择E2m对应的边缘节点,否则,计算切换参数θ,切换参数θ的计算方法如式(6)所示,
θ=(E2o-E2m)/E2o           (6)
3) Determine the final selected edge node. When the terminal layer accesses for the first time, select the edge node corresponding to E2 m . Otherwise, calculate the handover parameter θ. The calculation method of the handover parameter θ is as shown in Equation (6),
θ=(E2 o -E2 m )/E2 o (6)
式(6)中,θ表示切换节点对性能的提升比例。设定阈值,当θ大于阈值时,选择E2m对应的边缘节点,否则继续使用E2o对应的边缘节点。阈值可以用户根据实际情况确定。In equation (6), θ represents the performance improvement ratio of switching nodes. Set the threshold. When θ is greater than the threshold, select the edge node corresponding to E2 m , otherwise continue to use the edge node corresponding to E2 o . The threshold can be determined by the user based on the actual situation.
第二阶段:播放阶段,如果播放端距离上述用于转码的边缘节点距离最近,那么直接播放用于转码的边缘节点的视频。其中,播放端包括用户及转码机器。 如果播放端距离此用于转码的边缘节点较远,通过边边协同,以用于转码的边缘节点为源站,推流至距离用户最近的边缘节点,然后播放距离播放端最近的边缘节点的视频。通过这种方式,可以最大限度地拉近源端与播放端的距离,最大程度地降低延时。在边缘节点完整转码的在线视频,会通过边边协同缓存到各个边缘节点播放,用户通过内容分发网络(Content Delivery Network,CDN)播放时,会选择距离最近的边缘节点接入,最大限度地降低时延。The second stage: the playback stage. If the playback end is closest to the above-mentioned edge node used for transcoding, then the video of the edge node used for transcoding will be played directly. Among them, the playback end includes users and transcoding machines. If the playback end is far away from the edge node used for transcoding, through edge-to-edge collaboration, the edge node used for transcoding is used as the source station, the stream is pushed to the edge node closest to the user, and then the edge closest to the playback end is played. Node video. In this way, the distance between the source end and the playback end can be shortened to the greatest extent and the delay can be reduced to the greatest extent. Online videos that are completely transcoded at edge nodes will be cached and played on each edge node through edge-to-edge collaboration. When users play through the content delivery network (Content Delivery Network, CDN), they will choose the nearest edge node to access, maximizing the Reduce latency.
流程二:离线转码流程。Process 2: Offline transcoding process.
离线转码针对历史视频的录制的历史视频,通过离线转码的方式转码成不同的格式,方便不同的客户端(播放端)播放。离线转码对实时性的要求不高,但是对计算的要求很高,因此需要最大限度的利用云层、边缘层乃至终端层的计算资源。云层和边缘层相对集群规模较大,计算能力较强,可以使用k8s做集群的计算调度。各类终端层的计算能力有限,因此采用轻量级的K3s做计算调度。k3s是rancher开源的一个Kubernetes发行版,k3s相对k8s做了很多裁剪和优化,二进制程序不足50MB,占用资源更少,只需要512MB内存即可运行。因为k3s的以上优点,k3s可以应用在网页浏览器(Edge)、物联网(Internet of Things,IoT)、组织识别系统(Corporate Identity System,CIS)、处理器(Advanced RISC Machines,ARM)等场景中,可以对各类终端层的算力做统一协调与管控。Offline transcoding: Historical videos recorded for historical videos are transcoded into different formats through offline transcoding to facilitate playback by different clients (players). Offline transcoding does not have high requirements for real-time performance, but has high requirements for computing. Therefore, it is necessary to maximize the use of computing resources at the cloud layer, edge layer, and even terminal layer. The cloud layer and edge layer are relatively large in scale and have strong computing power. K8s can be used for cluster computing scheduling. The computing capabilities of various terminal layers are limited, so lightweight K3s is used for computing scheduling. k3s is a Kubernetes distribution open sourced by rancher. Compared with k8s, k3s has been greatly tailored and optimized. The binary program is less than 50MB, takes up less resources, and only requires 512MB of memory to run. Because of the above advantages of k3s, k3s can be used in web browsers (Edge), Internet of Things (IoT), corporate identification systems (Corporate Identity System, CIS), processors (Advanced RISC Machines, ARM) and other scenarios , which can coordinate and control the computing power of various terminal layers in a unified manner.
因此在算力网络内,形成了两级Kubernetes+一级k3s协同调度的格局,即云层和边缘层k8s做集群的计算调度,终端层采用轻量级的k3s做计算调度。混合使用Kubernetes和k3s,既可以在云层和边缘层更灵活地调度资源,又可以将终端层的算力纳入整个网络,最大化的利用整个网络内的资源。Therefore, within the computing power network, a two-level Kubernetes + one-level k3s collaborative scheduling pattern has been formed, that is, k8s at the cloud layer and edge layer does cluster computing scheduling, and the terminal layer uses lightweight k3s for computing scheduling. By mixing Kubernetes and k3s, resources can be more flexibly scheduled at the cloud and edge layers, and the computing power of the terminal layer can be incorporated into the entire network to maximize the use of resources within the entire network.
图5为本公开实施例基于算力网络的视频转码方法离线转码实现流程示意图,如图5所示为离线转码的整个流程图。FIG5 is a schematic diagram of the offline transcoding implementation process of the video transcoding method based on the computing power network according to an embodiment of the present disclosure. FIG5 is a whole flowchart of offline transcoding.
终端层采集视频以后,对于录制的历史视频,通过边缘层的边缘节点,上传至云层的对象存储。每个视频会关联对应的转码模板,其中,转码模板由终端层指定。算力网络服务系统根据转码模板和视频的参数,计算出所需要的算 力资源,然后创建离线转码任务。After the terminal layer collects the video, the recorded historical video is uploaded to the object storage of the cloud layer through the edge node of the edge layer. Each video is associated with a corresponding transcoding template, where the transcoding template is specified by the terminal layer. The computing power network service system calculates the required computing power based on the transcoding template and video parameters. human resources, and then create an offline transcoding task.
进行任务选择时考虑如下因素:Consider the following factors when making task selection:
第一:云层、边缘层、终端层三级网络中每个节点是否能满足算力要求。First: Whether each node in the three-level network of cloud layer, edge layer, and terminal layer can meet the computing power requirements.
第二:在满足算力要求的节点中,考虑云层、边缘层、终端层三级网络中每个节点的性能。设定三级网络中每个节点的性能的数值为p′,其影响因素为γ(可以用户根据实际情况确定)。Second: Among the nodes that meet the computing power requirements, consider the performance of each node in the three-level network of cloud layer, edge layer, and terminal layer. Set the value of the performance of each node in the three-level network as p′, and its influencing factor as γ (which can be determined by the user according to the actual situation).
第三:在满足算力要求的节点中,考虑云层、边缘层、终端层三级网络中每个节点的负载。设定三级网络中每个节点的负载的数值为l′,其影响因素为η(可以用户根据实际情况确定)。Third: Among the nodes that meet the computing power requirements, consider the load of each node in the three-level network of cloud layer, edge layer, and terminal layer. Set the value of the load of each node in the three-level network to l', and its influencing factor is η (which can be determined by the user according to actual conditions).
第四:在满足算力要求的节点中,考虑终端层到云层、边缘层、终端层三级网络中每个节点传输成本。设定三级网络中每个节点传输成本的数值为d′,设定其影响因素为λ(可以用户根据实际情况确定)。Fourth: Among the nodes that meet the computing power requirements, consider the transmission cost of each node in the three-level network from the terminal layer to the cloud layer, edge layer, and terminal layer. Set the value of the transmission cost of each node in the three-level network as d′, and set its influencing factor as λ (can be determined by the user according to the actual situation).
最终,三级网络中各个节点的第二优先值V=γp′+ηl′+λ/d′。Finally, the second priority value V of each node in the three-level network is V=γp′+ηl′+λ/d′.
其中,三级网络中各个节点的第二优先值V值与第三最优流畅度存在对应关系,第三一最优流畅度可以是三级网络中各个节点的优先级别,三级网络中各个节点的第二优先值V越大,表示三级网络中各个节点的优先级别越高。在符合条件的节点中选择V最大的节点作为最优节点。Among them, there is a corresponding relationship between the second priority value V value of each node in the three-level network and the third optimal fluency. The third optimal fluency can be the priority level of each node in the three-level network. Each node in the three-level network The larger the second priority value V of a node is, the higher the priority level of each node in the three-level network is. Select the node with the largest V among the nodes that meet the conditions as the optimal node.
计算出最优节点后,触发算力网络中对应的节点进行调度。如果最优节点在云层,则由云层的k8s创建pod。如果最优节点在边缘层,则由对应边缘层的k8s创建pod。如果最优节点在终端层,则由终端层的K3S创建pod。任务执行完成,将对应的pod销毁。After calculating the optimal node, the corresponding node in the computing power network is triggered for scheduling. If the optimal node is in the cloud layer, the pod is created by k8s in the cloud layer. If the optimal node is at the edge layer, the pod is created by k8s at the corresponding edge layer. If the optimal node is at the terminal layer, the pod is created by K3S at the terminal layer. After the task execution is completed, the corresponding pod will be destroyed.
在播放端的用户需要播放历史视频时,将云层存储的视频作为源站,通过边缘层各个边缘节点缓存和传输优化进行加速,提升各个播放端的用户的播放的体验。When users on the playback end need to play historical videos, the video stored in the cloud layer is used as the source station, and the cache and transmission optimization of each edge node in the edge layer are used to accelerate the playback experience of users on each playback end.
流程三:转码算力的管理与交易流程。Process 3: Management and transaction process of transcoding computing power.
与通常转码系统按照视频的大小与转码格式等计算方式不同。面向算力网 络服务系统支持按照算力的计费方式。每个终端层,既可以提供算力又会消耗算力。终端层注册到算力网络中,代表其成为算力网络的一个服务网格。终端层自身提供算力,又消耗算力。终端层所采集的视频需要在线转码、离线转码存入对象存储,代表终端层消耗算力。同时,终端层作为K3s的一个网格,可以被整个的算力网络调度,代表终端层可以贡献算力。算力网络服务系统有算力的管理模块,终端层每一次被调度,都可以作为算力的贡献,将贡献值计入。同时,终端层所采集的视频,消耗的在线转码算力与离线转码算力也会被记录。每个终端的最终收益(支出)计算方法如式(7)所示,
∑α1ct+β1mt-∑α2ct+β2mt-∑α3ct+β3mt         (7)
It is different from the usual transcoding system based on the calculation method of video size and transcoding format. For computing power network The network service system supports billing based on computing power. Each terminal layer can both provide computing power and consume computing power. The terminal layer is registered in the computing power network, which means it becomes a service grid of the computing power network. The terminal layer itself provides computing power and consumes computing power. Videos collected at the terminal layer need to be transcoded online and transcoded offline and stored in object storage, which represents the consumption of computing power by the terminal layer. At the same time, the terminal layer, as a grid of K3s, can be scheduled by the entire computing power network, which means that the terminal layer can contribute computing power. The computing power network service system has a computing power management module. Every time the terminal layer is scheduled, it can be regarded as a contribution to the computing power and the contribution value will be included. At the same time, the online transcoding computing power and offline transcoding computing power consumed by the video collected at the terminal layer will also be recorded. The final revenue (expenditure) of each terminal is calculated as shown in Equation (7),
∑α 1 ct+β 1 mt-∑α 2 ct+β 2 mt-∑α 3 ct+β 3 mt (7)
式(7)中:c代表消耗cpu的核数;m代表消耗的内存(单位g);t代表使用的时间;α1、β1代表终端贡献的算力的参数;α2、β2代表消耗其所采集的视频在线转码过程中消耗的算力的参数;α3、β3代表消耗其所采集的视频离线转码过程中消耗的算力的参数。In formula (7): c represents the number of cores consuming the CPU; m represents the memory consumed (unit g); t represents the time of use; α 1 and β 1 represent the parameters of the computing power contributed by the terminal; α 2 and β 2 represent Parameters that consume the computing power consumed in the online transcoding process of the collected videos; α 3 and β 3 represent parameters that consume the computing power consumed in the offline transcoding process of the collected videos.
本公开实施例提供一种基于算力网络实现在线视频转码和离线视频转码的整体设计方案。针对实时性要求高的在线转码,在上传阶段,引入最优边缘节点的计算公式,通过利用现有的测试方法进行学习调优,选择最优的边缘节点,在边缘层的边缘节点完成在线转码。播放阶段,通过边边协同,推送到离客户最近的边缘节点实现实时播放。针对实时性要求不高但对算力要求很高的离线转码,协调云层、边缘层、终端层三级资源,通过k8s+k3s进行调度,通过标签的方式指定pod,选择最优的节点进行调度。基于算力的管理与付费方式,终端层既是算力的贡献者也是算力的消耗者。The embodiment of the present disclosure provides an overall design solution for realizing online video transcoding and offline video transcoding based on computing power network. For online transcoding with high real-time requirements, in the upload stage, the calculation formula of the optimal edge node is introduced, and the existing test method is used for learning and optimization, the optimal edge node is selected, and the online process is completed at the edge node of the edge layer. Transcoding. In the playback stage, through edge-side collaboration, the content is pushed to the edge node closest to the customer to achieve real-time playback. For offline transcoding that has low real-time requirements but high computing power requirements, coordinate three-level resources at the cloud layer, edge layer, and terminal layer, schedule through k8s+k3s, specify pods through labels, and select the optimal node for execution. Scheduling. Based on the management and payment methods of computing power, the terminal layer is both a contributor and a consumer of computing power.
本公开实施例相对于基于云计算的在线转码方式,基于算力网络的转码方式,能够降低延时,提升播放的流畅度。相对于基于云计算的离线转码方式,基于算力网络的离线转码方式,能够最大限度地利用资源,提升资源的利用率。基于算力的管理与计费方式,可以从技术上最大程度地降低转码成本,提升任务的执行效率,可以实现对视频转码服务提供方和购买方的双赢。 Compared with the online transcoding method based on cloud computing, the transcoding method based on computing power network can reduce the delay and improve the smoothness of playback. Compared with the offline transcoding method based on cloud computing, the offline transcoding method based on the computing power network can maximize the use of resources and improve resource utilization. Management and billing methods based on computing power can technically reduce transcoding costs to the greatest extent, improve task execution efficiency, and achieve a win-win situation for video transcoding service providers and buyers.
本公开实施例通过云层、边缘层、终端层构成的三级算力网络。针对在线转码,通过直接在边缘转码和边边协同,可以提高上传与下载的效率。针对离线转码,可以最大限度地调度整个系统内的算力资源。引入基于算力的计费,接入的终端层既是算力的消耗者又是算力的贡献者,可以实现算力提供方和购买方的双赢。The embodiment of the present disclosure uses a three-level computing power network composed of cloud layer, edge layer, and terminal layer. For online transcoding, the efficiency of uploading and downloading can be improved through direct transcoding at the edge and edge-to-edge collaboration. For offline transcoding, computing resources within the entire system can be scheduled to the maximum extent. By introducing computing power-based billing, the connected terminal layer is both a consumer and a contributor of computing power, which can achieve a win-win situation for computing power providers and buyers.
本公开实施例提供一种基于算力网络的视频转码装置,图6为本公开实施例基于算力网络的视频转码装置的组成结构示意图,如图6所示,所述装置600包括:An embodiment of the present disclosure provides a video transcoding device based on a computing power network. Figure 6 is a schematic structural diagram of a video transcoding device based on a computing power network according to an embodiment of the disclosure. As shown in Figure 6, the device 600 includes:
第一确定模块601,配置为确定待转码视频对应的算力资源;The first determination module 601 is configured to determine the computing resources corresponding to the video to be transcoded;
第二确定模块602,配置为在满足所述算力资源的至少一个节点中,基于所述至少一个节点中的每个节点对应的优先值确定目标节点;The second determination module 602 is configured to determine the target node based on the priority value corresponding to each node in the at least one node among at least one node that meets the computing power resources;
转码模块603,配置为利用所述目标节点对所述待转码视频进行转码,得到转码后的视频。The transcoding module 603 is configured to use the target node to transcode the video to be transcoded to obtain a transcoded video.
在其他的实施例中,所述转码包括在线转码,所述第二确定模块602还包括:第一确定单元和第二确定单元;其中,In other embodiments, the transcoding includes online transcoding, and the second determination module 602 further includes: a first determination unit and a second determination unit; wherein,
所述第一确定单元,配置为在所述算力网络中确定至少一个第一节点;其中,所述第一节点表征在所述算力网络的边缘层中满足所述算力资源的任一节点;The first determination unit is configured to determine at least one first node in the computing power network; wherein the first node represents any of the computing power resources in the edge layer of the computing power network. node;
所述第二确定单元,配置为基于所述至少一个第一节点中的每个节点对应的第一优先值确定第一目标节点;The second determining unit is configured to determine the first target node based on the first priority value corresponding to each node in the at least one first node;
所述转码模块603,还配置为利用所述第一目标节点对所述待转码视频进行在线转码,得到在线转码后的第一视频。The transcoding module 603 is also configured to use the first target node to perform online transcoding on the video to be transcoded to obtain the first video after online transcoding.
在其他的实施例中,所述第二确定单元,还配置为获取与所述至少一个第一节点中的每个节点对应的第一参数;所述第一参数表征所述第一节点与所述待转码视频的流畅度相关的属性参数;基于预设模型确定与所述第一参数对应的第二参数;所述第二参数表征所述第一参数对所述待转码视频的流畅度的影响参数;基于所述第一参数和所述第二参数,确定所述至少一个第一节点中的 每个节点对应的第一优先值;将最小的所述第一优先值对应的第一节点作为所述第一目标节点。In other embodiments, the second determining unit is further configured to obtain a first parameter corresponding to each node in the at least one first node; the first parameter represents the relationship between the first node and the Describe attribute parameters related to the smoothness of the video to be transcoded; determine a second parameter corresponding to the first parameter based on a preset model; the second parameter represents the smoothness of the first parameter to the video to be transcoded degree of influence parameters; based on the first parameter and the second parameter, determine the at least one first node The first priority value corresponding to each node; the first node corresponding to the smallest first priority value is used as the first target node.
在其他的实施例中,所述装置600还包括:构建模块和训练模块;其中,In other embodiments, the device 600 further includes: a building module and a training module; wherein,
所述构建模块,配置为基于与所述至少一个第一节点中的每个节点相关的第一样本参数和第二样本参数,构建训练样本集合;The building module is configured to construct a training sample set based on the first sample parameter and the second sample parameter related to each node in the at least one first node;
所述训练模块,配置为以所述训练样本集合包括的第一样本参数为输入,以所述训练样本集合包括的第二样本参数为输出,对第一模型进行训练,得到所述预设模型。The training module is configured to use the first sample parameter included in the training sample set as input, and use the second sample parameter included in the training sample set as output to train the first model to obtain the preset Model.
在其他的实施例中,所述第二确定单元,还配置为在所述基于所述至少一个第一节点中的每个节点对应的第一优先值确定第一目标节点之后,确定所述第一目标节点的第一当前优先值;确定所述至少一个第一节点中每个节点对应的第二当前优先值;确定所述第二当前优先值中最小的第二当前优先值;在所述第一当前优先值和所述最小的第二当前优先值满足预设条件的情况下,将所述最小的第二当前优先值对应的第一节点更新为所述第一目标节点。In other embodiments, the second determining unit is further configured to determine the first target node based on the first priority value corresponding to each node in the at least one first node. The first current priority value of a target node; determining the second current priority value corresponding to each node in the at least one first node; determining the smallest second current priority value among the second current priority values; in the When the first current priority value and the minimum second current priority value meet the preset conditions, the first node corresponding to the minimum second current priority value is updated as the first target node.
在其他的实施例中,所述转码模块603,还配置为利用所述第一目标节点对所述待转码视频进行在线转码,得到在线转码后的第一视频之后,在所述第一目标节点距离用户最近的情况下,通过所述第一目标节点对所述第一视频进行播放。In other embodiments, the transcoding module 603 is further configured to use the first target node to perform online transcoding on the video to be transcoded, and after obtaining the online transcoded first video, after the When the first target node is closest to the user, the first video is played through the first target node.
在其他的实施例中,所述转码包括离线转码,所述第二确定模块602还包括:第三确定单元和第四确定单元;其中,In other embodiments, the transcoding includes offline transcoding, and the second determination module 602 further includes: a third determination unit and a fourth determination unit; wherein,
所述第三确定单元,配置为在所述算力网络中确定至少一个第二节点;其中,所述第二节点表征在所述算力网络的终端层、边缘层或云层中满足所述算力资源的任一节点;The third determination unit is configured to determine at least one second node in the computing power network; wherein the second node represents a condition that satisfies the computing power requirements in the terminal layer, edge layer or cloud layer of the computing power network. Any node of human resources;
所述第四确定单元,配置为基于所述至少一个第二节点中的每个节点对应的第二优先值确定第二目标节点;The fourth determination unit is configured to determine the second target node based on the second priority value corresponding to each node in the at least one second node;
所述转码模块603,还配置为利用所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频。 The transcoding module 603 is also configured to use the second target node to perform offline transcoding on the video to be transcoded to obtain the second video after offline transcoding.
在其他的实施例中,所述第四确定单元,还配置为获取与所述至少一个第二节点中的每个节点对应的第三参数;所述第三参数表征第二节点与所述待转码视频的流畅度相关的属性参数;确定与所述第三参数对应的第四参数;所述第四参数表征所述第三参数对所述待转码视频的流畅度的影响参数;基于所述第三参数和所述第四参数,确定所述至少一个第二节点中的每个节点对应的第二优先值;将最大的所述第二优先值对应的第二节点作为所述第二目标节点。In other embodiments, the fourth determining unit is further configured to obtain a third parameter corresponding to each node in the at least one second node; the third parameter represents the relationship between the second node and the to-be-determined node. Attribute parameters related to the fluency of the transcoded video; determine a fourth parameter corresponding to the third parameter; the fourth parameter represents the influence parameter of the third parameter on the fluency of the video to be transcoded; based on The third parameter and the fourth parameter determine the second priority value corresponding to each node in the at least one second node; the second node corresponding to the largest second priority value is used as the second priority value. Two target nodes.
在其他的实施例中,所述转码模块603,还配置为在所述第二目标节点在所述算力网络的云层或边缘层中的情况下,确定对所述待转码视频进行离线转码的第一调度方式;基于所述第一调度方式,通过所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频。In other embodiments, the transcoding module 603 is further configured to determine to perform offline processing of the video to be transcoded when the second target node is in the cloud layer or edge layer of the computing power network. A first scheduling method for transcoding; based on the first scheduling method, the video to be transcoded is offline transcoded through the second target node to obtain the second video after offline transcoding.
在其他的实施例中,所述转码模块603,还配置为在所述第二目标节点在所述算力网络的终端层中的情况下,确定对所述待转码视频进行离线转码的第二调度方式;基于所述第二调度方式,通过所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频。In other embodiments, the transcoding module 603 is further configured to determine to perform offline transcoding on the video to be transcoded when the second target node is in the terminal layer of the computing power network. The second scheduling method; based on the second scheduling method, perform offline transcoding on the video to be transcoded through the second target node to obtain the second video after offline transcoding.
在其他的实施例中,所述装置600还包括:第一获取模块、第二获取模块和第三确定模块;其中,In other embodiments, the device 600 further includes: a first acquisition module, a second acquisition module and a third determination module; wherein,
所述第一获取模块,配置为获取所述算力网络的终端层进行调度的第一算力;The first acquisition module is configured to acquire the first computing power scheduled by the terminal layer of the computing power network;
所述第二获取模块,配置为获取对所述待转码视频进行转码的第二算力;The second acquisition module is configured to acquire the second computing power for transcoding the video to be transcoded;
所述第三确定模块,配置为基于所述第一算力和所述第二算力,确定所述终端层的收益参数。The third determination module is configured to determine the revenue parameter of the terminal layer based on the first computing power and the second computing power.
以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本公开装置实施例中未披露的技术细节,请参照本公开方法实施例的描述而理解。The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiments of the present disclosure, please refer to the description of the method embodiments of the present disclosure for understanding.
需要说明的是,本公开实施例中,如果以软件功能模块的形式实现上述的基于算力网络的视频转码方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开实施例的技术实施 例本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台基于算力网络的视频转码设备(可以是个人计算机、服务器、或者网络设备等)执行本公开各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本公开实施例不限制于任何特定的硬件和软件结合。It should be noted that in the embodiments of the present disclosure, if the above-mentioned video transcoding method based on computing power network is implemented in the form of a software function module and is sold or used as an independent product, it can also be stored in a computer-readable in the storage medium. Based on this understanding, the technical implementation of the embodiments of the present disclosure For example, the part that essentially contributes to the existing technology can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions to enable a video transcoding system based on a computing power network. The device (which may be a personal computer, a server, a network device, etc.) executes all or part of the methods described in various embodiments of the present disclosure. The aforementioned storage media include: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), magnetic disk or optical disk and other various media that can store program codes. As such, disclosed embodiments are not limited to any specific combination of hardware and software.
对应地,本公开实施例提供一种基于算力网络的视频转码设备,包括存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现上述任一项所述的方法。Correspondingly, embodiments of the present disclosure provide a video transcoding device based on a computing power network, including a memory and a processor. The memory stores a computer program that can be run on the processor. When the processor executes the program, , implement any of the above methods.
对应地,本公开实施例提供一种存储介质,所述存储介质存储有可执行指令,当所述可执行指令被处理器执行时,实现上述任一项所述的方法。Correspondingly, embodiments of the present disclosure provide a storage medium that stores executable instructions. When the executable instructions are executed by a processor, any one of the methods described above is implemented.
这里需要指出的是:以上存储介质和设备实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本公开存储介质和设备实施例中未披露的技术细节,请参照本公开方法实施例的描述而理解。It should be pointed out here that the above description of the storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of the present disclosure, please refer to the description of the method embodiments of the present disclosure for understanding.
需要说明的是,图7为本公开实施例基于算力网络的视频转码设备的一种硬件实体结构示意图,如图7所示,该视频转码设备700的硬件实体包括:处理器701和存储器703,可选地,所述视频转码设备700还可以包括通信接口702。It should be noted that Figure 7 is a schematic structural diagram of a hardware entity of a video transcoding device based on a computing power network according to an embodiment of the present disclosure. As shown in Figure 7 , the hardware entity of the video transcoding device 700 includes: a processor 701 and Memory 703. Optionally, the video transcoding device 700 may also include a communication interface 702.
可以理解,存储器703可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、磁性随机存取存储器(FRAM,ferromagnetic random access memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory); 磁表面存储器可以是磁盘存储器或磁带存储器。易失性存储器可以是随机存取存储器(RAM,Random Access Memory),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(SRAM,Static Random Access Memory)、同步静态随机存取存储器(SSRAM,Synchronous Static Random Access Memory)、动态随机存取存储器(DRAM,Dynamic Random Access Memory)、同步动态随机存取存储器(SDRAM,Synchronous Dynamic Random Access Memory)、双倍数据速率同步动态随机存取存储器(DDRSDRAM,Double Data Rate Synchronous Dynamic Random Access Memory)、增强型同步动态随机存取存储器(ESDRAM,Enhanced Synchronous Dynamic Random Access Memory)、同步连接动态随机存取存储器(SLDRAM,SyncLink Dynamic Random Access Memory)、直接内存总线随机存取存储器(DRRAM,Direct Rambus Random Access Memory)。本公开实施例描述的存储器703旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory 703 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM, Read Only Memory), a programmable read-only memory (PROM, Programmable Read-Only Memory), an erasable programmable read-only memory (EPROM, Erasable Programmable Read-Only Memory). Only Memory), Electrically Erasable Programmable Read-Only Memory (EEPROM, Electrically Erasable Programmable Read-Only Memory), Magnetic Random Access Memory (FRAM, ferromagnetic random access memory), Flash Memory, Magnetic Surface Memory , CD, or CD-ROM (Compact Disc Read-Only Memory); Magnetic surface storage can be disk storage or tape storage. The volatile memory may be random access memory (RAM), which is used as an external cache. By way of illustration, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory Memory (DRAM, Dynamic Random Access Memory), synchronous dynamic random access memory (SDRAM, Synchronous Dynamic Random Access Memory), double data rate synchronous dynamic random access memory (DDRSDRAM, Double Data Rate Synchronous Dynamic Random Access Memory), enhanced Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), Direct Rambus Random Access Memory (DRRAM) ). The memory 703 described in embodiments of the present disclosure is intended to include, but is not limited to, these and any other suitable types of memory.
上述本公开实施例揭示的方法可以应用于处理器701中,或者由处理器701实现。处理器701可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器701中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器701可以是通用处理器、数字信号处理器(DSP,Digital Signal Processor),或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。处理器701可以实现或者执行本公开实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本公开实施例所公开的方法的步骤,可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储介质中,该存储介质位于存储器703,处理器701读取存储器703中的信息,结合其硬件完成前述方法的步骤。The methods disclosed in the above embodiments of the present disclosure can be applied to the processor 701 or implemented by the processor 701 . The processor 701 may be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the above method can be completed by instructions in the form of hardware integrated logic circuits or software in the processor 701 . The above-mentioned processor 701 can be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 701 can implement or execute the disclosed methods, steps and logical block diagrams in the embodiments of the present disclosure. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly implemented by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, and the storage medium is located in the memory 703. The processor 701 reads the information in the memory 703, and completes the steps of the foregoing method in combination with its hardware.
在示例性实施例中,视频转码设备可以被一个或多个应用专用集成电路(ASIC,Application Specific Integrated Circuit)、DSP、可编程逻辑器件(PLD,Programmable Logic Device)、复杂可编程逻辑器件(CPLD,Complex  Programmable Logic Device)、现场可编程门阵列(FPGA,Field-Programmable Gate Array)、通用处理器、控制器、微控制器(MCU,Micro Controller Unit)、微处理器(Microprocessor)、或其他电子元件实现,用于执行前述方法。In an exemplary embodiment, the video transcoding device may be one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices ( CPLD, Complex Programmable Logic Device), Field-Programmable Gate Array (FPGA, Field-Programmable Gate Array), general-purpose processor, controller, microcontroller (MCU, Micro Controller Unit), microprocessor (Microprocessor), or other electronic components , used to execute the aforementioned method.
在本公开所提供的几个实施例中,应该理解到,所揭露的方法和装置,可以通过其他的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个观测量,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其他形式的。In the several embodiments provided in this disclosure, it should be understood that the disclosed methods and devices can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components may be combined, or can be integrated into another observation, or some features can be ignored, or not implemented. In addition, the communication connection between the various components shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, and may be electrical, mechanical or other forms.
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例的目的。The units described above as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of this embodiment.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(ROM,Read-Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), magnetic disks or optical disks, and other media that can store program codes.
或者,本公开实施例上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开实施例的技术实施例本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台视频转码设备(可以是个人计算机、服务器、或者网络设备等)执行本公开各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。 Alternatively, if the above-mentioned integrated units in the embodiments of the present disclosure are implemented in the form of software functional units and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical embodiments of the embodiments of the present disclosure can be embodied in the form of software products in nature or in part that contribute to the existing technology. The computer software products are stored in a storage medium and include a number of instructions. So that a video transcoding device (which can be a personal computer, a server, a network device, etc.) executes all or part of the methods described in various embodiments of the present disclosure. The aforementioned storage media include: mobile storage devices, ROMs, magnetic disks or optical disks and other media that can store program codes.
本公开实施例中记载的基于算力网络的视频转码方法、装置、监测器和存储介质只以本公开所述实施例为例,但不仅限于此,只要涉及到该基于算力网络的视频转码方法、装置、监测器和存储介质均在本公开的保护范围。The video transcoding method, device, monitor and storage medium based on the computing power network recorded in the embodiments of the disclosure are only examples of the embodiments of the disclosure, but are not limited thereto. As long as the video transcoding based on the computing power network is involved, The transcoding method, device, monitor and storage medium are all within the protection scope of the present disclosure.
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本公开的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本公开的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本公开实施例的实施过程构成任何限定。上述本公开实施例序号仅仅为了描述,不代表实施例的优劣。It will be understood that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic associated with the embodiment is included in at least one embodiment of the present disclosure. Thus, the appearances of "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that in various embodiments of the present disclosure, the size of the sequence numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its functions and internal logic, and should not be used in the embodiments of the present disclosure. The implementation process constitutes any limitation. The above serial numbers of the embodiments of the present disclosure are only for description and do not represent the advantages and disadvantages of the embodiments.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this document, the terms "comprising", "comprises" or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device that includes a series of elements not only includes those elements, It also includes other elements not expressly listed or inherent in the process, method, article or apparatus. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article or apparatus that includes that element.
以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以所述权利要求的保护范围为准。 The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure. should be covered by the protection scope of this disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims (14)

  1. 一种基于算力网络的视频转码方法,所述方法包括:A video transcoding method based on computing power network, the method includes:
    确定待转码视频对应的算力资源;Determine the computing resources corresponding to the video to be transcoded;
    在满足所述算力资源的至少一个节点中,基于所述至少一个节点中的每个节点对应的优先值确定目标节点;In at least one node that meets the computing power resources, determine the target node based on the priority value corresponding to each node in the at least one node;
    利用所述目标节点对所述待转码视频进行转码,得到转码后的视频。The target node is used to transcode the video to be transcoded to obtain a transcoded video.
  2. 根据权利要求1所述的方法,其中,所述转码包括在线转码,所述方法还包括:The method of claim 1, wherein the transcoding includes online transcoding, and the method further includes:
    在所述算力网络中确定至少一个第一节点;其中,所述第一节点表征在所述算力网络的边缘层中满足所述算力资源的任一节点;Determine at least one first node in the computing power network; wherein the first node represents any node that meets the computing power resources in the edge layer of the computing power network;
    基于所述至少一个第一节点中的每个节点对应的第一优先值确定第一目标节点;Determine the first target node based on the first priority value corresponding to each node in the at least one first node;
    利用所述第一目标节点对所述待转码视频进行在线转码,得到在线转码后的第一视频。The first target node is used to perform online transcoding on the video to be transcoded to obtain the first video after online transcoding.
  3. 根据权利要求2所述的方法,其中,所述基于所述至少一个第一节点中的每个节点对应的第一优先值确定第一目标节点,包括:The method according to claim 2, wherein determining the first target node based on the first priority value corresponding to each node in the at least one first node includes:
    获取与所述至少一个第一节点中的每个节点对应的第一参数;所述第一参数表征所述第一节点与所述待转码视频的流畅度相关的属性参数;Obtain a first parameter corresponding to each node in the at least one first node; the first parameter represents an attribute parameter of the first node related to the fluency of the video to be transcoded;
    基于预设模型确定与所述第一参数对应的第二参数;所述第二参数表征所述第一参数对所述待转码视频的流畅度的影响参数;Determine a second parameter corresponding to the first parameter based on a preset model; the second parameter represents the influence parameter of the first parameter on the fluency of the video to be transcoded;
    基于所述第一参数和所述第二参数,确定所述至少一个第一节点中的每个节点对应的第一优先值;Based on the first parameter and the second parameter, determine a first priority value corresponding to each node in the at least one first node;
    将最小的所述第一优先值对应的第一节点作为所述第一目标节点。The first node corresponding to the smallest first priority value is used as the first target node.
  4. 根据权利要求1所述的方法,其中,所述方法还包括:The method of claim 1, further comprising:
    基于与所述至少一个第一节点中的每个节点相关的第一样本参数和第二样本参数,构建训练样本集合; Construct a training sample set based on the first sample parameter and the second sample parameter associated with each node in the at least one first node;
    以所述训练样本集合包括的第一样本参数为输入,以所述训练样本集合包括的第二样本参数为输出,对第一模型进行训练,得到预设模型。Using the first sample parameters included in the training sample set as input and the second sample parameters included in the training sample set as output, the first model is trained to obtain a preset model.
  5. 根据权利要求2所述的方法,其中,在所述基于所述至少一个第一节点中的每个节点对应的第一优先值确定第一目标节点之后,所述方法还包括:The method according to claim 2, wherein, after determining the first target node based on the first priority value corresponding to each node in the at least one first node, the method further comprises:
    确定所述第一目标节点的第一当前优先值;Determine the first current priority value of the first target node;
    确定所述至少一个第一节点中每个节点对应的第二当前优先值;Determine the second current priority value corresponding to each node in the at least one first node;
    确定所述第二当前优先值中最小的第二当前优先值;Determine the smallest second current priority value among the second current priority values;
    在所述第一当前优先值和所述最小的第二当前优先值满足预设条件的情况下,将所述最小的第二当前优先值对应的第一节点更新为所述第一目标节点。When the first current priority value and the minimum second current priority value meet preset conditions, the first node corresponding to the minimum second current priority value is updated as the first target node.
  6. 根据权利要求2所述的方法,其中,所述利用所述第一目标节点对所述待转码视频进行在线转码,得到在线转码后的第一视频之后,所述方法还包括:The method according to claim 2, wherein after using the first target node to perform online transcoding on the video to be transcoded to obtain the first video after online transcoding, the method further includes:
    在所述第一目标节点距离用户最近的情况下,通过所述第一目标节点对所述第一视频进行播放。When the first target node is closest to the user, the first video is played through the first target node.
  7. 根据权利要求1所述的方法,其中,所述转码包括离线转码,所述方法还包括:The method of claim 1, wherein the transcoding includes offline transcoding, and the method further includes:
    在所述算力网络中确定至少一个第二节点;其中,所述第二节点表征在所述算力网络的终端层、边缘层或云层中满足所述算力资源的任一节点;Determine at least one second node in the computing power network; wherein the second node represents any node that meets the computing power resources in the terminal layer, edge layer or cloud layer of the computing power network;
    基于所述至少一个第二节点中的每个节点对应的第二优先值确定第二目标节点;Determine a second target node based on a second priority value corresponding to each node in the at least one second node;
    利用所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频。The video to be transcoded is offline transcoded using the second target node to obtain a second video after offline transcoding.
  8. 根据权利要求7所述的方法,其中,所述基于所述至少一个第二节点中的每个节点对应的第二优先值确定第二目标节点,包括:The method of claim 7, wherein determining the second target node based on the second priority value corresponding to each node in the at least one second node includes:
    获取与所述至少一个第二节点中的每个节点对应的第三参数;所述第三参数表征第二节点与所述待转码视频的流畅度相关的属性参数;Obtain a third parameter corresponding to each node in the at least one second node; the third parameter represents an attribute parameter of the second node related to the fluency of the video to be transcoded;
    确定与所述第三参数对应的第四参数;所述第四参数表征所述第三参数对所述待转码视频的流畅度的影响参数; Determine a fourth parameter corresponding to the third parameter; the fourth parameter represents the influence parameter of the third parameter on the fluency of the video to be transcoded;
    基于所述第三参数和所述第四参数,确定所述至少一个第二节点中的每个节点对应的第二优先值;Based on the third parameter and the fourth parameter, determine a second priority value corresponding to each node in the at least one second node;
    将最大的所述第二优先值对应的第二节点作为所述第二目标节点。The second node corresponding to the largest second priority value is used as the second target node.
  9. 根据权利要求7所述的方法,其中,所述利用所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频,包括:The method according to claim 7, wherein said using the second target node to perform offline transcoding on the video to be transcoded to obtain the second video after offline transcoding includes:
    在所述第二目标节点在所述算力网络的云层或边缘层中的情况下,确定对所述待转码视频进行离线转码的第一调度方式;When the second target node is in the cloud layer or edge layer of the computing power network, determine a first scheduling method for offline transcoding of the video to be transcoded;
    基于所述第一调度方式,通过所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频。Based on the first scheduling method, the video to be transcoded is offline transcoded through the second target node to obtain the second video after offline transcoding.
  10. 根据权利要求7所述的方法,其中,所述利用所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频,包括:The method according to claim 7, wherein said using the second target node to perform offline transcoding on the video to be transcoded to obtain the second video after offline transcoding includes:
    在所述第二目标节点在所述算力网络的终端层中的情况下,确定对所述待转码视频进行离线转码的第二调度方式;When the second target node is in the terminal layer of the computing power network, determine a second scheduling method for offline transcoding of the video to be transcoded;
    基于所述第二调度方式,通过所述第二目标节点对所述待转码视频进行离线转码,得到离线转码后的第二视频。Based on the second scheduling method, the video to be transcoded is offline transcoded through the second target node to obtain the second video after offline transcoding.
  11. 根据权利要求1所述的方法,其中,所述方法还包括:The method of claim 1, further comprising:
    获取所述算力网络的终端层进行调度的第一算力;Obtain the first computing power scheduled by the terminal layer of the computing power network;
    获取对所述待转码视频进行转码的第二算力;Obtain the second computing power to transcode the video to be transcoded;
    基于所述第一算力和所述第二算力,确定所述终端层的收益参数。Based on the first computing power and the second computing power, a revenue parameter of the terminal layer is determined.
  12. 一种基于算力网络的视频转码装置,其中,所述装置包括:A video transcoding device based on computing power network, wherein the device includes:
    第一确定模块,配置为确定待转码视频对应的算力资源;The first determination module is configured to determine the computing resources corresponding to the video to be transcoded;
    第二确定模块,配置为在满足所述算力资源的至少一个节点中,基于所述至少一个节点中的每个节点对应的优先值确定目标节点;The second determination module is configured to determine the target node based on the priority value corresponding to each node in the at least one node among at least one node that meets the computing power resource;
    转码模块,配置为利用所述目标节点对所述待转码视频进行转码,得到转码后的视频。A transcoding module configured to use the target node to transcode the video to be transcoded to obtain a transcoded video.
  13. 一种基于算力网络的视频转码设备,包括存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,其中,所述处理器执行所述程序时, 实现权利要求1至11任一项所述的方法。A video transcoding device based on a computing power network, including a memory and a processor. The memory stores a computer program that can be run on the processor. When the processor executes the program, Implement the method of any one of claims 1 to 11.
  14. 一种存储介质,其中,所述存储介质存储有可执行指令,当所述可执行指令被处理器执行时,实现权利要求1至11任一项所述的方法。 A storage medium, wherein the storage medium stores executable instructions, and when the executable instructions are executed by a processor, the method described in any one of claims 1 to 11 is implemented.
PCT/CN2023/111561 2022-09-22 2023-08-07 Computing power network-based video transcoding method, apparatus and device and storage medium WO2024060860A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211157805.8A CN116781917A (en) 2022-09-22 2022-09-22 Video transcoding method, device, equipment and storage medium based on computing power network
CN202211157805.8 2022-09-22

Publications (1)

Publication Number Publication Date
WO2024060860A1 true WO2024060860A1 (en) 2024-03-28

Family

ID=88008734

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/111561 WO2024060860A1 (en) 2022-09-22 2023-08-07 Computing power network-based video transcoding method, apparatus and device and storage medium

Country Status (2)

Country Link
CN (1) CN116781917A (en)
WO (1) WO2024060860A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160219117A1 (en) * 2012-09-07 2016-07-28 Avigilon Corporation Security device capability discovery and device selection
US20200296155A1 (en) * 2020-03-27 2020-09-17 Intel Corporation Method, system and product to implement deterministic on-boarding and scheduling of virtualized workloads for edge computing
WO2021063339A1 (en) * 2019-09-30 2021-04-08 星环信息科技(上海)股份有限公司 Cluster resource scheduling method, apparatus, device and storage medium
CN112672227A (en) * 2019-10-15 2021-04-16 中国电信股份有限公司 Service processing method, device, node and storage medium based on edge node
CN114026834A (en) * 2019-04-30 2022-02-08 英特尔公司 Multi-entity resource, security, and service management in edge computing deployments

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160219117A1 (en) * 2012-09-07 2016-07-28 Avigilon Corporation Security device capability discovery and device selection
CN114026834A (en) * 2019-04-30 2022-02-08 英特尔公司 Multi-entity resource, security, and service management in edge computing deployments
WO2021063339A1 (en) * 2019-09-30 2021-04-08 星环信息科技(上海)股份有限公司 Cluster resource scheduling method, apparatus, device and storage medium
CN112672227A (en) * 2019-10-15 2021-04-16 中国电信股份有限公司 Service processing method, device, node and storage medium based on edge node
US20200296155A1 (en) * 2020-03-27 2020-09-17 Intel Corporation Method, system and product to implement deterministic on-boarding and scheduling of virtualized workloads for edge computing

Also Published As

Publication number Publication date
CN116781917A (en) 2023-09-19

Similar Documents

Publication Publication Date Title
US10872064B2 (en) Utilizing version vectors across server and client changes to determine device usage by type, app, and time of day
CN105144737B (en) Distribution of media and management platform
US8874700B2 (en) Optimizing storage of data files
RU2343536C2 (en) Mechanism of peer broadcasting of information content
EP2588977B1 (en) Systems and methods for storing digital content
US11356493B2 (en) Systems and methods for cloud storage direct streaming
CN102882829A (en) Transcoding method and system
CN101842812A (en) The system and method that is used for the parameter quality perception selection of transcoding of digital images
CN113157418A (en) Server resource allocation method and device, storage medium and electronic equipment
US20220038521A1 (en) Systems and methods for media quality selection of media assets based on internet service provider data usage limits
WO2023147758A1 (en) Method and apparatus for processing cloud game resource data, and computer device and storage medium
CN107547909B (en) Media file online playing control method, device and system
Pang et al. Optimizing personalized interaction experience in crowd-interactive livecast: A cloud-edge approach
CN108512817B (en) Multi-video transcoding scheduling method and device
WO2024060860A1 (en) Computing power network-based video transcoding method, apparatus and device and storage medium
US20130290124A1 (en) Data delivery optimization via an auction system
WO2024082770A1 (en) Video transcoding method and apparatus, and device, storage medium and video on-demand system
US20230283813A1 (en) Centralized streaming video composition
CN104581215A (en) Content scheduling method and system for internet protocol television (IPTV)
US8774599B2 (en) Method for transcoding and playing back video files based on grid technology in devices having limited computing power
WO2022089321A1 (en) Method and apparatus for scheduling access point, and server and storage medium
CN112953944A (en) Audio-video transcoding method based on MapReduce
Liao et al. Edgesaver: Edge-assisted energy-aware mobile video streaming for user retention enhancement
US11870833B2 (en) Methods and systems for encoder parameter setting optimization
CN115022677B (en) Video playing method, device, equipment and medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23867155

Country of ref document: EP

Kind code of ref document: A1