Intelligent lossless video compression optimization method and device, equipment and medium

By constructing a multi-level semantic visual description network and a dynamic content topology graph, and combining real-time feedback information to optimize the coding strategy, the problem of rigid coding in existing lossless video compression technologies is solved, achieving deep analysis and efficient compression of video content.

CN121967710APending Publication Date: 2026-05-01HUAXIA HUASHANG (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-04
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing lossless video compression technologies lack a deep understanding of the inherent logic and semantic structure of video content, resulting in a rigid encoding process and making it difficult to achieve globally optimal lossless compression results.

Method used

A multi-level semantic visual description network is constructed. A dynamic content topology map is generated by labeling content markers to form semantic aggregation units. A pre-established compressed semantic tag library is used to match candidate strategies for each unit. Online adjustments are made based on real-time feedback information to generate a final strategy mapping table to optimize the encoding process.

Benefits of technology

It achieves deep analysis and precise compression of video content, and the encoding process is adaptive in real time. It can optimize encoding decisions under complex global constraints to achieve a more efficient global compression goal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121967710A_ABST
    Figure CN121967710A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of video compression coding, and discloses an intelligent lossless video compression optimization method and device, equipment and a medium. According to the method, initial content description of an original video stream is extracted through a visual description network, content marking points are marked, and a dynamic content topological graph is generated according to the space-time relation of the content marking points. And performing semantic aggregation on the topological graph to form a semantic aggregation unit associated with a compressed semantic tag. A candidate compression strategy is matched for each unit, an initial strategy mapping table is generated, and a final strategy mapping table is screened out according to global constraint iteration. And configuring encoder parameters according to the table to carry out lossless encoding, and collecting feedback information to adjust strategies and parameters on line. According to the method, the structured association of the video content can be deeply understood, and the dynamic closed-loop optimization of the coding strategy is realized, so that the overall efficiency and the adaptive capability of lossless video compression are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of video compression coding technology, specifically to intelligent lossless video compression optimization methods, apparatus, equipment, and media. Background Technology

[0002] Current mainstream lossless video compression technologies primarily rely on frame-based or block-based coding architectures, eliminating spatial and temporal redundancy through steps such as prediction, transform, and entropy coding. These methods typically treat video data as a collection of pixels or transform coefficients, lacking a deep understanding of the inherent logic and semantic structure of video content. Existing technologies for analyzing video content often remain at the level of scene transition detection and motion estimation, or introduce simple object segmentation to guide the selection of coding parameters. However, video content is a whole composed of various semantic elements and their complex spatiotemporal interactions. Conventional block or object segmentation cannot accurately characterize this dynamic, networked content relationship structure, resulting in the inability to achieve optimal redundancy elimination based on the inherent connections within the content during compression.

[0003] Existing adaptive coding schemes often rely on preset rules or offline analysis results, determining parameters before encoding begins or adjusting a single path during encoding based on limited local information. This approach lacks a mechanism for flexibly and dynamically binding high-level semantic understanding with low-level compression strategies. Because it cannot globally coordinate and optimize multiple compression strategies matched to different units based on content semantic segmentation during encoding based on real-time feedback, the adaptive capability of the encoding process is rigid and limited. It is difficult to allocate appropriate coding resources to different types of semantic content in the video while meeting strict global constraints, thus failing to achieve globally optimal lossless compression. Summary of the Invention

[0004] The purpose of this invention is to provide an intelligent lossless video compression optimization method, apparatus, device, and medium to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention provides an intelligent lossless video compression optimization method, the method comprising: A visual description network containing multi-level semantics is constructed. The original video stream is received, and the initial content description in the original video stream is decomposed step by step through the visual description network. In the initial content description, content markers with differences are marked, and a dynamic content topology map is generated based on the spatiotemporal relationships between the content markers; Multi-level semantic aggregation operations are performed on the dynamic content topology graph to form multiple semantic aggregation units, each of which is associated with a set of predefined compressed semantic tags; Using a pre-established compressed semantic tag library, a set of candidate compression strategies is matched for each semantic aggregation unit, and all candidate compression strategies are integrated into an initial strategy mapping table; Based on the global compression constraints of the original video stream, the initial policy mapping table is iteratively filtered to generate the final policy mapping table; Based on the final strategy mapping table, a specific encoder parameter group is configured for each semantic aggregation unit, and a lossless encoding process for the original video stream is initiated, with feedback information collected synchronously during the encoding process; Based on the feedback information collected synchronously, the final strategy mapping table and the encoder parameter group are adjusted online to complete intelligent lossless video compression optimization.

[0006] Preferably, a visual description network containing multi-level semantics is constructed. The original video stream is received, and the initial content description in the original video stream is decomposed level by level through the visual description network, including: Define the input interface format for the visual description network, wherein the input interface format is aligned with the pixel data format of the original video stream; A primary semantic extraction layer is configured in the visual description network. This primary semantic extraction layer performs pixel-level scanning on each frame of the original video stream and outputs pixel-level semantic fragments. Pixel-level semantic fragments are input into the intermediate semantic organization layer of the visual description network. The intermediate semantic organization layer splices the pixel-level semantic fragments according to spatial adjacency to form frame-level semantic blocks. Frame-level semantic blocks are input into the high-level semantic association layer of the visual description network. The high-level semantic association layer analyzes the evolution trajectory of frame-level semantic blocks between consecutive frames and generates and outputs the initial content description.

[0007] Preferably, the initial content description includes marking content markers with differences, and generating a dynamic content topology map based on the spatiotemporal relationships between these content markers, including: Establish content marker annotation rules, which are used to identify the boundary positions of semantic changes in the initial content description; Based on the content marker annotation rules, the initial content description is traversed, and content markers are inserted at the boundary positions of semantic changes. The timestamp and spatial coordinates of each content marker are recorded. Extract the spatiotemporal attributes of each content marker, including the frame number of the content marker and the region coordinates within that frame; Calculate the spatiotemporal correlation strength between any two content markers, where the spatiotemporal correlation strength is obtained by weighting the timestamp difference and spatial coordinate distance between the two content markers. A dynamic content topology graph is constructed using all content markers as nodes and the spatiotemporal correlation strength as the edge weights.

[0008] Preferably, a multi-level semantic aggregation operation is performed on the dynamic content topology graph to form multiple semantic aggregation units. Each semantic aggregation unit is associated with a set of predefined compressed semantic tags, including: S1: Set a granularity threshold for semantic aggregation, whereby the granularity threshold determines the degree to which nodes in the dynamic content topology graph are merged; S2: Select a starting node from the dynamic content topology graph, and using this starting node as the core, find all adjacent nodes whose spatiotemporal correlation strength is greater than the granularity threshold; S3: Merge the starting node and all found adjacent nodes to form a semantic aggregation unit, and assign a unique unit identifier to the semantic aggregation unit; Traverse all unmerged nodes in the dynamic content topology graph and repeat steps S2 to S3 until all nodes are classified into a semantic aggregation unit; Based on the semantic type of all nodes within each semantic aggregation unit in the initial content description, a set of the most matching compressed semantic tags is assigned to the semantic aggregation unit from a predefined set of compressed semantic tags.

[0009] Preferably, a pre-established compressed semantic tag library is used to match a set of candidate compression strategies for each semantic aggregation unit, and all candidate compression strategies are integrated into an initial strategy mapping table, including: A pre-established compressed semantic tag library is provided, which stores the mapping relationship between each compressed semantic tag and multiple sets of candidate compression strategies. Each set of candidate compression strategies includes encoding mode selection, quantization table identifier, and prediction unit partitioning method. For each semantic aggregation unit, read its associated set of compressed semantic tags, use this set of compressed semantic tags as the query key, and perform parallel retrieval in the pre-established compressed semantic tag library to find all candidate compression strategies associated with each compressed semantic tag; All identified candidate compression strategies are deduplicated and their intersection is calculated to obtain a set of final candidate compression strategies specific to that semantic aggregation unit. Establish a mapping pair with the unit identifier of the semantic aggregation unit as the key and a set of final candidate compression strategies specific to that unit as the value. Summarize all such mapping pairs to form an initial strategy mapping table.

[0010] Preferably, the initial policy mapping table is iteratively filtered based on the global compression constraints of the original video stream to generate the final policy mapping table, including: A1: Global compression constraints for receiving the original video stream, wherein the global compression constraints include at least the target bitrate limit, maximum processing latency, and allowed complexity level; A2: Extract the final candidate compression strategy set corresponding to the first semantic aggregation unit from the initial strategy mapping table; A3: From this final set of candidate compression strategies, evaluate the impact of each candidate compression strategy on the global compression constraints when the assumption is applied to the current semantic aggregation unit; A4: Eliminate candidate compression strategies that do not meet any of the global compression constraints in the evaluation results to form a preliminary subset of screening strategies for this semantic aggregation unit; A5: Update the preliminary screening strategy subset back to the initial strategy mapping table, replacing the original final candidate compression strategy set; Iterate through each semantic aggregation unit in the initial policy mapping table, repeating steps A2 to A5 to complete the screening of candidate compression policies for all semantic aggregation units; The initial policy mapping table after all unit policy filtering is completed is marked as the final policy mapping table.

[0011] Preferably, based on the final strategy mapping table, a specific encoder parameter group is configured for each semantic aggregation unit, and a lossless encoding process for the original video stream is initiated. Feedback information is collected synchronously during the encoding process, including: B1: Load a video encoder compatible with the final policy mapping table; B2: Read the unit identifier of the first semantic aggregation unit in the final policy mapping table and its corresponding preliminary filtering policy subset; B3: From this initial selection strategy subset, select an optimal compression strategy according to the preset optimization rules, and convert the optimal compression strategy into an encoder parameter set that the encoder can directly execute; B4: Configure this encoder parameter group to the video encoder for encoding the video data region in the original video stream corresponding to this semantic aggregation unit; B5: During encoding, feedback information is collected from the internal status register of the video encoder, including real-time bit rate, instantaneous distortion, and buffer occupancy rate; B6: The collected feedback information is bound and stored with the unit identifier of the semantic aggregation unit and the encoder parameter set used; B7: Repeat steps B2 to B6 for each semantic aggregation unit in the final policy mapping table, following the order of the unit identifiers, until all parts of the original video stream have been encoded.

[0012] Preferably, the present invention further includes an intelligent lossless video compression optimization device for implementing the intelligent lossless video compression optimization method described above, the device comprising: The visual description network construction module is used to construct a visual description network containing multi-level semantics, receive the original video stream, and decompose the initial content description in the original video stream step by step through the visual description network; The content topology graph generation module is used to mark content markers with differences in the initial content description and generate a dynamic content topology graph based on the spatiotemporal relationships between the content markers. The semantic aggregation unit forming module is used to perform multi-level semantic aggregation operations on the dynamic content topology graph to form multiple semantic aggregation units, each semantic aggregation unit being associated with a set of predefined compressed semantic tags; The initial policy mapping table integration module is used to match a set of candidate compression strategies for each semantic aggregation unit using a pre-established compressed semantic tag library, and integrate all candidate compression strategies into the initial policy mapping table; The final strategy mapping table generation module is used to iteratively filter the initial strategy mapping table according to the global compression constraints of the original video stream to generate the final strategy mapping table; The encoding and feedback module is used to configure a specific encoder parameter group for each semantic aggregation unit according to the final strategy mapping table, start the lossless encoding process for the original video stream, and collect feedback information synchronously during the encoding process; The online adjustment module is used to adjust the final strategy mapping table and the encoder parameter group online based on synchronously collected feedback information, thereby completing intelligent lossless video compression optimization.

[0013] Preferably, the present invention further includes an electronic device, the electronic device comprising: Processor; and Memory, used to store computer programs; The processor, when executing the computer program, implements the intelligent lossless video compression optimization method described above.

[0014] Preferably, the present invention further includes a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the intelligent lossless video compression optimization method as described above.

[0015] Compared with the prior art, the beneficial effects of the present invention are: By annotating content markers with differences in the initial video content description and analyzing the temporal and spatial relationships between these markers, a graph structure is dynamically generated based on these spatiotemporal connections. This graph structure models the video content as a network composed of nodes and edges, where nodes represent key content features and edges represent the dynamic interactions and structural relationships between them. This approach transforms video content analysis from traditional planar, regional divisions to a deep analysis of the complex topological relationships between content elements. Based on this network modeling, it is possible to more accurately identify and understand how different elements in the video interact and influence each other, providing an accurate structural basis for subsequent differentiated compression based on the content's inherent logic.

[0016] During the encoding process, the system dynamically configures encoding parameters based on a strategy mapping table formed by candidate strategy groups matched for each semantic unit from a pre-built tag library. This process is not completed all at once, but rather real-time feedback information such as compression status and resource consumption is collected synchronously during encoding. Using this feedback information, the system can dynamically and in a closed-loop online manner adjust the strategy mapping table in use and the encoder parameter groups determined by it. This enables the compression strategy to evolve flexibly with the actual encoding progress and the real-time performance of the content, giving the encoding process true real-time adaptability. Under complex global constraints, it can continuously optimize encoding decisions for different semantic content units, thereby achieving the global compression goal more efficiently. Attached Figure Description

[0017] Figure 1 This is a schematic diagram illustrating the working principle of the intelligent lossless video compression optimization method described in this invention. Figure 2 A flowchart for constructing a visual description network and generating initial content descriptions; Figure 3 A flowchart illustrating the process of matching candidate compression strategies and integrating the initial strategy mapping table; Figure 4 A comparative chart of comprehensive scores for candidate intelligent lossless video compression strategies; Figure 5 A comparison chart of performance metrics before and after optimization for intelligent lossless video compression. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] Please see Figure 1This invention provides an intelligent lossless video compression optimization method, comprising: constructing a visual description network containing multi-level semantics, the network receiving the original video stream; the visual description network decomposing the original video stream level by level to output an initial content description of the original video stream; marking the content markers with differences in the obtained initial content description according to specific rules; generating a dynamic content topology graph based on the spatiotemporal relationships between these content markers; performing multi-level semantic aggregation operations on the dynamic content topology graph to form multiple independent semantic aggregation units, each semantic aggregation unit being associated with a set of predefined compression semantic tags; using a pre-established compression semantic tag library, matching a set of candidate compression strategies for each semantic aggregation unit; integrating the correspondence between all semantic aggregation units and their candidate compression strategies to form an initial strategy mapping table; iteratively filtering this initial strategy mapping table according to the global compression constraints that the original video stream needs to satisfy, eliminating strategies that do not meet the constraints, and generating a final strategy mapping table; configuring encoder parameter groups for each semantic aggregation unit according to the final strategy mapping table, and then starting the lossless encoding process for the original video stream; synchronously collecting feedback information from the encoder during the encoding process. Based on the feedback information collected synchronously, the final strategy mapping table and encoder parameter group are adjusted online to complete intelligent lossless video compression optimization.

