Video encoding method, device, electronic device and computer storage medium

By fusion processing of the encoding features and video features in the video encoding method, the target code rate control parameters are selected, and the problem of low accuracy in the existing technology is solved, and the video encoding quality is improved.

CN117956157BActive Publication Date: 2024-11-05SHUXING TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410216027.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-27
Publication Date
2024-11-05
Estimated Expiration
2044-02-27

AI Technical Summary

Technical Problem

In the existing video encoding methods, the accuracy of determining the code rate by a fixed rate coefficient is low, resulting in the video quality after encoding that does not meet the requirements.

Method used

By obtaining the video to be encoded and the preset code rate control parameters, performing encoding processing and extracting the coded features and video features, and after performing the fusion process, the target code rate control parameters that meet the preset conditions are filtered out from the preset code rate control parameters. Recode.

Benefits of technology

The accuracy of the bit rate control parameters is improved, making the quality of the encoded video more in line with the requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117956157B_ABST
    Figure CN117956157B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a video encoding method, device, electronic device and computer storage medium; in the embodiment of the present application, according to at least one preset bit rate control parameter, the video to be encoded is encoded to obtain at least one encoded video, and the encoding feature corresponding to the at least one encoded video is obtained; the feature extraction of the video to be encoded is performed to obtain the video feature corresponding to the video to be encoded; the encoding feature corresponding to the at least one encoded video is fused with the video feature respectively to obtain at least one fused feature; according to the at least one fused feature, a target bit rate control parameter is obtained; according to the target bit rate control parameter, the video to be encoded is encoded to obtain the target encoded video corresponding to the video to be encoded. The embodiment of the present application can improve the accuracy of the target bit rate control parameter, so that the quality of the target encoded video is more in line with the requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Video encoding refers to the process of converting a video file in the original video format into another video format file through compression technology. For the same video, the higher the bit rate during video encoding, the higher the quality of the encoded video. The lower the bit rate during video encoding, the lower the storage and transmission cost of the encoded video. In order to ensure the quality of the video while ensuring the storage and transmission costs, it is necessary to find a suitable bit rate to encode the video.

[0003] Among them, the bit rate during video encoding can be determined by a constant rate factor (CRF). However, the current method of determining the bit rate by a constant rate factor has low accuracy, resulting in the quality of the encoded video not meeting the requirements. Summary of the invention

[0004] The embodiments of the present application provide a video encoding method, device, electronic device and computer storage medium, which can solve the technical problem that the quality of the encoded video does not meet the requirements due to low bit rate accuracy.

[0005] The present application provides a video encoding method, including:

[0006] Acquire a video to be encoded and acquire a parameter set, wherein the parameter set includes at least one preset bit rate control parameter;

[0007] According to the at least one preset bit rate control parameter, the video to be encoded is encoded to obtain at least one encoded video, and a coding feature corresponding to the at least one encoded video is obtained;

[0008] Extracting features from the video to be encoded to obtain video features corresponding to the video to be encoded;

[0009] Fusing the encoding features corresponding to the at least one encoded video with the video features to obtain at least one fused feature;

[0010] According to the at least one fused feature, a preset rate control parameter satisfying a preset condition is selected from the at least one preset rate control parameter to obtain a target rate control parameter;

[0011] According to the target bit rate control parameters, the video to be encoded is encoded to obtain a target encoded video corresponding to the video to be encoded.

[0012] Accordingly, an embodiment of the present application provides a video encoding device, including:

[0013] A first acquisition module, used to acquire a video to be encoded and acquire a parameter set, wherein the parameter set includes at least one preset bit rate control parameter;

[0014] A first encoding module, configured to encode the video to be encoded according to the at least one preset bit rate control parameter to obtain at least one encoded video, and obtain encoding features corresponding to the at least one encoded video;

[0015] A feature extraction module is used to extract features from the video to be encoded to obtain video features corresponding to the video to be encoded;

[0016] A feature fusion module, used to fuse the encoding features corresponding to the at least one encoded video with the video features to obtain at least one fused feature;

[0017] A parameter screening module, configured to screen out a preset rate control parameter that meets a preset condition from the at least one preset rate control parameter according to the at least one fused feature, and obtain a target rate control parameter;

[0018] The second encoding module is used to encode the above-mentioned video to be encoded according to the above-mentioned target bit rate control parameter to obtain a target encoded video corresponding to the above-mentioned video to be encoded.

[0019] In addition, an embodiment of the present application further provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to implement the video encoding method provided in the embodiment of the present application.

[0020] In addition, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is suitable for loading by a processor to execute any video encoding method provided in the embodiment of the present application.

[0021] In addition, an embodiment of the present application further provides a computer program product, including a computer program, and when the above computer program is executed by a processor, any one of the video encoding methods provided in the embodiments of the present application is implemented.

[0022] In an embodiment of the present application, a video to be encoded and a parameter set are obtained, the parameter set including at least one preset rate control parameter; according to the at least one preset rate control parameter, the video to be encoded is encoded to obtain at least one encoded video, and an encoding feature corresponding to the at least one encoded video is obtained; feature extraction is performed on the video to be encoded to obtain video features corresponding to the video to be encoded; the encoding features corresponding to the at least one encoded video are respectively fused with the video features to obtain at least one fused feature; according to the at least one fused feature, a preset rate control parameter that meets a preset condition is screened out from at least one preset rate control parameter to obtain a target rate control parameter; according to the target rate control parameter, the video to be encoded is encoded to obtain a target encoded video corresponding to the video to be encoded, so as to determine the target rate control parameter according to the encoding feature and the video feature, improve the accuracy of the target rate control parameter, thereby improving the accuracy of the bit rate obtained according to the target rate control parameter, so that the quality of the target encoded video meets the requirements better. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0024] Figure 1 It is a flowchart of a video encoding method provided by an embodiment of the present application;

[0025] Figure 2 It is a flowchart of the model training method provided in the embodiment of the present application;

[0026] Figure 3 It is a flow chart of the model application method provided in the embodiment of the present application;

[0027] Figure 4 is a schematic diagram of a model training method provided in an embodiment of the present application;

[0028] Figure 5 is a schematic diagram of a model application method provided in an embodiment of the present application;

[0029] Figure 6 is a schematic diagram of the structure of a video encoding device provided in an embodiment of the present application;

[0030] Figure 7 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0032] The embodiments of the present application provide a video encoding method, device, electronic device and computer storage medium. The video encoding device can be integrated in an electronic device, which can be a server or a terminal.

[0033] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.

[0034] The terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, and this application does not limit this.

[0035] In addition, the term "plurality" in the embodiments of the present application refers to two or more than two. The terms "first" and "second" in the embodiments of the present application are used to distinguish descriptions and should not be understood as implying relative importance.

[0036] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0037] In this embodiment, the description will be made from the perspective of the video encoding device. In order to facilitate the description of the video encoding method of the present application, the video encoding device will be integrated in the terminal for detailed description, that is, the terminal will be used as the execution subject for detailed description.

[0038] See also Figure 1 , Figure 1 : is a flow chart of a video encoding method provided by an embodiment of the present application. The video encoding method may include:

[0039] S101: Acquire a video to be encoded and acquire a parameter set, where the parameter set includes at least one preset bit rate control parameter.

[0040] The video to be encoded may be a complete video or a video segment of the target video. The type of the video to be encoded may be set according to actual conditions, for example, the video to be encoded may be a live video or a video on demand, which is not limited in the present embodiment.

[0041] At least one preset rate control parameter refers to a parameter used to control the bit rate of the video encoder during encoding. The type of at least one preset rate control parameter can be set according to actual conditions. For example, at least one preset rate control parameter can be a constant rate factor (CRF) or a constant quantization parameter (CQP) of the video encoder. This embodiment of the present application is not limited here.

[0042] S102: Encode the video to be encoded according to at least one preset bit rate control parameter to obtain at least one encoded video, and obtain encoding features corresponding to the at least one encoded video.

[0043] Among them, the coding feature can also be called a compression domain feature, which refers to the characteristics used to describe the video after encoding. The type of the coding feature corresponding to the at least one encoded video can be set according to the actual situation. For example, the coding feature corresponding to the at least one encoded video can include at least one of video block division information, video frame peak signal-to-noise ratio, block transformation coefficient and coding mode information, which is not limited in the embodiments of the present application.

[0044] The video block division information is the relevant information of the block division of the video frame when the video encoder encodes the video, for example, the video block division information can be the frequency information of the block division. The video frame peak signal-to-noise ratio can reflect the quality of different video frame types, including the peak signal-to-noise ratio (PSNR) of different video frame types in the video (different video frame types can be, for example, intra picture (I frame), predictive-frame (P frame), bi-directional interpolated prediction frame (B frame), etc.). The block transform coefficient represents the frequency domain information of the video. The coding mode information refers to the coding standard of the video encoder, for example, the coding mode information can be H.265 coding mode information or AV1 coding mode information.

[0045] Optionally, the terminal can input at least one preset bit rate control parameter and the video to be encoded into a video encoder for encoding processing to obtain a file containing at least one encoded video, and then read out the encoding features corresponding to at least one encoded video from the file containing at least one encoded video.

