A video compression method based on quality-bitrate dynamic balancing

By adopting a dynamic bitrate allocation method based on spatiotemporal correlation and multi-feature fusion, the problem of unstable image quality in video compression is solved, the bitrate is matched with the scene complexity, and the efficiency and quality stability of video compression are improved.

CN123123575APending Publication Date: 2026-11-17SHENZHEN JINLIAN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610982103.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2026-04-17
Filing Date
2026-07-02
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing video compression technologies struggle to adapt to changes in complexity while balancing video quality and bitrate, leading to issues such as decreased image quality in complex scenes or wasted bitrate in simple scenes.

Method used

A dynamic bitrate allocation method based on spatiotemporal correlation analysis, multi-feature fusion analysis, and adaptive mapping mechanism is adopted. Through inter-frame feature analysis and multi-dimensional feature recognition, the video segment division and bitrate allocation are dynamically optimized. Combined with post-compression quality feedback adjustment, the bitrate is matched with the scene complexity.

Benefits of technology

It achieves accurate identification of video segments and reasonable bitrate allocation, avoiding unstable image quality and bitrate waste, and improving compression efficiency and quality stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123123575A_ABST
    Figure CN123123575A_ABST
Patent Text Reader

Abstract

This invention relates to the technical field of digital video compression, specifically a video compression method based on dynamic quality-bitrate balance. The method includes: dynamically allocating bitrate based on video scene complexity, comprising: constructing a dynamic bitrate allocation model, using the video data to be compressed as input to the model, and dynamically optimizing the allocation of video bitrate based on the model's output; compressing the video based on the allocated bitrate and calculating the corresponding quality score; dynamically optimizing the video compression bitrate according to the quality score function; and determining the optimal bitrate through an iterative optimization mechanism based on the dynamically adjusted bitrate. This invention achieves a reasonable match between bitrate and scene complexity by employing a dynamic bitrate allocation technique based on adaptive mapping; and achieves closed-loop adaptive optimization of bitrate allocation by employing a feedback adjustment technique based on the quality of the compressed video.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of digital video compression, specifically to a video compression method based on dynamic quality-bitrate balance. Background Technology

[0002] Over the past two decades, the rapid growth of multimedia data in cyberspace has led to a rapid increase in data transmission volume and repository size. This increase in data volume has made it necessary to explore effective technologies for processing and storing data content. Video is the most consumed data type on the internet. It occupies a large amount of storage space and contains massive amounts of information. However, at present, video compression while maintaining both quality and bitrate still faces the following challenges: When the complexity of a video scene changes significantly, image quality is prone to degrade in complex scenes, while bitrate is wasted in simple scenes. The bitrate allocation process usually relies on a single complexity index or fixed empirical parameters, making it difficult to take into account different dimensions of image quality requirements. Summary of the Invention

[0003] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a video compression method based on dynamic quality-bitrate balance, comprising the following steps, Dynamically allocate bitrate based on video scene complexity, including: A dynamic bitrate allocation model is constructed, using the video data to be compressed as input. Based on the model's output, the video bitrate is dynamically optimized and allocated. Specifically: The dynamic bitrate allocation model, based on a multi-level optimization mechanism, also includes: The video segmentation module based on spatiotemporal correlation analysis mechanism, the scene complexity analysis module based on multi-feature fusion analysis mechanism, and the dynamic bitrate allocation module based on adaptive mapping mechanism. In addition, dynamic optimization and adjustment are performed based on the quality of the compressed video, specifically as follows: Video compression is performed based on the bitrate allocated to each video segment, and feedback adjustments are made based on the compression quality. This also includes... Video compression is performed based on the allocated bitrate, and the corresponding quality score of the video is calculated. The video compression bitrate is dynamically optimized according to the quality score function. At the same time, the optimal bitrate is determined through an iterative optimization mechanism based on the dynamically adjusted bitrate.