[0020] In one embodiment of the present invention, see [reference] Figure 2 The input interface format of the visual description network is defined and aligned with the pixel data format of the original video stream. A primary semantic extraction layer is configured in the visual description network. This layer performs pixel-level scanning on each frame of the original video stream, outputting pixel-level semantic fragments. These pixel-level semantic fragments are then input to the intermediate semantic organization layer of the visual description network. The intermediate semantic organization layer concatenates the pixel-level semantic fragments according to spatial adjacency, forming frame-level semantic blocks. These frame-level semantic blocks are then input to the high-level semantic association layer of the visual description network. The high-level semantic association layer analyzes the evolution trajectory of frame-level semantic blocks between consecutive frames, generating and outputting the initial content description. Content marker annotation rules are established to identify the boundary positions of semantic changes in the initial content description. The initial content description is traversed according to the content marker annotation rules, and content markers are inserted at the boundary positions of semantic changes, recording the timestamp and spatial coordinates of each content marker. The spatiotemporal attributes of each content marker are extracted, including the frame number of the content marker and its region coordinates within that frame. Calculate the spatiotemporal association strength between any two content markers. The spatiotemporal association strength is obtained by weighting the timestamp difference and spatial coordinate distance between the two content markers. Construct a dynamic content topology graph using all content markers as nodes and the spatiotemporal association strength as the edge weights.