[0046] The encoding standard of the video encoder can be set according to actual conditions. For example, the encoding standard of the video encoder can be the H.265 standard or the AV1 standard, which is not limited in the embodiments of the present application.

[0047] For example, when at least one preset bit rate control parameter is a fixed rate coefficient and the video encoder is a video encoder based on the AV1 standard, the parameter set can be [45, 60], at least one preset bit rate control parameter is an integer in [45, 60], the video to be encoded is encoded according to the fixed rate coefficient 45 to obtain an encoded video, and the video to be encoded is encoded according to the fixed rate coefficient 46 to obtain another encoded video.

[0048] Optionally, the terminal may encode the video to be encoded according to all preset rate control parameters in at least one preset rate control parameter to obtain at least one encoded video, or the terminal may first encode the video to be encoded according to some preset rate control parameters in at least one preset rate control parameter to obtain at least one encoded video, and if the target rate control parameter is not in the part of the preset rate control parameters, the terminal may then encode the video to be encoded according to the remaining preset rate control parameters in at least one preset rate control parameter to obtain at least one encoded video.

[0049] S103: Extract features of the video to be encoded to obtain video features corresponding to the video to be encoded.

[0050] The video feature refers to the characteristics of the video to be encoded before encoding. The method for extracting features from the video to be encoded can be set according to the actual situation. For example, the feature extraction model or the Histogram of Oriented Gradient (HOG) can be used to extract features from the video to be encoded. The feature extraction model can be a two-dimensional convolutional network model or a three-dimensional convolutional network model, which is not limited in the embodiments of the present application.

[0051] Optionally, the terminal may perform feature extraction on all video frames in the video to be encoded to obtain video features corresponding to the video to be encoded, or the terminal may perform feature extraction on some video frames in the video to be encoded to obtain video features corresponding to the video to be encoded.

[0052] When extracting features from some video frames in the video to be encoded to obtain video features corresponding to the video to be encoded, the process of extracting features from the video to be encoded to obtain video features corresponding to the video to be encoded may be:

[0053] Sampling the video to be encoded to obtain a sampled video;

[0054] Feature extraction is performed on the sampled video to obtain video features corresponding to the video to be encoded.

[0055] In an embodiment of the present application, the video to be encoded is sampled to obtain a sampled video, and then feature extraction is performed on the sampled video to obtain video features corresponding to the video to be encoded, thereby reducing the number of video frames for feature extraction and increasing the speed of feature extraction, thereby increasing the speed of obtaining the target bit rate control parameters.

[0056] S104: Fusing the encoding features corresponding to at least one encoded video with the video features respectively to obtain at least one fused feature.

[0057] Among them, the fusion processing can also be called splicing processing, and the encoding features corresponding to at least one encoded video can be serially spliced ​​with the video features respectively, or the encoding features corresponding to at least one encoded video can be spliced ​​with the video features respectively in parallel, which is not limited in the embodiments of the present application.

[0058] For example, when at least one preset rate control parameter is a fixed rate coefficient and the video encoder is a video encoder based on the AV1 standard, the parameter set may be [45, 60], the video to be encoded is encoded according to the preset rate control parameter 45 to obtain encoded video A1, the video to be encoded is encoded according to the preset rate control parameter 50 to obtain encoded video A2, the video to be encoded is encoded according to the preset rate control parameter 60 to obtain encoded video A3, at this time, at least one encoded video is encoded video A1, encoded video A2 and encoded video A3, the encoding features and video features of encoded video A1 are fused to obtain fused feature B1, the encoding features and video features of encoded video A2 are fused to obtain fused feature B2, the encoding features and video features of encoded video A3 are fused to obtain fused feature B3, at this time, at least one fused feature is fused feature B1, fused feature B2 and fused feature B3.

[0059] S105. Filter out a preset rate control parameter that meets a preset condition from at least one preset rate control parameter according to at least one fused feature, and obtain a target rate control parameter.

[0060] Among them, the terminal can identify at least one fused feature through a parameter identification model or a parameter identification table to obtain an identification result, and then, based on the identification result, filter out a preset rate control parameter that meets the preset conditions from at least one preset rate control parameter to obtain a target rate control parameter.

[0061] The recognition result may include a target rate control parameter. After obtaining the recognition result, the terminal may directly read the target rate control parameter from the recognition result.

[0062] Alternatively, the recognition result may also include the quality status of the encoded video. After obtaining the recognition result, the terminal selects a preset rate control parameter that meets the preset conditions from at least one preset rate control parameter according to the quality status to obtain the target rate control parameter.

[0063] When the recognition result includes the quality status of the encoded video, a preset rate control parameter satisfying a preset condition is selected from at least one preset rate control parameter according to the at least one fused feature to obtain a target rate control parameter, including:

[0064] Predicting a quality state of at least one encoded video based on at least one fused feature;

[0065] The preset bit rate control parameter used by the encoded video corresponding to the quality state that meets the preset condition is determined as the target bit rate control parameter.

[0066] Among them, the quality status indicates the quality of the encoded video, which can be represented by a score or a quality flag, and the embodiment of the present application does not limit this.

[0067] When expressed in fractions, the quality state with the smallest difference from the preset target quality score can be determined as the quality state that meets the preset conditions.

[0068] When the quality flag is used for representation, the quality flag may include a first quality status flag and a second quality status flag. When the quality status of the encoded video is the first quality status flag, it indicates that the quality of the encoded video is high, that is, it indicates that the quality status of the encoded video meets the preset quality status, and when the quality status of the encoded video is the second quality status flag, it indicates that the quality of the encoded video is low, that is, it indicates that the quality of the encoded video does not meet the preset quality status.

[0069] Among them, the first quality status flag and the second quality status flag can be set according to actual conditions. For example, the first quality status flag can be 1 and the second quality status flag can be 0, or the first quality status flag can be 1 and the second quality status flag can be 2. The embodiments of the present application are not limited here.

[0070] Optionally, when there are multiple encoded videos in at least one encoded video whose quality status is the first quality status identification bit, in order to ensure the quality of the target encoded video while avoiding the file containing the target encoded video being larger, the first quality status identification bit that meets the preset conditions can be screened out from the quality status, that is, the preset bit rate control parameters used by the encoded video corresponding to the quality status that is the first quality status identification bit and meets the preset conditions are determined as the target bit rate control parameters.

[0071] Among them, when encoding the video to be encoded according to all preset rate control parameters in at least one preset rate control parameter, the terminal can determine the preset rate control parameter used by the encoded video corresponding to the quality state that meets the preset condition as the target rate control parameter by a traversal method, or the process of determining the preset rate control parameter used by the encoded video corresponding to the quality state that meets the preset condition as the target rate control parameter can also be:

[0072] Selecting a first parameter interval and a second parameter interval from the parameter set;

[0073] A target parameter interval is selected from the first parameter interval and the second parameter interval, wherein the quality status corresponding to the endpoint parameters of the target parameter interval includes a first quality status identifier and a second quality status identifier;

[0074] If the number of preset rate control parameters included in the target parameter interval does not meet the preset number condition, the target parameter interval is used as the parameter set, and the step of selecting the first parameter interval and the second parameter interval from the parameter set is returned to be executed;

[0075] If the number of preset rate control parameters included in the target parameter interval meets the preset number condition, the endpoint parameter corresponding to the first quality state identifier in the target parameter interval is determined as the target rate control parameter.

[0076] For example, when at least one preset rate control parameter is a fixed rate coefficient, the video encoder is a video encoder based on the AV1 standard, the first quality status flag is 1, the second quality status flag is 0, and the preset number condition is 2, the parameter set may be [45, 60], the first parameter interval may be [45, 50], and the second parameter interval may be [50, 60]. The video to be encoded is encoded according to the preset rate control parameter 45 to obtain encoded video A1. The video to be encoded is encoded according to the preset rate control parameter 50 to obtain encoded video A2. The video to be encoded is encoded according to the preset rate control parameter 60 to obtain encoded video A3. The encoding features and video features of the encoded video A1 are fused to obtain fused features B1. The encoding features and video features of the encoded video A2 are fused to obtain fused features B2. The encoding features and video features of the encoded video A3 are fused. The fused feature B3 is obtained. According to the fused feature B1, the quality state of the encoded video A1 is determined to be 1. According to the fused feature B2, the quality state of the encoded video A2 is determined to be 0. According to the fused feature B3, the quality state of the encoded video A3 is determined to be 0. Then the target parameter interval is [45, 50]. Since [45, 50] includes more preset rate control parameters and does not meet the preset number condition, [45, 50] is continuously divided and the process is executed repeatedly until it is divided to [49, 50]. According to the preset rate control parameter 49, the video to be encoded is encoded to obtain the encoded video A4. The encoding feature and the video feature of the encoded video A4 are fused to obtain the fused feature B4. According to the fused feature B4, the quality state of the encoded video A4 is determined to be 1. Since [49, 50] includes fewer preset rate control parameters and meets the preset number condition, 49 is determined as the target rate control parameter.

[0077] Optionally, if the number of preset rate control parameters included in the target parameter interval meets the preset number condition, it can also be understood that if the preset rate control parameters included in the target parameter interval are adjacent rate control parameters, for example, the target parameter interval is [49, 50], 49 and 50 are adjacent rate control parameters.