[0004] As a preferred embodiment of the video compression method based on dynamic quality-bitrate balance described in this invention, the spatiotemporal correlation analysis mechanism is as follows: Based on the spatiotemporal continuity features between video frames, boundary identification is performed on the video sequence to determine the dividing nodes of video segments, specifically: Three consecutive frames of video data are constructed into a temporal analysis unit. Based on the motion consistency, structural continuity and color smoothness in the temporal analysis unit, a comprehensive difference score is calculated. Based on the calculated difference score, the segmentation nodes of the video data are determined.

[0005] As a preferred embodiment of the video compression method based on dynamic quality-bitrate balance described in this invention, the multi-feature fusion analysis mechanism is as follows: Scene analysis is performed on each video segment in the initial video segmentation results. Multi-feature fusion calculation is performed on each video segment, and the scene complexity of the video segment is identified based on the calculation results. Specifically: Extract multidimensional spatiotemporal features from any video segment in the initial video segmentation results; Based on the extracted multidimensional spatiotemporal features, the complexity level of the first-generation video segmentation is identified by specifying complexity grading rules. The complexity level of the initial video segmentation is identified based on the set complexity threshold vector.

[0006] As a preferred embodiment of the video compression method based on dynamic quality-bitrate balance described in this invention, the adaptive mapping mechanism is specifically as follows: Based on the correspondence between complexity levels and visual quality requirements, precise allocation of video bitrate is achieved, specifically as follows: Based on the scene complexity analysis results corresponding to the video data segments, an adaptive mapping relationship between complexity level and target bit rate is established; Based on the established fundamental mapping relationship between bitrate and complexity, the bitrate is dynamically adjusted through a quality feedback mechanism; The quality of each video data segment is evaluated based on the bitrate assigned to it according to the underlying mapping relationship.

[0007] As a preferred embodiment of the video compression method based on dynamic quality-bitrate balance described in this invention, the calculation of the comprehensive difference score is as follows: Motion consistency index is determined based on the amplitude of optical flow field change between adjacent frames. Structural continuity index is determined based on the structural similarity index between adjacent frames. The color smoothness index is determined based on the Bach distance of the color histogram between adjacent frames. ; Based on the defined indicators, a comprehensive difference score is calculated, specifically as follows: in, Indicates the first Difference score of frame video data Indicates the first Frame video data and the first Motion consistency metrics between frames of video data Indicates the first Frame video data and the first Motion consistency metrics between frames of video data Indicates the first Frame video data and the first Motion consistency metrics between frames of video data Represents the weighting coefficients, and satisfies the formula .

[0008] As a preferred embodiment of the video compression method based on dynamic quality-bitrate balance described in this invention, the determination of the video data segmentation nodes is specifically as follows: Based on the calculated difference score, the segmentation nodes of the video data are determined, specifically as follows: The difference scores corresponding to each frame of video data are arranged in descending order, then in chronological order, and combined to form the initial video segmentation results. ,in, This represents the first video segment in the initial video segmentation results. This indicates the first segment in the initial video segmentation results. A video clip, This indicates the total number of segments into which the video data is divided.

[0009] As a preferred embodiment of the video compression method based on dynamic quality-bitrate balance described in this invention, the quality evaluation of each data segment is specifically as follows: Based on the bitrate allocated to video segments according to the underlying mapping relationship, the quality of each segment's data is evaluated, and the actual visual quality score at the current bitrate is calculated. and the target visual quality threshold The comparison is performed, and the bitrate is dynamically adjusted based on the comparison results, specifically as follows: If the comparison between the actual visual quality score and the target visual quality threshold satisfies the formula If the current bitrate allocation is reasonable, the bitrate allocation of video data segments will be maintained based on the mapping relationship between the base bitrate and the scene complexity. If the comparison between the actual visual quality score and the target visual quality threshold satisfies the formula If the current bitrate allocation is unreasonable and bitrate is wasted during video compression, the bitrate will be reduced based on the highest visual quality score. If the comparison between the actual visual quality score and the target visual quality threshold satisfies the formula If the current bitrate allocation is unreasonable and the bitrate is insufficient during video compression, the bitrate will be increased based on the lowest visual quality score.