[0021] In practical implementation, the input interface format of the visual description network is defined as YUV420 planar format, aligned with the pixel data format of the original video stream. The primary semantic extraction layer in the visual description network contains a set of parallel edge detection operators and color clustering filters. This layer performs pixel-level scanning on each frame of the original video stream, outputting pixel-level semantic fragments composed of pixel coordinates, edge intensity, and color category. These pixel-level semantic fragments are then input to the intermediate semantic organization layer of the visual description network. The intermediate semantic organization layer splices the pixel-level semantic fragments according to spatial adjacency and the continuity of edge intensity between fragments, forming frame-level semantic blocks with clear outlines. Each frame-level semantic block records its bounding rectangle coordinates and dominant color information. Finally, the frame-level semantic blocks are input to the high-level semantic association layer of the visual description network. This high-level semantic association layer analyzes the evolution trajectory of frame-level semantic blocks between consecutive frames. This evolution trajectory is obtained by calculating the correspondence between the position and shape of the frame-level semantic blocks. The high-level semantic association layer generates and outputs an initial content description describing the structure and motion of the video content.

[0022] In some embodiments, the content marker annotation rule is established as follows: when the dominant color information of a continuous region in the initial content description changes abruptly or the motion vector amplitude of a frame-level semantic block exceeds a preset threshold, it is determined to be a boundary position of semantic change. The initial content description is traversed according to the content marker annotation rule, and content markers are inserted at the boundary positions of semantic changes, recording the timestamp and spatial coordinates of each content marker. The spatiotemporal attributes of each content marker are extracted, including the frame number where the content marker is located and its region coordinates within the frame. The region coordinates are represented by the center coordinates of the bounding rectangle of the frame-level semantic block. The spatiotemporal correlation strength between any two content markers is calculated. The spatiotemporal correlation strength is obtained by weighting the difference in timestamps and the spatial coordinate distance between the two content markers, using the following formula: in: Content markers With content markers The spatiotemporal correlation strength between them and These are content markers. and content markers timestamp, and These are content markers. and content markers spatial coordinate vector, It is the time decay constant. It is a spatial distance constant. and It is a weighting coefficient and satisfies Using all content markers as nodes, and based on the strength of spatiotemporal correlation... For connecting nodes With nodes The weights of the edges are used to construct a dynamic content topology graph, which is stored in memory as an adjacency matrix.

