Method and apparatus for determining target transcoding parameter template, and computer device
By automatically adjusting the transcoding parameter template through genetic algorithms and A/B testing, the problem of high manpower and time consumption in traditional technologies is solved, and efficient transcoding parameter template adjustment is achieved.
Patent Information
- Application Number
- CN202210158897.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-21
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2042-02-21
AI Technical Summary
In traditional technologies, adjusting transcoding parameter templates requires a significant amount of manpower and time.
By employing genetic algorithms and A/B testing, the transcoding parameter templates are automatically adjusted to achieve the desired playback quality by generating and comparing playback quality data from multiple transcoding parameter templates, thus reducing human intervention.
It saves development costs and testing time for template adjustments and improves the efficiency of adjusting transcoding parameter templates.
Smart Images

Figure CN114630126B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present specification relate to the technical field of computer Internet technology, and in particular, to a target transcoding parameter template determination method and device and computer equipment. BACKGROUND
[0002] With the development of network technology, more and more users entertain or learn through various short videos. In the process of sharing and watching short videos, video transcoding needs to be performed on the short videos.
[0003] In related technologies, video transcoding involves many parameters, and the parameters involved in each execution of video transcoding will have repeated parts. Combining the repeated parameters can form a transcoding parameter template, so that the formed transcoding parameter template can be called in the video transcoding process. With the change of actual data processing needs, the maintenance personnel adjusts the transcoding parameter template.
[0004] However, the adjustment of the transcoding parameter template in related technologies needs to consume a lot of manpower and time. SUMMARY
[0005] Therefore, embodiments of the present specification are committed to providing a target transcoding parameter template determination method and device, computer equipment, storage medium and computer program product to solve the technical problem that the adjustment of the transcoding parameter template in the prior art needs to consume a lot of manpower and time.
[0006] The embodiments of the present specification provide a target transcoding parameter template determination method, which comprises: generating a second template according to a first template comprising a plurality of transcoding parameters; wherein the transcoding parameters included in the first template and the second template are partially the same; wherein the first template corresponds to first playback quality data generated by playing a video file using the first template; obtaining second playback quality data of playing the video file using the second template; in the case that the second playback quality data does not reach target playback quality data, one of the first template and the second template that is closer to reaching the target playback quality data is taken as the first template; repeating the foregoing steps until the second playback quality data of the second template reaches the target playback quality data, and the obtained second template is taken as the target transcoding parameter template.
[0007] The embodiment of the present specification provides a device for determining a target transcoding parameter template, the device comprising: a transcoding template generation module configured to generate a second template according to a first template comprising a plurality of transcoding parameters; wherein the transcoding parameters included in the first template and the second template are partially the same; a quality data acquisition module configured to acquire first playback quality data of a video file played using the first template, and second playback quality data of the video file played using the second template; a first template determination module configured to, in a case where the second playback quality data does not reach target playback quality data, determine one of the first template and the second template that is closer to reaching the target playback quality data as a first template; and a target template determination module configured to repeatedly perform the functions of the aforementioned modules until the second playback quality data of the second template reaches the target playback quality data, and determine the second template obtained as the target transcoding parameter template.
[0008] The embodiment of the present specification provides a computing device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the method steps in the above embodiment when executing the computer program.
[0009] The embodiment of the present specification provides a computer-readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method steps in the above embodiment.
[0010] The embodiment of the present specification provides a computer program product comprising instructions, and the instructions are executed by a processor of a computer device to enable the computer device to perform the method steps in the above embodiment.
[0011] In the embodiment of the present specification, a second template is generated based on a genetic algorithm and a first template, and the first template and the second template are used as A version and B version of AB testing, respectively, to transcode and play a video file, to obtain playback quality data of the first template and the second template, and to gradually adjust transcoding parameters according to the playback quality data of the first template and the second template, so as to automatically adjust the transcoding parameter template to reach an expected state, without requiring too much time and effort of operation and maintenance personnel and testers, thereby saving development cost and test time of template adjustment. BRIEF DESCRIPTION OF DRAWINGS
[0012] Figure 1a A flowchart of a genetic algorithm in a scenario example provided by an embodiment is shown;
[0013] Figure 1b An application environment diagram of a method for determining a target transcoding parameter template provided by an embodiment is shown;
[0014] Figure 1cAn interaction diagram of a method for determining a target transcoding parameter template in a scenario example provided by an embodiment is shown;
[0015] Figure 1d A framework diagram of a system for determining a target transcoding parameter template provided by an embodiment is shown;
[0016] Figure 1e An application environment diagram of a method for determining a target transcoding parameter template provided by an embodiment is shown;
[0017] Figure 2 A flowchart of a method for determining a target transcoding parameter template provided by an embodiment is shown;
[0018] Figure 3 A flowchart of a method for determining a target transcoding parameter template provided by an embodiment is shown;
[0019] Figure 4 A flowchart of a method for determining a target transcoding parameter template provided by an embodiment is shown;
[0020] Figure 5 A structural block diagram of a target data determination apparatus provided by an embodiment is shown;
[0021] Figure 6 An internal structure diagram of a computer device provided by an embodiment is shown. DETAILED DESCRIPTION
[0022] The technical solutions in the embodiments of the present specification will be described clearly and completely in the following with reference to the drawings in the embodiments of the present specification. Obviously, the described embodiments are only part of the embodiments of the present specification, rather than all the embodiments of the present specification. Based on the embodiments in the present specification, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present specification.
[0023] Some terms involved in the present specification are explained below. The transcoding parameter template can be a template file provided to a user in advance and used for video transcoding of a video file. Video transcoding can refer to converting a video bitstream that has been compressed and encoded into another video bitstream to adapt to different network bandwidths, different terminal processing capabilities and different user needs. Transcoding is essentially a process of decoding first and then encoding, so the bitstream before and after conversion may or may not follow the same video coding standard.
[0024] Video bitrate can be the number of data bits transmitted per unit of time in data transmission. The commonly used unit is kbps, that is, kilobits per second. It can also be understood as a sampling rate. The larger the sampling rate per unit of time, the higher the precision, and the closer the processed video file is to the original video file.
[0025] Video frame rate can be a measure for measuring the number of frames displayed. Its unit is frames per second (FPS) or "hertz" (Hz). Video frame rate is often used in practical data processing scenarios such as film and television production and electronic games.
[0026] In one scenario example provided in the present specification, with the development of short video platforms, actual data processing requirements are becoming more and more diverse. Video files uploaded to short video platforms based on actual data processing requirements have their own characteristics. Different users watching video files use different playback devices. Different playback devices support different video files, so it is necessary to call a transcoding parameter template to transcode the video file.
[0027] In some cases, each time the transcoding parameter template is adjusted, a large amount of testing needs to be performed on the new transcoding parameter template obtained after adjustment to verify the video playback effect after adjustment. Only after verification is passed will it be deployed on the server. It can be seen that the compatibility testing and verification workload of the new transcoding parameter template obtained after adjustment is huge, which requires a lot of time and manpower.
[0028] Therefore, in the scenario example, the transcoding parameter template is adjusted in combination with AB testing and genetic algorithm model, which saves the time of developing and adjusting the template. AB testing can be understood as making two (A / B) or more (A / B / n) versions of actual data processing processes. In the same time dimension, respectively let the visitor groups with the same or similar composition as the target population randomly access these versions, collect user experience data and behavior data of each group, and finally analyze and evaluate to determine the best version among the A / B versions or A / B / n versions, and formally adopt. Genetic operations include three basic genetic operators: selection, crossover, and mutation.
[0029] Please refer to Figure 1a , the basic operation process of genetic algorithm is as follows.
[0030] (1) Initialization: Set the evolution generation counter t = 0, set the maximum evolution generation T, and randomly generate M individuals as the initial population P(0).
[0031] (2) Individual evaluation: Calculate the fitness of each individual in the population P(t).
[0032] (3) Selection operation: The selection operator is applied to the population. The purpose of selection is to directly pass on optimized individuals to the next generation or to generate new individuals through pairing and crossover and then pass them on to the next generation. The selection operation is based on the fitness evaluation of individuals in the population.
[0033] (4) Crossover operation: Apply the crossover operator to the population. The crossover operator plays a core role in the genetic algorithm.
[0034] (5) Mutation operation: The mutation operator is applied to the population. That is, the gene values at certain loci of the individual strings in the population are changed. After selection, crossover and mutation operations, the population P(t) is transformed into the next generation population P(t+1).
[0035] (6) Termination condition judgment: If t = T, then the individual with the highest fitness obtained in the evolution process is used as the result output, and the calculation is terminated.
[0036] In this scenario example, transcoding parameter templates A and B are used. First playback quality data is collected when playing a video file using transcoding parameter template A, and second playback quality data is collected when playing a video file using transcoding parameter template B. The first and second playback quality data are analyzed and evaluated. If both the first and second playback quality data are substandard, the transcoding parameter templates A and B are automatically adjusted based on a genetic algorithm.
[0037] Please see Figure 1b User A uses mobile terminal A to record a video, obtaining a source video file. Mobile terminal A uploads the source video file to server S of a short video platform. Server S has several transcoding parameter templates deployed on it. These templates are used to transcode the source video file, resulting in the corresponding video file. User B uses mobile terminal B to access server S to watch the original video file uploaded by user A. To ensure smooth and clear playback of the video file on mobile terminal B, a corresponding video file is sent to mobile terminal B based on its playback environment. This corresponding video file can be obtained by transcoding the source video file using transcoding parameter templates corresponding to mobile terminal B's playback environment. Specifically, the playback environment could include the player installed on mobile terminal B, its operating system, and its device model. Mobile terminal B receives and plays the corresponding video file. Pre-set tracking points can be configured in the application on mobile terminal B that plays the video file, allowing for the collection of initial playback quality data for the corresponding video file. Specifically, this initial playback quality data could include availability, instant loading rate, stuttering rate, clarity, or frame rate.
[0038] The server S can also generate the B transcoding parameter template according to the A transcoding parameter template. The A transcoding parameter template and the B transcoding parameter template each include a plurality of transcoding parameters, and the transcoding parameters included in the A transcoding parameter template and the B transcoding parameter template can be partially the same. The source video file is video transcoded using the B transcoding parameter template to obtain a corresponding video file. The second playback quality data corresponding to the B transcoding parameter template is also obtained by the embedding method. It can be understood that the B transcoding parameter template and the A transcoding parameter template are used in the same playback environment, i.e., the same playback environment as the mobile terminal B.
[0039] The second playback quality data can include the available rate, the second opening rate, the freezing rate, the definition, and the frame rate. The server S determines whether the second playback quality data meets the expected indicators. The expected indicators can include a plurality of indicators for the available rate, the second opening rate, the freezing rate, the definition, and the frame rate, respectively. If part of the second playback quality data does not meet the corresponding indicators, it can be determined that the second playback quality data does not meet the expected indicators. If all of the second playback quality data meets the corresponding indicators, it can be determined that the second playback quality data meets the expected indicators.
[0040] In the case where the second playback quality data does not meet the expected indicators, the first playback quality data corresponding to the A transcoding parameter template and the target playback quality data are compared, and the second playback quality data corresponding to the B transcoding parameter template and the target playback quality data are compared, and one of the first playback quality data and the second playback quality data that is closer to the target playback quality data is determined. Specifically, there are two cases: in the first case, if it is determined that the first playback quality data is closer to the target playback quality data, the A transcoding parameter template corresponding to the first playback quality data is continued as the A transcoding parameter template. In the second case, if it is determined that the second playback quality data is closer to the target playback quality data, the B transcoding parameter template corresponding to the second playback quality data is replaced as the A transcoding parameter template.
[0041] In the first case, the A transcoding parameter template corresponding to the first playback quality data is continued as the A transcoding parameter template. Based on the cross operation and the selection operation of the genetic algorithm, the C transcoding parameter template is regenerated as the B transcoding parameter template according to the plurality of transcoding parameters of the A transcoding parameter template and the parameter value range of the transcoding parameters. The second playback quality data corresponding to the B transcoding parameter template is repeatedly obtained, it is determined whether the second playback quality data meets the expected indicators, until the second playback quality data meets the expected indicators, and the B transcoding parameter template that meets the expected indicators is taken as the target transcoding parameter template.
[0042] In the second case, the B transcoding parameter template corresponding to the second playback quality data is continued as the A transcoding parameter template. Based on the crossover operation and the selection operation of the genetic algorithm, the D transcoding parameter template is regenerated from the multiple transcoding parameters of the B transcoding parameter template and the parameter value range of the transcoding parameters, as the B transcoding parameter template. The step of obtaining the second playback quality data corresponding to the B transcoding parameter template, judging whether the second playback quality data reaches the expected index, is repeatedly executed until the second playback quality data reaches the expected index, and the B transcoding parameter template reaching the expected index is taken as the target transcoding parameter template.
[0043] Since the maximum evolution number T is set in advance, the maximum number of times of repeating the above steps until the second playback quality data reaches the expected index is executed. Therefore, the number of times of executing the above steps until the second playback quality data reaches the expected index can be counted, and if the number of times reaches the maximum evolution number T, but the target transcoding parameter template satisfying the expected index is still not found, the mutation calculation of the genetic algorithm needs to be performed at this time. Specifically, the values of each transcoding parameter are randomly determined within the parameter value range of each transcoding parameter, and the E transcoding parameter template is regenerated as the A transcoding parameter template. The B transcoding parameter template is regenerated based on the A transcoding parameter template, and the above steps until the second playback quality data reaches the expected index are repeatedly executed.
[0044] In another specific scenario provided in the present specification, please refer to Figure 1c . The client of the tester is provided with a transcoding parameter template configuration page. The selection operation of the transcoding parameter is received through the transcoding parameter template configuration page. In response to the selection operation of the transcoding parameter, the multiple transcoding parameters of the initial template are determined. The transcoding parameter template configuration page is provided with a parameter range configuration item of each transcoding parameter, and the setting operation of the parameter range is received through the parameter range configuration item. In response to the setting operation of the parameter range, the parameter value range of each transcoding parameter is determined. The client sends a template determination request to the server, and the server generates the A test template and the B test template according to the initial template. The transcoding parameters included in the initial template and the A test template are partially the same. The transcoding parameters included in the initial template and the B test template are partially the same.
[0045] Please refer to Figure 1d , the video file is played by using the initial template, the A test template and the B test template respectively. The playback quality data generated by playing the video file using the initial template is recorded as the initial template quality data. The playback quality data generated by playing the video file using the A test template is recorded as the A test quality data. The playback quality data generated by playing the video file using the B test template is recorded as the B test quality data. The server collects the initial template quality data, the A test quality data and the B test quality data according to the dimensions of the playback environment.
[0046] The server evaluates whether the A test template and the B test template improve the play quality in combination with the initial template quality data, the A test quality data and the B test quality data. Specifically, the server detects whether there is qualified data in the initial template quality data, the A test quality data and the B test quality data, and if so, takes the template corresponding to the qualified data as the target transcoding parameter template. If not, the server judges whether the A test quality data and the B test quality data are higher than the initial template quality data. If the A test quality data is higher than the initial template quality data, the A test template is taken as the initial template. If the B test quality data is higher than the initial template quality data, the B test template is taken as the initial template. If the A test quality data and the B test quality data are both higher than the initial template quality data, the template with higher data is taken as the initial template. Then, the above steps of self-generating the A test template and the B test template and determining the target transcoding parameter template are repeated.
[0047] If the A test quality data and the B test quality data are both lower than the initial template quality data, the server regenerates the A test template and the B test template according to the initial template, and further repeats the above steps of self-collecting the play quality data and determining the target transcoding parameter template.
[0048] In the scene example, the play environment has multiple environment parameters. Different play environments have at least partially different environment parameters. The environment parameters include system category, device model information, encoding engine information, decoding engine information and player information.
[0049] In the scene example, the parameter value range of each transcoding parameter includes a minimum value and a maximum value. The minimum value and the maximum value are determined in combination with the multiple transcoding parameter values of the initial template. The A test template is generated in the value range between the minimum value and the transcoding parameter value, and the B test template is generated in the value range between the transcoding parameter value and the maximum value.
[0050] In the scene example, the initial template, the A test template and the B test template are respectively the transcoding parameter templates for the specified play environment.
[0051] In the present scenario example, the multiple transcoding parameters of the initial template include a transcoding format, a target bit rate, a frame rate, an inter-frame distance of adjacent key frames, a buffer size, a peak bit rate, and a resolution. The value range of the transcoding format can include H.264 format and H.265 format. The value range of the target bit rate can include (900, 2400) (unit: kbps); the value range of the frame rate can include [25, 60] (unit: fps); the value range of the inter-frame distance of adjacent key frames can include [1-100000] (unit: frame); the value range of the buffer size can include [1000, 128000] (unit: kb); the value range of the peak bit rate can include [1-100000] (unit: kb); and the value of the resolution can include 720x1280.
[0052] Referring to Figure 1e The present specification provides a target transcoding parameter template determination system, and a target transcoding parameter template determination method provided by the present specification is applied to the target transcoding parameter template determination system. The target transcoding parameter template determination system can include a hardware environment formed by a client 110 and a server 120. The client 110 communicates with the server 120 through a network. The client communicates with the server through a network. The client can be an electronic device with network access capability. Specifically, for example, the client can be a desktop computer, a tablet computer, a notebook computer, a smart phone, a digital assistant, a smart wearable device, a shopping guide terminal, a television, a smart speaker, a microphone, etc. The smart wearable device includes but is not limited to a smart bracelet, a smart watch, smart glasses, a smart helmet, a smart necklace, etc. Alternatively, the client can also be software capable of running in the above-mentioned electronic devices. The server can be an electronic device with certain computing and processing capabilities. It can have a network communication module, a processor, a memory, etc. Of course, the above-mentioned server can also refer to software running in an electronic device. The above-mentioned server can also be a distributed server, which can be a system with multiple processors, memories, network communication modules, etc. working cooperatively. Alternatively, the server can also be a server cluster formed by several servers. Alternatively, with the development of science and technology, the server can also be a new technical means capable of realizing the corresponding functions of the present specification. For example, it can be a new form of "server" based on quantum computing.
[0053] Referring to Figure 2 The present specification provides a target transcoding parameter template determination method. It can be applied to a client or a server. The target transcoding parameter template determination method includes the following steps.
[0054] Step S210: generating a second template according to a first template including multiple transcoding parameters.
[0055] In the embodiment, the first template and the second template can be transcoding parameter templates for video file transcoding. The second template can be understood as the next generation of the first template. Some transcoding parameters in the first template can be inherited into the second template. The transcoding parameter template can be understood as a combination of multiple transcoding parameters. The transcoding parameter can be a job parameter used in the video transcoding process. The transcoding parameter includes at least one of transcoding format, target bit rate, frame rate, interframe distance of adjacent key frames, buffer size, code rate peak value and definition.
[0056] Specifically, for example, the multiple transcoding parameters included in the first template are respectively transcoding format, frame rate, interframe distance of adjacent key frames, buffer size, code rate peak value. The multiple transcoding parameters included in the second template are also respectively transcoding format, frame rate, interframe distance of adjacent key frames, buffer size, code rate peak value. Among them, the transcoding parameters included in the first template and the second template are partially the same. For example, the values of the transcoding format, the frame rate and the code rate peak value in the first template and the second template are the same, while the values of the interframe distance of adjacent key frames and the buffer size are different. For another example, the values of the transcoding format and the code rate peak value in the first template and the second template are the same, while the values of the frame rate, the interframe distance of adjacent key frames and the buffer size are different.
[0057] The first template can correspond to first playback quality data generated by playing the video file using the first template. When playing the video file, playback effect data such as availability rate, second opening rate, stuttering rate, definition, frame rate, etc. can be generated, which is called playback quality data. For example, if the video file needs to be played, the video file needs to be transcoded using the first template, the output video data is played to generate some data. For example, when starting to play, there is a case of whether the playing is successful. For example, the time waiting for the first frame of picture seen by the naked eye after the video is played. For example, the smoothness and the number of stalls during video playback.
[0058] In some embodiments, since the second template is mainly used as a contrast template of the first template. The first template includes high-quality transcoding parameters, which can be selected to be inherited into the second template. Therefore, the optimized transcoding parameters can be kept unchanged, and other transcoding parameters can be adjusted. The unchanged optimized transcoding parameters form the second template with the adjusted transcoding parameters. Among them, the part of the same transcoding parameters included in the first template and the second template can be understood as the optimized transcoding parameters.
[0059] In some embodiments, the first template includes a plurality of transcoding parameters, and the same and different transcoding parameters are determined according to the plurality of transcoding parameters included in the first template, and the transcoding parameters constitute the second template. Wherein, the names of the transcoding parameters in the first template are the same as the names of the transcoding parameters in the second template, but the values of the transcoding parameters in the first template are partially the same as the values of the transcoding parameters in the second template.
[0060] Step S220: Obtain second playback quality data of the video file played using the second template.
[0061] Specifically, the second playback quality data can be generated when the video file is played using the second template. For example, the playback quality data such as availability rate, second opening rate, stuttering rate, definition, frame rate, etc. generated when the video file is played. In some embodiments, by pre-setting a burying point in the application, the second playback quality data (such as at least one of availability rate, second opening rate, stuttering rate, definition, frame rate) generated based on the second template playing the video file is collected through the burying point.
[0062] In some embodiments, the second template is used for a specified playback environment. The second playback quality data can be obtained in the dimension of the playback environment. Similarly, the first playback quality data can also be divided in the dimension of the playback environment. Wherein, the playback environment has a plurality of environment parameters. Different playback environments have at least partially different environment parameters. The environment parameters include at least one of system category, device model information, encoding engine information, decoding engine information, and player information.
[0063] Step S230: In the case where the second playback quality data does not reach the target playback quality data, the one of the first template and the second template that is closer to reaching the target playback quality data is used as the first template.
[0064] Step S240: Repeat the execution of the foregoing steps until the second playback quality data of the second template reaches the target playback quality data, and the obtained second template is used as the target transcoding parameter template.
[0065] Specifically, the video file is transcoded using the first template and the second template to play the video data, respectively, to correspondingly generate the first playback quality data of the first template and the second playback quality data of the second template. Based on the analysis and evaluation of the first playback quality data and the second playback quality data, the better transcoding parameter template is determined in the first template and the second template. In some embodiments, the target playback quality data can be pre-set. If the playback quality data of one of the first template and the second template reaches the target playback quality data, the template reaching the target playback quality data can be determined as the target transcoding parameter template.
[0066] Since the closer to the target playback quality data indicates the higher quality of the corresponding transcoding parameter template, the first playback quality data, the second playback quality data and the target playback quality data are compared respectively to determine one closer to the target playback quality data. If the playback quality data of one does not reach the target playback quality data in the first template and the second template, it indicates that the target transcoding parameter template has not been determined, and thus new transcoding parameter templates need to be generated. In order to ensure the quality of the new transcoding parameter templates, one closer to reaching the target playback quality data is further determined in the first template and the second template as the first template.
[0067] After the first template is re-determined, step S210 can be reached, and steps S210 to S230 are repeatedly executed based on the first template until the second playback quality data of the second template reaches the target playback quality data, and a qualified second template is obtained, which is used as the target transcoding parameter template.
[0068] The above method for determining the target transcoding parameter template generates the second template based on the genetic algorithm and the first template, and uses the first template and the second template as the A version and the B version of the AB test respectively, performs transcoding and playback of the video file, obtains the playback quality data of the first template and the second template, and can gradually adjust the transcoding parameters according to the playback quality data of the first template and the second template, automatically adjusts the transcoding parameter template to the expected state, and does not need to spend too much time and effort of the operation and maintenance personnel and the test personnel, thereby saving the development cost and test time of template adjustment.
[0069] In some embodiments, referring to Figure 3 , the step of generating the second template according to the first template including a plurality of transcoding parameters can include the following steps.
[0070] Step S310: According to the comparison result of the first playback quality data corresponding to the first template and the target playback quality data, one or more key transcoding parameters affecting the first playback quality data not reaching the target playback quality data are determined from the plurality of transcoding parameters included in the first template.
[0071] The first playback quality data is related to at least one of the availability rate, the second opening rate, the freezing rate, the definition, and the frame rate. For example, the first playback quality data can be in the form of a score value, the availability rate, the second opening rate, the freezing rate, the definition, and the frame rate are normalized to obtain the score value, and the score value is the first playback quality data. For example, the first playback quality data can be a data set including a plurality of elements. The elements in the first playback quality data can be a plurality of values corresponding to the availability rate, the second opening rate, the freezing rate, the definition, and the frame rate. The target playback quality data can be in the same data format as the first playback quality data or in a different data format from the first playback quality data.
[0072] Specifically, if the target playback quality data can be in the same data format as the first playback quality data, the first playback quality data corresponding to the first template and the target playback quality data are obtained, and the first playback quality data corresponding to the first template and the target playback quality data are directly compared to obtain a comparison result. If the target playback quality data can be in a different data format from the first playback quality data, for example, the first playback quality data is in a data set, and the target playback quality data is in a score value. Before comparing the first playback quality data with the target playback quality data, the first playback quality data is scored or normalized to generate a corresponding score value, and then compared with the target score value corresponding to the target playback quality data.
[0073] According to the comparison result, the quality data far from the target playback quality data can be determined. The transcoding parameter related to the quality data can be a key transcoding parameter affecting the first playback quality data not reaching the target playback quality data. For example, the first playback quality data includes the availability rate and the second opening rate. The target playback quality data includes the availability rate and the second opening rate. The availability rate and the second opening rate included in the first playback quality data are 60% and 50%, respectively. The availability rate and the second opening rate included in the target playback quality data are 70% and 90%, respectively. The difference between the availability rate included in the first playback quality data and the availability rate included in the target playback quality data is 10%, and the difference between the second opening rate included in the first playback quality data and the second opening rate included in the target playback quality data is 30%. In some cases, 30% is greater than 10%, and it can be determined that the low second opening rate can be the main reason for not meeting the standard, and therefore, the transcoding parameter related to the second opening rate is determined as the key transcoding parameter. For example, the transcoding parameter related to the second opening rate includes the target bit rate and the code rate peak value, and the target bit rate and the code rate peak value are determined as the key transcoding parameter. In some cases, the availability rate can also be determined as the main reason for not meeting the standard based on experience, and the transcoding parameter related to the availability rate includes the transcoding format as the key transcoding parameter.
[0074] Step S320: modifying the key transcoding parameter in the first template to obtain a second template.
[0075] Specifically, after determining the key transcoding parameter in the first template, the value of the key transcoding parameter can be reset based on an experience value, the value of the key transcoding parameter can be increased, or the value of the key transcoding parameter can be decreased. The second template is composed of the adjusted key transcoding parameter and the transcoding parameters in the first template that are not adjusted. For example, if the availability needs to be improved, the transcoding format can be adjusted to H.264 format. For example, if the second opening rate needs to be improved, the transcoding parameters related to the second opening rate, such as the target bit rate and the peak bit rate, can be decreased. In the case that the availability, the second opening rate, and the stall rate in the playback quality data meet the standards, the resolution and the frame rate in the transcoding parameters can be increased accordingly.
[0076] In this embodiment, according to the comparison result of the first playback quality data and the target playback quality data, the key transcoding parameter is determined from the multiple transcoding parameters included in the first template, the key transcoding parameter is quickly located, the key transcoding parameter is modified accordingly to obtain the second template, the probability of the transcoding parameter template being in a positive adjustment state is increased, the probability of the transcoding parameter template being adjusted worse and worse is reduced, and the adjustment efficiency of the transcoding parameter template is improved.
[0077] In some embodiments, the first playback quality data is generated according to quality data of multiple evaluation dimensions. Different quality data corresponds to different transcoding parameters in the first template. Specifically, the quality data can be at least one of the availability, the second opening rate, the stall rate, the resolution, and the frame rate. At least one of the availability, the second opening rate, the stall rate, the resolution, and the frame rate is used as an evaluation dimension for determining the first playback quality data. The first playback quality data is determined according to at least one of the availability, the second opening rate, the stall rate, the resolution, and the frame rate. For example, the first playback quality data can be in the form of a score value, the availability, the second opening rate, the stall rate, the resolution, and the frame rate that affect the first playback quality data are scored to obtain a score value, which is the first playback quality data.
[0078] Since different transcoding parameters affect different quality data, or different quality data are related to different transcoding parameters, different quality data correspond to different transcoding parameters in the first template. For example, availability is related to video format (codec). The video format includes two formats of H.264 and H.265. It can be determined whether the H.265 format is supported according to the device model information and browser information. For example, the stall rate can be related to the target bit rate, frame rate, inter-frame distance of adjacent key frames, buffer size, peak rate, and resolution. The second open rate can also be related to the target bit rate, frame rate, inter-frame distance of adjacent key frames, buffer size, peak rate, and resolution.
[0079] In some embodiments, the first playback quality data is generated according to quality data of multiple evaluation dimensions. Different quality data correspond to different transcoding parameters in the first template. For details, please refer to Figure 4 In the plurality of transcoding parameters included in the first template, the step of determining the key transcoding parameter affecting the first playback quality data not reaching the target playback quality data can include the following steps.
[0080] Step S410: In the quality data of multiple evaluation dimensions, determine the constraint quality data.
[0081] Step S420: At least part of the transcoding parameters corresponding to the constraint quality data are the key transcoding parameters.
[0082] The constraint quality data has a greater impact on the first playback quality data than the rest of the quality data in the first template. For example, the first playback quality data is generated according to the stall rate, resolution, and availability. If the impact of the stall rate on the first playback quality data is greater than the impact of the resolution and availability on the first playback quality data, the stall rate can be determined as the constraint quality data. Specifically, the impact of the quality data of multiple evaluation dimensions on the first playback quality data is different, and the constraint quality data with a greater impact weight can be determined in the quality data of multiple evaluation dimensions according to the impact weight. The number of constraint quality data can be one or more.
[0083] Further, the quality data corresponds to different transcoding parameters in the first template. The transcoding parameters corresponding to the quality data can be one or multiple. When the transcoding parameters corresponding to the quality data is one, the one transcoding parameter corresponding to the quality data is taken as the key transcoding parameter. When the transcoding parameters corresponding to the quality data is multiple, part or all of the transcoding parameters corresponding to the quality data are taken as the key transcoding parameter. For example, the availability is related to the video format (codec). If the availability is determined to restrict the quality data, the video format (codec) is determined as the key transcoding parameter. For example, the stall rate can be related to the target bit rate, frame rate, and frame interval of adjacent key frames. If the stall rate is determined to restrict the quality data, at least one of the target bit rate, frame rate, and frame interval of adjacent key frames is determined as the key transcoding parameter. For example, the second open rate can be related to the buffer size, code rate peak value, and resolution. If the second open rate is determined to restrict the quality data, at least one of the buffer size, code rate peak value, and resolution is determined as the key transcoding parameter.
[0084] In the embodiment, by determining the quality data that restricts the quality data in the quality data of the multiple evaluation dimensions, and taking at least part of the transcoding parameters corresponding to the quality data that restricts the quality data as the key transcoding parameter, the key transcoding parameter is quickly and accurately located, the useless work of adjusting the transcoding parameter template is reduced, and the time cost of adjusting the transcoding parameter template is reduced.
[0085] In some embodiments, each evaluation dimension is respectively provided with an evaluation weight. Correspondingly, in the quality data of the multiple evaluation dimensions, the step of determining the quality data that restricts the quality data can include: determining a target dimension that meets a preset weight threshold according to the evaluation weights of the multiple evaluation dimensions; and taking the quality data corresponding to the target dimension as the quality data that restricts the quality data.
[0086] The preset weight threshold can be determined in combination with the actual situation. Each evaluation dimension is respectively provided with an evaluation weight, and different evaluation weights represent the influence degree of the quality data on the first playback quality data in different evaluation dimensions. Specifically, the evaluation weight of each evaluation dimension can be determined, the evaluation weight with the maximum evaluation weight is determined as the target dimension, and the quality data corresponding to the target dimension is taken as the quality data that restricts the quality data. The evaluation weights of the evaluation dimensions can be sorted from large to small, and a plurality of evaluation dimensions at the front of the sorting are taken as the target dimensions. The quality data corresponding to the target dimensions is taken as the quality data that restricts the quality data. The evaluation weight threshold can be preset, the evaluation weights of the multiple evaluation dimensions are compared with the preset weight threshold, and the evaluation dimensions greater than the preset weight threshold are taken as the target dimensions. The quality data corresponding to the target dimensions is taken as the quality data that restricts the quality data.
[0087] In this embodiment, the target dimension with greater influence on the first playback quality data is determined according to the evaluation weight of the evaluation dimension, the quality data corresponding to the target dimension is taken as the constraint quality data, the constraint quality data is quickly and accurately determined, and the key transcoding parameter is conveniently found.
[0088] In some embodiments, the target transcoding parameter template is used for a specified playback environment. Correspondingly, the method can further include setting evaluation weights for each evaluation dimension respectively according to the playback environment.
[0089] Specifically, the target transcoding parameter template is used for a specified playback environment. The playback environment has a plurality of environment parameters. Different playback environments have at least partially different environment parameters. The environment parameters can include at least one of a system category, device model information, encoding engine information, decoding engine information, and player information. Evaluation weights are set for each evaluation dimension respectively according to different playback environments. Different evaluation weights represent the influence degree of the quality data on the first playback quality data on different evaluation dimensions. For example, the environment parameters of the playback environment include a system category and device model information. The system category includes an Android system, an IOS system, and a Harmony system. The device model information includes a brand A-P30, a brand B-X13, and a brand C-M40. The playback environment includes a brand A-P30 Android system, a brand B-X13 IOS system, and a brand C-M40 Harmony system. Different evaluation weights of the evaluation dimensions are set for the brand A-P30 Android system, the brand B-X13 IOS system, and the brand C-M40 Harmony system. For example, the evaluation weight of the availability for the brand A-P30 Android system is 90%, the evaluation weight of the availability for the brand B-X13 IOS system is 70%, and the evaluation weight of the availability for the brand C-M40 Harmony system is 60%.
[0090] In some embodiments, in the plurality of transcoding parameters included in the first template, the step of determining the key transcoding parameter affecting the first playback quality data not reaching the target playback quality data can include: determining the same transcoding parameter in the first template and the second template according to the comparison result; and taking the transcoding parameter in the first template except the same transcoding parameter as the key transcoding parameter. Alternatively, the different transcoding parameter in the first template and the second template is determined according to the comparison result; and the different transcoding parameter in the first template is taken as the key transcoding parameter.
[0091] The transcoding parameters include at least one of a transcoding format, a target bit rate, a frame rate, an interval of key frames, a buffer size, a peak bit rate, and a definition. Specifically, first playback quality data corresponding to the first template is obtained. A comparison result is obtained by comparing the first playback quality data and the target playback quality data. The plurality of transcoding parameters included in the first template are compared with the plurality of transcoding parameters included in the second template, and the same transcoding parameters are determined. The same transcoding parameters are less likely to affect the difference in the playback quality data than the different transcoding parameters. Therefore, the same transcoding parameters in the first template and the second template are determined, and the transcoding parameters in the first template other than the same transcoding parameters are used as the key transcoding parameters. The key transcoding parameters in the first template are modified to obtain the second template.
[0092] In some embodiments, the plurality of transcoding parameters included in the first template are compared with the plurality of transcoding parameters included in the second template, and the different transcoding parameters are determined. The different transcoding parameters are more likely to affect the difference in the playback quality data than the same transcoding parameters. Therefore, the different transcoding parameters in the first template and the second template are determined, and the different transcoding parameters in the first template are used as the key transcoding parameters. The key transcoding parameters in the first template are modified to obtain the second template.
[0093] In the present embodiment, the key transcoding parameters are determined from the same transcoding parameters or the different transcoding parameters in the first template and the second template, and the key transcoding parameters are determined from the plurality of transcoding parameters included in the first template, so that the key transcoding parameters are determined quickly and accurately.
[0094] In some embodiments, the transcoding parameters respectively correspond to a parameter value range. The step of modifying the key transcoding parameters in the first template to obtain the second template can include: modifying the key transcoding parameters in the first template within the parameter value range to obtain the second template.
[0095] Specifically, after determining the key transcoding parameters in the first template, the values of the key transcoding parameters can be reset based on experience values, the values of the key transcoding parameters can be increased in the parameter value range, or the values of the key transcoding parameters can be decreased in the parameter value range. The second template is composed of the adjusted key transcoding parameters and the transcoding parameters in the first template that are not adjusted. For example, if the available rate needs to be improved, the available rate corresponds to a range including H.264 format and H.265 format, and the transcoding format can be adjusted to H.264 format. For example, if the second opening rate needs to be improved, the transcoding parameters related to the second opening rate, such as the target bit rate and the peak bit rate, can be decreased. The value range of the target bit rate can include (900, 2400) (unit: kbps), and the target bit rate can be decreased in the range (900, 2400). The value range of the peak bit rate can include [1-100000] (unit: kb), and the peak bit rate can be decreased in the range [1-100000].
[0096] In the embodiment, the key transcoding parameters are modified in the parameter value range to obtain the second template, the parameter value range is used as a limited condition for adjusting the first template, the probability of the transcoding parameter template being adjusted to be worse is reduced, and the adjustment efficiency of the transcoding parameter template is improved.
[0097] In some embodiments, the target transcoding parameter template is used in a specified playing environment. The playing environment has a plurality of environment parameters. Different playing environments have at least partially different environment parameters.
[0098] In some embodiments, the environment parameters can include at least one of a system category, device model information, encoding engine information, decoding engine information, and player information. Specifically, the system category can include at least one of iOS, Android, and H5. The device model information can include a device signal of a terminal of any brand. The encoding engine information can be information of an engine for encoding a video file. The decoding engine information can be information of an engine for decoding a video file. The player information can be information of an application for playing a video file.
[0099] In some embodiments, the environment parameters can further include network conditions. If the freezing rate is improved, it can be determined whether the network conditions are good. If the network is good, the parameters related to the freezing rate (such as the target bit rate, the frame rate, the frame interval between adjacent key frames, the buffer size, the peak bit rate, and the resolution) can be decreased according to the parameters of the previously tested template.
[0100] In some embodiments, the step of generating a second template according to a first template including a plurality of transcoding parameters includes: generating a plurality of second templates according to the first template; and wherein different second templates include different plurality of transcoding parameters.
[0101] wherein, wherein, the first template and the second template can be a transcoding parameter template for video file transcoding. The second template can be understood as the next generation of the first template. Part of the transcoding parameters in the first template can be inherited into the second template. Specifically, since the second template is mainly used for the contrast template of the first template. The first template includes high-quality transcoding parameters, and the high-quality transcoding parameters can be selected to be inherited into the second template. The number of the second template can be multiple, so that the optimized transcoding parameters can be kept unchanged, and other transcoding parameters can be adjusted multiple times. Each time the other transcoding parameters are adjusted, the optimized transcoding parameters that remain unchanged can be obtained to adjust the transcoding parameters. According to each time the optimized transcoding parameters that remain unchanged and each time the adjusted transcoding parameters, a corresponding second template is formed. Wherein, the multiple transcoding parameters included in different second templates are different. The same part of the transcoding parameters included in different second templates can be understood as the optimized transcoding parameters inherited from the first template.
[0102] In the embodiment, a plurality of second templates are generated according to the first template. When adjusting the transcoding parameter template each time, the number of templates tested in parallel is increased, and the template test time is correspondingly reduced, and the efficiency of determining the template transcoding parameter template is improved.
[0103] In some embodiments, the transcoding parameters respectively correspond to a parameter value range between a maximum parameter and a minimum parameter; the transcoding parameters of part of the second templates are located in a range between the minimum parameter and the transcoding parameter value of the first template; and the transcoding parameters of part of the second templates are located in a range between the transcoding parameter value of the first template and the maximum parameter.
[0104] Specifically, the parameter value range of each transcoding parameter includes a minimum value and a maximum value. Taking the plurality of transcoding parameter values of the first template as intermediate values, the value range between the minimum value and the transcoding parameter value of the first template and the value range between the transcoding parameter value of the first template and the maximum value are determined. In the value range between the minimum value and the transcoding parameter value of the first template, part of the second templates are generated. In the value range between the transcoding parameter value of the first template and the maximum value, another part of the second templates are generated. Exemplarily, the number of the second templates is 2, and is denoted as A template and B template. The generation of the A template and the B template based on the first template is exemplarily described below. The transcoding parameter value of the first template is denoted as an intermediate value, and the parameter value range is min to max. According to the intermediate value and the parameter value range, the value range of min to the intermediate value and the value range of the intermediate value to max are generated. In the value range of min to the intermediate value, a parameter value is randomly obtained as the transcoding parameter of the A template. In the value range of the intermediate value to max, a parameter value is randomly obtained as the transcoding parameter of the B template.
[0105] In the embodiment, the value range of the transcoding parameter of the second template is determined to be between the minimum parameter and the value of the transcoding parameter of the first template, or between the value of the transcoding parameter of the first template and the maximum parameter, so that the adjustment range of the transcoding parameter template can be reduced, and the target transcoding parameter template can be quickly determined.
[0106] In some embodiments, in a case where the second playback quality data does not reach the target playback quality data, the step of determining one of the first template and the second template as the first template can include: in a case where the second playback quality data is closer to the target playback quality data, replacing the first template with the second template as the first template; or in a case where the first playback quality data is closer to the target playback quality data, continuing to use the first template as the first template.
[0107] Specifically, the video file is transcoded by using the first template and the second template respectively to play the video data, and the first playback quality data corresponding to the first template and the second playback quality data corresponding to the second template are generated. The first playback quality data and the second playback quality data are analyzed and evaluated, and a better transcoding parameter template is determined from the first template and the second template. The target playback quality data can be preset. If the playback quality data of one of the first template and the second template reaches the target playback quality data, the template reaching the target playback quality data can be determined as the target transcoding parameter template. If the second playback quality data is closer to the target playback quality data, the second template is used to replace the first template as the first template. If the first playback quality data is closer to the target playback quality data, the first template is continued to be used as the first template.
[0108] In the embodiment, the genetic algorithm is used to determine the optimized template as the first template by comparing the playback quality data, so as to provide a correct direction and basis for subsequent template adjustment, facilitate quick completion of template adjustment, and determine the target transcoding parameter template.
[0109] In some embodiments, the transcoding parameters correspond to parameter value ranges respectively. The method can further include: in a case where the number of times of repeating the steps S210 to S230 reaches a threshold number of times, and the first playback quality data and the second playback quality data do not reach the target playback quality data, generating a third template based on a preset rule according to the parameter value ranges; and using the third template as the first template to re-execute the steps S210 to S240.
[0110] Specifically, the steps S210 to S230 include generating a second template according to a first template including a plurality of transcoding parameters. The second playback quality data of playing the video file using the second template is obtained. In the case that the second playback quality data does not reach the target playback quality data, one of the first template and the second template that is closer to reaching the target playback quality data is taken as the first template.
[0111] Since the maximum evolution number T (i.e., the maximum number of times of repeating the steps S210 to S230 until the second playback quality data reaches the expected index) is set in advance, the execution of the steps S210 to S230 can be counted, and the execution number is obtained. If the execution number reaches the maximum evolution number T, but the target transcoding parameter template satisfying the expected index is still not found, the mutation calculation of the genetic algorithm needs to be performed. Specifically, new transcoding parameter values can be randomly determined in the parameter value range of each transcoding parameter to generate a third template; and the third template is taken as the first template. The second template is regenerated based on the first template, and the steps S210 to S240 are repeatedly executed.
[0112] In the embodiment, in the case that the number of cycles reaches the maximum evolution number T, but the target transcoding parameter template satisfying the expected index is still not found, it indicates that the adjustment direction at this time has a problem, and a new adjustment direction needs to be determined. The previous transcoding parameters do not have reference value, and thus do not need to be inherited. Therefore, the third template is regenerated based on the mutation strategy of the genetic algorithm, so as to avoid the adjustment effect being worse and worse, and reduce the probability of wasting a large amount of test cost and time.
[0113] The embodiment of the present specification provides a method for determining a target transcoding parameter template, wherein the target transcoding parameter template is used for a specified playback environment; the playback environment has a plurality of environment parameters; different playback environments have at least partially different environment parameters. The environment parameters include at least one of system category, device model information, encoding engine information, decoding engine information, and player information. Specifically, the method for determining the target transcoding parameter template includes the following steps.
[0114] The step S502 includes determining, in the plurality of transcoding parameters included in the first template, a key transcoding parameter affecting that the first playback quality data does not reach the target playback quality data according to a comparison result of the first playback quality data corresponding to the first template and the target playback quality data.
[0115] The first playback quality data is generated by playing the video file using the first template. The first playback quality data is generated according to quality data of multiple evaluation dimensions; different quality data corresponds to different transcoding parameters in the first template. Each evaluation dimension is provided with an evaluation weight. Specifically, a target dimension satisfying a preset weight threshold is determined according to the evaluation weights of the multiple evaluation dimensions; the quality data corresponding to the target dimension is taken as constraint quality data; and at least part of the transcoding parameters corresponding to the constraint quality data are taken as key transcoding parameters. The constraint quality data has a greater influence on the first playback quality data than the remaining quality data in the first template.
[0116] Step S504: modifying the key transcoding parameters in the first template to obtain a second template.
[0117] The transcoding parameters each correspond to a parameter value range. Specifically, the key transcoding parameters in the first template are modified within the parameter value range to obtain the second template.
[0118] Step S506: obtaining second playback quality data of the video file played using the second template.
[0119] Step S508: in the case where the second playback quality data does not reach the target playback quality data, taking one of the first template and the second template that is closer to reaching the target playback quality data as the first template.
[0120] Step S510: jumping to step S502, and repeatedly executing the foregoing steps S502 to S508 until the second playback quality data of the second template reaches the target playback quality data, and taking the obtained second template as the target transcoding parameter template.
[0121] Step S512: in the case where the number of times of repeatedly executing the foregoing steps S502 to S508 reaches a number threshold, and the first playback quality data and the second playback quality data both do not reach the target playback quality data, generating a third template according to the parameter value range based on a preset rule.
[0122] Step S514: taking the third template as the first template, and re-executing the foregoing steps S502 to S510.
[0123] Step S516: in the case where the second playback quality data reaches the target playback quality data, taking the second template as the target transcoding parameter template.
[0124] It should be understood that although the steps in the above flowcharts are shown in sequence according to the directions of the arrows, the steps are not necessarily executed in the order of the directions of the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other sequences. Moreover, at least some of the steps in the above flowcharts can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of the steps or stages is not necessarily sequential, but can be alternately or alternately executed with at least part of other steps or steps or stages in other steps.
[0125] Referring to Figure 5 The embodiments of the present specification provide a target transcoding parameter template determination apparatus. The target transcoding parameter template determination apparatus comprises a transcoding template generation module, a quality data acquisition module, a first template determination module and a target template determination module.
[0126] The transcoding template generation module is configured to generate a second template according to a first template comprising a plurality of transcoding parameters; wherein the transcoding parameters included in the first template and the second template are partially the same; wherein the first template corresponds to first playback quality data generated by playing a video file using the first template.
[0127] The quality data acquisition module is configured to acquire second playback quality data of playing the video file using the second template.
[0128] The first template determination module is configured to, in the case that the second playback quality data does not reach the target playback quality data, determine one of the first template and the second template that is closer to reaching the target playback quality data as the first template.
[0129] The target template determination module is configured to repeatedly execute the functions of the aforementioned modules until the second playback quality data of the second template reaches the target playback quality data, and obtain the second template as the target transcoding parameter template.
[0130] The specific limitations of the target transcoding parameter template determination apparatus can be referred to the limitations of the target transcoding parameter template determination method in the foregoing, which will not be repeated here. Each module in the above target transcoding parameter template determination apparatus can be realized by software, hardware and combinations thereof, in whole or in part. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each of the above modules.
[0131] In some embodiments, a computer device is provided, which can be a terminal, and its internal structure diagram can be as shown in Figure 6As shown in the figure. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner. Wireless mode can be achieved through WIFI, operator network, NFC (near field communication) or other technologies. The computer program is executed by the processor to implement a target transcoding parameter template determination method. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device. It can also be an external keyboard, touchpad or mouse, etc.
[0132] Those skilled in the art can understand that, Figure 6 The skilled in the art can understand that,
[0133] In some embodiments, a computer device is provided, including a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the method steps in the above embodiments.
[0134] In some embodiments, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by the processor to implement the method steps in the above embodiments.
[0135] In some embodiments, a computer program product is also provided, which includes instructions, and the above instructions can be executed by the processor of the computer device to implement the method steps in the above embodiments.
[0136] Those skilled in the art can understand that all or part of the processes in the above-mentioned method embodiments can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiments of each method. Any reference to memory, storage, database or other medium used in each embodiment provided in the description can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0137] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of each technical feature in the above embodiments are not described, however, as long as the combination of these technical features does not exist, it should be considered as the scope of the description.
[0138] The above only describes the preferred embodiments of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for determining a target transcoding parameter template, characterized in that, The method comprises: generating a second template according to a first template comprising a plurality of transcoding parameters, including determining, from a comparison result of first playback quality data corresponding to the first template and target playback quality data, among the plurality of transcoding parameters included in the first template, a key transcoding parameter affecting that the first playback quality data does not reach the target playback quality data; modifying the key transcoding parameter in the first template to obtain the second template; wherein the transcoding parameters included in the first template and the second template are partially the same; wherein the first template corresponds to first playback quality data generated by playing a video file using the first template; obtaining second playback quality data of playing the video file using the second template; in the case that the second playback quality data does not reach the target playback quality data, taking one of the first template and the second template that is closer to reaching the target playback quality data as the first template; repeating all the preceding steps until the second playback quality data of the second template reaches the target playback quality data, and taking the obtained second template as the target transcoding parameter template.
2. The method of claim 1, wherein, The first playback quality data is generated according to quality data of a plurality of evaluation dimensions; different quality data corresponds to different transcoding parameters in the first template; correspondingly, the step of determining, among the plurality of transcoding parameters included in the first template, a key transcoding parameter affecting that the first playback quality data does not reach the target playback quality data, comprises: determining a constraint quality data among the quality data of the plurality of evaluation dimensions; wherein the influence of the constraint quality data on the first playback quality data is greater than that of the remaining quality data in the first template; taking at least part of the transcoding parameters corresponding to the constraint quality data as the key transcoding parameter.
3. The method of claim 2, wherein, Each of the evaluation dimensions is respectively provided with an evaluation weight; correspondingly, the step of determining a constraint quality data among the quality data of the plurality of evaluation dimensions comprises: determining a target dimension satisfying a preset weight threshold according to the evaluation weights of the plurality of evaluation dimensions; taking the quality data corresponding to the target dimension as the constraint quality data.
4. The method of claim 3, wherein, The target transcoding parameter template is used for a specified playback environment; correspondingly, the method further comprises: respectively setting the evaluation weights for each of the evaluation dimensions corresponding to the playback environment.
5. The method of claim 1, wherein, The step of determining, among the plurality of transcoding parameters included in the first template, a key transcoding parameter affecting that the first playback quality data does not reach the target playback quality data, comprises: determining, according to the comparison result, the same transcoding parameters in the first template and the second template; taking the transcoding parameters in the first template other than the same transcoding parameters as the key transcoding parameters; or determining, according to the comparison result, different transcoding parameters in the first template and the second template; taking the different transcoding parameters in the first template as the key transcoding parameters.
6. The method of claim 1, wherein, The transcoding parameters respectively correspond to parameter value ranges; The step of modifying the key transcoding parameter in the first template to obtain the second template comprises: The key transcoding parameter in the first template is modified in the parameter value range to obtain the second template.
7. The method of claim 1, wherein, The target transcoding parameter template is used for a designated playing environment; the playing environment has a plurality of environment parameters; different playing environments have at least partially different environment parameters.
8. The method of claim 7, wherein, The environment parameters include at least one of system category, device model information, encoding engine information, decoding engine information, and player information.
9. The method of claim 1, wherein, The step of generating the second template according to the first template including a plurality of transcoding parameters comprises: A plurality of second templates are generated according to the first template; wherein different second templates include partially different transcoding parameters.
10. The method of claim 9, wherein, The transcoding parameters respectively correspond to a parameter value range between a maximum parameter and a minimum parameter; transcoding parameters of some second templates are located in a range between the minimum parameter and the transcoding parameter value of the first template; Transcoding parameters of some second templates are located in a range between the transcoding parameter value of the first template and the maximum parameter.
11. The method of claim 1, wherein, In the case that the second playing quality data does not reach the target playing quality data, the step of taking one of the first template and the second template that is closer to reaching the target playing quality data as the first template comprises: In the case that the second playing quality data is closer to reaching the target playing quality data, the second template is used to replace the first template as the first template; or In the case that the first playing quality data is closer to reaching the target playing quality data, the first template is continuously used as the first template.
12. The method of claim 1, wherein, The transcoding parameters respectively correspond to a parameter value range; further comprising: In the case that the number of times of repeating the aforementioned all steps reaches a number threshold value, and the first playing quality data and the second playing quality data do not reach the target playing quality data, a third template is generated based on a preset rule according to the parameter value range; The third template is taken as the first template, and all steps in claim 1 are re-executed.
13. The method of claim 1, wherein, The method further comprises: In the case that the second playing quality data reaches the target playing quality data, the second template is taken as the target transcoding parameter template.
14. A device for determining a target transcoding parameter profile, characterized in that The device comprises: A transcoding template generation module is configured to generate a second template according to a first template including a plurality of transcoding parameters, including determining, in the plurality of transcoding parameters included in the first template, a key transcoding parameter affecting that the first playing quality data does not reach the target playing quality data according to a comparison result of a first playing quality data corresponding to the first template and a target playing quality data; wherein the transcoding parameters included in the first template and the second template are partially same; wherein the first template corresponds to a first playing quality data generated by playing a video file using the first template; A quality data acquisition module is configured to acquire a second playing quality data of playing the video file using the second template. The first template determining module is configured to, in the case that the second playback quality data does not reach the target playback quality data, determine one of the first template and the second template that is closer to the target playback quality data as a first template; The target template determining module is configured to repeatedly execute the functions of all the modules until the second playback quality data of the second template reaches the target playback quality data, and determine the second template obtained as the target transcoding parameter template. The device is further configured to modify the key transcoding parameters in the first template to obtain the second template.
15. A computer device, comprising: The device comprises: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the method for determining the target transcoding parameter template according to any one of claims 1 to 13.
Citation Information
Patent Citations
Method and system of video encoding optimization
US20180367799A1