Video transcoding method, device, electronic device and storage medium
By analyzing the proportion of application objects and resource correlation changes of the transcoding algorithm, determining the threshold for the transcoding algorithm, solving the problem of unreasonable resource allocation in the existing technology, and achieving the rational allocation of video transcoding resources and improving user experience.
Patent Information
- Application Number
- CN202211153150.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-21
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2042-09-21
AI Technical Summary
In the existing video transcoding strategy, resource allocation is unreasonable, resulting in the combination of transcoding algorithms that does not meet the resource coordination requirements, affecting the CDN cost of the video platform and user viewing experience.
By analyzing the change in the proportion of application objects of each transcoding algorithm, the change in the proportion of resource and business associations, the proportion of application objects of each transcoding algorithm is determined, and the activation threshold of the corresponding transcoding algorithm is determined based on the proportion, and the target transcoding algorithm is selected for video transcoding.
The rational allocation of transcoding resources is achieved, ensuring the overall requirements of transcoding resources, reducing CDN costs, and improving users' viewing experience.
Smart Images

Figure CN115529461B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to data processing technology, and more particularly to a video transcoding method, device, electronic device, and storage medium. Background Art
[0002] Before sending the video to the content consumer, the server needs to convert the video into multiple versions with different bit rates to adapt to the terminal devices and network bandwidth of different content consumers, thereby improving the user viewing experience.
[0003] The current transcoding strategy includes encoding, pre-processing and optimization methods. Different encoding, pre-processing and optimization methods occupy different types and amounts of computing resources, and the output bit rates are also different, which affects the CDN (Content Delivery Network) cost of the video platform. In addition, the playback effects of videos with different bit rates are different, which brings different viewing experiences to users, thus affecting core business indicators.
[0004] Since the algorithms included in the transcoding strategy are launched in stages, and the activation threshold of each transcoding algorithm in the transcoding strategy is determined based on empirical judgment and control experiments, this leads to at least unreasonable allocation of transcoding resources in the relevant technology, resulting in the combination of transcoding algorithms in the transcoding strategy not necessarily meeting the requirements for transcoding resource coordination. Summary of the invention
[0005] The present disclosure provides a video transcoding method, device, electronic device and storage medium, which can reasonably allocate transcoding resources.
[0006] In a first aspect, an embodiment of the present disclosure provides a video transcoding method, including:
[0007] Determine the application object ratio of each transcoding algorithm according to the relationship between the change amount of the application object ratio of each transcoding algorithm and the first change amount associated with the resource and the second change amount associated with the service;
[0008] Determine an activation threshold of a corresponding transcoding algorithm according to the application object ratio of each transcoding algorithm;
[0009] A target transcoding algorithm is determined according to the attribute information of the video and the activation threshold, and the target transcoding algorithm is used to transcode the video.
[0010] In a second aspect, the present disclosure also provides a video transcoding device, the device comprising:
[0011] A proportion determination module, used to determine the proportion of application objects of each transcoding algorithm according to the relationship between the change amount of the proportion of application objects of each transcoding algorithm and the first change amount associated with the resource and the second change amount associated with the business;
[0012] A threshold determination module, used to determine an activation threshold of a corresponding transcoding algorithm according to a proportion of application objects of each transcoding algorithm;
[0013] The video transcoding module is used to determine a target transcoding algorithm according to the attribute information of the video and the activation threshold, and transcode the video using the target transcoding algorithm.
[0014] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0015] one or more processors;
[0016] a storage device for storing one or more programs,
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the video transcoding method described in any embodiment of the present disclosure.
[0018] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the video transcoding method described in any embodiment of the present disclosure.
[0019] In the embodiments of the present disclosure, the proportion of application objects of each transcoding algorithm is determined through the relationship between the change in the proportion of application objects of each transcoding algorithm and the change in resource consumption, the change in resource distribution cost and the change in business revenue, and the activation threshold of the corresponding transcoding algorithm is determined according to the proportion of application objects of each transcoding algorithm. The algorithm combination required for processing the video is determined according to the activation threshold, which solves the problem of unreasonable resource allocation caused by determining the activation threshold by combining experience with control experiments, and achieves the effect of reasonably allocating transcoding resources to meet the requirements of transcoding resource coordination. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0021] Figure 1 A schematic diagram of a video transcoding method provided by an embodiment of the present disclosure;
[0022] Figure 2A schematic diagram of another video transcoding method flow provided by an embodiment of the present disclosure;
[0023] Figure 3 A schematic diagram of a threshold determination process in a video transcoding method provided by an embodiment of the present disclosure;
[0024] Figure 4 A schematic diagram of the structure of a video conversion device provided by an embodiment of the present disclosure;
[0025] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0027] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0028] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0029] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0030] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0031] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0032] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0033] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0034] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0035] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0036] Figure 1 A flow chart of a video transcoding method provided in an embodiment of the present disclosure is provided. The embodiment of the present disclosure is applicable to the case of video transcoding. The method can be executed by a video transcoding device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a PC or a server, etc.
[0037] like Figure 1 As shown, the method includes:
[0038] S110 , determining the application object ratio of each transcoding algorithm according to a relationship between a change in the application object ratio of each transcoding algorithm and a first change associated with a resource and a second change associated with a service.
[0039] The transcoding algorithm is an algorithm used by the server to adjust the format of the video before sending it to the content consumer. Usually, each transcoding algorithm is pre-configured on the server, and according to the applicable scope of different transcoding algorithms, the video that meets the applicable scope is transcoded.
[0040] The transcoding strategy is a combination of transcoding algorithms. A video transcoding strategy can be composed of one or more transcoding algorithms.
[0041] For example, assuming that the attribute information of video a meets the enabling conditions of transcoding algorithm A, video a belongs to the applicable scope of transcoding algorithm A, and further, it can be determined that the transcoding strategy used to transcode video a includes transcoding algorithm A. Also assuming that the attribute information of video a does not meet the enabling conditions of transcoding algorithm X, video a does not belong to the applicable scope of transcoding algorithm X, and further, it can be determined that the transcoding strategy used to transcode video a does not include transcoding algorithm X.
[0042] The application object ratio is the ratio of videos applied by the transcoding algorithm to all videos. For example, there are 100 videos to be transcoded, of which 30 videos meet the activation conditions of transcoding algorithm A. These 30 videos are the application objects of transcoding algorithm A, so the application object ratio of transcoding algorithm A is 30%.
[0043] The resources are server-side resources consumed by video transcoding. The first variation associated with the resources may be the variation of resource consumption generated by transcoding the video using the target transcoding algorithm. In the present disclosure, the resources include CPU resources and GPU resources. Optionally, the resources may also include FPGA (Field Programmable Gate Array) resources, etc. The resources consumed by different transcoding algorithms may be different. For example, when performing server-side super-resolution processing on the video, GPU resources are consumed, and when performing variable frame rate processing on the video, CPU resources are consumed, etc. The first variation associated with the resources includes the variation of CPU resources consumed by transcoding the video using the target transcoding algorithm, or the variation of GPU resources consumed by transcoding the video using the target transcoding algorithm, etc.
[0044] In the present disclosure, the first change in resource association may also include a change in resource distribution cost. The resource distribution cost is the CDN cost generated by sending videos to content consumers through CDN servers. The CDN cost can be calculated based on the bit rate of the video sent to the content consumer through a relevant formula. The bit rate is affected by the video coverage. The video coverage is determined based on the number of times the transcoded video is viewed.
[0045] Business income is the business income generated by the consumption of videos by content consumers. Business income is calculated using specific business indicator data. Optionally, business indicators can be set according to actual business scenarios.
[0046] In the disclosed embodiment, the relationship between the change in the proportion of application objects of each transcoding algorithm and the change in resource consumption, the change in resource distribution cost and the change in business revenue can be specifically the change in resource consumption corresponding to every 1% change in the proportion of application objects of each transcoding algorithm, and the change in resource distribution cost and the change in business revenue corresponding to the change in viewing coverage caused by the change in the proportion of application objects of each transcoding algorithm.
[0047] In one case, the change in the application object ratio of the transcoding algorithm is 1%, and the relationship between the change in the transcoding algorithm and the change in resource consumption, resource distribution cost, and business revenue is the change in resource consumption caused by a 1% change in the application object ratio, and the change in resource distribution cost and business revenue caused by a 1% change in the viewing coverage caused by the change in the application object ratio.
[0048] In another case, the change in the proportion of application objects of the transcoding algorithm is greater than or less than 1%. Based on the relationship between the change in the corresponding transcoding algorithm and the change in resource consumption, the change in resource distribution cost, and the change in business income, mathematical operations are performed to obtain the change in resource consumption, the change in resource distribution cost, and the change in business income caused by a 1% change in the proportion of application objects. For example, assuming that the change in the proportion of application objects of the transcoding algorithm is 1% of the set multiple, the result of the division of the change in resource consumption and the set multiple is calculated to obtain the change in resource consumption caused by a 1% change in the proportion of application objects. Also, assuming that the change in viewing coverage caused by the change in the proportion of application objects of the transcoding algorithm is 1% of the set multiple, the result of the division of the change in resource distribution cost and the change in business income with the set multiple is calculated to obtain the change in resource distribution cost and the change in business income caused by a 1% change in viewing coverage.
[0049] In some embodiments, the method further includes determining the resource consumption change corresponding to the unit change of the application object ratio of each transcoding algorithm, and the resource distribution cost change and business income change corresponding to the viewing coverage change caused by the change of the application object ratio of each transcoding algorithm according to the historical control experimental data of each transcoding algorithm. In the embodiment of the present disclosure, the unit change can be 1%.
[0050] For example, take 1% of all videos processed by the Veryslow2 optimization method as the experimental group, and take a group of videos not processed by the Veryslow2 optimization method as the control group. The experimental group videos and the control group videos are sent to different content consumers respectively to obtain control experimental data. According to the control experimental data, it can be determined that the change in resource consumption caused by transcoding 1% of all videos using the Veryslow2 optimization method, as well as the corresponding change in resource distribution cost and business revenue when the viewing coverage changes by 1%.
[0051] Optionally, 2% of all videos processed by the Veryslow2 optimization method can be used as an experimental group, and 1% of all videos processed by the Veryslow2 optimization method can be used as a control group. The experimental group videos and the control group videos can be sent to different content consumers respectively to obtain control experimental data. Based on the control experimental data, the change in resource consumption caused by a 1% change in the application object of the Veryslow2 optimization method can be determined, as well as the corresponding change in resource distribution cost and business revenue when the viewing coverage changes by 1%.
[0052] By conducting multiple groups of similar control experiments, the change in resource consumption caused by a 1% change in the proportion of multiple groups of algorithm application objects, as well as the corresponding changes in resource distribution costs and business revenue when the viewing coverage changes by 1%, can be determined. By combining the change in resource consumption caused by a 1% change in multiple groups of algorithm application objects, as well as the corresponding changes in resource distribution costs and business revenue when the viewing coverage changes by 1%, the final correspondence between the change in resource consumption caused by a 1% change in algorithm application objects, as well as the final correspondence between the change in resource distribution costs and business revenue caused by a 1% change in viewing coverage can be determined, thereby improving the confidence level of the above final correspondence.
[0053] In the embodiment of the present disclosure, CPU i or GPU i It indicates the change in resource consumption when the application object ratio of each transcoding algorithm changes by 1%, with CDN i It represents the change in resource distribution cost when the viewing coverage of the application objects of each transcoding algorithm changes by 1%, expressed in REV i Indicates the change in business revenue when the viewing coverage of the application objects of each transcoding algorithm changes by 1%. Wherein, i is used to represent each transcoding algorithm, for example, i can be a character that can uniquely identify a transcoding algorithm, such as a number of a different transcoding algorithm.
[0054] Further, obtain the application object ratio parameter of each transcoding algorithm. Determine the total resource consumption according to the application object ratio parameter and the relationship between the change in the application object ratio of the corresponding transcoding algorithm and the change in resource consumption. Determine the viewing coverage parameter according to the application object ratio parameter. Determine the total resource distribution cost according to the viewing coverage parameter and the relationship between the change in the viewing coverage of the application objects of the corresponding transcoding algorithm and the change in the resource distribution cost. Determine the total business revenue according to the viewing coverage parameter and the relationship between the change in the viewing coverage of the application objects of the corresponding transcoding algorithm and the change in the business revenue.
[0055] For example, the application object ratio of each transcoding algorithm is set to x i , and x iThe value of is unknown, where i is used to represent each transcoding algorithm, i=1, 2, 3, ..., n, and n represents the number of transcoding algorithms that have been launched. For example, i can be a character that can uniquely identify a transcoding algorithm, such as the serial number of a different transcoding algorithm. According to the application object ratio parameter and the relationship between the change in the ratio of each application object and the change in resource consumption, determining the total resource consumption specifically includes:
[0056] For the first transcoding algorithm that consumes CPU, calculate the application object ratio parameter x of each first transcoding algorithm i CPU corresponding to the transcoding algorithm i Then, the products are added up to get the total CPU consumption, where the total CPU consumption is the product of the variable x. i expression.
[0057] For the second transcoding algorithm that consumes GPU, calculate the application object ratio parameter of each second transcoding algorithm and the GPU of the corresponding transcoding algorithm i Then, the products are accumulated to get the total GPU consumption, where the total GPU consumption is the product of the variable x. i expression.
[0058] Determining the total resource distribution cost according to the viewing coverage parameter and the relationship between the viewing coverage change of the application object of each transcoding algorithm and the resource distribution cost change specifically includes:
[0059] According to the application object ratio parameter x of each transcoding algorithm i Determine the viewing coverage parameter y, where y = f(x i ), according to f(x i ) and the CDN with the corresponding transcoding algorithm i Then, the products are accumulated to obtain the total resource distribution cost corresponding to all transcoding algorithms, where the total resource distribution cost includes f(x i ) expression.
[0060] Determining the total business revenue according to the viewing coverage parameter and the relationship between the viewing coverage change of the application object and the business revenue change specifically includes:
[0061] According to the viewing coverage parameter f(x i ) and the corresponding transcoding algorithm REV i Then, the products are accumulated to obtain the total business revenue corresponding to all transcoding algorithms, where the total business revenue is the product of f(x i ) expression.
[0062] In an embodiment of the present disclosure, when the total resource consumption is less than or equal to the set total resource consumption, the application object proportion of each transcoding algorithm is determined when the difference between the total business revenue and the total resource distribution cost meets the profit target, wherein the application object proportion is the parameter value of the application object proportion parameter.
[0063] The revenue target is to maximize the sum of the revenue from reduced resource distribution costs and increased business revenue. Specifically, this revenue mainly includes the resource distribution cost savings caused by bit rate adjustment and the business revenue growth caused by improved video playback experience.
[0064] The total resource consumption includes the total CPU consumption and the total GPU consumption. Accordingly, the set total resource amount includes the total CPU resources and the total GPU resources in the server.
[0065] The total amount of resources of the CPU and GPU is used as a constraint condition, that is, the constraint condition is: the total amount of CPU consumption is less than or equal to the total amount of CPU resources; the total amount of GPU consumption is less than or equal to the total amount of GPU resources.
[0066] Through the optimization method of operations research, determine the application ratio of each transcoding algorithm that maximizes the difference between the total business revenue and the total resource distribution cost when the constraints are met, that is, find the ratio of videos that each transcoding algorithm is applicable to to all videos x i .
[0067] S120: Determine an activation threshold of a corresponding transcoding algorithm according to a proportion of application objects of each transcoding algorithm.
[0068] The enabling threshold may be a critical value of attribute information of the object to which the transcoding algorithm is applied. The enabling threshold is used to determine whether the transcoding algorithm can be used to process the video. For example, the enabling threshold may include a video author popularity threshold or a video play count threshold. In the disclosed embodiment, the video author popularity may be determined by the behavior of the video author being followed by content consumers. The video play count may be determined by the behavior of the video being watched by content consumers.
[0069] In some embodiments, the video author popularity information of each historical video is obtained. The historical videos are sorted according to the video author popularity information, and the video author popularity threshold for enabling the corresponding transcoding algorithm is determined according to the video author popularity sorting result and the application object ratio of each transcoding algorithm. The historical video is the video obtained by the server within a set time.
[0070] In one case, the popularity information of the video author is represented by the number of fans of the video author, the number of fans of the video author of each historical video is obtained, the historical videos are sorted in ascending order based on the number of fans of the video author, and the threshold number of fans of the video author for enabling the corresponding transcoding algorithm is obtained by matching the sorting result with the application object ratio of the transcoding algorithm. For example, if there are 100 historical videos and the application object ratio of transcoding algorithm i is 30%, the number of fans of the video author of the 70th historical video is determined as the threshold number of fans of the video author, thereby ensuring that the 70th and subsequent historical videos can be processed by transcoding algorithm i.
[0071] In some embodiments, the video play count of each historical video is obtained. The historical videos are sorted according to the video play count, and the video play count threshold for enabling the corresponding transcoding algorithm is determined according to the video play count sorting result and the application object ratio of each transcoding algorithm. The historical video is the video obtained by the server within a set time.
[0072] In one case, the video play count of each historical video is obtained, and the historical videos are sorted in ascending order based on the video play count. The video play count threshold for enabling the corresponding transcoding algorithm is obtained by matching the sorting result with the application object ratio of the transcoding algorithm. For example, if there are 100 historical videos and the application object ratio of transcoding algorithm i is 10%, the video play count of the 90th historical video is determined as the video play count threshold, thereby ensuring that the 90th and subsequent historical videos can be processed by transcoding algorithm i.
[0073] S130: Determine a target transcoding algorithm according to the attribute information of the video and the activation threshold, and transcode the video using the target transcoding algorithm.
[0074] Among them, the attribute information is used to characterize the probability of a video being consumed by content consumers. For example, the attribute information may include the video author's popularity and the number of video plays. It is understandable that the higher the video author's popularity, the more popular the video author is, and the author's works may be clicked and played by more people. The more video plays, the more popular the video is, and the more likely the video is to be clicked and played by more people.
[0075] Exemplarily, the video author popularity information of the video is obtained, and the video author popularity information is compared with the video author popularity threshold of each transcoding algorithm; the video play count of the video is obtained, and the video play count is compared with the video play count threshold of each transcoding algorithm; based on the video author popularity comparison result and / or the video play count comparison result, a target transcoding algorithm is selected from preset transcoding algorithms, and the video is transcoded according to the target transcoding algorithm.
[0076] In some embodiments, for a video to be transcoded, the number of fans of the video author of the video is obtained, and the number of fans of the video author is compared with the video author fan number threshold of each transcoding algorithm to obtain a video author popularity comparison result. If the video author popularity comparison result is that the video author popularity information is equal to or greater than the video author popularity threshold of the current transcoding algorithm, the current transcoding algorithm is determined as the target transcoding algorithm.
[0077] In other embodiments, for a video to be transcoded, the number of times the video is played is obtained, and the number of times the video is played is compared with the video play number threshold of each transcoding algorithm to obtain a video play number comparison result. If the video play number comparison result is that the number of times the video is played is equal to or greater than the video play number threshold of the current transcoding algorithm, the current transcoding algorithm is determined as the target transcoding algorithm.
[0078] In one case, if the video author popularity information is equal to or greater than the video author popularity threshold of the current transcoding algorithm, and the number of plays is equal to or greater than the video play count threshold of the current transcoding algorithm, the current transcoding algorithm is determined as the target transcoding algorithm, so that no matter whether the video meets the video author popularity threshold or the video play count threshold, the transcoding algorithm can be triggered to transcode the video, thereby saving CDN costs through changes in video bit rate, and improving video clarity or smoothness by applying different transcoding algorithms, thereby enhancing user viewing experience and thereby bringing about growth in business revenue.
[0079] The technical solution of the disclosed embodiment determines the proportion of application objects of each transcoding algorithm through the relationship between the change in the proportion of application objects of each transcoding algorithm and the change in resource consumption, the change in resource distribution cost and the change in business revenue, and determines the activation threshold of the corresponding transcoding algorithm according to the proportion of application objects of each transcoding algorithm, and determines the algorithm combination required for processing the video according to the activation threshold, which solves the problem of unreasonable resource allocation caused by determining the activation threshold by combining experience with control experiments, and achieves the effect of reasonably allocating transcoding resources to meet the requirements of transcoding resource coordination.
[0080] Figure 2 This is another video transcoding method flow chart provided by the embodiment of the present disclosure. Based on the above embodiment, this embodiment adds a step of predicting the total cost of resource distribution and the total business revenue. Figure 2 Said method comprises:
[0081] S210. Determine, based on the historical control experimental data of each transcoding algorithm, the change in resource consumption corresponding to the unit change in the proportion of application objects of each transcoding algorithm, as well as the change in resource distribution cost and business revenue corresponding to the change in viewing coverage caused by the change in the proportion of application objects of each transcoding algorithm.
[0082] S220: Obtain application object ratio parameters of each transcoding algorithm.
[0083] S230: Determine the total resource consumption according to the application object proportion parameter and the relationship between the change in the proportion of each application object and the change in resource consumption.
[0084] S240: Determine a viewing coverage parameter according to the application object proportion parameter, and determine a total resource distribution cost according to the viewing coverage parameter and a relationship between a change in viewing coverage of the application object of each transcoding algorithm and a change in resource distribution cost.
[0085] S250: Determine the total business revenue according to the viewing coverage parameter and the relationship between the viewing coverage change of the application object and the business revenue change.
[0086] S260: Determine the target total amount of resources based on the total amount of existing resources and the amount of resources to be applied for.
[0087] The total amount of existing resources is the sum of the current transcoding resources on the server side, and the amount of resources to be applied for is the estimated amount of additional transcoding resources.
[0088] Exemplarily, the target total amount of resources may be determined based on the total amount of existing resources and the amount of resources to be applied for.
[0089] S270: When the total resource consumption is less than or equal to the target total resource consumption, and when it is predicted that the difference between the total business revenue and the total resource distribution cost meets the revenue target, the target application object proportion of each transcoding algorithm.
[0090] In the embodiment of the present disclosure, the target resource amount can be obtained by adding the resource amount to be applied for and the total amount of existing resources. The total amount of existing resources can be increased to the target resource amount by increasing CPU or GPU processing resources.
[0091] Since the target total amount of resources is the total amount of resources on the server in the future and the target total amount of resources is a constraint, it is possible to predict the proportion of target application objects of each transcoding algorithm when the difference between the total business revenue and the total cost of resource distribution meets the revenue target.
[0092] If the total amount of resources of the CPU and GPU is used as a constraint, the constraint conditions are: the total amount of CPU consumption is less than or equal to the total amount of CPU resources in the target total amount of resources; the total amount of GPU consumption is less than or equal to the total amount of GPU resources in the target total amount of resources.
[0093] Through the optimization method of operations research, determine the application ratio of each transcoding algorithm that maximizes the difference between the total business revenue and the total resource distribution cost when the constraints are met, that is, find the ratio of videos that each transcoding algorithm is applicable to to all videos x i .
[0094] S280. Determine a predicted total resource distribution cost and a predicted total business revenue according to viewing coverage parameters corresponding to the proportion of target application objects of each transcoding algorithm and changes in resource distribution cost and business revenue corresponding to changes in viewing coverage of each application object.
[0095] For example, the viewing coverage parameter f(x i ) and CDN i The product of , we get the resource distribution cost CDN of each transcoding algorithm. i ×f(x i ), then, using The resource distribution cost of each transcoding algorithm is accumulated to obtain the predicted total resource distribution cost corresponding to all transcoding algorithms.
[0096] Calculate the viewing coverage parameter f(x i ) and REV i The product of the business revenue REV of each transcoding algorithm is obtained. i ×f(x i ), then, using The business revenue of each transcoding algorithm is accumulated to obtain the predicted value of the total business revenue corresponding to all transcoding algorithms.
[0097] By comparing the difference between the predicted value of total business revenue and the predicted value of total resource distribution cost with the difference between the predicted value of total business revenue and the predicted value of total resource distribution cost, the degree of revenue improvement brought about by the improvement of transcoding resources can be obtained.
[0098] The technical solution of the disclosed embodiment determines the target application object ratio of each transcoding algorithm when the resource consumption does not exceed the target total resource amount through the relationship between the change in the application object ratio of each transcoding algorithm and the change in resource consumption, the change in resource distribution cost, and the change in business income, and determines the total resource distribution cost prediction value and the total business income prediction value according to the target application object ratio and the change in resource distribution cost and business income corresponding to the unit change in the application object ratio. Through the technical solution of the disclosed embodiment, the estimated total resource consumption can be used as a constraint condition to predict the degree of revenue improvement brought about by the improvement of transcoding resources, providing data support for transcoding resource application and revenue estimation.
[0099] Figure 3A schematic diagram of a threshold determination process in a video transcoding method provided by an embodiment of the present disclosure. Figure 3 In the illustrated enabling threshold determination process, the transcoding resources of the server are used as constraints. Different transcoding algorithms consume different transcoding resources, and the amount of transcoding resources needs to be calculated separately. In some embodiments, the threshold of the number of fans of the video author or the threshold of the number of video playbacks is used as a controllable variable. The number of transcoded videos and the video viewing coverage of various transcoding algorithms are controlled by the threshold of the number of fans of the video author or the threshold of the number of video playbacks. The number of transcoded videos of each transcoding algorithm under different thresholds is obtained, and the video viewing coverage of each transcoding algorithm under different thresholds is obtained. For any transcoding algorithm, a first curve is generated according to the threshold of the number of video playbacks and the number of transcoded videos; a second curve is generated according to the threshold of the number of fans of the video author and the number of transcoded videos; a third curve is generated according to the threshold of the number of video playbacks and the video viewing coverage; a fourth curve is generated according to the threshold of the number of fans of the video author and the video viewing coverage. A fifth curve is generated according to the number of transcoded videos and the video viewing coverage.
[0100] For example, the first curve is generated with the threshold of the number of video playbacks as the x-axis and the number of transcoded videos as the y-axis. The second curve is generated with the threshold of the number of video author fans as the x-axis and the number of transcoded videos as the y-axis. The third curve is generated with the threshold of the number of video playbacks as the x-axis and the video viewing coverage as the y-axis. The fourth curve is generated with the threshold of the number of video author fans as the x-axis and the video viewing coverage as the y-axis. The fifth curve is generated by fitting the corresponding relationship between the number of transcoded videos as the x-axis and the video viewing coverage as the y-axis.
[0101] The amount of resources occupied by each transcoding algorithm for transcoding a single video is determined according to the number of transcoded videos and the total amount of resources used corresponding to each transcoding algorithm. The total amount of resource consumption is determined according to the amount of resources occupied by each transcoding algorithm for transcoding a single video and the number of transcoded videos of the first curve or the second curve.
[0102] Obtain the viewing coverage of videos that exceed the threshold in the third curve or the fourth curve, and determine the resource distribution cost based on the video viewing coverage and the video bit rate. Obtain business indicator data affected by changes in video bit rate, and determine business revenue based on the business indicator data. Among them, the business indicator data is indicator data that reflects the user's stickiness to the APP, including the average number of active days per person and the average usage time per person. Taking the total resource consumption as the constraint condition, that is, the sum of the transcoding resources occupied by each transcoding algorithm running at the same time cannot exceed the total resource consumption, determine the proportion of application objects of each transcoding algorithm that maximizes the benefits of business revenue and resource distribution cost.
[0103] For example, when the popularity of a video author is represented by the number of fans of the video author, historical videos are sorted in ascending order based on the number of fans of the video author, and the threshold number of fans of the video author for enabling the corresponding transcoding algorithm is obtained by matching the sorting result with the proportion of application objects of the transcoding algorithm.
[0104] When the number of video playbacks is represented by the number of video views, historical videos are sorted in ascending order according to the number of video views, and the video playback threshold for enabling the corresponding transcoding algorithm is obtained by matching the sorting result with the application object ratio of the transcoding algorithm.
[0105] Figure 4 A schematic diagram of the structure of a video conversion device provided by an embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the device includes: a proportion determination module 410, a threshold determination module 420 and a video transcoding module 430.
[0106] A proportion determination module 410, configured to determine the proportion of application objects of each transcoding algorithm according to the relationship between the change amount of the proportion of application objects of each transcoding algorithm and the first change amount associated with the resource and the second change amount associated with the service;
[0107] A threshold determination module 420, configured to determine an activation threshold of a corresponding transcoding algorithm according to a proportion of application objects of each transcoding algorithm;
[0108] The video transcoding module 430 is used to determine a target transcoding algorithm according to the attribute information of the video and the activation threshold, and transcode the video using the target transcoding algorithm.
[0109] The technical solution provided by the embodiments of the present disclosure determines the proportion of application objects of each transcoding algorithm through the relationship between the change in the proportion of application objects of each transcoding algorithm and the change in resource consumption, the change in resource distribution cost and the change in business revenue, and determines the activation threshold of the corresponding transcoding algorithm according to the proportion of application objects of each transcoding algorithm, and determines the algorithm combination required for processing the video according to the activation threshold, which solves the problem of unreasonable resource allocation caused by determining the activation threshold by combining experience with control experiments, and achieves the effect of reasonably allocating transcoding resources to meet the requirements of transcoding resource coordination.
[0110] Furthermore, the video transcoding device further includes:
[0111] Before determining the proportion of application objects of each transcoding algorithm based on the relationship between the change in the proportion of application objects of each transcoding algorithm and the first change associated with the resource and the second change associated with the business, determine the change in resource consumption corresponding to the unit change in the proportion of application objects of each transcoding algorithm based on the historical control experimental data of each transcoding algorithm, as well as the change in resource distribution cost and the change in business revenue corresponding to the change in viewing coverage caused by the change in the proportion of application objects of each transcoding algorithm.
[0112] In the above solution, the proportion determination module 410 is specifically used for:
[0113] Get the application object ratio parameters of each transcoding algorithm;
[0114] Determine the total resource consumption according to the application object proportion parameter and the relationship between the change in the proportion of each application object and the change in resource consumption;
[0115] Determine a viewing coverage parameter according to the application object proportion parameter, and determine a total resource distribution cost according to the viewing coverage parameter and a relationship between a change in viewing coverage of the application object of each transcoding algorithm and a change in resource distribution cost;
[0116] Determine the total business revenue according to the viewing coverage parameter and the relationship between the viewing coverage change of the application object and the business revenue change;
[0117] When the total resource consumption is less than or equal to the set total resource consumption, determine the application object proportion of each transcoding algorithm when the difference between the total business revenue and the total resource distribution cost meets the profit target, wherein the application object proportion is the parameter value of the application object proportion parameter.
[0118] Furthermore, the scheme also includes:
[0119] A prediction module, configured to determine the target total amount of resources based on the total amount of existing resources and the amount of resources to be applied for, after determining the total business revenue according to the viewing coverage parameter and the relationship between the change in viewing coverage of the application object and the change in business revenue;
[0120] When the total resource consumption is less than or equal to the target resource consumption, the target application object ratio of each transcoding algorithm when the difference between the total service revenue and the total resource distribution cost is predicted to meet the revenue target;
[0121] Determine the total resource distribution cost forecast value and the total business revenue forecast value based on the viewing coverage parameters corresponding to the proportion of target application objects of each transcoding algorithm and the changes in resource distribution cost and business revenue corresponding to the changes in viewing coverage of each application object.
[0122] In the above solution, the threshold determination module 420 is specifically used for:
[0123] Sort historical videos according to video author popularity information;
[0124] According to the ranking results and the application object ratio of each transcoding algorithm, the popularity threshold of video authors for enabling the corresponding transcoding algorithm is determined.
[0125] In the above solution, the threshold determination module 420 is further specifically used for:
[0126] Sort historical videos by video play count;
[0127] According to the ranking results and the application ratio of each transcoding algorithm, the video playback count threshold for enabling the corresponding transcoding algorithm is determined.
[0128] In the above solution, the video transcoding module 430 is specifically used for:
[0129] Obtaining video author popularity information of the video, and comparing the video author popularity information with a video author popularity threshold of each transcoding algorithm;
[0130] Obtaining the video play count of the video, and comparing the video play count with a video play count threshold of each transcoding algorithm;
[0131] According to the comparison result of video author popularity and / or the comparison result of video play times, a target transcoding algorithm is selected from preset transcoding algorithms, and the video is transcoded according to the target transcoding algorithm.
[0132] In the above solution, the video transcoding module 430 is further used for:
[0133] The transcoding algorithm participating in the comparison is determined as the current transcoding algorithm. When the video author popularity information is equal to or greater than the video author popularity threshold of the current transcoding algorithm, and / or the number of plays is equal to or greater than the video play count threshold of the current transcoding algorithm, the current transcoding algorithm is determined as the target transcoding algorithm.
[0134] The video transcoding device provided in the embodiments of the present disclosure can execute the video transcoding method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0135] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0136] Figure 5 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 5 , which shows an electronic device (eg, Figure 5 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0137] like Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.
[0138] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0139] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0140] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0141] The electronic device provided in the embodiment of the present disclosure and the video transcoding method provided in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0142] The embodiment of the present disclosure provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the video transcoding method provided by the above embodiment is implemented.
[0143] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0144] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0145] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0146] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0147] Determine the application object ratio of each transcoding algorithm according to the relationship between the change amount of the application object ratio of each transcoding algorithm and the first change amount associated with the resource and the second change amount associated with the service;
[0148] Determine an activation threshold of a corresponding transcoding algorithm according to the application object ratio of each transcoding algorithm;
[0149] A target transcoding algorithm is determined according to the attribute information of the video and the activation threshold, and the target transcoding algorithm is used to transcode the video.
[0150] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0151] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0152] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0153] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0154] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0155] According to one or more embodiments of the present disclosure, the present disclosure provides a video transcoding method, including:
[0156] Determine the application object ratio of each transcoding algorithm according to the relationship between the change amount of the application object ratio of each transcoding algorithm and the first change amount associated with the resource and the second change amount associated with the service;
[0157] Determine an activation threshold of a corresponding transcoding algorithm according to the application object ratio of each transcoding algorithm;
[0158] A target transcoding algorithm is determined according to the attribute information of the video and the activation threshold, and the target transcoding algorithm is used to transcode the video.
[0159] According to one or more embodiments of the present disclosure, before determining the application object ratio of each transcoding algorithm according to the relationship between the change amount of the application object ratio of each transcoding algorithm and the first change amount associated with the resource and the second change amount associated with the service, the method further includes:
[0160] Based on the historical control experimental data of each transcoding algorithm, determine the change in resource consumption corresponding to a unit change in the proportion of application objects of each transcoding algorithm, as well as the change in resource distribution cost and business revenue corresponding to the change in viewing coverage caused by the change in the proportion of application objects of each transcoding algorithm.
[0161] According to one or more embodiments of the present disclosure, determining the application object ratio of each transcoding algorithm according to the relationship between the change amount of the application object ratio of each transcoding algorithm and the first change amount associated with the resource and the second change amount associated with the service includes:
[0162] Get the application object ratio parameters of each transcoding algorithm;
[0163] Determine the total resource consumption according to the application object proportion parameter and the relationship between the change in the proportion of each application object and the change in resource consumption;
[0164] Determine a viewing coverage parameter according to the application object proportion parameter, and determine a total resource distribution cost according to the viewing coverage parameter and a relationship between a change in viewing coverage of the application object of each transcoding algorithm and a change in resource distribution cost;
[0165] Determine the total business revenue according to the viewing coverage parameter and the relationship between the viewing coverage change of the application object and the business revenue change;
[0166] When the total resource consumption is less than or equal to the set total resource consumption, determine the application object proportion of each transcoding algorithm when the difference between the total business revenue and the total resource distribution cost meets the profit target, wherein the application object proportion is the parameter value of the application object proportion parameter.
[0167] According to one or more embodiments of the present disclosure, after determining the total business revenue according to the viewing coverage parameter and the relationship between the viewing coverage change of the application object and the business revenue change, the method further includes:
[0168] Determine the total target resource amount based on the total existing resource amount and the resource amount to be applied for;
[0169] When the total resource consumption is less than or equal to the target resource consumption, the target application object ratio of each transcoding algorithm when the difference between the total service revenue and the total resource distribution cost is predicted to meet the revenue target;
[0170] Determine the total resource distribution cost forecast value and the total business revenue forecast value based on the viewing coverage parameters corresponding to the proportion of target application objects of each transcoding algorithm and the changes in resource distribution cost and business revenue corresponding to the changes in viewing coverage of each application object.
[0171] According to one or more embodiments of the present disclosure, determining the activation threshold of the corresponding transcoding algorithm according to the application object ratio of each transcoding algorithm includes:
[0172] Sort historical videos according to video author popularity information;
[0173] According to the ranking results and the application object ratio of each transcoding algorithm, the popularity threshold of video authors for enabling the corresponding transcoding algorithm is determined.
[0174] According to one or more embodiments of the present disclosure, determining the activation threshold of the corresponding transcoding algorithm according to the application object ratio of each transcoding algorithm includes:
[0175] Sort historical videos by video play count;
[0176] According to the ranking results and the application ratio of each transcoding algorithm, the video playback count threshold for enabling the corresponding transcoding algorithm is determined.
[0177] According to one or more embodiments of the present disclosure, determining a target transcoding algorithm according to the attribute information of the video and the enabling threshold, and transcoding the video using the target transcoding algorithm includes:
[0178] Obtaining video author popularity information of the video, and comparing the video author popularity information with a video author popularity threshold of each transcoding algorithm;
[0179] Obtaining the video play count of the video, and comparing the video play count with a video play count threshold of each transcoding algorithm;
[0180] According to the comparison result of video author popularity and / or the comparison result of video play times, a target transcoding algorithm is selected from preset transcoding algorithms, and the video is transcoded according to the target transcoding algorithm.
[0181] According to one or more embodiments of the present disclosure, the step of selecting a target transcoding algorithm from preset transcoding algorithms according to a comparison result of video author popularity and / or a comparison result of video play times includes:
[0182] The transcoding algorithm participating in the comparison is determined as the current transcoding algorithm. When the video author popularity information is equal to or greater than the video author popularity threshold of the current transcoding algorithm, and / or the number of plays is equal to or greater than the video play count threshold of the current transcoding algorithm, the current transcoding algorithm is determined as the target transcoding algorithm.
[0183] According to one or more embodiments of the present disclosure, the present disclosure provides a video transcoding device, including:
[0184] A proportion determination module, used to determine the proportion of application objects of each transcoding algorithm according to the relationship between the change amount of the proportion of application objects of each transcoding algorithm and the first change amount associated with the resource and the second change amount associated with the business;
[0185] A threshold determination module, used to determine an activation threshold of a corresponding transcoding algorithm according to a proportion of application objects of each transcoding algorithm;
[0186] The video transcoding module is used to determine a target transcoding algorithm according to the attribute information of the video and the activation threshold, and transcode the video using the target transcoding algorithm.
[0187] According to one or more embodiments of the present disclosure, an electronic device is provided. The electronic device includes:
[0188] one or more processors;
[0189] a storage device for storing one or more programs,
[0190] When the one or more programs are executed by the one or more processors, the one or more processors implement the video transcoding method described in any embodiment of the present disclosure.
[0191] According to one or more embodiments of the present disclosure, an embodiment of the present disclosure provides a storage medium containing computer executable instructions, and when the computer executable instructions are executed by a computer processor, they are used to execute the video transcoding method described in any embodiment of the present disclosure.
[0192] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0193] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0194] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A video transcoding method, characterized in that: include: According to the historical control experimental data of each transcoding algorithm, determine the change in resource consumption corresponding to the unit change in the proportion of application objects of each transcoding algorithm, and the change in resource distribution cost and business revenue corresponding to the change in viewing coverage caused by the change in the proportion of application objects of each transcoding algorithm; Determine the constraint conditions according to the application object ratio parameter of each transcoding algorithm and the change in resource consumption caused by the change in the application object ratio; Determine the optimization target based on the application object ratio parameter of each transcoding algorithm and the change in resource distribution cost and business revenue corresponding to the change in viewing coverage caused by the change in the application object ratio; Under the condition that the constraint conditions are met, determining the application object ratio of each of the transcoding algorithms when the optimization target meets the revenue target, wherein the application object ratio is the ratio of the videos applied by the transcoding algorithm to all the videos; Determining an activation threshold of a corresponding transcoding algorithm according to the application object ratio of each transcoding algorithm and attribute information of the video; wherein the attribute information is used to characterize the probability of the video being consumed; A target transcoding algorithm is determined according to the attribute information of the video and the activation threshold, and the target transcoding algorithm is used to transcode the video.
2. The method according to claim 1, characterized in that Determining the constraint conditions according to the application object ratio parameters of each transcoding algorithm and the change in resource consumption caused by the change in the application object ratio; determining the optimization target according to the application object ratio parameters of each transcoding algorithm and the change in resource distribution cost and business revenue corresponding to the change in viewing coverage caused by the change in the application object ratio; In the case where the constraint conditions are met, determining the proportion of application objects of each transcoding algorithm when the optimization target meets the revenue target includes: Set the application object ratio parameters for each transcoding algorithm; Determine the total resource consumption according to the application object proportion parameter and the relationship between the change in the proportion of each application object and the change in resource consumption; Determine a viewing coverage parameter according to the application object proportion parameter, and determine a total resource distribution cost according to the viewing coverage parameter and a relationship between a change in viewing coverage of the application object of each transcoding algorithm and a change in resource distribution cost; Determine the total business revenue according to the viewing coverage parameter and the relationship between the viewing coverage change of the application object and the business revenue change; When the total resource consumption is less than or equal to the set total resource consumption, the proportion of application objects of each transcoding algorithm is determined when the difference between the total business income and the total resource distribution cost meets the profit target.
3. The method according to claim 2, characterized in that After determining the total service revenue according to the viewing coverage parameter and the relationship between the viewing coverage change of the application object and the service revenue change, the method further includes: Determine the total target resource amount based on the total existing resource amount and the resource amount to be applied for; When the total resource consumption is less than or equal to the target resource consumption, the target application object ratio of each transcoding algorithm when the difference between the total service revenue and the total resource distribution cost is predicted to meet the revenue target; Determine the total resource distribution cost forecast value and the total business revenue forecast value based on the viewing coverage parameters corresponding to the proportion of target application objects of each transcoding algorithm and the changes in resource distribution cost and business revenue corresponding to the changes in viewing coverage of each application object.
4. The method according to claim 1, characterized in that: The step of determining the activation threshold of the corresponding transcoding algorithm according to the application object ratio of each transcoding algorithm and the attribute information of the video includes: Sort historical videos according to video author popularity information; According to the ranking results and the application object ratio of each transcoding algorithm, the popularity threshold of video authors for enabling the corresponding transcoding algorithm is determined.
5. The method according to claim 1, characterized in that: The step of determining the activation threshold of the corresponding transcoding algorithm according to the application object ratio of each transcoding algorithm and the attribute information of the video includes: Sort historical videos by video play count; According to the ranking results and the application ratio of each transcoding algorithm, the video playback count threshold for enabling the corresponding transcoding algorithm is determined.
6. The method according to claim 1, characterized in that The step of determining a target transcoding algorithm according to the attribute information of the video and the enabling threshold, and transcoding the video using the target transcoding algorithm, comprises: Obtaining video author popularity information of the video, and comparing the video author popularity information with a video author popularity threshold of each transcoding algorithm; Obtaining the video play count of the video, and comparing the video play count with a video play count threshold of each transcoding algorithm; According to the comparison result of video author popularity and / or the comparison result of video play times, a target transcoding algorithm is selected from preset transcoding algorithms, and the video is transcoded according to the target transcoding algorithm.
7. The method according to claim 6, characterized in that The step of selecting a target transcoding algorithm from preset transcoding algorithms according to the comparison result of video author popularity and / or the comparison result of video play times includes: The transcoding algorithm participating in the comparison is determined as the current transcoding algorithm. When the video author popularity information is equal to or greater than the video author popularity threshold of the current transcoding algorithm, and / or the number of plays is equal to or greater than the video play count threshold of the current transcoding algorithm, the current transcoding algorithm is determined as the target transcoding algorithm.
8. A video transcoding device, characterized in that: include: A proportion determination module is used to determine, based on historical control experimental data of each transcoding algorithm, the change in resource consumption corresponding to a unit change in the proportion of application objects of each transcoding algorithm, as well as the change in resource distribution cost and business income corresponding to the change in viewing coverage caused by the change in the proportion of application objects of each transcoding algorithm; determine constraints based on the proportion parameters of application objects of each transcoding algorithm and the change in resource consumption caused by the change in the proportion of application objects; determine optimization targets based on the proportion parameters of application objects of each transcoding algorithm and the change in resource distribution cost and business income corresponding to the change in viewing coverage caused by the change in the proportion of application objects; and determine the proportion of application objects of each transcoding algorithm when the optimization target meets the revenue target when the constraint conditions are met, wherein the proportion of application objects is the proportion of videos applied by the transcoding algorithm to all videos; A threshold determination module, used to determine the activation threshold of the corresponding transcoding algorithm according to the application object ratio of each transcoding algorithm and the attribute information of the video; wherein the attribute information is used to represent the probability of the video being consumed; The video transcoding module is used to determine a target transcoding algorithm according to the attribute information of the video and the activation threshold, and transcode the video using the target transcoding algorithm.
9. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the video transcoding method as described in any one of claims 1-7.
10. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to perform the video transcoding method according to any one of claims 1 to 7 when executed by a computer processor.
Citation Information
Patent Citations
Service resource allocation method and device
CN113327126A
Live video transcoding method and device
CN113676754A