[0023] It is understandable that the construction process of a dynamic content topology graph depends on the granularity of information provided by the initial content description. The preset threshold of the content marker annotation rules directly affects the number and distribution of nodes in the dynamic content topology graph. Different definitions of the input interface format will cause changes in the data dimension processed by the primary semantic extraction layer, thereby affecting the generation and organization of subsequent semantic fragments.

[0024] In one embodiment of the present invention, a granularity threshold for semantic aggregation is set, which determines the tightness of node merging in the dynamic content topology graph. A starting node is selected from the dynamic content topology graph, and all adjacent nodes with a spatiotemporal correlation strength greater than the granularity threshold are searched using this starting node as the core. The starting node and all found adjacent nodes are merged to form a semantic aggregation unit, and a unique unit identifier is assigned to this semantic aggregation unit. The above search and merging steps are repeated for all unmerged nodes in the dynamic content topology graph until all nodes are classified into a certain semantic aggregation unit. Based on the semantic type corresponding to all nodes in the initial content description within each semantic aggregation unit, a set of the most matching compressed semantic tags is assigned to the semantic aggregation unit from a predefined set of compressed semantic tags.

[0025] In practical implementation, a granularity threshold for semantic aggregation is set. Granularity threshold It is a real number between 0 and 1, granularity threshold. The specific numerical value determines the tightness with which nodes are merged in the dynamic content topology graph; the granularity threshold. The larger the value, the stricter the merging condition. A starting node is selected from the dynamic content topology graph. The selection rule for the starting node can be minimum timestamp priority or maximum degree centrality priority. Using the selected starting node as the core, all nodes in the dynamic content topology graph that have edges with the starting node and whose spatiotemporal association strength value is greater than the granularity threshold are searched. The starting node and all found adjacent nodes are merged to form a semantic aggregation unit, and a unique unit identifier is assigned to the formed semantic aggregation unit. The unit identifier can be a string composed of the prefix "AU_" and an incrementing sequence of numbers.

[0026] Traverse all unmerged nodes in the dynamic content topology graph. For each currently unmerged node, repeat the steps of selecting the starting node, finding adjacent nodes, merging nodes, and assigning unit identifiers until all nodes in the dynamic content topology graph are classified into a semantic aggregation unit. Based on the semantic type of all nodes within each semantic aggregation unit corresponding to the initial content description, the semantic type is derived from the dominant color and motion feature classification of the frame-level semantic block where the content marker point of the node is located. From a predefined set of compressed semantic tags, assign a set of the most matching compressed semantic tags to the semantic aggregation unit. The matching process is completed by calculating the cosine similarity between the feature vector of the semantic aggregation unit and the feature template of each compressed semantic tag.

[0027] In some embodiments, the process of finding adjacent nodes is implemented by querying the adjacency matrix of the dynamic content topology graph, for the starting node. Check the adjacency matrix for the first... All elements of the row ,when At time, node Adjacent nodes identified as meeting the criteria. This can be understood as a granularity threshold. The value is set to a fixed value, or it can be calculated using an adaptive method based on the global edge weight distribution of the dynamic content topology graph. The adaptive method can be based on the formula: in: This represents the average weight of all edges in the dynamic content topology graph. This represents the standard deviation of all edge weights. It is a scaling factor that controls the tightness of aggregation. The allocation of cell identifiers is performed after each successful formation of a semantic aggregation cell. The allocation operation is managed by the global identifier generator, which ensures that the allocated cell identifier remains unique in this processing flow.

[0028] Optionally, the formation process of semantic aggregation units is iterative. After a merging operation, the newly formed semantic aggregation unit is considered a supernode. The edge weights between the supernode and other unmerged nodes or supernodes in the dynamic content topology graph need to be recalculated, based on the maximum or average edge weights between the original node sets. The compressed semantic tag set contains several predefined tags such as "static background," "uniformly moving foreground," "complex texture region," and "smooth gradient region," each associated with a multidimensional feature template. When assigning compressed semantic tags to semantic aggregation units, the centroid of the semantic type feature vectors of all nodes within the semantic aggregation unit is calculated. The centroid vectors are compared with the feature templates of each predefined compressed semantic tag for similarity. One or more predefined compressed semantic tags with similarity exceeding the matching threshold are selected to form a set of compressed semantic tags assigned to the semantic aggregation unit.

[0029] In one embodiment of the present invention, see [reference] Figure 3 A pre-established compressed semantic tag library is used to store the mapping relationship between each compressed semantic tag and multiple sets of candidate compression strategies. Each set of candidate compression strategies includes encoding mode selection, quantization table identifier, and prediction unit partitioning method. For each semantic aggregation unit, its associated set of compressed semantic tags is read. This set of compressed semantic tags is used as the query key to perform parallel retrieval in the pre-established compressed semantic tag library to find all candidate compression strategies associated with each compressed semantic tag. All found candidate compression strategies are deduplicated and their intersection is performed to obtain a set of final candidate compression strategies specific to that semantic aggregation unit. A mapping pair is established with the unit identifier of the semantic aggregation unit as the key and the set of final candidate compression strategies specific to that unit as the value. All such mapping pairs are summarized to form an initial strategy mapping table.