[0078] In an embodiment of the present application, a first parameter interval and a second parameter interval are selected from a parameter set; a target parameter interval is screened out from the first parameter interval and the second parameter interval, and the quality status corresponding to the endpoint parameter of the target parameter interval includes a first quality status identifier and a second quality status identifier; if the number of preset rate control parameters included in the target parameter interval does not meet the preset number condition, the target parameter interval is used as the parameter set, and the step of selecting the first parameter interval and the second parameter interval from the parameter set is returned to be executed; if the number of preset rate control parameters included in the target parameter interval meets the preset number condition, the endpoint parameter corresponding to the first quality status identifier in the target parameter interval is determined as the target rate control parameter, which can increase the speed of obtaining the target rate control parameter compared to the traversal method.

[0079] In some embodiments, selecting a target parameter interval from the first parameter interval and the second parameter interval includes:

[0080] If the quality states corresponding to the endpoint parameters of the first parameter interval are all first quality state identification bits, and / or the quality states corresponding to the endpoint parameters of the second parameter interval include the first quality state identification bit and the second quality state identification bit, the second parameter interval is determined as the target parameter interval;

[0081] If the quality status corresponding to the endpoint parameters of the first parameter interval includes the first quality status identifier and the second quality status identifier, and / or the quality status corresponding to the endpoint parameters of the second parameter interval are all the second quality status identifier, the first parameter interval is determined to be the target parameter interval.

[0082] For example, when at least one preset rate control parameter is a fixed rate coefficient, the video encoder is a video encoder based on the AV1 standard, the first quality status flag is 1, the second quality status flag is 0, and the preset number condition is 2, the parameter set may be [45, 60], the first parameter interval may be [45, 50], the endpoint parameters of the first parameter interval are 45 and 50, the second parameter interval may be [50, 60], the endpoint parameters of the second parameter interval are 50 and 60, if the quality status of the encoded video A1 determined according to the preset rate control parameter 45 is 1, the quality status of the encoded video A2 determined according to the preset rate control parameter 50 is 0, and the quality status of the encoded video A3 determined according to the preset rate control parameter 60 is 0, then the first parameter interval The quality status corresponding to the endpoint parameters of the first parameter interval includes a first quality status identification bit and a second quality status identification bit, and the quality status corresponding to the endpoint parameters of the second parameter interval are all the second quality status identification bits, and the first parameter interval is determined as the target parameter interval. If the quality status of the encoded video A1 determined according to the preset bit rate control parameter 45 is 1, the quality status of the encoded video A2 determined according to the preset bit rate control parameter 50 is 1, and the quality status of the encoded video A3 determined according to the preset bit rate control parameter 60 is 0, then the quality status corresponding to the endpoint parameters of the first parameter interval are all the first quality status identification bits, and the quality status corresponding to the endpoint parameters of the second parameter interval includes the first quality status identification bit and the second quality status identification bit, and the second parameter interval is determined as the target parameter interval.

[0083] In some other embodiments, predicting the quality status of at least one encoded video according to at least one fused feature includes:

[0084] Predicting a probability parameter according to at least one fused feature, where the probability parameter is used to measure whether at least one encoded video meets a preset quality state;

[0085] If the probability parameter is equal to or greater than the preset probability parameter, determining the quality status of at least one encoded video as a first quality status flag;

[0086] If the probability parameter is less than the preset probability parameter, the quality status of at least one encoded video is determined as a second quality status flag.

[0087] The preset probability parameter is a pre-set parameter, which indicates whether the preset quality state is satisfied. When the probability parameter is equal to or greater than the preset probability parameter, it indicates that the encoded video satisfies the preset quality state, and therefore, the quality state of at least one encoded video can be determined as the first quality state identification bit, and when the probability parameter is less than the preset probability parameter, it indicates that the encoded video does not satisfy the preset quality state, and therefore, the quality state of at least one encoded video can be determined as the second quality state identification bit.

[0088] For example, if the preset probability parameter is 0.5 and the probability parameter of the encoded video A1 is 0.6, the quality status of the encoded video A1 is determined as the first quality status identification bit, and the probability parameter of the encoded video A2 is 0.4, the quality status of the encoded video A2 is determined as the second quality status identification bit.

[0089] In the above embodiments, the target rate control parameter is obtained by dividing the parameter set. In other embodiments, when the quality state includes a first quality state identification bit that satisfies a preset quality state and a second quality state identification bit that does not satisfy the preset quality state, the quality state may be arranged according to the arrangement order of at least one preset rate control parameter in the parameter set, and then the quality state is divided to obtain the target rate control parameter. In this case, the preset rate control parameter used by the encoded video corresponding to the quality state that meets the preset condition is determined as the target rate control parameter, including:

[0090] Dividing the quality state to obtain a first quality state interval and a second quality state interval;

[0091] Filtering out a target quality state interval from the first quality state interval and the second quality state interval, wherein the endpoint quality state of the target quality state interval includes a first quality state identification bit and a second quality state identification bit;

[0092] If the number of quality states included in the target quality state interval does not meet the preset state number condition, the target quality state interval is determined as the quality state, and the process returns to execute the division of the quality state to obtain a first quality state interval and a second quality state interval;

[0093] If the number of quality states included in the target quality state interval meets the preset state number condition, the preset bit rate control parameter used by the encoded video corresponding to the first quality state flag in the target quality state interval is determined as the target bit rate control parameter.

[0094] For example, the preset state number condition is 2, at least one preset bit rate control parameter is 45, 46, 47, 48, 49, 50, the quality state of the encoded video obtained according to the preset bit rate control parameter 45 is 1, the quality state of the encoded video obtained according to the preset bit rate control parameter 46 is 1, the quality state of the encoded video obtained according to the preset bit rate control parameter 47 is 1, the quality state of the encoded video obtained according to the preset bit rate control parameter 48 is 1, the quality state of the encoded video obtained according to the preset bit rate control parameter 49 is 0, and the quality state of the encoded video obtained according to the preset bit rate control parameter 50 is 0, then the quality state The arrangement order is 1, 1, 1, 1, 0 and 0, the first quality state interval is 1, 1, 1 and 1, the second quality state interval is 1, 0 and 0, the target quality state interval is the second quality state interval, the number of quality states included in the second quality state interval is 3, and the preset state number condition is not met. The second quality state interval continues to be divided. At this time, the first quality state interval is 1 and 0, the second quality state interval is 0 and 0, the target quality state interval is the first quality state interval, and the number of quality states included in the first quality state interval is 2, which meets the preset state number condition, and the preset rate control parameter 48 is determined as the target rate control parameter.

[0095] In some embodiments, when encoding a video to be encoded according to some of the preset rate control parameters in at least one preset rate control parameter, encoding the video to be encoded according to the at least one preset rate control parameter to obtain at least one encoded video includes:

[0096] Selecting a first parameter interval and a second parameter interval from the parameter set;

[0097] Encoding the video to be encoded according to the endpoint parameters of the first parameter interval and the endpoint parameters of the second parameter interval to obtain at least one encoded video;

[0098] Determining a preset bit rate control parameter used by the encoded video corresponding to the quality state that meets the preset condition as a target bit rate control parameter includes:

[0099] A target parameter interval is selected from the first parameter interval and the second parameter interval, wherein the quality status corresponding to the endpoint parameters of the target parameter interval includes a first quality status identifier and a second quality status identifier;

[0100] If the number of preset rate control parameters included in the target parameter interval does not meet the preset number condition, the target parameter interval is used as the parameter set, and the step of selecting the first parameter interval and the second parameter interval from the parameter set is returned to be executed;

[0101] If the number of preset rate control parameters included in the target parameter interval meets the preset number condition, the endpoint parameter corresponding to the first quality state identifier in the target parameter interval is determined as the target rate control parameter.

[0102] When the number of preset rate control parameters included in the target parameter interval meets the preset number condition, the first quality state identifier in the target parameter interval is the quality state that meets the preset condition.

[0103] For example, when at least one preset rate control parameter is a fixed rate coefficient, the video encoder is a video encoder based on the AV1 standard, the first quality status flag is 1, the second quality status flag is 0, and the preset number condition is 2, the parameter set can be [45, 60], the first parameter interval can be [45, 50], the endpoint parameters of the first parameter interval are 45 and 50, the second parameter interval can be [50, 60], the endpoint parameters of the second parameter interval are 50 and 60, if the quality state of the encoded video A1 obtained according to the preset rate control parameter 45 is 1, the quality state of the encoded video A1 obtained according to the preset rate control parameter 50 is The quality status of the encoded video A2 is 0, and the quality status of the encoded video A3 obtained according to the preset bit rate control parameter 60 is 0, then the target parameter interval is the first parameter interval, and the number of preset bit rate control parameters included in the first parameter interval does not meet the preset number condition, then the first parameter interval is continued to be divided as a parameter set, and the process is executed in a loop until it is divided to [49, 50]. The quality status of the encoded video A4 obtained according to the preset bit rate control parameter 49 is 1. Since the preset bit rate control parameters included in [49, 50] are relatively small and meet the preset number condition, 49 is determined as the target bit rate control parameter.