[0010] As a preferred embodiment of the video compression method based on dynamic quality-bitrate balance described in this invention, the dynamic optimization of the video compression bitrate is specifically as follows: For the assigned bitrate, generate two new candidate bitrate values. as well as ; Based on the generated candidate bitrates, the video segments are compressed, and the quality score corresponding to the compressed data is calculated. as well as ; Based on the quality scores of the three compressed videos, the video compression bitrate is dynamically optimized, specifically as follows: If the quality score of the compressed video satisfies the formula This means that increasing the bitrate can improve the quality of the compressed video, and the target bitrate is updated to 0. and will As a new feedback benchmark; If the quality score of the compressed video satisfies the formula This means that reducing the bitrate will not reduce the quality of the compressed video, and the target bitrate is updated to 0. and will As a new feedback benchmark; If the quality score of the compressed video satisfies the formula If the current bitrate is 0, it means that the current bitrate is the optimal bitrate, and the video data compression will be performed while maintaining the current bitrate.

[0011] As a preferred embodiment of the video compression method based on dynamic quality-bitrate balance described in this invention, the step of determining the optimal bitrate through an iterative optimization mechanism is as follows: Based on the dynamically adjusted bitrate, video compression is performed, and the result of the dynamic adjustment is compared with the result of the previous round of adjustment. The optimal quality score for each adjustment is recorded. as well as ; The evaluation is based on iterative optimization using the optimal quality score, specifically as follows: If the comparison of two consecutive best quality scores satisfies the formula If the adjustment is successful, the current bitrate will continue to be used as the feedback baseline for dynamic optimization, and a new round of iterative optimization will be performed until the optimal quality score satisfies the formula. If the bitrate allocation fails, it indicates that the adjustment has failed, the iterative optimization of the bitrate will be terminated, and the bitrate allocation from the previous round will be retained for video data compression.

[0012] The beneficial effects of this invention are: The invention achieves intelligent segmentation of video data by adopting video segmentation technology based on spatiotemporal correlation analysis, avoiding the problem of inaccurate boundary recognition caused by fixed interval segmentation in the existing technology, thereby improving the rationality of subsequent bitrate allocation; By adopting scene complexity analysis technology based on multi-feature fusion, the technical effect of accurate identification of video segment complexity was achieved, which solved the problem that existing technologies rely on a single complexity index and cannot fully reflect the differences in video scenes. By adopting a dynamic bitrate allocation technology based on adaptive mapping, a reasonable match between bitrate and scene complexity is achieved, avoiding the problems of image quality degradation in complex scenes and bitrate waste in simple scenes. By adopting feedback adjustment technology based on the quality of compressed video, the technical effect of closed-loop adaptive optimization of bitrate allocation is achieved, which solves the problem of lack of post-compression quality verification and adjustment mechanism in the existing technology, thereby improving bitrate utilization efficiency while ensuring image quality. By adopting an iterative optimization mechanism, a dynamic balance between video quality and bitrate allocation is achieved, overcoming the shortcomings of existing technologies that are prone to unstable image quality when there are sudden scene changes, making the compression results more stable and reliable. Attached Figure Description

[0013] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 This is a schematic diagram of the overall method steps of a video compression method based on dynamic quality-bitrate balance according to the present invention. Detailed Implementation

[0014] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0015] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0016] Example 1: Refer to Figure 1 As an embodiment of the present invention, a video compression method based on dynamic quality-bitrate balance is provided, comprising the following steps: S1: Dynamically allocate bitrate based on video scene complexity.

[0017] Specifically, the dynamic bitrate allocation based on video scene complexity is achieved by constructing a dynamic bitrate allocation model, using the video data to be compressed as the input to the model, and dynamically optimizing the allocation of the video bitrate based on the model's output.