[0030] In practice, a pre-established compressed semantic tag library is created. This library is stored in persistent storage using relational database tables or key-value pairs. Each record in the library stores a mapping relationship between a compressed semantic tag and multiple candidate compression strategies. Each candidate compression strategy includes encoding mode selection parameters, quantization table identifiers, and prediction unit partitioning parameters. For each semantic aggregation unit, a set of compressed semantic tags associated with the unit is read. This set of tags is used as the query key for parallel retrieval. Parallel retrieval is performed in the pre-established compressed semantic tag library. Parallel retrieval is achieved by allocating an independent retrieval thread for each query key or constructing a batch query vector. All candidate compression strategies associated with each compressed semantic tag are identified, and all candidate compression strategies are returned as a set.

[0031] For all identified candidate compression strategies, deduplication and intersection operations are performed. Deduplication removes all identical candidate compression strategy records from the strategy set. Intersection operations retain candidate compression strategies that appear simultaneously in the strategy sets corresponding to all associated compression semantic tags. Intersection operations are completed by iteratively comparing strategy identifiers or calculating the overlap of strategy feature vectors, resulting in a set of final candidate compression strategies specific to this semantic aggregation unit. A mapping pair is established with the unit identifier of the semantic aggregation unit as the key and the set of final candidate compression strategies specific to the semantic aggregation unit as the value. The unit identifier serves as the primary key, and the set of final candidate compression strategies serves as the associated value. The associated values ​​can be stored in a list or array structure. All such mapping pairs are summarized and written into a global index structure or configuration file to form the initial strategy mapping table.

[0032] In some embodiments, the construction of the compressed semantic tag library is completed during the system initialization phase. The data for the compressed semantic tag library comes from statistical regularities and expert rules obtained through offline analysis of a large number of video samples. Encoding mode selection parameters include the enable flags and priorities for intra-frame prediction, inter-frame prediction, and skip mode; the quantization table identifier points to the configuration file index storing different quantization step size matrices; and the prediction unit partitioning parameter defines the allowed partitioning depth and shape. It can be understood that when a set of compressed semantic tags associated with a semantic aggregation unit contains multiple tags, parallel retrieval may return multiple policy sets, and an intersection operation is performed on these policy sets. in: Indicates belonging to a semantic aggregation unit A set of final candidate compression strategies, This indicates that by querying the first Each compression semantic tag is a set of candidate compression strategies retrieved from a compression semantic tag library. Represents semantic aggregation unit The total number of associated compressed semantic tags, This represents the set intersection operator. If the result of the intersection operation is an empty set, then the backup rule is enabled. The backup rule specifies that the top K most frequent candidate compression strategies are selected from the union of all retrieved strategy sets to form a final candidate compression strategy.

[0033] Optionally, the initial strategy mapping table is implemented using a memory hash table. The key is the unit identifier string of the semantic aggregation unit, and the value is a pointer to a memory address storing the final candidate compression strategy list. The deduplication and intersection operations are performed in memory. These operations compare the structured field combinations of the candidate compression strategies. If all parameter fields of two candidate compression strategies are identical, the two candidate compression strategies are considered the same. A set of final candidate compression strategies is sorted in the initial strategy mapping table according to a predefined cost estimation function. This cost estimation function comprehensively considers coding complexity and expected compression rate, and the sorting facilitates rapid strategy selection in subsequent steps.

[0034] In one embodiment of the present invention, global compression constraints of the original video stream are received. These constraints include at least a target bitrate upper limit, maximum processing latency, and allowable complexity level. The final candidate compression strategy set corresponding to the first semantic aggregation unit is extracted from the initial strategy mapping table. From this final candidate compression strategy set, the impact of each candidate compression strategy on the global compression constraints is evaluated sequentially when assumed to be applied to the current semantic aggregation unit. Candidate compression strategies that do not satisfy any of the global compression constraints are eliminated, forming a preliminary selection strategy subset for the semantic aggregation unit. The preliminary selection strategy subset is updated back to the initial strategy mapping table, replacing the original final candidate compression strategy set. Each semantic aggregation unit in the initial strategy mapping table is traversed, and the above extraction, evaluation, elimination, and update steps are repeated to complete the selection of candidate compression strategies for all semantic aggregation units. The initial strategy mapping table after all unit strategy selections are completed is marked as the final strategy mapping table.

[0035] In practical implementation, the global compression constraints for receiving the original video stream include at least a target bitrate upper limit in bits per second. Maximum processing latency in milliseconds Allowable complexity levels, expressed in integer order. The final candidate compression strategy set corresponding to the first semantic aggregation unit is extracted from the initial strategy mapping table. This final candidate compression strategy set is stored in memory as a list. From the final candidate compression strategy set, the impact of each candidate compression strategy on the global compression constraints is evaluated sequentially when assumed to be applied to the current semantic aggregation unit. The evaluation process calls a predefined strategy evaluation function, which takes the parameters of the candidate compression strategy and the characteristics of the semantic aggregation unit as input and outputs the estimated impact values ​​of the strategy in three dimensions: bit rate, processing latency, and complexity.

[0036] Candidate compression strategies that do not meet any of the global compression constraints in the evaluation results are eliminated. The criterion for not meeting the constraints is that the estimated bitrate impact value exceeds the target bitrate upper limit. The estimated processing delay impact value exceeds the maximum processing delay. Or the estimated complexity impact value exceeds the allowable complexity level. This process involves creating a preliminary selection strategy subset for each semantic aggregation unit. This preliminary selection strategy subset is a subset of the final candidate compression strategy set. The preliminary selection strategy subset is then updated back to the initial strategy mapping table, replacing the original final candidate compression strategy set under the semantic aggregation unit entry in the initial strategy mapping table. For each semantic aggregation unit in the initial strategy mapping table, the steps of extracting the final candidate compression strategy set, evaluating each candidate compression strategy, eliminating candidate compression strategies that do not meet the conditions, and forming and updating the preliminary selection strategy subset are repeated until the selection of candidate compression strategies for all semantic aggregation units is complete. The initial strategy mapping table after the strategy selection for all semantic aggregation units is then marked as the final strategy mapping table.