[0104] In an embodiment of the present application, a first parameter interval and a second parameter interval are selected from a parameter set, and a video to be encoded is encoded according to endpoint parameters of the first parameter interval and endpoint parameters of the second parameter interval to obtain at least one encoded video, and a target parameter interval is screened out from the first parameter interval and the second parameter interval, and the quality status corresponding to the endpoint parameters of the target parameter interval includes a first quality status identifier and a second quality status identifier. If the number of preset rate control parameters included in the target parameter interval does not meet the preset number condition, the target parameter interval is used as a parameter set, and the step of selecting the first parameter interval and the second parameter interval from the parameter set is returned to execute. If the number of preset rate control parameters included in the target parameter interval meets the preset number condition, the endpoint parameter corresponding to the first quality status identifier in the target parameter interval is determined as the target rate control parameter, so as to determine whether it is necessary to continue encoding the video to be encoded according to the quality status of the encoded video, without directly encoding the video to be encoded according to all preset rate control parameters in at least one preset rate control parameter, thereby improving the speed of obtaining the target rate control parameter.

[0105] In some embodiments, the method of selecting the first parameter interval and the second parameter interval from the parameter set can be set according to actual conditions. For example, the parameter set can be divided evenly to obtain the first parameter interval and the second parameter interval, or the parameter set can be randomly divided to obtain the first parameter interval and the second parameter interval. The embodiments of the present application are not limited here.

[0106] In some embodiments, when the video to be encoded is a video segment in a target video, in order to increase the speed of obtaining the target bit rate control parameter, a first parameter interval and a second parameter interval are selected from a parameter set, including:

[0107] Obtaining bit rate control parameters of historical video segments, where the historical video segments are video segments in the target video that precede the video to be encoded;

[0108] According to the bit rate control parameter, a first parameter interval and a second parameter interval are selected from a parameter set.

[0109] The historical video segment may be any video segment before the to-be-encoded video in the target video. Since the bit rate control parameters of different video segments in the same video are relatively close or the same, the first parameter interval and the second parameter interval may be selected from the parameter set according to the bit rate control parameters of the historical video segments, so as to quickly find the target bit rate control parameters of the to-be-encoded video.

[0110] Optionally, according to the bit rate control parameter, a first parameter interval and a second parameter interval are selected from a parameter set. The parameter set may be divided using the bit rate control parameter as a dividing line to obtain the first parameter interval and the second parameter interval. Alternatively, the parameter set may be divided using the bit rate control parameter as a dividing line according to a preset step size to obtain the first parameter interval and the second parameter interval. The preset step size may be set according to actual conditions.

[0111] For example, the video to be encoded is video fragment 2 in the target video, the historical video fragment is video fragment 1 in the target video, the parameter interval is [45, 60], and the bit rate control parameter of video fragment 1 is 49, then the first parameter interval can be [45, 49], and the second parameter interval can be [49, 60].

[0112] For another example, the preset step size is 5, the video to be encoded is video fragment 2 in the target video, the historical video fragment is video fragment 1 in the target video, the parameter interval is [45, 60], and the bit rate control parameter of video fragment 1 is 49, then the first parameter interval can be [45, 49], and the second parameter interval can be [49, 54].

[0113] It should be noted that a preset bit rate control parameter can be a bit rate control parameter or a target bit rate control parameter. For example, when video segment 1 is a video to be encoded, 45 is the target bit rate control parameter of video segment 1, and when video segment 1 is a historical video segment, 45 is the bit rate control parameter of video segment 1.

[0114] In some embodiments, the quality status is a probability parameter for measuring whether at least one encoded video meets a preset condition, and predicting the quality status of at least one encoded video according to at least one fused feature includes:

[0115] Predicting, based on at least one fused feature, a probability parameter of whether at least one encoded video meets a preset quality state;

[0116] Determining a preset bit rate control parameter used by the encoded video corresponding to the quality state that meets the preset condition as a target bit rate control parameter includes:

[0117] Obtaining a preset probability parameter, the preset probability parameter indicating whether a boundary line of a preset quality state is met;

[0118] The preset bit rate control parameter used by the encoded video corresponding to the probability parameter that meets the preset probability parameter is determined as the target bit rate control parameter.

[0119] Among them, the probability parameter having the smallest difference from the preset probability parameter and being above the preset probability parameter may be determined as the probability parameter satisfying the preset probability parameter.

[0120] Alternatively, the probability parameters are arranged according to the arrangement order of at least one preset rate control parameter in the parameter set, and the process of determining the preset rate control parameter used by the encoded video corresponding to the probability parameter that satisfies the preset probability parameter as the target rate control parameter may also be:

[0121] Dividing the probability parameter to obtain a first probability parameter interval and a second probability parameter interval;

[0122] Filtering a target probability parameter interval from the first probability parameter interval and the second probability parameter interval, the target probability parameter interval including an endpoint probability parameter greater than a preset probability parameter and an endpoint probability parameter less than the preset probability parameter;

[0123] If the number of probability parameters included in the target probability parameter interval does not meet the preset parameter number condition, the target probability interval is used as the probability parameter, and the step of dividing the probability parameter to obtain the first probability parameter interval and the second probability parameter interval is returned;

[0124] If the number of probability parameters included in the target probability parameter interval meets the preset parameter number condition, the preset bit rate control parameter used for the encoded video corresponding to the endpoint probability parameter in the target probability parameter interval that is greater than the preset probability parameter is determined as the target bit rate control parameter.

[0125] For example, at least one preset bit rate control parameter is 45, 46, 47, 48, 49 and 50, the preset parameter number condition is 2, the preset probability parameter is 0.5, the probability parameter of the encoded video obtained according to the preset bit rate control parameter 45 is 0.7, the probability parameter of the encoded video obtained according to the preset bit rate control parameter 46 is 0.65, the probability parameter of the encoded video obtained according to the preset bit rate control parameter 47 is 0.6, the probability parameter of the encoded video obtained according to the preset bit rate control parameter 48 is 0.52, the probability parameter of the encoded video obtained according to the preset bit rate control parameter 49 is 0.49, and the probability parameter of the encoded video obtained according to the preset bit rate control parameter 50 is 0.4. Then the probability parameters are arranged in the order of 0.7, 0.65, 0.6, 0. 52, 0.49 and 0.4, the first probability parameter interval is 0.7, 0.65, 0.6 and 0.52, the second probability parameter interval is 0.52, 0.49 and 0.4, the target probability parameter interval is the second probability parameter interval, the number of probability parameters included in the second probability parameter interval is 3, and the preset parameter number condition is not met, then 0.52, 0.49 and 0.4 are divided, and the first probability parameter interval is 0.52 and 0.49, and the second probability parameter interval is 0.49 and 0.4. At this time, the target probability parameter interval is the first probability parameter interval, and the number of probability parameters included in the first probability parameter interval is 2, which meets the preset parameter number condition, then the preset bit rate control parameter 48 adopted by the encoded video corresponding to 0.52 is determined as the target bit rate control parameter.

[0126] It should be noted that if the target probability parameter interval includes an endpoint probability parameter equal to the preset probability parameter, the preset bit rate control parameter used by the encoded video corresponding to the endpoint probability parameter equal to the preset probability parameter can be directly determined as the target bit rate control parameter.

[0127] In some embodiments, the target rate control parameter is obtained by a parameter recognition model, and before selecting a preset rate control parameter that meets a preset condition from at least one preset rate control parameter according to at least one fused feature and obtaining the target rate control parameter, the method further includes:

[0128] Acquire a sample video set, where the sample video set includes a coding feature of at least one encoded sample video corresponding to at least one sample video;

[0129] Extracting features from at least one sample video to obtain sample video features corresponding to the at least one sample video;

[0130] Fusing the encoding features corresponding to at least one encoded sample video with the sample video features to obtain at least one fused sample feature;

[0131] The parameter recognition model to be trained is trained according to at least one fused sample feature to obtain a parameter recognition model.

[0132] The process of training the parameter recognition model to be trained according to at least one fused sample feature to obtain the parameter recognition model may be:

[0133] Predicting a rate control parameter of at least one sample video according to at least one fused sample feature;

[0134] Determining a target loss function value according to the predicted rate control parameter and a real rate control parameter of at least one sample video;

[0135] Determine whether the parameter recognition model to be trained has converged according to the target loss function value;

[0136] If the parameter identification model to be trained converges, the parameter identification model to be trained is determined as the parameter identification model;

[0137] If the parameter recognition model to be trained does not converge, the model parameters of the parameter recognition model to be trained are updated according to the target loss function value, and the step of performing feature extraction on at least one sample video to obtain sample video features corresponding to at least one sample video is returned.

[0138] Alternatively, the sample video set may further include a true quality state corresponding to at least one encoded sample video; and the process of training the parameter recognition model to be trained according to at least one fused sample feature to obtain the parameter recognition model may also be:

[0139] Predicting a sample quality state of at least one encoded sample video based on at least one fused feature;

[0140] According to the sample quality status and the true quality status, the parameter recognition model to be trained is trained to obtain the parameter recognition model.