[0018] The dynamic bitrate allocation model is designed to achieve the optimal balance between video quality and compression efficiency. It is built on a multi-level optimization mechanism, including a video segmentation module based on spatiotemporal correlation analysis, a scene complexity analysis module based on multi-feature fusion analysis, and a dynamic bitrate allocation module based on adaptive mapping.

[0019] Furthermore, the aforementioned spatiotemporal correlation analysis mechanism identifies the boundaries of the video sequence based on the spatiotemporal continuity characteristics between video frames, determining the segmentation nodes of the video segments. The specific implementation is as follows: For the video data to be compressed ,in, This represents the first frame of video data. Indicates the first in the video data Frame video data, This indicates the total frame rate of the video data; Based on the segmented video frame sequence, three consecutive frames of video data are randomly selected. ,as well as Based on the spatiotemporal correlation characteristics between adjacent frames, a difference score is calculated for each video frame. Initial segmentation nodes for the video segments are then constructed based on these calculated difference scores. Specifically: Three frames of video data are linked together to construct a temporal analysis unit. Based on motion consistency, structural continuity, and color smoothness within the temporal analysis unit, a comprehensive difference score is calculated, specifically as follows: Motion consistency index is determined based on the amplitude of optical flow field change between adjacent frames. Structural continuity index is determined based on the structural similarity index between adjacent frames. The color smoothness index is determined based on the Bach distance of the color histogram between adjacent frames. ; Based on the defined indicators, a comprehensive difference score is calculated, specifically as follows: in, Indicates the first Difference score of frame video data Indicates the first Frame video data and the first Motion consistency metrics between frames of video data Indicates the first Frame video data and the first Motion consistency metrics between frames of video data Indicates the first Frame video data and the first Motion consistency metrics between frames of video data Represents the weighting coefficients, and satisfies the formula The specific data is set by the implementers themselves based on the actual application scenario.

[0020] Based on the calculated difference score, the segmentation nodes of the video data are determined, specifically as follows: The difference scores corresponding to each frame of video data are arranged in descending order, then in chronological order, and combined to form the initial video segmentation results. ,in, This represents the first video segment in the initial video segmentation results. This indicates the first segment in the initial video segmentation results. A video clip, This indicates the total number of segments into which the video data is divided.

[0021] Furthermore, the multi-feature fusion analysis mechanism performs scene analysis on each video segment in the initial video segmentation results, performs multi-feature fusion calculation on each video segment, and identifies the scene complexity of the video segment based on the calculation results. The specific implementation is as follows: Based on any video segment from the initial video segmentation results Extract multidimensional spatiotemporal features from video clips, including texture energy density, motion activity intensity, brightness dynamic range, and spatial frequency entropy. Based on the extracted multidimensional spatiotemporal features, the complexity level of the initial video segmentation is identified by specifying complexity grading rules, specifically: Define the fields for extracting feature metrics from video clips. ,in, The texture energy density of the current fragment. The intensity of motion activity in the current segment. This represents the dynamic range of brightness for the current segment. The spatial frequency entropy of the current segment; At the same time, a first-level complexity threshold vector is set. and the second-order complexity threshold vector The specific values ​​in the complexity threshold vector are set by the implementers according to the actual application scenario. The values ​​involved in this embodiment are for illustrative purposes only and do not limit the specific application. Based on the set complexity threshold vector, the complexity level of the initial video segmentation is identified, then: The feature vectors corresponding to the initial video segments satisfy the formula When , it indicates that the scene complexity of the current video segment is level one; The feature vectors corresponding to the initial video segments satisfy the formula When , it indicates that the scene complexity of the current video segment is second-order complexity; The feature vectors corresponding to the initial video segments satisfy the formula When the time is specified, it indicates that the scene complexity of the current video segment is level three.