[0037] In some embodiments, the policy evaluation function produces a set of quantified evaluation values ​​for each candidate compression policy. The policy evaluation function can be modeled as: in: This represents the overall score of the candidate compression strategies. , , These represent the estimated impact values ​​on bitrate, processing latency, and complexity calculated internally by the policy evaluation function, respectively. , , It is a function that normalizes the estimated impact value. , , It is a weighting coefficient and satisfies The evaluation process can generate a strategy evaluation table to record intermediate results; see Table 1 for the structure of the strategy evaluation table.

[0038] Table 1: Evaluation Table of Candidate Strategies for Semantic Aggregation Unit "AU_001" It is understandable that the target bitrate upper limit of the global compression constraint is... Maximum processing delay Allowable complexity level This can be used as the absolute threshold for determining whether a condition is met in the policy evaluation function. The process of traversing the initial policy mapping table follows the lexicographical order of the unit identifiers. Policy selection for each semantic aggregation unit is an independent process; the selection result of one semantic aggregation unit does not affect the selection logic of other semantic aggregation units. The initial policy subset may contain zero, one, or more candidate compression policies. When the initial policy subset is empty, a default conservative compression policy that meets the global compression constraints is enabled for that semantic aggregation unit.

[0039] Optional, weighting coefficient , , The value is set by the user according to the application scenario, or dynamically calculated by the system based on the content characteristics of the original video stream. The elimination operation is performed immediately after each evaluation of a single candidate compression strategy, or in batches after evaluating all strategies in the final candidate compression strategy set. The final strategy mapping table is structurally identical to the initial strategy mapping table, but the strategy set associated with each semantic aggregation unit entry is the result of filtering based on global compression constraints. These global compression constraints are constant input parameters throughout the iterative filtering process, providing a unified constraint standard for strategy filtering across all semantic aggregation units.

[0040] Optional, the estimated impact value in the strategy evaluation function , , The calculation relies on a pre-established performance model, which stores average bitrate, encoding time, and computational load data obtained statistically from different compression strategy parameters across various types of video content. The process of traversing and updating the initial strategy mapping table is an atomic operation; the initial strategy mapping table is locked until the update is complete to prevent data inconsistency. It can be understood that the generation of the final strategy mapping table signifies the completion of preliminary strategy filtering for all semantic aggregation units based on constant constraints. The final strategy mapping table forms the basis for subsequent steps to select a unique compression strategy for each semantic aggregation unit.

[0041] See Figure 4 This is a comprehensive score comparison chart of candidate intelligent lossless video compression strategies. It displays the comprehensive score of each candidate compression strategy under different weight coefficients and is a core analysis tool in the optimization stage of compression strategy. Under the bitrate-first weight, all strategies have the highest scores, indicating that the current strategy generally performs better in terms of bitrate. The score under the latency-first weight is relatively low, requiring optimization of latency-related parameters. P_001 and P_004 have high scores under all weights and are preferred strategies for general scenarios. This chart can assist in selecting matching weight coefficients and candidate strategies according to business needs, improving the targeting and efficiency of video compression.

[0042] In one embodiment of the present invention, a video encoder compatible with the final policy mapping table is loaded. The unit identifier of the first semantic aggregation unit and its corresponding preliminary selection policy subset are read from the final policy mapping table. From this preliminary selection policy subset, an optimal compression policy is selected according to a preset optimization rule, and this optimal compression policy is converted into an encoder parameter set that the encoder can directly execute. This encoder parameter set is configured to the video encoder for encoding the video data region in the original video stream corresponding to the semantic aggregation unit. Simultaneously with encoding, feedback information is collected from the internal status register of the video encoder. The feedback information includes real-time bitrate, instantaneous distortion, and buffer occupancy. The collected feedback information is bound and stored with the unit identifier of the semantic aggregation unit and the encoder parameter set used. Following the order of the unit identifiers, the above steps of reading, selecting, converting, configuring, collecting, and binding are repeated for each semantic aggregation unit in the final policy mapping table until all parts of the original video stream have been encoded.

[0043] In practical implementation, a video encoder compatible with the final strategy mapping table is loaded. The video encoder supports parsing and applying encoder parameter sets from the final strategy mapping table. Loading the video encoder includes initializing encoder library functions, allocating encoder instance memory, and configuring encoder basic parameters. The unit identifier of the first semantic aggregation unit and its corresponding preliminary selection strategy subset are read from the final strategy mapping table. This read operation is completed by querying the data structure of the final strategy mapping table, which is organized as a hash table. The key is the unit identifier string of the semantic aggregation unit, and the value is the list of preliminary selection strategy subsets. From the preliminary selection strategy subset, an optimal compression strategy is selected according to a preset optimization rule. The preset optimization rule can be selecting the strategy with the highest estimated comprehensive score or the strategy with the lowest encoding complexity. The optimal compression strategy is then converted into an encoder parameter set that the encoder can directly execute. The conversion process is based on a predefined mapping table from strategy parameters to encoder API parameters.

[0044] The encoder parameter set is configured for the video encoder to encode the video data region corresponding to the current semantic aggregation unit in the original video stream. Configuration is achieved by calling the dynamic parameter setting interface provided by the video encoder. Simultaneously, feedback information is collected from the video encoder's internal status register. This register is updated after encoding the data block corresponding to each semantic aggregation unit. Feedback information includes real-time bitrate, transient distortion, and buffer occupancy rate, which are read from the register address in structure form. The collected feedback information is bound and stored with the unit identifier of the current semantic aggregation unit and its used encoder parameter set. This binding and storage is achieved by writing the three sets of data into the same database record or file line. The record format includes a unit identifier field, an encoder parameter set field, and a feedback information field. Following the order in which the unit identifier appears in the final policy mapping table, for each semantic aggregation unit in the final policy mapping table, the above steps of reading the unit identifier and policy subset, selecting the optimal policy, converting the parameter set, configuring the encoder, collecting feedback information, and binding and storing are repeated until all parts of the original video stream have been encoded.

