Transcoding parameter determination method, apparatus, device, storage medium, and program product
Patent Information
- Application Number
- CN202611237050.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-14
- Publication Date
- 2026-10-30
AI Technical Summary
然而,这种方法存在灵活性较差的问题
[0021]上述转码参数确定方法、装置、计算机设备、计算机可读存储介质和计算机程序产品,在接收到视频数据的情况下,基于视频数据确定视频数据的场景类型,并基于场景类型从参数搜索区间内确定初始转码参数;然后,基于初始转码参数生成多组候选转码参数,并利用各候选转码参数分别对视频数据进行试转码,获得各候选转码参数对应的试转码结果;最后,获取与场景类型匹配的目标权重,并基于目标权重对各候选转码参数对应的试转码结果进行评估,得到视频数据的目标转码参数。本申请提供的转码参数确定方法,针对不同的场景类型下的视频数据,可以匹配满足其场景需求的转码参数,相比于现有技术中采用固定的转码参数,可以有效提高转码参数确定的灵活性。
Smart Images

Figure CN123020798A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for determining transcoding parameters. Background Technology
[0002] Video transcoding refers to the process of re-encoding and converting parameters such as encoding format, resolution, and bitrate of a video according to preset encoding rules. By transcoding video data, it is possible to adapt to the limited network transmission bandwidth and device storage space requirements.
[0003] In existing technologies, most methods use fixed transcoding parameters to transcode video data. However, this method suffers from a lack of flexibility. Summary of the Invention
[0004] Therefore, it is necessary to provide a more flexible method, apparatus, computer device, computer-readable storage medium, and computer program product for determining transcoding parameters to address the aforementioned technical problems.
[0005] Firstly, this application provides a method for determining transcoding parameters, including:
[0006] Upon receiving video data, the scene type of the video data is determined based on the video data, and the initial transcoding parameters are determined from the parameter search range based on the scene type;
[0007] Multiple sets of candidate transcoding parameters are generated based on the initial transcoding parameters, and the video data is transcoded using each candidate transcoding parameter to obtain the transcoding result corresponding to each candidate transcoding parameter.
[0008] Obtain the target weights that match the scene type, and evaluate the trial transcoding results corresponding to each candidate transcoding parameter based on the target weights to obtain the target transcoding parameters for the video data.
[0009] In one embodiment, the trial transcoding results corresponding to each candidate transcoding parameter are evaluated based on the target weight to obtain the target transcoding parameters for the video data. This includes: for each set of candidate transcoding parameters, determining the evaluation result of the candidate transcoding parameter based on the target weight and the trial transcoding results corresponding to the candidate transcoding parameter; if there is a target evaluation result that meets the preset conditions among the evaluation results of each candidate transcoding parameter, determining the candidate transcoding parameter corresponding to the target evaluation result as the target transcoding parameter; if there is no target evaluation result among the evaluation results of each candidate transcoding parameter, adjusting each candidate transcoding parameter to obtain multiple new sets of candidate transcoding parameters, returning to the step of performing trial transcoding on the video data using each candidate transcoding parameter to obtain the trial transcoding results corresponding to each candidate transcoding parameter, and continuing to execute until there is a target evaluation result that meets the preset conditions among the evaluation results of each candidate transcoding parameter, and determining the candidate transcoding parameter corresponding to the target evaluation result as the target transcoding parameter.
[0010] In one embodiment, the candidate transcoding parameters are adjusted to obtain multiple sets of new candidate transcoding parameters, including: based on the evaluation results of each candidate transcoding parameter, selecting a first candidate transcoding parameter and a second candidate transcoding parameter from the candidate transcoding parameters, wherein the first candidate transcoding parameter is the candidate transcoding parameter with the best evaluation result among the candidate transcoding parameters, and the second candidate transcoding parameter is the candidate transcoding parameter with the worst evaluation result among the candidate transcoding parameters; adjusting the other candidate transcoding parameters other than the first and second candidate transcoding parameters among the candidate transcoding parameters to obtain new other candidate transcoding parameters; and determining the first candidate transcoding parameter, the second candidate transcoding parameter, and the new other candidate transcoding parameters as multiple sets of new candidate transcoding parameters.
[0011] In one embodiment, determining the initial transcoding parameters from the parameter search range based on the scene type includes: using a thought chain model to determine the initial transcoding parameters from the parameter search range based on the scene type and the performance attributes of the transcoding device.
[0012] In one embodiment, the initial transcoding parameters are determined from the parameter search range based on the scene type and the performance attributes of the transcoding device using a thought chain model. This includes: inputting the scene type, performance attributes, and parameter search range into the thought chain model, and performing chain reasoning through the thought chain model to obtain the initial transcoding parameters. The chain reasoning includes determining the transcoding target based on the scene type, generating transcoding parameter constraint information based on the performance attributes, and determining the initial transcoding parameters from the parameter search range based on the transcoding target and the transcoding parameter constraint information.
[0013] In one embodiment, the method further includes: acquiring historical transcoding records and determining optimal transcoding parameters based on the historical transcoding records; and constructing a parameter search interval centered on the optimal transcoding parameters and based on preset upper and lower limits.
[0014] Secondly, this application also provides a transcoding parameter determining device, comprising:
[0015] The determination module is used to determine the scene type of the video data based on the received video data, and to determine the initial transcoding parameters from the parameter search range based on the scene type.
[0016] The generation module is used to generate multiple sets of candidate transcoding parameters based on the initial transcoding parameters, and to perform trial transcoding on the video data using each candidate transcoding parameter to obtain the trial transcoding result corresponding to each candidate transcoding parameter.
[0017] The execution module is used to obtain the target weights that match the scene type, and evaluate the trial transcoding results corresponding to each candidate transcoding parameter based on the target weights to obtain the target transcoding parameters of the video data.
[0018] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in any of the embodiments of the first aspect above.
[0019] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the embodiments of the first aspect above.
[0020] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any of the embodiments of the first aspect above.
[0021] The aforementioned transcoding parameter determination method, apparatus, computer device, computer-readable storage medium, and computer program product, upon receiving video data, determine the scene type of the video data based on the video data, and determine initial transcoding parameters from a parameter search range based on the scene type. Then, based on the initial transcoding parameters, multiple sets of candidate transcoding parameters are generated, and trial transcoding is performed on the video data using each candidate transcoding parameter to obtain the trial transcoding result corresponding to each candidate transcoding parameter. Finally, a target weight matching the scene type is obtained, and the trial transcoding results corresponding to each candidate transcoding parameter are evaluated based on the target weight to obtain the target transcoding parameters for the video data. The transcoding parameter determination method provided in this application can match transcoding parameters that meet the scene requirements for video data under different scene types, effectively improving the flexibility of transcoding parameter determination compared to the use of fixed transcoding parameters in the prior art. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a flowchart illustrating a method for determining transcoding parameters in one embodiment;
[0024] Figure 2 This is a flowchart illustrating a method for obtaining target transcoding parameters of video data in one embodiment;
[0025] Figure 3 This is a flowchart illustrating a method for obtaining multiple sets of new candidate transcoding parameters in one embodiment.
[0026] Figure 4 This is a flowchart illustrating a method for constructing a parameter search range in one embodiment;
[0027] Figure 5 This is a flowchart illustrating the transcoding parameter determination method in another embodiment;
[0028] Figure 6 This is a structural block diagram of a transcoding parameter determination device in one embodiment;
[0029] Figure 7 This is an internal structural diagram of a computer device in one embodiment;
[0030] Figure 8 This is a diagram of the internal structure of a computer device in another embodiment. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0032] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0033] Video transcoding refers to the process of re-encoding and converting parameters such as encoding format, resolution, and bitrate of a video according to preset encoding rules. By transcoding video data, it is possible to adapt to the limited network transmission bandwidth and device storage space requirements.
[0034] In existing technologies, most methods use fixed transcoding parameters to transcode video data. However, this method suffers from a lack of flexibility.
[0035] In view of this, this application provides a method for determining transcoding parameters. Upon receiving video data, the method determines the scene type of the video data based on the video data, and then determines initial transcoding parameters from a parameter search range based on the scene type. Next, multiple sets of candidate transcoding parameters are generated based on the initial transcoding parameters, and trial transcoding of the video data is performed using each candidate transcoding parameter to obtain the trial transcoding result corresponding to each candidate transcoding parameter. Finally, a target weight matching the scene type is obtained, and the trial transcoding results corresponding to each candidate transcoding parameter are evaluated based on the target weight to obtain the target transcoding parameters for the video data. The transcoding parameter determination method provided in this application can match transcoding parameters that meet the scene requirements for video data under different scene types, effectively improving the flexibility of transcoding parameter determination compared to the use of fixed transcoding parameters in existing technologies.
[0036] The transcoding parameter determination method provided in this application can be executed by a computer device, which can be a terminal or a server.
[0037] In one exemplary embodiment, such as Figure 1 As shown, a method for determining transcoding parameters is provided, which includes the following steps:
[0038] Step 101: Upon receiving video data, determine the scene type of the video data based on the video data, and determine the initial transcoding parameters from the parameter search range based on the scene type.
[0039] Optionally, the video data can be data collected in real time by a data acquisition device. For example, the data acquisition device can be a multi-channel video acquisition terminal such as a road surveillance camera, a park camera, or an indoor live streaming camera.
[0040] Optionally, the scene type of the video data can be used to indicate the business scenario corresponding to the video data. For example, the scene type may include high-speed traffic monitoring and storage scenario, real-time live streaming scenario, static indoor security scenario, and day / night lighting switching snapshot scenario, etc.
[0041] Optionally, the parameter search range can include the value range of transcoding parameters, which may include the values of parameters such as bitrate, image group length, quantization parameters, and encoding format.
[0042] In some exemplary embodiments, the computer device may be communicatively connected to the data acquisition device to acquire video data collected by the data acquisition device in real time.
[0043] Furthermore, upon receiving video data, the computer device can determine the scene type of the video data based on the video data.
[0044] Specifically, computer devices can acquire temporal features such as inter-frame motion vectors, changes in lighting, and target motion complexity within video data, and then combine these with preset scene determination rules to match and obtain the scene type corresponding to the current video.
[0045] Furthermore, after determining the scene type of the video data based on the video data, the computer device can determine the initial transcoding parameters from the parameter search range based on the scene type.
[0046] Specifically, computer equipment can use a scene type-transcoding parameter mapping list to determine initial transcoding parameters from a parameter search range based on the scene type. The scene type-transcoding parameter mapping list can be used to indicate the mapping relationship between different scene types and different transcoding parameters.
[0047] Step 102: Generate multiple sets of candidate transcoding parameters based on the initial transcoding parameters, and use each candidate transcoding parameter to perform trial transcoding on the video data to obtain the trial transcoding result corresponding to each candidate transcoding parameter.
[0048] Optionally, the transcoding test results can be used to indicate various quantitative performance metrics generated after transcoding each set of candidate parameters. For example, the transcoding test results may include peak signal-to-noise ratio, actual output bit rate, transcoding processing latency, and hardware computing power utilization.
[0049] In some exemplary embodiments, after obtaining the initial transcoding parameters, the computer device can generate multiple sets of candidate transcoding parameters based on the initial transcoding parameters.
[0050] Specifically, the computer equipment uses the initial transcoding parameters as a baseline and performs small perturbations on the bitrate, image group length, quantization parameters, and encoding format within the parameter search range to generate multiple sets of candidate transcoding parameters.
[0051] Furthermore, after generating multiple sets of candidate transcoding parameters, the computer equipment can use each candidate transcoding parameter to perform trial transcoding on the video data, and obtain the trial transcoding result corresponding to each candidate transcoding parameter.
[0052] Specifically, the computer equipment can call the transcoding interface corresponding to the video transcoding device and load candidate transcoding parameters to perform a trial transcoding operation on the video data. During the trial transcoding operation, hardware operating status data is collected in real time. After the trial transcoding operation is completed, using the video data as a reference, evaluation indicators such as peak signal-to-noise ratio, actual output bit rate, transcoding processing latency, and hardware computing power utilization are extracted, and the values of each indicator are normalized. If the current candidate transcoding parameters exceed the hardware constraints such as the encoding format, output resolution, and computing power load limit supported by the video transcoding device, a hardware over-limit penalty flag is added to the group of candidate transcoding parameters. The normalized evaluation indicators and hardware over-limit penalty flag are the trial transcoding results corresponding to the group of candidate transcoding parameters.
[0053] Step 103: Obtain the target weights that match the scene type, and evaluate the trial transcoding results corresponding to each candidate transcoding parameter based on the target weights to obtain the target transcoding parameters for the video data.
[0054] Optionally, different target weights are matched for different scenario types. For example, the high-speed traffic monitoring storage scenario focuses on bitrate compression and image quality, with higher weights for image quality and bitrate; the real-time live streaming scenario focuses on low latency and hardware load control, with higher weights for transcoding latency and computing power; the sum of the four weights of image quality, bitrate, transcoding latency, and computing power is always equal to 1 in all scenarios.
[0055] Optionally, the target transcoding parameters of the video data can be used to guide the video transcoding device to perform a formal video transcoding task on the video data.
[0056] In some exemplary embodiments, the computer device may acquire target weights that match the scene type.
[0057] Specifically, the computer device can retrieve a preset scene weight configuration table and match the target weight that matches the scene type. The target weights correspond to four evaluation dimensions: image quality, bit rate, transcoding latency, and hardware computing power.
[0058] Furthermore, after obtaining the target weights that match the scene type, the computer device can evaluate the trial transcoding results corresponding to each candidate transcoding parameter based on the target weights to obtain the target transcoding parameters for the video data.
[0059] Specifically, for each set of candidate transcoding parameters, the computer equipment can obtain the normalized peak signal-to-noise ratio, actual output bit rate, transcoding delay, and computing power utilization rate, and calculate the evaluation result of the set of candidate transcoding parameters by combining the target weights. Based on the evaluation result, the target transcoding parameters of the video data are determined.
[0060] The aforementioned transcoding parameter determination method, upon receiving video data, first determines the scene type of the video data based on the video data, and then determines initial transcoding parameters from a parameter search range based on the scene type. Next, multiple sets of candidate transcoding parameters are generated based on the initial transcoding parameters, and trial transcoding is performed on the video data using each candidate transcoding parameter to obtain the trial transcoding result corresponding to each candidate transcoding parameter. Finally, a target weight matching the scene type is obtained, and the trial transcoding results corresponding to each candidate transcoding parameter are evaluated based on the target weight to obtain the target transcoding parameters for the video data. The transcoding parameter determination method provided in this application can match transcoding parameters that meet the scene requirements for video data under different scene types, effectively improving the flexibility of transcoding parameter determination compared to the use of fixed transcoding parameters in existing technologies.
[0061] In one exemplary embodiment, such as Figure 2 As shown, the trial transcoding results corresponding to each candidate transcoding parameter are evaluated based on the target weight to obtain the target transcoding parameters for the video data, including the following steps:
[0062] Step 201: For each set of candidate transcoding parameters, determine the evaluation result of the candidate transcoding parameters based on the target weight and the corresponding trial transcoding results.
[0063] In some exemplary embodiments, for each set of candidate transcoding parameters, the computer device can determine the evaluation result of the candidate transcoding parameters based on the target weight and the trial transcoding results corresponding to the candidate transcoding parameters.
[0064] Specifically, the computer equipment can obtain four quantitative indicators from the trial transcoding results: peak signal-to-noise ratio after normalization, actual output bit rate, transcoding processing latency, and hardware computing power utilization. Based on the weighted sum of the four indicators of image quality, bit rate, transcoding latency, and computing power matched in the current scene, a basic comprehensive reward score is calculated. If the group of trial transcoding results carries a hardware over-limit penalty flag, the corresponding penalty score is deducted according to the number of over-limit items. The final comprehensive reward score obtained after deducting penalties is used as the evaluation result of the group of candidate transcoding parameters.
[0065] Specifically, the computer equipment can acquire four quantitative indicators from the transcoding test results: peak signal-to-noise ratio, actual output bitrate, transcoding processing latency, and hardware computing power utilization. Based on the target weights matched in the current scene and the hardware constraint rules, the total reward score of the candidate transcoding parameters is calculated using a method of basic reward plus hardware penalty, which serves as the evaluation result for that set of parameters. The basic reward includes four sub-items: image quality reward, bitrate reward, latency reward, and computing power reward. All sub-item scores are standardized to the [0, 1] interval.
[0066] Image quality bonus: Calculation formula is as follows ,in, The actual peak signal-to-noise ratio is used. When the actual peak signal-to-noise ratio is below 28dB, the image quality bonus is 0 points, and when it is above 38dB, it is 1 point. The score is calculated according to a linear relationship within the interval.
[0067] Bitrate bonus: Calculation formula is as follows Among them, when the actual bitrate deviates from the target bitrate by more than 20%, the bitrate bonus is 0 points, and when the bitrate drops by 15%, the corresponding score is approximately 0.85.
[0068] Delayed reward: Calculation formula is as follows When the actual transcoding delay is higher than 150ms, the delay bonus is 0 points; when it is lower than 50ms, the bonus is 1 point. The score is calculated linearly within the interval.
[0069] Computing power reward: The calculation formula is as follows When the actual computing power usage exceeds the hardware limit, the computing power reward is 0 points; when it is below 5W, it is 1 point. The computing power limit can be determined based on the actual hardware performance of the video transcoding device.
[0070] Based on this, a hardware penalty is set. If the candidate transcoding parameters exceed the hardware support range of the video transcoding device, such as using an encoding format not supported by the device or exceeding the maximum output resolution supported by the device, 0.5 points will be deducted for each excess item. The penalty score is calculated as P = 0.5 × number of excess items. The final total reward score is calculated as follows: ,in, , , and These correspond to the target weights for image quality, bitrate, transcoding latency, and computing power, respectively. .
[0071] Step 202: If there is a target evaluation result that meets the preset conditions among the evaluation results of each candidate transcoding parameter, the candidate transcoding parameter corresponding to the target evaluation result is determined as the target transcoding parameter.
[0072] Optionally, the preset conditions can be conditions pre-set according to actual needs. For example, the preset conditions can be that the comprehensive reward score in the evaluation result is greater than or equal to a preset reward threshold, the fluctuation of the evaluation results in multiple consecutive iterations is less than the convergence threshold, or the number of iterations reaches the maximum number of iterations.
[0073] In some exemplary embodiments, after obtaining the evaluation results of candidate transcoding parameters, the computer device can determine whether there is a target evaluation result that meets preset conditions among the evaluation results of each candidate transcoding parameter.
[0074] Specifically, the computer equipment can iterate through the comprehensive reward scores in the evaluation results corresponding to all candidate transcoding parameters, and compare each evaluation result with the preset reward threshold, convergence fluctuation threshold, and maximum number of iterations. If the comprehensive reward score of any set of candidate transcoding parameters reaches the preset reward threshold, or the evaluation score fluctuation is lower than the convergence threshold for multiple consecutive rounds, or the parameter iteration count reaches the upper limit, then it can be determined that there is a target evaluation result that meets the preset conditions in the evaluation results of each candidate transcoding parameter.
[0075] Furthermore, if there is a target evaluation result that meets the preset conditions among the evaluation results of each candidate transcoding parameter, the computer device can determine the candidate transcoding parameter corresponding to the target evaluation result as the target transcoding parameter.
[0076] Step 203: If no target evaluation result is found in the evaluation results of each candidate transcoding parameter, adjust each candidate transcoding parameter to obtain multiple new candidate transcoding parameters. Return to the step of using each candidate transcoding parameter to perform trial transcoding on the video data and obtain the trial transcoding result corresponding to each candidate transcoding parameter, and continue execution until a target evaluation result that meets the preset conditions is found in the evaluation results of each candidate transcoding parameter. Then, determine the candidate transcoding parameter corresponding to the target evaluation result as the target transcoding parameter.
[0077] In some exemplary embodiments, after obtaining the evaluation results of candidate transcoding parameters, the computer device can determine whether there is a target evaluation result that meets preset conditions among the evaluation results of each candidate transcoding parameter.
[0078] Specifically, the computer device can iterate through the comprehensive reward scores in the evaluation results corresponding to all candidate transcoding parameters, and compare each evaluation result with the preset reward threshold, convergence fluctuation threshold, and maximum iteration round. If the comprehensive reward scores of all candidate parameters do not reach the preset reward threshold, the reward fluctuation is greater than the convergence threshold for multiple consecutive rounds, and the current iteration round has not reached the maximum iteration limit, then it can be determined that there is no target evaluation result that meets the preset conditions in the evaluation results of each candidate transcoding parameter.
[0079] Furthermore, if no target evaluation result is found in the evaluation results of each candidate transcoding parameter, the computer device can adjust each candidate transcoding parameter to obtain multiple new candidate transcoding parameters, and return to the step of using each candidate transcoding parameter to perform trial transcoding on the video data to obtain the trial transcoding result corresponding to each candidate transcoding parameter, and continue to execute until a target evaluation result that meets the preset conditions is found in the evaluation results of each candidate transcoding parameter, and the candidate transcoding parameter corresponding to the target evaluation result is determined as the target transcoding parameter.
[0080] In this embodiment, for each set of candidate transcoding parameters, the evaluation result of the candidate transcoding parameters is determined based on the target weight and the corresponding trial transcoding results. If there is a target evaluation result that meets the preset conditions among the evaluation results of each candidate transcoding parameter, the candidate transcoding parameter corresponding to the target evaluation result is determined as the target transcoding parameter. If there is no target evaluation result among the evaluation results of each candidate transcoding parameter, the candidate transcoding parameters are adjusted to obtain multiple new sets of candidate transcoding parameters. The process returns to the step of using each candidate transcoding parameter to perform trial transcoding on the video data and obtaining the trial transcoding results corresponding to each candidate transcoding parameter, and continues until there is a target evaluation result that meets the preset conditions among the evaluation results of each candidate transcoding parameter. The candidate transcoding parameter corresponding to the target evaluation result is then determined as the target transcoding parameter. By comprehensively evaluating the transcoding parameters in conjunction with the scene requirements and continuously adjusting the transcoding parameters for repeated trial transcoding comparisons, transcoding parameters adapted to the current scene and hardware can be determined, improving the accuracy of the determined transcoding parameters.
[0081] In one exemplary embodiment, such as Figure 3 As shown, the candidate transcoding parameters are adjusted to obtain multiple sets of new candidate transcoding parameters, including the following steps:
[0082] Step 301: Based on the evaluation results of each candidate transcoding parameter, select the first candidate transcoding parameter and the second candidate transcoding parameter from each candidate transcoding parameter.
[0083] Optionally, the first candidate transcoding parameter is the candidate transcoding parameter with the best evaluation result among all candidate transcoding parameters, and the second candidate transcoding parameter is the candidate transcoding parameter with the worst evaluation result among all candidate transcoding parameters.
[0084] In some exemplary embodiments, the computer device may select a first candidate transcoding parameter and a second candidate transcoding parameter from the candidate transcoding parameters based on the evaluation results of each candidate transcoding parameter.
[0085] Specifically, the computer equipment can obtain the comprehensive evaluation score corresponding to all candidate transcoding parameters in this round, compare and sort all the evaluation scores, select the set of parameters with the highest score as the first candidate transcoding parameters, and select the set of parameters with the lowest score as the second candidate transcoding parameters.
[0086] Step 302: Adjust the other candidate transcoding parameters (excluding the first and second candidate transcoding parameters) among the candidate transcoding parameters to obtain new candidate transcoding parameters.
[0087] In some exemplary embodiments, after the computer device filters out the first candidate transcoding parameter and the second candidate transcoding parameter, it can adjust other candidate transcoding parameters other than the first candidate transcoding parameter and the second candidate transcoding parameter to obtain new other candidate transcoding parameters.
[0088] Specifically, the computer device can refer to the value range of the first candidate transcoding parameter, and make small modifications to the bit rate, image group length, and quantization parameter in other candidate parameters within the parameter search interval to generate new other candidate transcoding parameters, while ensuring that all adjusted candidate transcoding parameters do not exceed the value boundaries allowed by the hardware of the video transcoding device.
[0089] Step 303: Determine the first candidate transcoding parameter, the second candidate transcoding parameter, and other new candidate transcoding parameters as multiple new sets of candidate transcoding parameters.
[0090] In some exemplary embodiments, after obtaining the first candidate transcoding parameter, the second candidate transcoding parameter, and other new candidate transcoding parameters, the computer device can determine the first candidate transcoding parameter, the second candidate transcoding parameter, and other new candidate transcoding parameters as multiple new sets of candidate transcoding parameters.
[0091] In this embodiment, based on the evaluation results of each candidate transcoding parameter, a first candidate transcoding parameter and a second candidate transcoding parameter are selected from the candidate transcoding parameters. The other candidate transcoding parameters besides the first and second candidate transcoding parameters are adjusted to obtain new other candidate transcoding parameters. The first candidate transcoding parameter, the second candidate transcoding parameter, and the new other candidate transcoding parameters are determined as multiple new sets of candidate transcoding parameters. By retaining the optimal and worst parameters, on the one hand, the current optimal configuration can be continuously retained to ensure the lower limit of optimization. On the other hand, the parameter search space can be expanded by relying on the perturbation adjustment of the remaining parameters, which can effectively reduce the probability of iterative optimization getting stuck in local optima, and balance the parameter iteration convergence speed and global search capability, thereby improving the adaptability of the target transcoding parameter.
[0092] In one exemplary embodiment, determining initial transcoding parameters from a parameter search range based on scene type includes: using a thought chain model to determine initial transcoding parameters from a parameter search range based on scene type and performance attributes of the transcoding device.
[0093] Optionally, the thought chain model refers to a reasoning model with step-by-step chain reasoning capabilities, which can break down complex parameter selection tasks into multiple progressive sub-tasks to be solved sequentially.
[0094] In some exemplary embodiments, the computer device may utilize a thought chain model to determine initial transcoding parameters from a parameter search range based on scene type and the performance attributes of the transcoding device.
[0095] Specifically, computer devices can input scene type, transcoding device performance attributes, and parameter search range into the mind chain model to obtain the initial transcoding parameters output by the mind chain model.
[0096] In an exemplary embodiment, the initial transcoding parameters are determined from the parameter search range based on the scene type and the performance attributes of the transcoding device using a thought chain model. This includes: inputting the scene type, performance attributes, and parameter search range into the thought chain model, and performing chain-like reasoning through the thought chain model to obtain the initial transcoding parameters.
[0097] The chained reasoning process includes determining the transcoding target based on the scenario type, generating transcoding parameter constraint information based on performance attributes, and determining the initial transcoding parameters from the parameter search range based on the transcoding target and the transcoding parameter constraint information.
[0098] In some exemplary embodiments, a computer device can input scene type, performance attributes, and parameter search range into a thought chain model, and perform chain reasoning through the thought chain model to obtain initial transcoding parameters.
[0099] Specifically, the thought chain model can first break down the corresponding core transcoding objectives based on the identified scenario type, distinguishing different business focuses such as storage retention and real-time push; then, it reads the hardware performance attributes of the video transcoding device, such as the computing power limit, supported encoding formats, and maximum load, to generate value constraints for various indicators such as bitrate, image group length, and quantization parameters; finally, it combines the preset parameter search range, takes into account both business transcoding objectives and hardware constraints, completes the parameter optimization screening, eliminates parameter combinations that exceed the hardware's carrying capacity, and outputs a set of compliant and suitable initial transcoding parameters for the current scenario.
[0100] In this embodiment, the scenario type, performance attributes, and parameter search range are input into the thinking chain model. The thinking chain model performs chain reasoning to obtain the initial transcoding parameters. By breaking down the parameter selection task layer by layer through step-by-step chain reasoning, the business scenario requirements and transcoding device hardware limitations can be coordinated in an orderly manner, avoiding the initial parameter setting being one-sided and detached from actual usage conditions.
[0101] In one exemplary embodiment, such as Figure 4 As shown, constructing the parameter search range includes the following steps:
[0102] Step 401: Obtain historical transcoding records and determine the optimal transcoding parameters based on the historical transcoding records.
[0103] Optionally, historical transcoding records may include transcoding parameters used in the same scene and on the same video transcoding device in the past, the corresponding image quality, output bitrate, transcoding latency, computing power usage, and comprehensive evaluation score data for each transcoding parameter.
[0104] In some exemplary embodiments, the computer device may acquire historical transcoding records.
[0105] Specifically, the computer equipment obtains historical transcoding logs and filters out historical transcoding operation data that matches the current scene type and the hardware model of the video transcoding device.
[0106] Furthermore, after acquiring historical transcoding records, the computer equipment can determine the optimal transcoding parameters based on these records.
[0107] Specifically, the computer equipment compares the comprehensive evaluation results of all historical transcoding records selected and selects the set of parameters with the highest comprehensive score as the optimal transcoding parameters.
[0108] Step 402: Using the optimal transcoding parameters as the center, construct a parameter search interval based on preset upper and lower limits.
[0109] In some exemplary embodiments, after determining the optimal transcoding parameters, the computer device can construct a parameter search interval based on preset upper and lower limits, with the optimal transcoding parameters as the center.
[0110] Specifically, the computer equipment can use the values of each parameter within the historical best transcoding parameters as the central benchmark, and define the upper and lower limits of the values of the bitrate, image group length, and quantization parameters according to the pre-set upper and lower fluctuation ranges. The value boundaries of all parameters are combined to form a complete parameter search range, while ensuring that the overall range of the range does not exceed the maximum and minimum parameter limits that the video transcoding equipment hardware can support.
[0111] In this embodiment, historical transcoding records are obtained, and the optimal transcoding parameters are determined based on the historical transcoding records. With the optimal transcoding parameters as the center, a parameter search interval is constructed based on preset upper and lower limits. The baseline parameters are determined through historical running data, and the local search range is defined, which reduces the parameter traversal space, reduces the workload of useless parameter calculation, and improves the optimization speed.
[0112] In one optional embodiment of this application, the computer device can automatically iteratively optimize candidate transcoding parameters using a reinforcement learning model. The reinforcement learning model can perform a cold start using a sample-driven approach, selecting a preset number of corresponding scene samples to complete the model initialization training. For example, for a toll station scene, 200 video samples of moderate traffic flow difficulty are selected for initial training, and low-rank adaptation lightweight fine-tuning is used to update the model parameters, reducing the computational overhead and deployment cost of model training. The parameter iterative optimization process is executed using a group-relative strategy optimization algorithm, taking the initial transcoding parameters output by the thought chain model as the starting point for iteration. Each iteration adjusts the values of bitrate, image group length, quantization parameters, and encoding format based on the total reward score; parameter combinations with higher reward scores are retained, while parameter combinations with lower reward scores are subject to targeted correction. An elite retention strategy is executed synchronously in each iteration, retaining the two sets of candidate transcoding parameters with the best evaluation results and one set of outlier candidate transcoding parameters, ensuring parameter convergence speed while avoiding the model getting trapped in local optima. The iteration process terminates when any of the following conditions are met: the total reward score is greater than or equal to 0.85, the number of iterations reaches 30 rounds, or the reward fluctuation range is less than 0.01 for three consecutive rounds. The trained reinforcement learning model can automatically adjust the values of candidate transcoding parameters based on the trial transcoding results, and quickly output target transcoding parameters that are adapted to the current scene and hardware performance.
[0113] In one exemplary embodiment, such as Figure 5 As shown, another method for determining transcoding parameters is provided, which includes the following steps:
[0114] Step 501: Obtain historical transcoding records and determine the optimal transcoding parameters based on these records; construct a parameter search interval centered on the optimal transcoding parameters, based on preset upper and lower limits; upon receiving video data, determine the scene type of the video data based on the video data, input the scene type, performance attributes, and parameter search interval into the thought chain model, and perform chain reasoning through the thought chain model to obtain the initial transcoding parameters; wherein, chain reasoning includes determining the transcoding target based on the scene type, generating transcoding parameter constraint information based on performance attributes, and determining the initial transcoding parameters from the parameter search interval based on the transcoding target and transcoding parameter constraint information;
[0115] Step 502: Generate multiple sets of candidate transcoding parameters based on the initial transcoding parameters, and use each candidate transcoding parameter to perform trial transcoding on the video data to obtain the trial transcoding result corresponding to each candidate transcoding parameter; obtain the target weight matching the scene type; for each set of candidate transcoding parameters, determine the evaluation result of the candidate transcoding parameter according to the target weight and the trial transcoding result corresponding to the candidate transcoding parameter.
[0116] Step 503: If there is a target evaluation result that meets the preset conditions among the evaluation results of each candidate transcoding parameter, the candidate transcoding parameter corresponding to the target evaluation result is determined as the target transcoding parameter; if there is no target evaluation result among the evaluation results of each candidate transcoding parameter, based on the evaluation results of each candidate transcoding parameter, a first candidate transcoding parameter and a second candidate transcoding parameter are selected from each candidate transcoding parameter. The first candidate transcoding parameter is the candidate transcoding parameter with the best evaluation result among each candidate transcoding parameter, and the second candidate transcoding parameter is the candidate transcoding parameter with the worst evaluation result among each candidate transcoding parameter.
[0117] Step 504: Adjust the candidate transcoding parameters other than the first and second candidate transcoding parameters to obtain new candidate transcoding parameters; determine the first candidate transcoding parameter, the second candidate transcoding parameter, and the new candidate transcoding parameters as multiple new candidate transcoding parameters; return to the step of using each candidate transcoding parameter to perform trial transcoding on the video data to obtain the trial transcoding result corresponding to each candidate transcoding parameter and continue execution until there is a target evaluation result that meets the preset conditions in the evaluation results of each candidate transcoding parameter; determine the candidate transcoding parameter corresponding to the target evaluation result as the target transcoding parameter.
[0118] In one specific embodiment, the transcoding parameter determination method provided in this application can be applied to the transcoding scenario of highway toll station lane monitoring video. The specific steps are as follows:
[0119] Step 1: After the highway toll station lane cameras are powered on, this step is initiated periodically every 2 seconds. The processing objects are the raw video stream output by the cameras and the camera device identifier bound to the lane number, such as toll lane 1-CAM01. The computer device receives the raw video stream, segments it into video segments according to a 2-second duration, performs format conversion, and caches a set of raw video segments for subsequent image quality comparison. It uses the camera device identifier to retrieve historical transcoding records, searching for the three most recent optimal transcoding parameters for the same type of camera in the same toll station. An example parameter is a bitrate of 3.5Mbps, image group length of 6, and encoding format H.265. If valid historical optimal transcoding parameters are found, a parameter search range is established centered on this set of parameters, with a bitrate fluctuation range of 500kbps and an image group length fluctuation range of 3. If no available historical transcoding parameters are found, the default parameter range for the toll station scenario is selected: bitrate 800kbps-5000kbps, image group length 3-20, and encoding format limited to H.264 and H.265.
[0120] Step two: When the inter-frame motion vector of the detected image is greater than 0.4, indicating a sudden increase in traffic flow or large vehicles obscuring license plates, parameter optimization will be forcibly restarted. The computer equipment inputs the scene type, video transcoding device hardware performance, and parameter search range into the thought chain model for chain reasoning. Considering the toll station's requirements for clear license plate recognition and strict control of transcoding latency, the H.265 encoding format is selected, and the image group length is limited to no more than 8. Based on hardware computing power constraints, initial transcoding parameters are output; an example initial parameter is a bitrate of 3.2 Mbps and an image group length of 6. 200 video samples of medium traffic flow scenes are selected to complete the cold start of the reinforcement learning model, and the model is refined through lightweight fine-tuning. The toll station-specific target weight is retrieved: a latency weight of 0.4. Image quality weight 0.3, bitrate weight 0.2, and computing power weight 0.1. Based on these weights, the transcoding results of each group of candidate parameters are weighted to calculate the comprehensive reward score. An iterative algorithm is used to optimize the algorithm, with a maximum of 3 iterations. After each iteration, the two optimal parameter groups and one outlier parameter group are retained to prevent the optimization process from getting stuck in local optima. When the comprehensive reward score increases by less than 3% for two consecutive rounds, the iteration is considered to have converged, and the final target transcoding parameters adapted to the scene and hardware are output. An example parameter is a bitrate of 3.1 Mbps, an image group length of 5, and an H.265 encoding format.
[0121] Step 3: After determining the target transcoding parameters, the transcoding task is immediately started. The computer equipment reads the load data of the video transcoding device in real time, such as the computing power utilization rate and chip temperature. The preset safety thresholds are a computing power utilization rate of 65% and a temperature of 75 degrees Celsius. If the current computing power utilization rate is lower than 65 degrees Celsius and the hardware temperature is lower than 75 degrees Celsius, the transcoding interface is directly called to load the target transcoding parameters and perform compression encoding on the video segments. If the hardware load exceeds the above thresholds, the video segments and transcoding parameters are stored in the task queue for scheduling until the computing power utilization rate drops below 60%, at which point the transcoding task is executed first. The video transcoding device completes dynamic bitrate compression and frame group arrangement according to the selected parameters, outputting H.265 format compressed video segments. The final output video bitrate fluctuation is no higher than 8%, and the overall transcoding latency is controlled within 75ms.
[0122] Step four: This step begins after the video transcoding device outputs compressed video segments, with the execution cycle consistent with the previous video segmentation and cutting cycle. The computer retrieves the pre-cached original video segments and compares them with the compressed video segments, calculating the peak signal-to-noise ratio (PSNR), actual transcoding latency, and video compression rate. A PSNR greater than or equal to 30dB indicates acceptable image quality. The fitness score, normalized to the [0, 1] interval, is calculated according to a preset formula: Fitness Score = 0.3 × PSNR / 40 + 0.3 × Compression Rate + 0.4 × (1 - Transcoding Latency / 100). The fitness score is then sent back for the next round of parameter iteration adjustment, and the camera device identifier, target transcoding parameters, and corresponding fitness score are written into the historical transcoding record.
[0123] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0124] Based on the same inventive concept, this application also provides a transcoding parameter determination apparatus for implementing the transcoding parameter determination method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more transcoding parameter determination apparatus embodiments provided below can be found in the limitations of the transcoding parameter determination method described above, and will not be repeated here.
[0125] In one exemplary embodiment, such as Figure 6 As shown, a transcoding parameter determination device 600 is provided, including: a determination module 601, a generation module 602, and an execution module 603, wherein:
[0126] The determination module 601 is used to determine the scene type of the video data based on the received video data, and to determine the initial transcoding parameters from the parameter search range based on the scene type.
[0127] The generation module 602 is used to generate multiple sets of candidate transcoding parameters based on the initial transcoding parameters, and to perform trial transcoding on the video data using each candidate transcoding parameter to obtain the trial transcoding result corresponding to each candidate transcoding parameter.
[0128] The execution module 603 is used to obtain the target weights that match the scene type, and to evaluate the trial transcoding results corresponding to each candidate transcoding parameter based on the target weights, so as to obtain the target transcoding parameters of the video data.
[0129] In one embodiment, the execution module 603 is specifically configured to, for each set of candidate transcoding parameters, determine the evaluation result of the candidate transcoding parameters based on the target weight and the trial transcoding result corresponding to the candidate transcoding parameters; if there is a target evaluation result that meets the preset conditions among the evaluation results of each candidate transcoding parameter, determine the candidate transcoding parameter corresponding to the target evaluation result as the target transcoding parameter; if there is no target evaluation result among the evaluation results of each candidate transcoding parameter, adjust each candidate transcoding parameter to obtain multiple sets of new candidate transcoding parameters, return to the step of using each candidate transcoding parameter to perform trial transcoding on the video data respectively to obtain the trial transcoding result corresponding to each candidate transcoding parameter, and continue execution until there is a target evaluation result that meets the preset conditions among the evaluation results of each candidate transcoding parameter, and determine the candidate transcoding parameter corresponding to the target evaluation result as the target transcoding parameter.
[0130] In one embodiment, the execution module 603 is specifically configured to, based on the evaluation results of each candidate transcoding parameter, select a first candidate transcoding parameter and a second candidate transcoding parameter from the candidate transcoding parameters, wherein the first candidate transcoding parameter is the candidate transcoding parameter with the best evaluation result among the candidate transcoding parameters, and the second candidate transcoding parameter is the candidate transcoding parameter with the worst evaluation result among the candidate transcoding parameters; adjust the other candidate transcoding parameters other than the first and second candidate transcoding parameters to obtain new other candidate transcoding parameters; and determine the first candidate transcoding parameter, the second candidate transcoding parameter, and the new other candidate transcoding parameters as multiple new sets of candidate transcoding parameters.
[0131] In one embodiment, the determining module 601 is specifically used to determine the initial transcoding parameters from the parameter search range based on the scene type and the performance attributes of the transcoding device using a thought chain model.
[0132] In one embodiment, the determining module 601 is specifically used to input the scene type, performance attributes, and parameter search range into the thinking chain model, and perform chain reasoning through the thinking chain model to obtain initial transcoding parameters; wherein, the chain reasoning includes determining the transcoding target based on the scene type, generating transcoding parameter constraint information based on the performance attributes, and determining the initial transcoding parameters from the parameter search range based on the transcoding target and the transcoding parameter constraint information.
[0133] In one embodiment, the determining module 601 is further configured to acquire historical transcoding records and determine the optimal transcoding parameters based on the historical transcoding records; and construct a parameter search interval based on the optimal transcoding parameters and a preset upper limit value and a preset lower limit value.
[0134] Each module in the aforementioned transcoding parameter determination device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0135] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a transcoding parameter determination method.
[0136] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a transcoding parameter determination method.
[0137] Those skilled in the art will understand that Figure 7 and Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0138] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in any of the above embodiments.
[0139] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the above embodiments.
[0140] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method described in any of the above embodiments.
[0141] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0142] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0143] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for determining transcoding parameters, characterized in that, The method includes: Upon receiving video data, the scene type of the video data is determined based on the video data, and the initial transcoding parameters are determined from the parameter search range based on the scene type; Multiple sets of candidate transcoding parameters are generated based on the initial transcoding parameters, and the video data is transcoded using each of the candidate transcoding parameters to obtain the transcoding result corresponding to each candidate transcoding parameter. Obtain the target weight that matches the scene type, and evaluate the trial transcoding results corresponding to each candidate transcoding parameter based on the target weight to obtain the target transcoding parameters of the video data.
2. The method according to claim 1, characterized in that, The step of evaluating the trial transcoding results corresponding to each of the candidate transcoding parameters based on the target weight to obtain the target transcoding parameters of the video data includes: For each set of candidate transcoding parameters, the evaluation result of the candidate transcoding parameter is determined based on the target weight and the trial transcoding result corresponding to the candidate transcoding parameter. If there is a target evaluation result that meets the preset conditions among the evaluation results of each candidate transcoding parameter, the candidate transcoding parameter corresponding to the target evaluation result is determined as the target transcoding parameter; If the target evaluation result is not found in the evaluation results of the candidate transcoding parameters, the candidate transcoding parameters are adjusted to obtain multiple new candidate transcoding parameters. The process then returns to the step of performing trial transcoding on the video data using each candidate transcoding parameter to obtain the trial transcoding result corresponding to each candidate transcoding parameter, and continues until a target evaluation result that meets the preset conditions is found in the evaluation results of each candidate transcoding parameter. The candidate transcoding parameter corresponding to the target evaluation result is then determined as the target transcoding parameter.
3. The method according to claim 2, characterized in that, The process of adjusting each of the candidate transcoding parameters to obtain multiple sets of new candidate transcoding parameters includes: Based on the evaluation results of each of the candidate transcoding parameters, a first candidate transcoding parameter and a second candidate transcoding parameter are selected from each of the candidate transcoding parameters. The first candidate transcoding parameter is the candidate transcoding parameter with the best evaluation result among all the candidate transcoding parameters, and the second candidate transcoding parameter is the candidate transcoding parameter with the worst evaluation result among all the candidate transcoding parameters. The candidate transcoding parameters other than the first and second candidate transcoding parameters are adjusted to obtain new candidate transcoding parameters. The first candidate transcoding parameter, the second candidate transcoding parameter, and the other new candidate transcoding parameters are determined as the plurality of new candidate transcoding parameters.
4. The method according to claim 1, characterized in that, The step of determining the initial transcoding parameters from the parameter search range based on the scene type includes: Using the thought chain model, the initial transcoding parameters are determined from the parameter search range based on the scenario type and the performance attributes of the transcoding device.
5. The method according to claim 4, characterized in that, The step of using the thought chain model to determine the initial transcoding parameters from the parameter search range based on the scenario type and the performance attributes of the transcoding device includes: The scenario type, the performance attribute, and the parameter search range are input into the mind chain model, and chain reasoning is performed through the mind chain model to obtain the initial transcoding parameters. The chained reasoning includes determining the transcoding target based on the scenario type, generating transcoding parameter constraint information based on the performance attributes, and determining the initial transcoding parameters from the parameter search interval based on the transcoding target and the transcoding parameter constraint information.
6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Obtain historical transcoding records and determine the optimal transcoding parameters based on the historical transcoding records; Centered on the optimal transcoding parameters, the parameter search interval is constructed based on preset upper and lower limits.
7. A transcoding parameter determination device, characterized in that, The device includes: The determination module is used to determine the scene type of the video data based on the received video data, and to determine the initial transcoding parameters from the parameter search range based on the scene type; The generation module is used to generate multiple sets of candidate transcoding parameters based on the initial transcoding parameters, and to perform trial transcoding on the video data using each of the candidate transcoding parameters to obtain the trial transcoding result corresponding to each of the candidate transcoding parameters. The execution module is used to obtain the target weight that matches the scene type, and evaluate the trial transcoding results corresponding to each candidate transcoding parameter based on the target weight to obtain the target transcoding parameters of the video data.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