[0022] It should be noted that the extraction of multidimensional spatiotemporal features is a well-known technique in the field and will not be elaborated here. Texture energy density is used to quantify the richness and complexity of spatial details in video clips, motion activity intensity is used to quantify the severity of spatiotemporal changes caused by the movement of objects or cameras in video clips, luminance dynamic range is used to quantify the distribution breadth and contrast of luminance levels in video clips, and spatial frequency entropy is used to quantify the complexity and unpredictability of spatial information in video clips. The extracted multidimensional spatiotemporal features comprehensively and quantitatively describe the scene complexity of video clips from four dimensions: spatial details (texture energy density), temporal variation (motion activity intensity), brightness distribution (brightness dynamic range), and information complexity (spatial frequency entropy). This provides a solid, reliable, and repeatable computational basis for subsequent dynamic bitrate allocation based on complexity levels.

[0023] Furthermore, the adaptive mapping mechanism is based on the correspondence between complexity level and visual quality requirements to achieve precise allocation of video bitrate, specifically as follows: Based on the scene complexity analysis results corresponding to the video data segments, an adaptive mapping relationship between complexity level and target bitrate is established, specifically as follows: Establish the basic mapping relationship between bitrate and complexity ,in, This represents the base code rate allocated to level one complexity. This represents the base code rate allocated to second-order complexity. This represents the base code rate allocated to level three complexity. This represents the basic mapping relationship between the set bit rate and complexity.

[0024] Based on the established fundamental mapping relationship between bitrate and complexity, the bitrate is dynamically adjusted through a quality feedback mechanism, specifically as follows: Based on the bitrate allocated to video data segments according to the basic mapping relationship, the quality of each segment is evaluated, and then we have: Based on the bitrate allocated to video segments according to the underlying mapping relationship, the quality of each segment's data is evaluated, and the actual visual quality score at the current bitrate is calculated. and the target visual quality threshold The comparison is performed, and the bitrate is dynamically adjusted based on the comparison results, specifically as follows: If the comparison between the actual visual quality score and the target visual quality threshold satisfies the formula If the current bitrate allocation is reasonable, the bitrate allocation of video data segments will be maintained based on the mapping relationship between the base bitrate and the scene complexity. If the comparison between the actual visual quality score and the target visual quality threshold satisfies the formula This indicates that the current bitrate allocation is unreasonable, resulting in wasted bitrate during video compression. The bitrate will be reduced based on the highest visual quality score, specifically: in, This represents the basic mapping relationship between the set bit rate and complexity. This represents the bitrate reduction factor, which is set by the implementers based on the actual application scenario. This indicates the highest visual quality score. This represents the basic mapping relationship between the reduced bitrate and complexity. If the comparison between the actual visual quality score and the target visual quality threshold satisfies the formula This indicates that the current bitrate allocation is unreasonable and the bitrate is insufficient during video compression. The bitrate will be increased based on the lowest visual quality score, specifically: in, This represents the basic mapping relationship between the set bit rate and complexity. This represents the bitrate adjustment factor, which is set by the real-time personnel according to the actual application scenario. Indicates the lowest visual quality score. This represents the basic mapping relationship between the increased bitrate and complexity.

[0025] It should be noted that the visual quality score for video data segments is determined through a multi-person scoring mechanism, specifically: For video data segmentation, multiple people are assigned to score each video segment. The average score of each person for all segments is the actual visual quality score of the current data. The highest visual quality score is the highest score of a single person, and the lowest visual quality score is the lowest score of a single person. The target visual quality threshold is the average score of the group.

[0026] S2: Dynamically optimize and adjust based on the quality of the compressed video.