[0045] In some embodiments, the preset preference rule is defined as an objective function, which calculates a comprehensive score for each strategy in the initial selection strategy subset: in: The overall score of the strategy is represented. This indicates the total number of indicators used for scoring. , , They represent the first The normalized evaluation values ​​of the strategy in terms of bitrate, latency, and complexity under each metric are selected to maximize the overall score. The maximum value is used as the optimal compression strategy. The real-time bitrate of the feedback information is calculated by statistically analyzing the size of the encoded data blocks and the encoding time. The instantaneous distortion is obtained by comparing the pixel differences between the original video data and the reconstructed video data. The buffer occupancy rate is obtained by querying the ratio of the current data volume to the total capacity of the video encoder's output buffer.

[0046] Understandably, the loading of the video encoder needs to ensure that its supported encoding toolset covers the characteristics required by all possible encoder parameter sets appearing in the final policy mapping table. Encoder parameter sets may contain specific control variables such as quantization parameters, motion search range, and entropy coding modes. The conversion process requires mapping the policy description to the specific values ​​assigned to these control variables. The traversal order of the final policy mapping table can be based on the lexicographical order of the unit identifiers or the order in which semantic aggregation units appear on the video timeline.

[0047] Optionally, the collection of feedback information is performed asynchronously with the encoding process, achieved through a separate background monitoring thread periodically polling the video encoder's internal status register. The bound storage data structure maintains a queue in memory, where each element corresponds to the complete information of a semantic aggregation unit that has been encoded. This queue data is persisted to disk after the encoding process is complete. It can be understood that when the processing of all semantic aggregation units in the final strategy mapping table is finished, all parts of the original video stream are encoded, and the bound storage data queue contains a complete feedback log of the entire original video stream encoding process. Optionally, for scenarios with high real-time requirements, the traversal and encoding process of the final strategy mapping table can adopt a pipelined parallel approach. That is, while encoding the current semantic aggregation unit, the optimal compression strategy is pre-selected for the next semantic aggregation unit, and the encoder parameter set is converted. The address of the video encoder's internal status register and the format of the feedback information are provided by the video encoder manufacturer or defined through the encoder API documentation. The step of selecting the optimal compression strategy from the initial selection strategy subset, if the initial selection strategy subset is empty, uses a system-preset default encoder parameter set.

[0048] See Figure 5 This is a performance comparison chart of intelligent lossless video compression before and after optimization. It demonstrates the improvement effect of the compression strategy optimization on core indicators and serves as a core verification chart for the video compression optimization results. The significant reduction in average bitrate is the core benefit, ensuring both lossless quality and efficient compression. The average distortion remains almost unchanged, verifying that the constraints of "lossless" compression have not been violated. This chart can verify the effectiveness of the compression optimization strategy, support the implementation of solutions in business scenarios, and balance compression efficiency with resource consumption.

[0049] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for intelligent lossless video compression optimization, characterized in that... The method includes: A visual description network containing multi-level semantics is constructed. The original video stream is received, and the initial content description in the original video stream is decomposed step by step through the visual description network. In the initial content description, content markers with differences are marked, and a dynamic content topology map is generated based on the spatiotemporal relationships between the content markers; Multi-level semantic aggregation operations are performed on the dynamic content topology graph to form multiple semantic aggregation units, each of which is associated with a set of predefined compressed semantic tags; Using a pre-established compressed semantic tag library, a set of candidate compression strategies is matched for each semantic aggregation unit, and all candidate compression strategies are integrated into an initial strategy mapping table; Based on the global compression constraints of the original video stream, the initial policy mapping table is iteratively filtered to generate the final policy mapping table; Based on the final strategy mapping table, a specific encoder parameter group is configured for each semantic aggregation unit, and a lossless encoding process for the original video stream is initiated, with feedback information collected synchronously during the encoding process; Based on the feedback information collected synchronously, the final strategy mapping table and the encoder parameter group are adjusted online to complete intelligent lossless video compression optimization.

2. The intelligent lossless video compression optimization method according to claim 1, characterized in that... A visual description network containing multi-level semantics is constructed. The original video stream is received, and the initial content description in the original video stream is decomposed level by level through the visual description network, including: Define the input interface format for the visual description network, wherein the input interface format is aligned with the pixel data format of the original video stream; A primary semantic extraction layer is configured in the visual description network. This primary semantic extraction layer performs pixel-level scanning on each frame of the original video stream and outputs pixel-level semantic fragments. Pixel-level semantic fragments are input into the intermediate semantic organization layer of the visual description network. The intermediate semantic organization layer splices the pixel-level semantic fragments according to spatial adjacency to form frame-level semantic blocks. Frame-level semantic blocks are input into the high-level semantic association layer of the visual description network. The high-level semantic association layer analyzes the evolution trajectory of frame-level semantic blocks between consecutive frames and generates and outputs the initial content description.

3. The intelligent lossless video compression optimization method according to claim 2, characterized in that... The process of marking differentiated content markers in the initial content description and generating a dynamic content topology graph based on the spatiotemporal relationships between these markers includes: Establish content marker annotation rules, which are used to identify the boundary positions of semantic changes in the initial content description; Based on the content marker annotation rules, the initial content description is traversed, and content markers are inserted at the boundary positions of semantic changes. The timestamp and spatial coordinates of each content marker are recorded. Extract the spatiotemporal attributes of each content marker, including the frame number of the content marker and the region coordinates within that frame; Calculate the spatiotemporal correlation strength between any two content markers, where the spatiotemporal correlation strength is obtained by weighting the timestamp difference and spatial coordinate distance between the two content markers. A dynamic content topology graph is constructed using all content markers as nodes and the spatiotemporal correlation strength as the edge weights.