[0141] The sample quality status may include a first sample quality status flag and a second sample quality status flag. The real quality status may include a first sample quality status flag and a second sample quality status flag. The first sample quality status flag and the second sample quality status flag may be set according to actual conditions, for example, the first sample quality status flag may be 1 and the second sample quality status flag may be 0, or the first sample quality status flag may be 1 and the second sample quality status flag may be 2, which is not limited in the embodiments of the present application.

[0142] After obtaining the sample quality status, the terminal can determine the target loss function value according to the sample quality status and the true quality status, and judge whether the parameter recognition model to be trained has converged according to the target loss function value; if the parameter recognition model to be trained has converged, the parameter recognition model to be trained is determined as the parameter recognition model; if the parameter recognition model to be trained does not converge, the model parameters of the parameter recognition model to be trained are updated according to the target loss function value, and the step of performing feature extraction on at least one sample video to obtain sample video features corresponding to at least one sample video is returned.

[0143] Optionally, obtain a sample video collection, including:

[0144] Acquire at least one sample video, and encode the at least one sample video according to at least one preset bit rate control parameter to obtain at least one encoded sample video;

[0145] Obtaining encoding features of at least one encoded sample video, and determining an encoding quality score of at least one encoded sample video;

[0146] Determining a true quality state corresponding to at least one encoded sample video according to the encoding quality score and the preset quality score;

[0147] A sample video set is generated according to the actual quality state and the encoding feature corresponding to at least one encoded sample video.

[0148] Among them, if the encoding quality score is greater than or equal to the preset quality score, the actual quality state of the encoded video is determined as the first sample quality state identification bit; if the encoding quality score is less than the preset quality score, the actual quality state of the encoded video is determined as the second sample quality state identification bit.

[0149] The preset quality score is a score pre-set according to the target quality indicator. The target quality indicator can be set according to actual conditions. For example, the target quality indicator can be any one of a peak signal-to-noise ratio quality indicator, a structural similarity quality indicator, and a mixed quality indicator. The embodiments of the present application are not limited here.

[0150] Among them, the Peak Signal-to-Noise Ratio (PSNR) quality index is a quality index that determines the quality of video encoding based on the difference between the pixels in the video to be encoded and the encoded video. The structural similarity quality index is also called the Multi-Scale Structural Similarity (MS-SSIM) quality index, which is a quality index that determines the quality of video encoding based on the structural similarity between the video to be encoded and the encoded video. The hybrid quality index is also called Video multi-method Accesment Fusion (VMAF), which is a video encoding quality evaluation index that combines three indicators: Visual Quality Fidelity (VIF), Detail Loss Measure (DLM) and Temporal Motion Index / Average Related Position Pixel Difference (TI).

[0151] S106 , encoding the video to be encoded according to the target bit rate control parameter to obtain a target encoded video corresponding to the video to be encoded.

[0152] The terminal may determine a quantization parameter (QP) of the video to be encoded according to the target bit rate control parameter, and then encode the video to be encoded according to the quantization parameter to obtain a target encoded video corresponding to the video to be encoded.

[0153] Optionally, when the target rate control parameter is a fixed rate coefficient, the larger the target rate control parameter is, the larger the quantization parameter determined according to the target rate control parameter is, and the smaller the target rate control parameter is, the smaller the quantization parameter determined according to the target rate control parameter is, and the larger the bit rate is when encoding the video to be encoded.

[0154] In some embodiments, according to the target bit rate control parameter, the process of encoding the video to be encoded to obtain the target encoded video corresponding to the video to be encoded may be:

[0155] Determining candidate quantization parameters according to target bit rate control parameters;

[0156] Get the parameters of interest;

[0157] The candidate quantization parameters are adjusted according to the parameter of interest to obtain a first quantization parameter of the region of interest in the to-be-encoded video and a second quantization parameter of the region of non-interest in the to-be-encoded video;

[0158] The video to be encoded is encoded according to the first quantization parameter and the second quantization parameter to obtain a target encoded video corresponding to the video to be encoded.

[0159] The parameter of interest may be a 01 matrix, the size of which may be the same as the size of a video frame in the video to be encoded.

[0160] The terminal can subtract the candidate quantization parameter from the parameter of interest to obtain a first quantization parameter, add the candidate quantization parameter to the parameter of interest to obtain a second quantization parameter, and then when encoding the video to be encoded, first identify the region of interest (ROI) and the region of non-interest in the video to be encoded. Finally, according to the first quantization parameter, the region of interest is encoded, and according to the second quantization parameter, the region of non-interest is encoded to obtain the target encoded video.

[0161] In an embodiment of the present application, a candidate quantization parameter is determined according to a target bit rate control parameter; a parameter of interest is obtained; the candidate quantization parameter is adjusted according to the parameter of interest to obtain a first quantization parameter of an area of ​​interest in a video to be encoded and a second quantization parameter of an area of ​​non-interest in the video to be encoded; the video to be encoded is encoded according to the first quantization parameter and the second quantization parameter to obtain a target encoded video corresponding to the video to be encoded, thereby respectively encoding the area of ​​interest and the area of ​​non-interest according to different quantization parameters, so that the size of the file containing the target encoded video can be guaranteed while ensuring the quality of the target encoded video.

[0162] As can be seen from the above, in an embodiment of the present application, a video to be encoded and a parameter set are obtained, the parameter set including at least one preset rate control parameter; according to at least one preset rate control parameter, the video to be encoded is encoded to obtain at least one encoded video, and an encoding feature corresponding to at least one encoded video is obtained; feature extraction is performed on the video to be encoded to obtain video features corresponding to the video to be encoded; the encoding features corresponding to at least one encoded video are fused with video features respectively to obtain at least one fused feature; according to at least one fused feature, a preset rate control parameter that meets a preset condition is screened out from at least one preset rate control parameter to obtain a target rate control parameter; according to the target rate control parameter, the video to be encoded is encoded to obtain a target encoded video corresponding to the video to be encoded, so as to determine the target rate control parameter according to the encoding feature and the video feature, improve the accuracy of the target rate control parameter, thereby improving the accuracy of the bit rate obtained according to the target rate control parameter, so that the quality of the target encoded video meets the requirements more.

[0163] According to the following Figure 2 and Figure 3 , the video encoding method provided by the present application is further described. In this embodiment, taking the fixed rate coefficient as the preset bit rate control parameter as an example, the target bit rate control parameter is obtained by the parameter recognition model, and the video feature is obtained by the feature extraction model. Figure 2 , the training process of parameter identification model and feature extraction model is explained.

[0164] S201. A terminal obtains at least one sample video and a parameter set, where the parameter set includes at least one preset bit rate control parameter.

[0165] S202: The terminal encodes at least one sample video according to at least one preset bit rate control parameter to obtain at least one encoded sample video, and acquires encoding features of the at least one encoded sample video.

[0166] S203: The terminal determines a coding quality score of at least one encoded sample video.

[0167] S204: The terminal determines a true quality state corresponding to at least one encoded sample video according to the encoding quality score and the preset quality score, and generates a sample video set according to the true quality state and encoding features corresponding to at least one encoded sample video.

[0168] S205. The terminal extracts features from at least one sample video using the feature extraction model to be trained, and obtains sample video features corresponding to the at least one sample video.

[0169] S206: The terminal fuses the encoding features corresponding to at least one encoded sample video in the sample video set with the sample video features to obtain at least one fused sample feature.

[0170] S207: The terminal predicts a sample quality state of at least one encoded sample video according to at least one fused sample feature through the parameter recognition model to be trained.

[0171] Among them, the specific type of the parameter identification model can be set according to actual conditions. For example, the parameter identification model can be a support vector machine (SVM) or a decision tree, which is not limited in the embodiments of the present application.

[0172] S208. The terminal trains the feature extraction model to be trained and the parameter recognition model to be trained according to the sample quality status and the true quality status to obtain the feature extraction model and the parameter recognition model.

[0173] In this embodiment, the feature extraction model to be trained and the parameter recognition model to be trained are trained to obtain the feature extraction model and the parameter recognition model, so that the quality state of the video to be encoded can be obtained through the feature extraction model and the parameter recognition model, for example, Figure 4 shown.

[0174] According to the following Figure 3 , the process of video encoding through parameter identification model and feature extraction model is explained.

[0175] S301: The terminal obtains a video to be encoded.

[0176] When the video to be encoded is a video fragment in a target video, the terminal may obtain the target video, and then perform a slicing process on the target video to obtain the video to be encoded.

[0177] S302: The terminal encodes the video to be encoded according to at least one preset bit rate control parameter to obtain at least one encoded video, and obtains encoding features corresponding to the at least one encoded video.

[0178] S303: The terminal extracts features of the video to be encoded by using a feature extraction model to obtain video features corresponding to the video to be encoded.

[0179] S304: The terminal fuses the encoding features corresponding to at least one encoded video with the video features to obtain at least one fused feature.

[0180] S305. The terminal predicts a probability parameter according to at least one fused feature through a parameter recognition model, where the probability parameter is used to measure whether at least one encoded video meets a preset quality state.

[0181] The type of the parameter identification model may be set according to actual conditions. For example, the parameter identification model may be a fully connected network model or a support vector machine (SVM), which is not limited in this embodiment.