[0027] Specifically, the dynamic optimization adjustment based on the quality of the compressed video involves compressing the video according to the bitrate allocated to each video segment, and then dynamically optimizing and adjusting the quality based on the compression. The specific implementation is as follows: For the allocated bitrate, video compression is performed, and based on the compression results, corresponding video quality evaluation metrics are calculated, including structural similarity, video multi-method evaluation factors, and peak signal-to-noise ratio. Based on the calculation results of these metrics, an initial quality scoring function is constructed and used as a benchmark for feedback adjustment. Specifically: The initial quality scoring function is ,in, Indicators representing structural similarity This represents the multi-method evaluation factor for video. Indicates peak signal-to-noise ratio. Indicates the initial quality score; Based on the quality scoring function, the video compression bitrate is dynamically optimized, specifically as follows: For the assigned bitrate, two new candidate bitrate values ​​are generated within two adjacent preset bitrate intervals (e.g., ±10%). as well as ; Based on the generated candidate bitrates, the video segments are compressed, and the quality score corresponding to the compressed data is calculated. as well as ; Based on the quality scores of the three compressed videos, the video compression bitrate is dynamically optimized, specifically as follows: If the quality score of the compressed video satisfies the formula This means that increasing the bitrate can improve the quality of the compressed video, and the target bitrate is then updated to 0. and will As a new feedback benchmark; If the quality score of the compressed video satisfies the formula This means that reducing the bitrate will not reduce the quality of the compressed video, and the target bitrate is then updated to 0. and will As a new feedback benchmark; If the quality score of the compressed video satisfies the formula If the current bitrate is 0, it means that the current bitrate is the optimal bitrate, and the video data compression will be performed while maintaining the current bitrate.

[0028] Furthermore, based on the dynamically adjusted bitrate, the optimal bitrate is determined through an iterative optimization mechanism, specifically as follows: Based on the dynamically adjusted bitrate, video compression is performed, and the result of the dynamic adjustment is compared with the result of the previous round of adjustment. The optimal quality score for each adjustment is recorded. as well as ; The evaluation is based on iterative optimization using the optimal quality score, specifically as follows: If the comparison of two consecutive best quality scores satisfies the formula If the adjustment is successful, the current bitrate will continue to be used as the feedback baseline for dynamic optimization, and a new round of iterative optimization will be performed until the optimal quality score satisfies the formula. If the bitrate allocation fails, it indicates that the adjustment has failed, the iterative optimization of the bitrate will be terminated, and the bitrate allocation from the previous round will be retained for video data compression.

[0029] It should be noted that, in order to verify the beneficial effects of the present invention, supplementary explanations are provided through actual comparative experiments, as follows: The experiment compares two commonly used video compression methods: one divides the video into segments of fixed length and assigns the same fixed bitrate to all segments for compression, and the other uses a traditional scene segmentation method based on the inter-frame difference threshold to divide segments and assign a fixed bitrate. The experimental data consisted of 20 video sequences with different content and complexity from a publicly available video dataset, including various types such as sports, news, animation, and documentaries, with a total duration of over 120 minutes. Evaluation metrics include segmentation accuracy and bitrate utilization efficiency. Segmentation accuracy is measured using F1-Score. By comparing the segmentation results with manually annotated scene boundaries, the precision and recall of the segmentation results are calculated, and their harmonic mean F1-Score is calculated. The higher the F1-Score, the more accurate the segmentation. Bitrate efficiency compares the average bitrate required by different methods under the same target visual quality (with a VMAF score of not less than 95). The lower the bitrate, the higher the efficiency. The experimental comparison data are shown in the table below: Experimental Comparison Results Table

[0030] Based on the comparison table above, it is not difficult to see that: In terms of segmentation accuracy, the method of this invention achieved an F1-Score of 0.829, which is significantly higher than that of comparative method one (0.452) and comparative method two (0.598). Compared with comparative method two, which has a better effect, the segmentation accuracy is improved by 38.6%, which fully demonstrates the effectiveness of the "adaptive segmentation mechanism based on spatiotemporal correlation" of this invention. Through multi-dimensional analysis of motion consistency, structural continuity and color smoothness, it can more accurately capture the real scene boundary and avoid the blindness of fixed segmentation and the misjudgment of single threshold method. In terms of bitrate utilization efficiency, while ensuring the same high level of visual quality (VMAF≥95), the method of this invention requires only an average bitrate of 2.81Mbps, saving 41.7% of the bitrate compared to the first comparative method (4.82Mbps). Even compared to the second comparative method, which has already undergone preliminary optimization, it further saves 28.9% of the bitrate, highlighting the enormous value of the "quality-aware bitrate control algorithm." It does not simply allocate high bitrates to highly complex scenes, but rather, through a dual consideration of complexity level and visual quality requirements, combined with real-time quality feedback for fine-tuning, it achieves the optimal balance between quality and compression ratio by using bitrate resources effectively. In summary, this comparative experiment demonstrates through detailed data that the technical solution of this invention achieves significant and quantifiable performance improvements over existing technologies in the three core aspects of video segmentation, scene complexity identification, and final bitrate allocation efficiency, fully reflecting the inventiveness, advancement, and industrial applicability of this invention.