4. The intelligent lossless video compression optimization method according to claim 3, characterized in that... The dynamic content topology graph is subjected to multi-level semantic aggregation operations to form multiple semantic aggregation units. Each semantic aggregation unit is associated with a set of predefined compressed semantic tags, including: S1: Set a granularity threshold for semantic aggregation, whereby the granularity threshold determines the degree to which nodes in the dynamic content topology graph are merged; S2: Select a starting node from the dynamic content topology graph, and using this starting node as the core, find all adjacent nodes whose spatiotemporal correlation strength is greater than the granularity threshold; S3: Merge the starting node and all found adjacent nodes to form a semantic aggregation unit, and assign a unique unit identifier to the semantic aggregation unit; Traverse all unmerged nodes in the dynamic content topology graph and repeat steps S2 to S3 until all nodes are classified into a semantic aggregation unit; Based on the semantic type of all nodes within each semantic aggregation unit in the initial content description, a set of the most matching compressed semantic tags is assigned to the semantic aggregation unit from a predefined set of compressed semantic tags.

5. The intelligent lossless video compression optimization method according to claim 4, characterized in that... Using a pre-established compressed semantic tag library, a set of candidate compression strategies is matched for each semantic aggregation unit, and all candidate compression strategies are integrated into an initial strategy mapping table, including: A pre-established compressed semantic tag library is provided, which stores the mapping relationship between each compressed semantic tag and multiple sets of candidate compression strategies. Each set of candidate compression strategies includes encoding mode selection, quantization table identifier, and prediction unit partitioning method. For each semantic aggregation unit, read its associated set of compressed semantic tags, use this set of compressed semantic tags as the query key, and perform parallel retrieval in the pre-established compressed semantic tag library to find all candidate compression strategies associated with each compressed semantic tag; All identified candidate compression strategies are deduplicated and their intersection is calculated to obtain a set of final candidate compression strategies specific to that semantic aggregation unit. Establish a mapping pair with the unit identifier of the semantic aggregation unit as the key and a set of final candidate compression strategies specific to that unit as the value. Summarize all such mapping pairs to form an initial strategy mapping table.

6. The intelligent lossless video compression optimization method according to claim 5, characterized in that... Based on the global compression constraints of the original video stream, the initial policy mapping table is iteratively filtered to generate the final policy mapping table, including: A1: Global compression constraints for receiving the original video stream, wherein the global compression constraints include at least the target bitrate limit, maximum processing latency, and allowed complexity level; A2: Extract the final candidate compression strategy set corresponding to the first semantic aggregation unit from the initial strategy mapping table; A3: From this final set of candidate compression strategies, evaluate the impact of each candidate compression strategy on the global compression constraints when the assumption is applied to the current semantic aggregation unit; A4: Eliminate candidate compression strategies that do not meet any of the global compression constraints in the evaluation results to form a preliminary subset of screening strategies for this semantic aggregation unit; A5: Update the preliminary screening strategy subset back to the initial strategy mapping table, replacing the original final candidate compression strategy set; Iterate through each semantic aggregation unit in the initial policy mapping table, repeating steps A2 to A5 to complete the screening of candidate compression policies for all semantic aggregation units; The initial policy mapping table after all unit policy filtering is completed is marked as the final policy mapping table.

7. The intelligent lossless video compression optimization method according to claim 6, characterized in that... Based on the final strategy mapping table, a specific encoder parameter group is configured for each semantic aggregation unit, and a lossless encoding process for the original video stream is initiated. Feedback information is collected synchronously during the encoding process, including: B1: Load a video encoder compatible with the final policy mapping table; B2: Read the unit identifier of the first semantic aggregation unit in the final policy mapping table and its corresponding preliminary filtering policy subset; B3: From this initial selection strategy subset, select an optimal compression strategy according to the preset optimization rules, and convert the optimal compression strategy into an encoder parameter set that the encoder can directly execute; B4: Configure this encoder parameter group to the video encoder for encoding the video data region in the original video stream corresponding to this semantic aggregation unit; B5: During encoding, feedback information is collected from the internal status register of the video encoder, including real-time bit rate, instantaneous distortion, and buffer occupancy rate; B6: The collected feedback information is bound and stored with the unit identifier of the semantic aggregation unit and the encoder parameter set used; B7: Repeat steps B2 to B6 for each semantic aggregation unit in the final policy mapping table, following the order of the unit identifiers, until all parts of the original video stream have been encoded.

8. An intelligent lossless video compression and optimization device, used to implement the intelligent lossless video compression and optimization method as described in any one of claims 1 to 7, characterized in that... ,include: The visual description network construction module is used to construct a visual description network containing multi-level semantics, receive the original video stream, and decompose the initial content description in the original video stream step by step through the visual description network; The content topology graph generation module is used to mark content markers with differences in the initial content description and generate a dynamic content topology graph based on the spatiotemporal relationships between the content markers. The semantic aggregation unit forming module is used to perform multi-level semantic aggregation operations on the dynamic content topology graph to form multiple semantic aggregation units, each semantic aggregation unit being associated with a set of predefined compressed semantic tags; The initial policy mapping table integration module is used to match a set of candidate compression strategies for each semantic aggregation unit using a pre-established compressed semantic tag library, and integrate all candidate compression strategies into the initial policy mapping table; The final strategy mapping table generation module is used to iteratively filter the initial strategy mapping table according to the global compression constraints of the original video stream to generate the final strategy mapping table; The encoding and feedback module is used to configure a specific encoder parameter group for each semantic aggregation unit according to the final strategy mapping table, start the lossless encoding process for the original video stream, and collect feedback information synchronously during the encoding process; The online adjustment module is used to adjust the final strategy mapping table and the encoder parameter group online based on synchronously collected feedback information, thereby completing intelligent lossless video compression optimization.

9. An electronic device, characterized in that... ,include: Processor; and Memory, used to store computer programs; Wherein, when the processor executes the computer program, it implements the intelligent lossless video compression optimization method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that... It stores a computer program, which, when executed by a processor, implements the intelligent lossless video compression optimization method as described in any one of claims 1 to 7.