[0182] S306. If the probability parameter is equal to or greater than the preset probability parameter, the terminal determines the quality status of at least one encoded video as the first quality status identification bit; if the probability parameter is less than the preset probability parameter, the terminal determines the quality status of at least one encoded video as the second quality status identification bit.

[0183] S307: The terminal selects a first parameter interval and a second parameter interval from the parameter set.

[0184] S308. If the quality states corresponding to the endpoint parameters of the first parameter interval are all first quality state identifiers, and / or the quality states corresponding to the endpoint parameters of the second parameter interval include the first quality state identifier and the second quality state identifier, the terminal determines the second parameter interval as the target parameter interval.

[0185] S309: If the quality status corresponding to the endpoint parameters of the first parameter interval includes the first quality status identifier and the second quality status identifier, and / or the quality status corresponding to the endpoint parameters of the second parameter interval are all the second quality status identifier, the terminal determines the first parameter interval as the target parameter interval.

[0186] S3010: If the number of preset rate control parameters included in the target parameter interval does not meet the preset number condition, the terminal takes the target parameter interval as a parameter set and returns to execute step S307.

[0187] S3011. If the number of preset rate control parameters included in the target parameter interval meets a preset number condition, the terminal determines the endpoint parameter corresponding to the first quality state identifier in the target parameter interval as the target rate control parameter.

[0188] S3012. The terminal determines candidate quantization parameters according to the target bit rate control parameters, and obtains parameters of interest.

[0189] S3013: The terminal adjusts the candidate quantization parameters according to the parameter of interest to obtain a first quantization parameter of the region of interest in the to-be-encoded video and a second quantization parameter of the region of non-interest in the to-be-encoded video.

[0190] S3014. The terminal performs encoding processing on the video to be encoded according to the first quantization parameter and the second quantization parameter to obtain a target encoded video corresponding to the video to be encoded.

[0191] In this embodiment, according to the video features and coding features, the target rate control parameters corresponding to the video to be encoded are determined through a feature extraction model and a parameter recognition model, and the target rate control parameters corresponding to the video to be encoded are determined through a multi-level neural network model according to the video features and coding features, thereby improving the accuracy of the target rate control parameters. For example, Figure 5 shown.

[0192] In order to better implement the video encoding method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the above video encoding method. The meanings of the terms are the same as those in the above video encoding method, and the specific implementation details can refer to the description in the method embodiment.

[0193] For example, Figure 6 As shown, the video encoding device may include:

[0194] The first acquisition module 601 is used to acquire a video to be encoded and acquire a parameter set, where the parameter set includes at least one preset bit rate control parameter.

[0195] The first encoding module 602 is used to encode the video to be encoded according to at least one preset bit rate control parameter to obtain at least one encoded video and obtain encoding features corresponding to the at least one encoded video.

[0196] The feature extraction module 603 is used to extract features from the video to be encoded to obtain video features corresponding to the video to be encoded.

[0197] The feature fusion module 604 is used to fuse the encoding features corresponding to at least one encoded video with the video features to obtain at least one fused feature.

[0198] The parameter screening module 605 is used to screen out a preset rate control parameter that meets a preset condition from at least one preset rate control parameter according to at least one fused feature, so as to obtain a target rate control parameter.

[0199] The second encoding module 606 is used to encode the video to be encoded according to the target bit rate control parameter to obtain a target encoded video corresponding to the video to be encoded.

[0200] Optionally, the parameter screening module 605 is specifically used to perform:

[0201] Predicting a quality state of at least one encoded video based on at least one fused feature;

[0202] The preset bit rate control parameter used by the encoded video corresponding to the quality state that meets the preset condition is determined as the target bit rate control parameter.

[0203] Optionally, the quality status includes a first quality status flag that meets a preset quality status and a second quality status flag that does not meet the preset quality status, and the parameter screening module 605 is specifically used to perform:

[0204] Selecting a first parameter interval and a second parameter interval from the parameter set;

[0205] A target parameter interval is selected from the first parameter interval and the second parameter interval, wherein the quality status corresponding to the endpoint parameters of the target parameter interval includes a first quality status identifier and a second quality status identifier;

[0206] If the number of preset rate control parameters included in the target parameter interval does not meet the preset number condition, the target parameter interval is used as the parameter set, and the step of selecting the first parameter interval and the second parameter interval from the parameter set is returned to be executed;

[0207] If the number of preset rate control parameters included in the target parameter interval meets the preset number condition, the endpoint parameter corresponding to the first quality state identifier in the target parameter interval is determined as the target rate control parameter.

[0208] Optionally, the parameter screening module 605 is specifically used to perform:

[0209] If the quality states corresponding to the endpoint parameters of the first parameter interval are all first quality state identification bits, and / or the quality states corresponding to the endpoint parameters of the second parameter interval include the first quality state identification bit and the second quality state identification bit, the second parameter interval is determined as the target parameter interval;

[0210] If the quality status corresponding to the endpoint parameters of the first parameter interval includes the first quality status identifier and the second quality status identifier, and / or the quality status corresponding to the endpoint parameters of the second parameter interval are all the second quality status identifier, the first parameter interval is determined as the target parameter interval.

[0211] Optionally, the parameter screening module 605 is specifically used to perform:

[0212] Predicting a probability parameter according to at least one fused feature, where the probability parameter is used to measure whether at least one encoded video meets a preset quality state;

[0213] If the probability parameter is equal to or greater than the preset probability parameter, determining the quality status of at least one encoded video as a first quality status flag;

[0214] If the probability parameter is less than the preset probability parameter, the quality status of at least one encoded video is determined as a second quality status flag.

[0215] Optionally, the quality state includes a first quality state flag that satisfies a preset quality state and a second quality state flag that does not satisfy the preset quality state, and the quality state is arranged according to the arrangement order of at least one preset bit rate control parameter in the parameter set, and the parameter screening module 605 is specifically used to execute:

[0216] Dividing the quality state to obtain a first quality state interval and a second quality state interval;

[0217] Filtering out a target quality state interval from the first quality state interval and the second quality state interval, wherein the endpoint quality state of the target quality state interval includes a first quality state identification bit and a second quality state identification bit;

[0218] If the number of quality states included in the target quality state interval does not meet the preset state number condition, the target quality state interval is determined as the quality state, and the process returns to execute the division of the quality state to obtain a first quality state interval and a second quality state interval;

[0219] If the number of quality states included in the target quality state interval meets the preset state number condition, the preset bit rate control parameter used by the encoded video corresponding to the first quality state flag in the target quality state interval is determined as the target bit rate control parameter.

[0220] Optionally, the first encoding module 602 is specifically configured to execute:

[0221] Selecting a first parameter interval and a second parameter interval from the parameter set;

[0222] The video to be encoded is encoded according to the endpoint parameters of the first parameter interval and the endpoint parameters of the second parameter interval to obtain at least one encoded video.

[0223] The parameter screening module 605 is specifically used to perform:

[0224] A target parameter interval is selected from the first parameter interval and the second parameter interval, wherein the quality status corresponding to the endpoint parameters of the target parameter interval includes a first quality status identifier and a second quality status identifier;

[0225] If the number of preset rate control parameters included in the target parameter interval does not meet the preset number condition, the target parameter interval is used as the parameter set, and the step of selecting the first parameter interval and the second parameter interval from the parameter set is returned to be executed;

[0226] If the number of preset rate control parameters included in the target parameter interval meets the preset number condition, the endpoint parameter corresponding to the first quality state identifier in the target parameter interval is determined as the target rate control parameter.

[0227] Optionally, the video to be encoded is a video segment in the target video, and the first encoding module 602 is specifically used to perform:

[0228] Obtaining bit rate control parameters of historical video segments, where the historical video segments are video segments in the target video that precede the video to be encoded;

[0229] According to the bit rate control parameter, a first parameter interval and a second parameter interval are selected from a parameter set.

[0230] Optionally, the quality status is a probability parameter for measuring whether at least one encoded video meets a preset condition, and the parameter screening module 605 is specifically used to perform:

[0231] predicting a probability parameter based on at least one fused feature;

[0232] Obtaining a preset probability parameter, the preset probability parameter indicating whether a boundary line of a preset quality state is met;

[0233] The preset bit rate control parameter used by the encoded video corresponding to the probability parameter that meets the preset probability parameter is determined as the target bit rate control parameter.

[0234] Optionally, the probability parameters are arranged according to the arrangement order of at least one preset bit rate control parameter in the parameter set, and the parameter screening module 605 is specifically used to perform:

[0235] Dividing the probability parameter to obtain a first probability parameter interval and a second probability parameter interval;

[0236] Filtering a target probability parameter interval from the first probability parameter interval and the second probability parameter interval, the target probability parameter interval including an endpoint probability parameter greater than a preset probability parameter and an endpoint probability parameter less than the preset probability parameter;

[0237] If the number of probability parameters included in the target probability parameter interval does not meet the preset parameter number condition, the target probability interval is used as the probability parameter, and the step of dividing the probability parameter to obtain the first probability parameter interval and the second probability parameter interval is returned;

[0238] If the number of probability parameters included in the target probability parameter interval meets the preset parameter number condition, the preset bit rate control parameter used for the encoded video corresponding to the endpoint probability parameter in the target probability parameter interval that is greater than the preset probability parameter is determined as the target bit rate control parameter.