[0031] Furthermore, if the aforementioned function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0032] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0033] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0034] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A video compression method based on quality-bitrate dynamic balancing, characterized in that: Includes the following steps, Dynamically allocate bitrate based on video scene complexity. include, A dynamic bitrate allocation model is constructed, using the video data to be compressed as input. Based on the model's output, the video bitrate is dynamically optimized and allocated. Specifically: The dynamic bitrate allocation model, based on a multi-level optimization mechanism, also includes: The video segmentation module based on spatiotemporal correlation analysis mechanism, the scene complexity analysis module based on multi-feature fusion analysis mechanism, and the dynamic bitrate allocation module based on adaptive mapping mechanism. In addition, dynamic optimization and adjustment are performed based on the quality of the compressed video, specifically as follows: Video compression is performed based on the bitrate allocated to each video segment, and feedback adjustments are made based on the compression quality. This also includes... Video compression is performed based on the allocated bitrate, and the corresponding quality score of the video is calculated. The video compression bitrate is dynamically optimized according to the quality score function. At the same time, the optimal bitrate is determined through an iterative optimization mechanism based on the dynamically adjusted bitrate.

2. The video compression method based on quality-bitrate dynamic balancing as described in claim 1, characterized in that: The spatiotemporal correlation analysis mechanism is as follows: Based on the spatiotemporal continuity features between video frames, boundary identification is performed on the video sequence to determine the dividing nodes of video segments, specifically: Three consecutive frames of video data are constructed into a temporal analysis unit. Based on the motion consistency, structural continuity and color smoothness in the temporal analysis unit, a comprehensive difference score is calculated. Based on the calculated difference score, the segmentation nodes of the video data are determined.

3. The video compression method based on quality-bitrate dynamic balancing as described in claim 2, characterized in that: The multi-feature fusion analysis mechanism is as follows: Scene analysis is performed on each video segment in the initial video segmentation results. Multi-feature fusion calculation is performed on each video segment, and the scene complexity of the video segment is identified based on the calculation results. Specifically: Extract multidimensional spatiotemporal features from any video segment in the initial video segmentation results; Based on the extracted multidimensional spatiotemporal features, the complexity level of the first-generation video segmentation is identified by specifying complexity grading rules. The complexity level of the initial video segmentation is identified based on the set complexity threshold vector.

4. The video compression method based on quality-bitrate dynamic balancing as described in claim 3, characterized in that: The adaptive mapping mechanism is as follows: Based on the correspondence between complexity levels and visual quality requirements, precise allocation of video bitrate is achieved, specifically as follows: Based on the scene complexity analysis results corresponding to the video data segments, an adaptive mapping relationship between complexity level and target bit rate is established; Based on the established fundamental mapping relationship between bitrate and complexity, the bitrate is dynamically adjusted through a quality feedback mechanism; The quality of each video data segment is evaluated based on the bitrate assigned to it according to the underlying mapping relationship.