[0239] Optionally, the second encoding module 606 is specifically configured to execute:

[0240] Determining candidate quantization parameters according to target bit rate control parameters;

[0241] Get the parameters of interest;

[0242] The candidate quantization parameters are adjusted according to the parameter of interest to obtain a first quantization parameter of the region of interest in the to-be-encoded video and a second quantization parameter of the region of non-interest in the to-be-encoded video;

[0243] The video to be encoded is encoded according to the first quantization parameter and the second quantization parameter to obtain a target encoded video corresponding to the video to be encoded.

[0244] Optionally, the target bit rate control parameter is obtained through a parameter identification model, and the video encoding device further includes:

[0245] Training module, which performs:

[0246] Acquire a sample video set, where the sample video set includes a coding feature of at least one encoded sample video corresponding to at least one sample video;

[0247] Extracting features from at least one sample video to obtain sample video features corresponding to the at least one sample video;

[0248] Fusing the encoding features corresponding to at least one encoded sample video with the sample video features to obtain at least one fused sample feature;

[0249] The parameter recognition model to be trained is trained according to at least one fused sample feature to obtain a parameter recognition model.

[0250] Optionally, the sample video set further includes at least one real quality state corresponding to the encoded sample video, and the training module is specifically used to perform:

[0251] Predicting a sample quality state of at least one encoded sample video based on at least one fused feature;

[0252] According to the sample quality status and the true quality status, the parameter recognition model to be trained is trained to obtain the parameter recognition model.

[0253] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation methods and corresponding beneficial effects of the above modules can be found in the previous method embodiments, which will not be repeated here.

[0254] The present application also provides an electronic device, which may be a server or a terminal, etc. Figure 7 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:

[0255] The electronic device may include components such as a processor 701 with one or more processing cores, a memory 702 with one or more computer-readable storage media, a power supply 703, and an input unit 704. Those skilled in the art will appreciate that Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0256] The processor 701 is the control center of the electronic device, which uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing computer programs and / or modules stored in the memory 702, and calling data stored in the memory 702. Optionally, the processor 701 may include one or more processing cores; preferably, the processor 701 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 701.

[0257] The memory 702 can be used to store computer programs and modules. The processor 701 executes various functional applications and data processing by running the computer programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.

[0258] The electronic device also includes a power supply 703 for supplying power to each component. Preferably, the power supply 703 can be logically connected to the processor 701 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 703 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0259] The electronic device may further include an input unit 704, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0260] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 701 in the electronic device will load the executable files corresponding to the processes of one or more computer programs into the memory 702 according to the following instructions, and the processor 701 will run the computer programs stored in the memory 702, thereby realizing various functions, such as:

[0261] Acquire a video to be encoded and acquire a parameter set, where the parameter set includes at least one preset bit rate control parameter;

[0262] According to at least one preset bit rate control parameter, encoding the video to be encoded is performed to obtain at least one encoded video, and a coding feature corresponding to the at least one encoded video is obtained;

[0263] Extract features of the video to be encoded to obtain video features corresponding to the video to be encoded;

[0264] Fusing the encoding features corresponding to at least one encoded video with the video features to obtain at least one fused feature;

[0265] According to the at least one fused feature, a preset rate control parameter satisfying a preset condition is selected from at least one preset rate control parameter to obtain a target rate control parameter;

[0266] The video to be encoded is encoded according to the target bit rate control parameter to obtain a target encoded video corresponding to the video to be encoded.

[0267] The specific implementation methods and corresponding beneficial effects of the above operations can be found in the detailed description of the video encoding method above, which will not be elaborated here.

[0268] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0269] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any video encoding method provided in the embodiment of the present application. For example, the computer program can execute the following steps:

[0270] Acquire a video to be encoded and acquire a parameter set, where the parameter set includes at least one preset bit rate control parameter;

[0271] According to at least one preset bit rate control parameter, encoding the video to be encoded is performed to obtain at least one encoded video, and a coding feature corresponding to the at least one encoded video is obtained;

[0272] Extract features of the video to be encoded to obtain video features corresponding to the video to be encoded;

[0273] Fusing the encoding features corresponding to at least one encoded video with the video features to obtain at least one fused feature;

[0274] According to the at least one fused feature, a preset rate control parameter satisfying a preset condition is selected from at least one preset rate control parameter to obtain a target rate control parameter;

[0275] The video to be encoded is encoded according to the target bit rate control parameter to obtain a target encoded video corresponding to the video to be encoded.

[0276] The specific implementation methods and corresponding beneficial effects of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0277] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0278] Since the computer program stored in the computer-readable storage medium can execute the steps in any one of the video encoding methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the video encoding methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0279] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned video encoding method.

[0280] The above is a detailed introduction to a video encoding method, device, electronic device and computer storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A video encoding method, characterized in that: include: Acquire a video to be encoded and acquire a parameter set, wherein the parameter set includes at least one preset bit rate control parameter; According to the at least one preset bit rate control parameter, the video to be encoded is encoded to obtain at least one encoded video, and a coding feature corresponding to the at least one encoded video is obtained; Extracting features of the video to be encoded to obtain video features corresponding to the video to be encoded; Fusing the encoding features corresponding to the at least one encoded video with the video features to obtain at least one fused feature; Predicting a quality status of the at least one encoded video according to the at least one fused feature; Determining a preset bit rate control parameter used by the encoded video corresponding to the quality state that meets the preset condition as a target bit rate control parameter; According to the target bit rate control parameter, the video to be encoded is encoded to obtain a target encoded video corresponding to the video to be encoded; The implementation method of determining the preset bit rate control parameter used by the encoded video corresponding to the quality state that meets the preset condition as the target bit rate control parameter includes any one of the following methods: Mode 1: The quality state includes a first quality state flag that satisfies a preset quality state and a second quality state flag that does not satisfy the preset quality state, and the preset bit rate control parameter used by the encoded video corresponding to the quality state that satisfies the preset condition is determined as the target bit rate control parameter, including: Selecting a first parameter interval and a second parameter interval from the parameter set; Filtering a target parameter interval from the first parameter interval and the second parameter interval, wherein the quality status corresponding to the endpoint parameters of the target parameter interval includes the first quality status flag and the second quality status flag; If the number of preset rate control parameters included in the target parameter interval does not meet the preset number condition, the target parameter interval is used as the parameter set, and the step of selecting the first parameter interval and the second parameter interval from the parameter set is returned to be executed; If the number of preset rate control parameters included in the target parameter interval meets the preset number condition, determining the endpoint parameter corresponding to the first quality state identifier in the target parameter interval as the target rate control parameter; Mode 2: The quality state includes a first quality state flag that satisfies a preset quality state and a second quality state flag that does not satisfy the preset quality state, the quality states are arranged according to the arrangement order of the at least one preset rate control parameter in the parameter set, and the preset rate control parameter used by the encoded video corresponding to the quality state that satisfies the preset condition is determined as the target rate control parameter, including: Dividing the quality state to obtain a first quality state interval and a second quality state interval; Filtering a target quality state interval from the first quality state interval and the second quality state interval, wherein the endpoint quality states of the target quality state interval include the first quality state flag and the second quality state flag; If the number of quality states included in the target quality state interval does not meet the preset state number condition, the target quality state interval is determined as the quality state, and the process returns to execute the division of the quality state to obtain a first quality state interval and a second quality state interval; If the number of quality states included in the target quality state interval meets the preset state number condition, determining the preset bit rate control parameter used by the encoded video corresponding to the first quality state flag in the target quality state interval as the target bit rate control parameter; Mode 3: encoding the video to be encoded according to the at least one preset bit rate control parameter to obtain at least one encoded video, including: Selecting a first parameter interval and a second parameter interval from the parameter set; Encoding the video to be encoded according to the endpoint parameters of the first parameter interval and the endpoint parameters of the second parameter interval to obtain at least one encoded video; The step of determining the preset bit rate control parameter used by the encoded video corresponding to the quality state satisfying the preset condition as the target bit rate control parameter includes: Filtering out a target parameter interval from the first parameter interval and the second parameter interval, wherein the quality status corresponding to the endpoint parameters of the target parameter interval includes a first quality status flag and a second quality status flag; If the number of preset rate control parameters included in the target parameter interval does not meet the preset number condition, the target parameter interval is used as the parameter set, and the step of selecting the first parameter interval and the second parameter interval from the parameter set is returned to be executed; If the number of preset rate control parameters included in the target parameter interval meets the preset number condition, determining the endpoint parameter corresponding to the first quality state identifier in the target parameter interval as the target rate control parameter; Mode 4: The quality status is a probability parameter for measuring whether the at least one encoded video meets a preset condition, and predicting the quality status of the at least one encoded video according to the at least one fused feature includes: Predicting probability parameters according to the at least one fused feature, wherein the probability parameters are arranged in the order in which the at least one preset bit rate control parameter is arranged in the parameter set; The step of determining the preset bit rate control parameter used by the encoded video corresponding to the quality state satisfying the preset condition as the target bit rate control parameter includes: Obtaining a preset probability parameter, wherein the preset probability parameter indicates whether a boundary line of a preset quality state is met; Dividing the probability parameter to obtain a first probability parameter interval and a second probability parameter interval; Filtering a target probability parameter interval from the first probability parameter interval and the second probability parameter interval, the target probability parameter interval including an endpoint probability parameter greater than the preset probability parameter and an endpoint probability parameter less than the preset probability parameter; If the number of probability parameters included in the target probability parameter interval does not meet the preset parameter number condition, the target probability interval is used as the probability parameter, and the step of dividing the probability parameter to obtain a first probability parameter interval and a second probability parameter interval is returned; If the number of probability parameters included in the target probability parameter interval meets the preset parameter number condition, the preset bit rate control parameter used by the encoded video corresponding to the endpoint probability parameter in the target probability parameter interval that is greater than the preset probability parameter is determined as the target bit rate control parameter.

2. The video encoding method according to claim 1, characterized in that When the implementation method of determining the preset rate control parameter used by the encoded video corresponding to the quality state that meets the preset condition as the target rate control parameter is the first method, the step of selecting the target parameter interval from the first parameter interval and the second parameter interval includes: If the quality states corresponding to the endpoint parameters of the first parameter interval are all the first quality state identification bits, and / or the quality states corresponding to the endpoint parameters of the second parameter interval include the first quality state identification bit and the second quality state identification bit, the second parameter interval is determined as the target parameter interval; If the quality status corresponding to the endpoint parameters of the first parameter interval includes the first quality status identifier and the second quality status identifier, and / or the quality status corresponding to the endpoint parameters of the second parameter interval are all the second quality status identifier, the first parameter interval is determined as the target parameter interval.

3. The video encoding method according to claim 1, characterized in that: When the implementation method of determining the preset rate control parameter used by the encoded video corresponding to the quality state that meets the preset condition as the target rate control parameter is the first method, predicting the quality state of the at least one encoded video according to the at least one fused feature includes: Predicting a probability parameter according to the at least one fused feature, the probability parameter being used to measure whether the at least one encoded video meets a preset quality state; If the probability parameter is equal to or greater than a preset probability parameter, determining the quality status of the at least one encoded video as the first quality status flag; If the probability parameter is less than the preset probability parameter, the quality status of the at least one encoded video is determined as the second quality status flag.

4. The video encoding method according to claim 1, characterized in that: When the implementation method of determining the preset rate control parameter used by the encoded video corresponding to the quality state that meets the preset condition as the target rate control parameter is the third method, the video to be encoded is a video slice in the target video, and the selecting the first parameter interval and the second parameter interval from the parameter set includes: Obtaining a bit rate control parameter of a historical video segment, wherein the historical video segment is a video segment in the target video that precedes the video to be encoded; According to the rate control parameter, a first parameter interval and a second parameter interval are selected from the parameter set.

5. The video encoding method according to claim 1, characterized in that: The step of encoding the video to be encoded according to the target bit rate control parameter to obtain a target encoded video corresponding to the video to be encoded includes: Determining a candidate quantization parameter according to the target rate control parameter; Get the parameters of interest; The candidate quantization parameters are adjusted according to the parameter of interest to obtain a first quantization parameter of an area of ​​interest in the to-be-encoded video and a second quantization parameter of an area of ​​non-interest in the to-be-encoded video; The video to be encoded is encoded according to the first quantization parameter and the second quantization parameter to obtain a target encoded video corresponding to the video to be encoded.

6. The video encoding method according to any one of claims 1 to 5, characterized in that: The quality status is obtained by a parameter recognition model, and before predicting the quality status of the at least one encoded video according to the at least one fused feature, the method further includes: Acquire a sample video set, where the sample video set includes a coding feature of at least one encoded sample video corresponding to at least one sample video; Extracting features from the at least one sample video to obtain sample video features corresponding to the at least one sample video; Fusing the encoding features corresponding to the at least one encoded sample video with the sample video features to obtain at least one fused sample feature; The parameter recognition model to be trained is trained according to the at least one fused sample feature to obtain the parameter recognition model.

7. The video encoding method according to claim 6, characterized in that: The sample video set also includes a true quality state corresponding to the at least one encoded sample video; The step of training the parameter recognition model to be trained according to the at least one fused sample feature to obtain the parameter recognition model comprises: Predicting a sample quality state of the at least one encoded sample video according to the at least one fused feature; The parameter recognition model to be trained is trained according to the sample quality status and the true quality status to obtain the parameter recognition model.

8. A video encoding device, characterized in that: include: A first acquisition module, used to acquire a video to be encoded and acquire a parameter set, wherein the parameter set includes at least one preset bit rate control parameter; A first encoding module, configured to perform encoding processing on the video to be encoded according to the at least one preset bit rate control parameter to obtain at least one encoded video, and obtain encoding features corresponding to the at least one encoded video; A feature extraction module is used to extract features from the video to be encoded to obtain video features corresponding to the video to be encoded; A feature fusion module, used to fuse the encoding features corresponding to the at least one encoded video with the video features to obtain at least one fused feature; a parameter screening module, configured to predict the quality status of the at least one encoded video according to the at least one fused feature, and determine a preset bit rate control parameter used by the encoded video corresponding to the quality status that meets the preset condition as a target bit rate control parameter; A second encoding module, configured to perform encoding processing on the video to be encoded according to the target bit rate control parameter to obtain a target encoded video corresponding to the video to be encoded; The parameter screening module is specifically used to perform any one of the following methods: Mode 1: The quality status includes a first quality status identification bit that satisfies a preset quality status and a second quality status identification bit that does not satisfy the preset quality status, and the parameter screening module is specifically used to perform: Selecting a first parameter interval and a second parameter interval from the parameter set; Filtering a target parameter interval from the first parameter interval and the second parameter interval, wherein the quality status corresponding to the endpoint parameters of the target parameter interval includes the first quality status flag and the second quality status flag; If the number of preset rate control parameters included in the target parameter interval does not meet the preset number condition, the target parameter interval is used as the parameter set, and the step of selecting the first parameter interval and the second parameter interval from the parameter set is returned to be executed; If the number of preset rate control parameters included in the target parameter interval meets the preset number condition, determining the endpoint parameter corresponding to the first quality state identifier in the target parameter interval as the target rate control parameter; Mode 2: The quality status includes a first quality status flag that satisfies a preset quality status and a second quality status flag that does not satisfy the preset quality status, and the quality status is arranged according to the arrangement order of the at least one preset bit rate control parameter in the parameter set, and the parameter screening module is specifically used to execute: Dividing the quality state to obtain a first quality state interval and a second quality state interval; Filtering a target quality state interval from the first quality state interval and the second quality state interval, wherein the endpoint quality states of the target quality state interval include the first quality state flag and the second quality state flag; If the number of quality states included in the target quality state interval does not meet the preset state number condition, the target quality state interval is determined as the quality state, and the process returns to execute the division of the quality state to obtain a first quality state interval and a second quality state interval; If the number of quality states included in the target quality state interval meets the preset state number condition, determining the preset bit rate control parameter used by the encoded video corresponding to the first quality state flag in the target quality state interval as the target bit rate control parameter; Mode 3: The first encoding module is specifically used to execute: Selecting a first parameter interval and a second parameter interval from the parameter set; Encoding the video to be encoded according to the endpoint parameters of the first parameter interval and the endpoint parameters of the second parameter interval to obtain at least one encoded video; The parameter screening module is specifically used to perform: Filtering out a target parameter interval from the first parameter interval and the second parameter interval, wherein the quality status corresponding to the endpoint parameters of the target parameter interval includes a first quality status flag and a second quality status flag; If the number of preset rate control parameters included in the target parameter interval does not meet the preset number condition, the target parameter interval is used as the parameter set, and the step of selecting the first parameter interval and the second parameter interval from the parameter set is returned to be executed; If the number of preset rate control parameters included in the target parameter interval meets the preset number condition, determining the endpoint parameter corresponding to the first quality state identifier in the target parameter interval as the target rate control parameter; Mode 4: The quality status is a probability parameter for measuring whether the at least one encoded video meets a preset condition, and the parameter screening module is specifically used to perform: Predicting probability parameters according to the at least one fused feature, wherein the probability parameters are arranged in the order in which the at least one preset bit rate control parameter is arranged in the parameter set; Obtaining a preset probability parameter, wherein the preset probability parameter indicates whether a boundary line of a preset quality state is met; Dividing the probability parameter to obtain a first probability parameter interval and a second probability parameter interval; Filtering a target probability parameter interval from the first probability parameter interval and the second probability parameter interval, the target probability parameter interval including an endpoint probability parameter greater than the preset probability parameter and an endpoint probability parameter less than the preset probability parameter; If the number of probability parameters included in the target probability parameter interval does not meet the preset parameter number condition, the target probability interval is used as the probability parameter, and the step of dividing the probability parameter to obtain a first probability parameter interval and a second probability parameter interval is returned; If the number of probability parameters included in the target probability parameter interval meets the preset parameter number condition, the preset bit rate control parameter used by the encoded video corresponding to the endpoint probability parameter in the target probability parameter interval that is greater than the preset probability parameter is determined as the target bit rate control parameter.

9. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the video encoding method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the video encoding method according to any one of claims 1 to 7.