5. The video compression method based on quality-bitrate dynamic balancing as described in claim 4, characterized in that: The calculation of the comprehensive difference score is as follows: Motion consistency index is determined based on the amplitude of optical flow field change between adjacent frames. Structural continuity index is determined based on the structural similarity index between adjacent frames. The color smoothness index is determined based on the Bach distance of the color histogram between adjacent frames. ; Based on the defined indicators, a comprehensive difference score is calculated, specifically as follows: in, Indicates the first Difference score of frame video data Indicates the first Frame video data and the first Motion consistency metrics between frames of video data Indicates the first Frame video data and the first Motion consistency metrics between frames of video data Indicates the first Frame video data and the first Motion consistency metrics between frames of video data Represents the weighting coefficients, and satisfies the formula .

6. The video compression method based on dynamic quality-bitrate balancing as described in claim 5, characterized in that: The specific steps for determining the segmentation nodes of the video data are as follows: Based on the calculated difference score, the segmentation nodes of the video data are determined, specifically as follows: The difference scores corresponding to each frame of video data are arranged in descending order, then in chronological order, and combined to form the initial video segmentation results. ,in, This represents the first video segment in the initial video segmentation results. This indicates the first segment in the initial video segmentation result. A video clip, This indicates the total number of segments into which the video data is divided.

7. The video compression method based on quality-bitrate dynamic balancing as described in claim 6, characterized in that: The quality assessment of each data segment is performed as follows: Based on the bitrate allocated to video segments according to the underlying mapping relationship, the quality of each segment's data is evaluated, and the actual visual quality score at the current bitrate is calculated. and the target visual quality threshold The comparison is performed, and the bitrate is dynamically adjusted based on the comparison results, specifically as follows: If the comparison between the actual visual quality score and the target visual quality threshold satisfies the formula If the current bitrate allocation is reasonable, the bitrate allocation of video data segments will be maintained based on the mapping relationship between the base bitrate and the scene complexity. If the comparison between the actual visual quality score and the target visual quality threshold satisfies the formula If the current bitrate allocation is unreasonable and bitrate is wasted during video compression, the bitrate will be reduced based on the highest visual quality score. If the comparison between the actual visual quality score and the target visual quality threshold satisfies the formula If the current bitrate allocation is unreasonable and the bitrate is insufficient during video compression, the bitrate will be increased based on the lowest visual quality score.

8. The video compression method based on quality-bitrate dynamic balancing as described in claim 7, characterized in that: The dynamic optimization of video compression bitrate is as follows: For the assigned bitrate, generate two new candidate bitrate values. as well as ; Based on the generated candidate bitrates, the video segments are compressed, and the quality score corresponding to the compressed data is calculated. as well as ; Based on the quality scores of the three compressed videos, the video compression bitrate is dynamically optimized, specifically as follows: If the quality score of the compressed video satisfies the formula This means that increasing the bitrate can improve the quality of the compressed video, and the target bitrate is updated to 0. and will As a new feedback benchmark; If the quality score of the compressed video satisfies the formula This means that reducing the bitrate will not reduce the quality of the compressed video, and the target bitrate is updated to 0. and will As a new feedback benchmark; If the quality score of the compressed video satisfies the formula If the current bitrate is 0, it means that the current bitrate is the optimal bitrate, and the video data compression will be performed while maintaining the current bitrate.

9. The video compression method based on dynamic quality-bitrate balancing as described in claim 8, characterized in that: The optimal bitrate is determined through an iterative optimization mechanism, as detailed below: Based on the dynamically adjusted bitrate, video compression is performed, and the result of the dynamic adjustment is compared with the result of the previous round of adjustment. The optimal quality score for each adjustment is recorded. as well as ; The evaluation is based on iterative optimization using the optimal quality score, specifically as follows: If the comparison of two consecutive best quality scores satisfies the formula If the adjustment is successful, the current bitrate will continue to be used as the feedback baseline for dynamic optimization, and a new round of iterative optimization will be performed until the optimal quality score satisfies the formula. If the bitrate allocation fails, it indicates that the adjustment has failed, the iterative optimization of the bitrate will be terminated, and the bitrate allocation from the previous round will be retained for video data compression.