An image processing method and device based on a dual-resolution decomposition tree, and a medium
By using an image processing method based on dual-resolution decomposition trees, the problems of high iteration time complexity and poor topological adaptability in computer vision image processing are solved. The iteration process is optimized by Eulerian circuit serialization mapping and lazy labeling update, which enables efficient processing of image data in dynamic environments.
Patent Information
- Application Number
- CN202610729908.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-26
- Publication Date
- 2026-07-24
- Estimated Expiration
- 2046-05-26
AI Technical Summary
Existing computer vision image processing methods suffer from high time complexity per iteration and poor adaptability to topological structures when facing dynamic environments, making it difficult to effectively handle dynamic topological changes.
An image processing method based on dual-resolution decomposition trees is adopted. By obtaining the spanning tree structure, Eulerian circuit serialization mapping and lazy labeling update are performed to decompose it into small and medium-sized blocks. The iterative process is optimized by combining the optimal transmission algorithm.
It reduces the time complexity of a single iteration, improves the flexibility of dynamic topology, and enables efficient processing of image data in dynamic environments.
Smart Images

Figure CN122289878B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an image processing method, apparatus, and medium based on dual-resolution decomposition trees. Background Technology
[0002] Optimal Transport (OT) is a mathematical framework that compares probability distributions by combining underlying spatial geometric features. Its core objective is to find the minimum cost transport scheme from the source domain to the target domain while satisfying supply and demand constraints. Existing optimal transmission methods for computer vision image processing include the network simplex method, heuristic approximation algorithms, and incremental network flow algorithms. For example, the network simplex method is a method that calculates the exact solution for optimal transmission based on adjusting costs. Heuristic approximation algorithms are polynomial time methods that do not guarantee obtaining the global optimal solution but can output an approximate optimal solution, and usually satisfy certain approximation ratio guarantees or empirical convergence. Incremental network flow algorithms are a method for solving network flows that does not recalculate from scratch but only updates the changed parts based on existing feasible / optimal flows.
[0003] However, while the network simplex method can provide numerically stable and accurate solutions for computer vision image processing, it often faces serious efficiency problems in dynamic environments. Furthermore, to maintain global optimality in the duality of linear programming, the algorithm requires processing data of up to [amount missing] in each iteration. Global information is crucial. Heuristic approximation algorithms for computer vision image processing, while having low cost per iteration, sacrifice accuracy and inevitably require compromises between approximation quality and update efficiency. Their iteration count is highly sensitive to regularization parameters, and they are prone to convergence instability when facing dynamic updates. Incremental network flow algorithms for computer vision image processing often rely on complex residual networks and flow adjustment mechanisms for local updates. However, these algorithms are poorly adaptable to frequent changes in network topology during dynamic optimal transmission and are difficult to use directly for efficient maintenance.
[0004] Therefore, a new method is needed to address the problems of high time complexity in a single iteration and poor adaptability to topological structures when processing computer vision images, thereby reducing the time complexity of the algorithm in a single iteration and improving the flexibility and adaptability of dynamic topologies. Summary of the Invention
[0005] This invention provides an image processing method, apparatus, and medium based on dual-resolution decomposition trees, which reduces the time complexity of the algorithm in a single iteration and improves the flexibility and adaptability of dynamic topologies.
[0006] The first aspect of this invention discloses an image processing method based on a dual-resolution decomposition tree, the method comprising: Acquire computer vision image data; obtain a spanning tree based on the computer vision image data; process the spanning tree to obtain a dual solution; obtain an adjustment cost matrix based on the dual solution; When it is determined that the adjustment cost matrix does not meet the preset target requirements, the adjustment cost matrix is subjected to Euler circuit serialization mapping operation to obtain the maintenance cost matrix; The maintenance cost matrix is divided into several small blocks and several medium blocks using a dual-resolution matrix decomposition tree. When the dual-resolution matrix decomposition tree performs a partitioning operation on the maintenance cost matrix, it performs a lazy-marking update operation on the small-scale block and the medium-scale block to obtain a lazy-marked small-scale block and a lazy-marked medium-scale block. Divide and conquer the small blocks of lazy-marked size to obtain several constant blocks; Based on all the constant blocks, the optimization matrix is obtained; The computer vision image data is processed using a preset optimal transmission algorithm, and the optimization matrix is used to reduce the time complexity of maintaining the optimal transmission algorithm in a single iteration.
[0007] As an optional implementation, in the first aspect of the present invention, the step of performing an Eulerian circuit serialization mapping operation on the adjustment cost matrix to obtain the maintenance cost matrix includes: Perform an Euler traversal on the spanning tree to obtain a one-dimensional Euler sequence; the one-dimensional Euler sequence corresponds one-to-one with the row and column order of the adjustment cost matrix; Based on the one-dimensional Euler sequence, an Euler circuit tree is obtained; the Euler circuit tree is used to provide a structured representation of the topology of the spanning tree. The maintenance cost matrix is obtained by using the one-dimensional Euler sequence in the Euler circuit tree as the rows and columns for maintaining the adjustment cost matrix.
[0008] As an optional implementation, in the first aspect of the invention, dividing the maintenance cost matrix into several small blocks and several medium blocks using a dual-resolution matrix decomposition tree includes: The maintenance cost matrix is divided according to a preset first partitioning benchmark value to obtain several medium-sized blocks; The medium-sized block is divided according to a preset second dividing benchmark value to obtain several smaller blocks; wherein the second dividing benchmark value is smaller than the first dividing benchmark value.
[0009] As an optional implementation, in the first aspect of the present invention, the lazy-marking update operation on the small-scale block and the medium-scale block to obtain the lazy-marked small-scale block and the lazy-marked medium-scale block includes: The maintenance cost matrix is then lazy-labeled and distributed to obtain a lazy-labeled block. Based on the lazy-marked large block, the medium-sized block is lazy-marked and distributed to obtain the lazy-marked medium-sized block; Based on the lazy-marked medium-sized block, the lazy-marked small-sized block is distributed to obtain a lazy-marked small-sized block.
[0010] As an optional implementation, in the first aspect of the invention, the divide-and-conquer operation on the lazy-marked small blocks to obtain several constant blocks includes: The lazy-marked small blocks are divided and conquered to obtain simulated small blocks; When it is determined that the size of the simulated block does not meet the preset constant standard, a divide-and-conquer operation is triggered to continue processing the simulated block; When it is determined that the size of the simulated block meets the preset constant standard, a constant block is obtained.
[0011] As an optional implementation, in the first aspect of the present invention, the method further includes: Based on a preset dynamic block length adaptive adjustment algorithm, the partitioning process of the maintenance cost matrix is constrained and adjusted; And, the specific operation method for constraining and adjusting the partitioning process of the maintenance cost matrix includes: When it is determined that the size of the small block is greater than or equal to a preset first threshold, and / or the sum of any two adjacent size small blocks within any size block is less than or equal to a preset second threshold, the size small block is adjusted to obtain an adjusted small block; When it is determined that the size block is greater than or equal to a preset third threshold, and / or the sum of any adjacent size blocks is less than or equal to a preset fourth threshold, the size block is adjusted to obtain an adjusted size block.
[0012] As an optional implementation, in the first aspect of the present invention, the method further includes: The maintenance cost matrix, the medium-sized block, and the small-sized block are labeled to obtain a first data label, a second data label, and a third data label. Based on the large lazy tag block, the medium lazy tag block, and the small lazy tag block, we obtain the first lazy tag, the second lazy tag, and the third lazy tag; A first tag block is obtained based on the first data tag and the first lazy tag; a second tag block is obtained based on the second data tag and the second lazy tag; a third tag block is obtained based on the third data tag and the third lazy tag; the first tag block, the second tag block, and the third tag block are used to record the minimum comprehensive data value in the maintenance cost matrix, the medium-sized block, and the small-sized block; When a global modification instruction is received, the first lazy tag, the second lazy tag, or the third lazy tag is modified to obtain a first modification block corresponding to the first tag block, a second modification block corresponding to the second tag block, and a third modification block corresponding to the third tag block.
[0013] A second aspect of the present invention discloses an image processing apparatus based on a dual-resolution decomposition tree, the apparatus comprising: A construction module is used to acquire computer vision image data; obtain a spanning tree based on the computer vision image data; process the spanning tree to obtain a dual solution; and obtain an adjustment cost matrix based on the dual solution. The judgment module is used to perform Euler circuit serialization mapping operation on the adjustment cost matrix to obtain the maintenance cost matrix when it is determined that the adjustment cost matrix does not meet the preset target requirements. The partitioning module is used to partition the maintenance cost matrix using a dual-resolution matrix decomposition tree to obtain several small blocks and several medium blocks. The marking module is used to perform lazy marking update operations on the small-scale block and the medium-scale block when the dual-resolution matrix decomposition tree performs a partitioning operation on the maintenance cost matrix, so as to obtain lazy-marked small-scale block and lazy-marked medium-scale block. The processing module is used to perform a divide-and-conquer operation on the lazy-marked small blocks to obtain several constant blocks; to obtain an optimization matrix based on all the constant blocks; to process the computer vision image data using a preset optimal transmission algorithm; and to use the optimization matrix to reduce the time complexity of maintaining the optimal transmission algorithm in a single iteration.
[0014] As an optional implementation, in a second aspect of the present invention, the specific operation method by which the determining module performs an Eulerian circuit serialization mapping operation on the adjustment cost matrix to obtain the maintenance cost matrix includes: Perform an Euler traversal on the spanning tree to obtain a one-dimensional Euler sequence; the one-dimensional Euler sequence corresponds one-to-one with the row and column order of the adjustment cost matrix; Based on the one-dimensional Euler sequence, an Euler circuit tree is obtained; the Euler circuit tree is used to provide a structured representation of the topology of the spanning tree. The maintenance cost matrix is obtained by using the one-dimensional Euler sequence in the Euler circuit tree as the rows and columns for maintaining the adjustment cost matrix.
[0015] As an optional implementation, in a second aspect of the invention, the specific operation of the partitioning module dividing the maintenance cost matrix into several small blocks and several medium blocks using a dual-resolution matrix decomposition tree includes: The maintenance cost matrix is divided according to a preset first partitioning benchmark value to obtain several medium-sized blocks; The medium-sized block is divided according to a preset second dividing benchmark value to obtain several smaller blocks; wherein the second dividing benchmark value is smaller than the first dividing benchmark value.
[0016] As an optional implementation, in a second aspect of the invention, the specific operation of the marking module performing lazy marking update operations on the small-scale blocks and the medium-scale blocks to obtain lazy-marked small-scale blocks and lazy-marked medium-scale blocks includes: The maintenance cost matrix is then lazy-labeled and distributed to obtain a lazy-labeled block. Based on the lazy-marked large block, the medium-sized block is lazy-marked and distributed to obtain the lazy-marked medium-sized block; Based on the lazy-marked medium-sized block, the lazy-marked small-sized block is distributed to obtain a lazy-marked small-sized block.
[0017] As an optional implementation, in a second aspect of the invention, the specific operation method by which the processing module performs a divide-and-conquer operation on the lazy-marked small blocks to obtain several constant blocks includes: The lazy-marked small blocks are divided and conquered to obtain simulated small blocks; When it is determined that the size of the simulated block does not meet the preset constant standard, a divide-and-conquer operation is triggered to continue processing the simulated block; When it is determined that the size of the simulated block meets the preset constant standard, a constant block is obtained.
[0018] As an optional implementation, in a second aspect of the invention, the apparatus further includes: The adjustment module is used to constrain and adjust the partitioning process of the maintenance cost matrix based on a preset dynamic block length adaptive adjustment algorithm. Furthermore, the specific operation method by which the adjustment module performs constraint adjustment on the partitioning process of the maintenance cost matrix includes: When it is determined that the size of the small block is greater than or equal to a preset first threshold, and / or the sum of any two adjacent size small blocks within any size block is less than or equal to a preset second threshold, the size small block is adjusted to obtain an adjusted small block; When it is determined that the size block is greater than or equal to a preset third threshold, and / or the sum of any adjacent size blocks is less than or equal to a preset fourth threshold, the size block is adjusted to obtain an adjusted size block.
[0019] As an optional implementation, in a second aspect of the invention, the apparatus further includes: The modification module is used to mark the maintenance cost matrix, the medium-sized block, and the small-sized block to obtain a first data mark, a second data mark, and a third data mark. Based on the large lazy tag block, the medium lazy tag block, and the small lazy tag block, we obtain the first lazy tag, the second lazy tag, and the third lazy tag; A first tag block is obtained based on the first data tag and the first lazy tag; a second tag block is obtained based on the second data tag and the second lazy tag; a third tag block is obtained based on the third data tag and the third lazy tag; the first tag block, the second tag block, and the third tag block are used to record the minimum comprehensive data value in the maintenance cost matrix, the medium-sized block, and the small-sized block; When a global modification instruction is received, the first lazy tag, the second lazy tag, or the third lazy tag is modified to obtain a first modification block corresponding to the first tag block, a second modification block corresponding to the second tag block, and a third modification block corresponding to the third tag block.
[0020] A third aspect of the present invention discloses an apparatus comprising a memory and a processor, the apparatus comprising: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute some or all of the steps in the image processing method based on dual-resolution decomposition tree according to any one of the first aspects of the present invention.
[0021] The fourth aspect of the present invention discloses a computer storage medium storing computer instructions, which, when invoked, are used to execute some or all of the steps in the image processing method based on dual-resolution decomposition tree as described in any of the first aspects of the present invention.
[0022] Compared with the prior art, the present invention has the following beneficial effects: This invention acquires computer vision image data; obtains a spanning tree structure based on the computer vision image data; processes the spanning tree to obtain a dual solution; constructs an adjustment cost matrix using the dual solution; judges the adjustment cost matrix, and when it is determined that it does not meet the requirements, performs an Eulerian circuit serialization mapping operation on the adjustment cost matrix to obtain a maintenance cost matrix; by transforming the global matrix reconstruction into a joint local optimization of the matrix and the tree structure, the structural information can be mapped one-to-one; through the Eulerian circuit serialization mapping operation, the information of the nodes on the tree can be transformed into a sequence operation, enabling it to cope with complex dynamic topological changes such as global numerical increases or decreases, thereby improving the flexibility and adaptability of dynamic topology; This invention partitions the maintenance cost matrix using a dual-resolution matrix decomposition tree, resulting in several small and medium-sized blocks. Simultaneously, lazy tags are distributed to both the small and medium-sized blocks. A divide-and-conquer operation is performed on the labeled small blocks, assigning them to constant blocks. These constant blocks are then merged to obtain the optimized matrix. The maintenance cost matrix is obtained by mapping the spanning tree structure to the adjustment cost matrix. Dividing the maintenance cost matrix into medium and small blocks and distributing instructions to the medium blocks controls the corresponding small blocks, reducing time complexity. Distributing lazy tags ensures that subsequent global modifications only require modification of the lazy tags, further reducing time complexity. Dividing small blocks into constant blocks reduces block complexity to a constant level, further reducing time complexity. The optimized matrix obtained through these operations significantly reduces computational time complexity. The optimal transfer algorithm is used to process computer vision image data, and combined with the calculated optimized matrix, the time complexity of a single iteration in the optimal transfer algorithm is reduced. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0024] Figure 1 This is a schematic flowchart of an image processing method based on a dual-resolution decomposition tree disclosed in an embodiment of the present invention; Figure 2 This is a schematic diagram of a structure based on a dual-resolution decomposition tree block partitioning method disclosed in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an image processing device based on a dual-resolution decomposition tree disclosed in an embodiment of the present invention; Figure 4This is a schematic diagram of the structure of a device including a memory and a processor disclosed in an embodiment of the present invention; Figure 5 This is a schematic diagram of matrix splitting disclosed in an embodiment of the present invention; Figure 6 This is a schematic diagram comparing algorithms disclosed in an embodiment of the present invention; Figure 7 This is a comparative diagram of a CIFAR-10 dataset disclosed in an embodiment of the present invention; Figure 8 This is a schematic diagram illustrating the comparison of an MNIST dataset disclosed in an embodiment of the present invention. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present invention, 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.
[0026] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or end that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or ends.
[0027] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0028] This invention discloses an image processing method, apparatus, and medium based on dual-resolution decomposition trees, which reduces the time complexity of the algorithm in a single iteration and improves the flexibility and adaptability of dynamic topologies. These are described in detail below.
[0029] Example 1 Please see Figure 1 , Figure 1This is a flowchart illustrating an image processing method based on a dual-resolution decomposition tree disclosed in an embodiment of the present invention. Figure 1 The described image processing method based on dual-resolution decomposition trees can be applied to an image processing device based on dual-resolution decomposition trees. This device can be integrated into a cloud server or a local server; the embodiments of this invention are not limited thereto. Figure 1 As shown, the image processing method based on dual-resolution decomposition trees can include the following operations: Step 101: Obtain computer vision image data; obtain a spanning tree based on the computer vision image data; process the spanning tree to obtain the dual solution; obtain the adjustment cost matrix based on the dual solution.
[0030] In this embodiment of the invention, the computer vision image data can be real-life images taken by mobile phones or cameras, surveillance footage, industrial real-life images, aerial images, remote sensing satellite images, etc.; it can be CT tomographic slice images, MRI magnetic resonance images, X-ray images, ultrasound images, pathological microscopic images, multi-stage follow-up scan images, etc.; it can be infrared images, depth images, low-light images, polarized images, multispectral images, etc.; it can be grayscale pixel matrices, RGB color pixel matrices, image grayscale distribution data, texture pixel data, etc.; it can also be image edge contour points, lesion feature points, anatomical key points, corner points or feature point sets, superpixel segmentation data, continuous sequence slice images, etc.
[0031] In this embodiment of the invention, the spanning tree can be formed by connecting all feature points of an image into an acyclic, globally connected tree topology. For example, feature points, keypoints, superpixels, and fault nodes in computer vision image data can all be treated as independent vertices. Connection edges are established between vertices based on spatial distance, feature similarity, and matching cost. From all connections, a set of connections that are acyclic, fully connected, and have the optimal overall cost is selected. The resulting tree structure is the spanning tree corresponding to the computer vision image data. Simply put, it is to connect the scattered feature points of an image into a connected, acyclic, and optimal tree structure.
[0032] In this embodiment of the invention, the dual solution can be abstracted and transformed into a purely dynamic matrix maintenance problem by taking the entire iterative process of finding the basic and out-of-basic variables using the simplex method. The dual solution is the element constituting this adjustment cost matrix. Because the traditional network simplex method often converges with only a very small number of iterations after dynamic fine-tuning, the real computational bottleneck lies in the need to perform a simplex maintenance on each iteration. A global scan and feasibility check are performed using the reduced cost matrix of the scale; the matrix constructed by the dual solution can transform the dynamic optimal transmission problem into a dynamic spanning tree maintenance problem.
[0033] The dual solution can be obtained in the following way: For example, let A and B be two point sets in space, representing the source point set and the target point set, respectively; For traffic distribution. ,have The flow needs to be directed to point B; and , need to have The inflow of traffic, of which, ;
[0034]
[0035] in, This is expressed as "constraints are", It is represented as "defined as". For the cost matrix, and For dual solutions; any Defined as a set of dual solutions for optimal transmission; when If so, then the dual solution is considered feasible.
[0036] Different dual solutions can be obtained through the network simplex method. For any optimal transport problem, the optimal solution can be obtained after multiple simplex iterations.
[0037] In this embodiment of the invention, the adjusted cost matrix can be ,in, To adjust the cost matrix, and This is a dual solution.
[0038] Step 102: When it is determined that the adjustment cost matrix does not meet the preset target requirements, the adjustment cost matrix is subjected to Euler circuit serialization mapping operation to obtain the maintenance cost matrix.
[0039] In this embodiment of the invention, the objective requirement may be that, for the final adjustment cost matrix, that is, the optimization matrix... When satisfied , And it meets the minimum The requirement regarding transmission cost is the objective requirement; this requirement aims to find an optimal transmission scheme that minimizes the total transmission cost between all points, while satisfying the mass conservation constraint. Source distribution (source edge), representing source points. The quality, probability, or supply at the location; The target distribution (target edge) represents the target points. The quality, probability, or demand at a given point. For example, when the reduced cost of all non-basis edges is non-negative and the reduced cost of all basis edges is 0, the current solution is the globally optimal solution, and the total transmission cost has been minimized.
[0040] In this embodiment of the invention, the Eulerian circuit serialization mapping operation, as those skilled in the art will understand, is a means of transforming a spanning tree into an ordered sequence using an Eulerian circuit tree. Through the Eulerian circuit serialization mapping operation, it is ensured that when cutting edges in the tree, the cut subtree is always a continuous segment. This property allows for convenient maintenance of the overall tree information related to the subtrees.
[0041] In this embodiment of the invention, the maintenance cost matrix can be the matrix obtained after the Eulerian circuit serialization mapping operation, which can be used as the maintenance matrix; at this time, the maintenance matrix is obtained by gridding according to the dimensions of the sequence, and it can be decomposed and maintained.
[0042] Step 103: Divide the maintenance cost matrix into several small blocks and several medium blocks using a dual-resolution matrix decomposition tree.
[0043] In this embodiment of the invention, the dual-resolution matrix factorization tree can be a hierarchical tree-like matrix optimization structure adapted to the dynamic optimal transmission problem. Through block-level aggregation and local updates of coarse and fine resolution, it transforms the global reduction cost matrix scan of a single iteration of the traditional network simplex method into an efficient process of "coarse-level fast localization + fine-level local update," thereby reducing iterative complexity while maintaining global optimality in a dual sense. Here, fine resolution can be the part that divides the matrix into small blocks, and coarse resolution can be the part that divides the matrix into medium blocks. The dual-resolution matrix factorization tree can also contain a two-layer decomposition structure. The single-layer decomposition is the basic structure, dividing the matrix to ensure correctness; the intermediate layer can act as a coordinating layer, an auxiliary layer for acceleration, reducing complexity and computational overhead, etc. Here, the single layer can be the part that divides the matrix into small blocks, and the intermediate layer can be the part that divides the matrix into medium blocks.
[0044] In this embodiment of the invention, the small blocks and medium blocks can be defined as follows: the maintenance cost matrix can be considered as a large block, which can be decomposed into different medium blocks and different small blocks using a dual-resolution matrix decomposition tree; furthermore, this embodiment of the invention can also be defined as follows: first decompose the large block into different small blocks, and then aggregate several small blocks together to form a medium block; or first decompose the large block into several medium blocks, and then decompose the medium blocks into several small blocks. When the basic operations of the simplex method cause the spanning tree to be cut and spliced, by operating on the decomposed medium blocks or small blocks, the complexity of node reorganization and maintenance when a single-layer matrix block is split and merged can be greatly reduced; for example, by issuing control instructions to the medium blocks, the medium blocks, after receiving the control instructions, quickly retrieve the small blocks they have divided and issue the instructions to the small blocks that need to be operated.
[0045] Step 104: When the dual-resolution matrix decomposition tree performs a partitioning operation on the maintenance cost matrix, a lazy-marking update operation is performed on the small-scale block and the medium-scale block to obtain the lazy-marked small-scale block and the lazy-marked medium-scale block.
[0046] In this embodiment of the invention, when recalculating the dual solution in each simplex iteration, it is usually necessary to perform uniform addition or subtraction operations on a large range of elements in the matrix. Directly instantiating and updating each element would again lead to extremely high time consumption. By introducing the classic lazy-marking delayed update technique from tree structures, when a global or large-scale numerical modification operation is triggered, the system only accumulates the incremental value to be processed at the "block" level structure of the target operation layer, i.e., marks it with a lazy mark, thereby delaying the actual computation process from being pushed down to each specific matrix element at the lower level. Only when a query operation is performed and a specific element at the lower level must be accessed will the lazy mark be triggered to be passed down and instantiated. This mechanism successfully compresses the time consumption of global numerical modification operations to a constant level. .
[0047] In this embodiment of the invention, when the maintenance cost matrix is divided, the lazy tag is distributed to the small and medium-sized blocks as the division begins.
[0048] Step 105: Perform a divide-and-conquer operation on the lazy-marked small blocks to obtain several constant blocks; obtain the optimization matrix based on all constant blocks; process the computer vision image data using the preset optimal transfer algorithm, and use the optimization matrix to reduce the time complexity of maintaining the optimal transfer algorithm in a single iteration.
[0049] In this embodiment of the invention, the divide-and-conquer operation can be to continue decomposing the smaller blocks within the decomposed block until the smaller blocks are constant blocks. At this point, the system's maintenance requirements for the data structure are precisely defined as supporting four core matrix operations: matrix splitting, merging, global numerical increment / decrement, and minimum value lookup. By operating on these four aspects, the time complexity of maintenance can be reduced. For example, when the middle block sends control instructions to the smaller blocks, the smaller blocks begin to continue decomposing, and the decomposition process is the same as the previously obtained smaller blocks. When the smaller blocks are decomposed to constant blocks at the constant level, the decomposition ends, and the operation on the constant blocks can significantly reduce the required time complexity. When global numerical increment / decrement and minimum value lookup are required, only the lazy-marked part needs to be operated on, which can reduce the time complexity of maintenance. Then, all the constant blocks are merged to obtain an optimized matrix. Using this optimized matrix to optimize subsequent operations can reduce the time complexity. The merging method can be to place all rows (or columns) of one matrix after another matrix.
[0050] In this embodiment of the invention, the optimal transmission algorithm can be a mathematical framework that compares probability distributions by combining underlying spatial geometric features. Its core objective is to find the minimum cost transmission scheme from the source domain to the target domain while satisfying supply and demand constraints. In this embodiment of the invention, the optimal transmission algorithm can be the network simplex method.
[0051] For example: Let A and B be two sets of points in space, representing the source set and the target set of points, respectively; and For traffic distribution. ,have The flow needs to be directed to point B; and , need to have The inflow of traffic, of which, The optimal transmission model guarantees that the total outflow and total inflow are the same; let's assume they are 1, i.e. Connecting all points in A to points in B forms a bipartite graph. For each edge (a, b) of this graph, given... The cost of a unit flow from point A to point B is in many cases. The optimal transmission problem aims to find the minimum cost required to transfer all traffic from A to B on demand. Mathematically, it is defined as: Optimal Transmission Cost for:
[0052]
[0053] in, This is expressed as "constraints are", It is represented as "defined as".
[0054] Furthermore, in this embodiment, point A can be considered the warehouse, and point B the customer. We need to ship all goods to our customers as needed, and on this basis, minimize the freight costs. For any... of It is a transmission scheme that satisfies all An edge is called a valid edge; for any satisfy If the cost of such a transmission scheme is equal to the cost of the optimal transmission scheme, then such a transmission scheme is called optimal.
[0055] As can be seen, the embodiments of the present invention acquire computer vision image data; obtain a spanning tree structure based on the computer vision image data; process the spanning tree to obtain a dual solution; construct an adjustment cost matrix through the dual solution; judge the adjustment cost matrix, and when it is determined that it does not meet the requirements, perform an Eulerian circuit serialization mapping operation on the adjustment cost matrix to obtain a maintenance cost matrix; by transforming the global matrix reconstruction into a joint local optimization of the matrix and the tree structure, the structural information can be mapped one-to-one; through the Eulerian circuit serialization mapping operation, the information of the nodes on the tree can be transformed into a sequence operation, which can cope with complex dynamic topological changes such as global numerical increases or decreases, thereby improving the flexibility and adaptability of dynamic topology; This invention divides the maintenance cost matrix into several small blocks and several medium blocks using a dual-resolution matrix decomposition tree. Simultaneously, lazy tags are distributed to both the medium and small blocks. A divide-and-conquer operation is performed on the labeled small blocks, assigning them to constant blocks. These constant blocks are then merged to obtain the optimized matrix. The maintenance cost matrix is obtained by mapping the spanning tree structure to the adjustment cost matrix. Dividing the maintenance cost matrix into medium and small blocks and distributing instructions to the medium blocks controls the corresponding small blocks, reducing time complexity. Distributing lazy tags ensures that subsequent global modifications only require modification of the lazy tags, further reducing time complexity. Dividing small blocks into constant blocks reduces block complexity to a constant level, further reducing time complexity. The optimized matrix obtained through these operations significantly reduces computational time complexity. Finally, the optimal transfer algorithm is used to process the computer vision image data, and combined with the calculated optimized matrix, the time complexity of a single iteration in the optimal transfer algorithm is reduced.
[0056] In an optional embodiment, performing an Euler circuit serialization mapping operation on the adjustment cost matrix to obtain the maintenance cost matrix may include: Performing an Euler traversal on the spanning tree yields a one-dimensional Euler sequence; Based on the one-dimensional Euler sequence, the Euler circuit tree is obtained; Using the one-dimensional Euler sequence in the Euler circuit tree as the rows and columns of the maintenance adjustment cost matrix, we obtain the maintenance cost matrix.
[0057] In this optional embodiment, the one-dimensional Euler sequence corresponds one-to-one with the order of rows and columns of the adjustment cost matrix; the Euler loop tree can be used to provide a structured representation of the spanning tree topology.
[0058] Optionally, we can first perform an Euler traversal on the spanning tree to transform it into a one-dimensional queue. Then, according to this queue order, we can rearrange the original two-dimensional data into small cells, checking only the cells that are not adjacent to the tree and skipping the adjacent cells. Finally, when querying, we don't need to search all the cells; we only need to search the one-dimensional cells in the corresponding sequence. This significantly reduces the time complexity and solves the efficiency problem of large-scale data.
[0059] In this optional embodiment, the specific operation process of the Eulerian circuit tree can be as follows: for a tree, construct an edge set. For any tree edge ,Will and Add them to the edge set as two directed edges. For any point , will self-loop Add edge set Calculating the Eulerian circuit sequence within the edge set constructed above yields the Eulerian circuit sequence of the tree, which, when aggregated, forms the Eulerian circuit tree. Clearly, if the number of nodes in the tree is... Then the length of its Euler circuit sequence is ,for Scale. The Euler sequence obtained through this operation can be used in subsequent splitting and merging operations. The sequence splitting and merging operations yield the Euler circuit sequence after the operation is completed; the splitting operation splits a tree into two by cutting edges, and the merging operation combines two trees into one by connecting edges.
[0060] As can be seen, this optional embodiment, by performing an Eulerian circuit serialization mapping operation on the spanning tree, can make the arrangement order of the rows and columns of the adjustment cost matrix correspond one-to-one with the one-dimensional Eulerian sequence of the spanning tree, thereby ensuring that when cutting edges in the tree, the cut subtree must be a continuous segment, which can facilitate the maintenance of tree information related to the subtree as a whole; using the one-dimensional Eulerian sequence on the Eulerian circuit tree as the maintenance cost matrix for maintaining the adjustment cost matrix, since the changes in the maintenance cost matrix are consistent with the subtree, it can cope with complex dynamic topological changes such as global value increases or decreases, thereby improving the flexibility and adaptability of dynamic topology; at the same time, by maintaining the maintenance cost matrix here through the maintenance tree structure, the time complexity of maintaining the maintenance cost matrix can be reduced.
[0061] In another alternative embodiment, the maintenance cost matrix is partitioned using a dual-resolution matrix decomposition tree to obtain several small blocks and several medium blocks, which may include: The maintenance cost matrix is divided according to a preset first partitioning benchmark value to obtain several medium-sized blocks; The medium-sized blocks are divided according to the preset second dividing benchmark value to obtain several small-sized blocks.
[0062] In this optional embodiment, the first dividing reference value can be a specific numerical value; for example, a matrix. It is a scale of If the matrix is such that the first dividing datum value can be... Then the matrix It can be classified as The second dividing reference value can be smaller than the first dividing reference value; for example, the second dividing reference value can be... Then the blocks in the scale can be divided into A small piece.
[0063] In this optional embodiment, such as Figure 2 As shown, for the entire matrix Divided into several sizes Medium-sized blocks, divided into several Small pieces of scale, among which It is a suitable choice based on the actual situation. In this context, the time complexity is reduced. For example, a medium block can be a control block, similar to a team leader in a factory; a small block can be an operation block, similar to an operator in a factory. By issuing instructions to the medium block, the medium block can then distribute the instructions to the small blocks that need to be operated based on its own division into small blocks, thereby reducing the required time complexity.
[0064] Furthermore, in this optional embodiment, the partitioning may also involve dividing the maintenance cost matrix according to a preset first partitioning benchmark value to obtain several medium-sized blocks; and dividing the maintenance cost matrix according to a preset second partitioning benchmark value to obtain several small-sized blocks.
[0065] Alternatively, the maintenance cost matrix can be divided according to a preset second partitioning benchmark value to obtain several small blocks; by aggregating all the small blocks, a medium block can be obtained.
[0066] As can be seen, this optional embodiment divides a complete large matrix block into different medium-sized blocks and small-sized blocks; operation instructions can be issued to the small-sized blocks divided from the medium-sized blocks through the medium-sized blocks, so that subsequent maintenance operations are all carried out in the medium-sized blocks and small-sized blocks, thereby reducing the time complexity of matrix maintenance.
[0067] In yet another optional embodiment, performing a lazy-marking update operation on the small-scale block and the medium-scale block to obtain a lazy-marked small-scale block and a lazy-marked medium-scale block may include: The maintenance cost matrix is lazy-labeled and distributed to obtain a lazy-labeled block; Based on the lazy-marked large blocks, the medium-sized blocks are lazy-marked and distributed to obtain lazy-marked medium-sized blocks; Based on the lazy-marked medium-sized blocks, lazy-marking is performed on the small-sized blocks to obtain lazy-marked small-sized blocks.
[0068] In this optional embodiment, those skilled in the art will understand that the lazy mark update operation, also known as the deferred update / lazy loading update operation, is a batch update optimization technique. The core logic is to write it down first, without rushing to modify it, and then modify it when it is actually used, thus avoiding meaningless repeated traversal and reducing the complexity from high dimension to low dimension.
[0069] In this optional embodiment, the classic lazy-marking delayed update technique from tree structures is introduced. When a global or large-scale numerical modification operation is triggered, the system only accumulates the incremental value to be processed at the "block" level structure of the target operation layer, i.e., marks it with a lazy mark, thereby delaying the process of pushing the actual calculation down to each specific matrix element at the bottom layer. The lazy mark is only triggered to be passed down and instantiated when a query operation is performed and a specific element at the bottom layer must be accessed. This mechanism successfully compresses the time consumption of global numerical modification operations to the constant level. .
[0070] As can be seen, this optional embodiment, by placing lazy tags in small and medium-sized blocks, configures lazy tags for each level of block nodes in the dual-resolution matrix factorization tree. This delays the batch addition and subtraction operations of the reduction cost brought by the dual solution update to be performed during access. It does not require traversing and modifying all elements in the block, but only modifies the lazy tag part, thus achieving efficient processing of batch updates and global queries, thereby reducing the time complexity required for maintenance.
[0071] In yet another alternative embodiment, a divide-and-conquer operation is performed on the lazy-marked small blocks to obtain several constant blocks, which may include: Divide and conquer the lazy-marked small blocks to obtain simulated small blocks; When it is determined that the size of the simulated block does not meet the preset constant standard, the divide-and-conquer operation is triggered to continue processing the simulated block; When it is determined that the size of the simulated block meets the preset constant standard, a constant block is obtained.
[0072] In this optional embodiment, the divide-and-conquer operation can be to further decompose smaller blocks that need to be decomposed; the decomposition operation can be the decomposition process described above, which will not be discussed further here. Decomposition will only cease when the number of decomposed blocks reaches a constant level.
[0073] In this optional embodiment, the constant standard can be a specific constant; for example, the constant standard can be set to be less than 10, or less than 50, or less than 100, etc.
[0074] As can be seen, this optional embodiment obtains a constant block by further decomposing the lazy-marked small blocks; at this point, the constant block is at a constant level, and operating on it can reduce the time complexity of the operation.
[0075] In yet another optional embodiment, the method may further include: Based on a preset dynamic block length adaptive adjustment algorithm, the process of partitioning the maintenance cost matrix is constrained and adjusted. Furthermore, the specific operational methods for adjusting constraints in the process of partitioning the maintenance cost matrix may include: When it is determined that the size of the small block is greater than or equal to a preset first threshold, and / or the sum of two adjacent small blocks within any size block is less than or equal to a preset second threshold, the small block is adjusted to obtain an adjusted small block. When it is determined that the size block is greater than or equal to the preset third threshold, and / or the sum of any adjacent size blocks is less than or equal to the preset fourth threshold, the size block is adjusted to obtain the adjusted size block.
[0076] In this optional embodiment, since the size of a block is no longer the original size after it is split, but is partially smaller than the original size, and as the number of operations decreases, the number of small blocks will increase, making it difficult to maintain complexity. To solve this problem, this embodiment of the invention proposes a method for dynamically maintaining block size; defining a standard-sized small block length. Define the block length in the standard size , , are the lengths of the small block and the medium block under ideal conditions, respectively. Clearly, the goal of this embodiment of the invention is to make all block lengths approach the standard block length. That is, we want the blocks to be neither too long nor too short. The dynamic block length adaptive adjustment algorithm can dynamically adjust the length boundaries of each block based on changes in node aggregation and distribution during algorithm execution, preventing extreme expansion or contraction of some block sizes, thereby maintaining the ideal worst-case time complexity boundary under any extreme topology.
[0077] In this optional embodiment, a standard-sized small block length is defined. Define the block length in the standard size Then the first threshold can be 2. The second threshold can be The third threshold can be 2. The fourth threshold can be Adjusting small and medium blocks can be done by adjusting the corresponding small and medium blocks to the block length that meets the threshold requirements.
[0078] For example, a block is considered reasonable if its length satisfies the following conditions both horizontally and vertically: 1. All blocks are less than twice the standard length, meaning all smaller blocks are less than 2 units long. All medium blocks have a length less than 2 .
[0079] 2. The sum of the lengths of any two adjacent blocks is greater than 1. The sum of the lengths of any two adjacent smaller blocks within a given block is greater than 1. .
[0080] If a block violates the first rule, it is said to be too long. If a block violates the second rule, it is said to be too short. In dynamic optimal transmission, all cuts are global cuts, so if a block is too long or too short, then all blocks in its row or column are too long or too short.
[0081] As can be seen, this optional embodiment, by setting a dynamic block length adaptive adjustment algorithm, enables the algorithm to dynamically adjust the length boundaries of each block according to the changes in node aggregation and distribution during operation, preventing some blocks from expanding or shrinking to an extreme extent, and maintaining the ideal worst-case time complexity boundary under any extreme topology, thereby improving the accuracy of the structure.
[0082] In yet another optional embodiment, the method may further include: The maintenance cost matrix, medium-sized blocks, and small-sized blocks are labeled to obtain the first data label, the second data label, and the third data label. Based on the large lazy-marked block, the medium lazy-marked block, and the small lazy-marked block, we obtain the first lazy mark, the second lazy mark, and the third lazy mark; A first tag block is obtained based on the first data tag and the first lazy tag; a second tag block is obtained based on the second data tag and the second lazy tag; a third tag block is obtained based on the third data tag and the third lazy tag. When a global modification instruction is received, the first lazy tag, the second lazy tag, or the third lazy tag is modified to obtain the first modification block corresponding to the first tag block, the second modification block corresponding to the second tag block, and the third modification block corresponding to the third tag block.
[0083] In this optional embodiment, the first marker block, the second marker block, and the third marker block are used to record the minimum comprehensive data value in the maintenance cost matrix, the medium-sized block, and the small-sized block; wherein, the minimum data value can be the minimum value of the element in the matrix.
[0084] In this optional embodiment, the first data marker, the second data marker, and the third data marker can be the minimum value of the data in the corresponding block; wherein, the minimum value of the block data can be the original data in the block. The first lazy marker, the second lazy marker, and the third lazy marker can be the minimum value of the data corresponding to the lazy marker; wherein, the minimum value of the lazy marker can be an offset from the data.
[0085] In this optional embodiment, the combined minimum data value is the true minimum value of the block only when the minimum value of the original data of the block itself and the minimum value of the corresponding lazy tag are combined. When it is necessary to modify the global data, it is only necessary to modify the minimum value corresponding to the lazy tag to obtain the overall data modification value. At this time, each small block, medium block and maintenance cost matrix can be regarded as the first modified block corresponding to the first tag block, the second modified block corresponding to the second tag block, and the third modified block corresponding to the third tag block.
[0086] Furthermore, if the first lazy tag is modified, the modified first modified block is obtained directly; if the second lazy tag is modified, the second lazy tags in all blocks of all sizes are aggregated together, that is, all second modified blocks are aggregated together, and the global data to be modified is obtained. At this time, the content of the first lazy tag in the maintenance cost matrix, that is, the large block, is cleared to zero; if the third lazy tag is modified, the third lazy tags in all small blocks of all sizes are aggregated together, that is, all third modified blocks are aggregated together, and the global data to be modified is obtained. At this time, the content of the first lazy tag in the maintenance cost matrix, that is, the large block, and the content of the second lazy tag in all blocks of all sizes are cleared to zero.
[0087] For example, let the large block (maintenance cost matrix) be D, the medium block be E, and the small block be F, and let their minimum values be respectively... , , The lazy tags are respectively , , Let the set of blocks under D be denoted as . , The subordinate small block set is Therefore, the true minimum value of the large block is... The same applies to small and medium-sized blocks; when a global modification command is received. When making large modifications, you only need to modify the large block. That's fine; if it's a middle block Modify, all In The collection of modified results is equivalent to At the same time, Update and replace the original The lazy tag can be cleared to zero; similarly, when performing divide and conquer within a small block, the lazy tag of the small block can be moved down to the middle block within the small block, and so on, so that the correctness of the global minimum value can be maintained with fewer moves.
[0088] As can be seen, this optional embodiment obtains the minimum value of the comprehensive data by combining the minimum value in the block with the lazy tag; at this time, if it is necessary to modify the global data, only the lazy tag needs to be modified, thereby reducing the time required for global numerical modification operations.
[0089] Example 2 Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of an image processing device based on a dual-resolution decomposition tree disclosed in an embodiment of the present invention, as shown below. Figure 3 As shown, the device may include: Module 201 is used to acquire computer vision image data; obtain a spanning tree based on the computer vision image data; process the spanning tree to obtain a dual solution; and obtain an adjustment cost matrix based on the dual solution. The judgment module 202 is used to perform Euler circuit serialization mapping operation on the adjustment cost matrix to obtain the maintenance cost matrix when it is determined that the adjustment cost matrix does not meet the preset target requirements. The partitioning module 203 is used to partition the maintenance cost matrix through a dual-resolution matrix decomposition tree to obtain several small blocks and several medium blocks. The marking module 204 is used to perform lazy marking update operations on the small-scale blocks and medium-scale blocks when the dual-resolution matrix decomposition tree performs a partitioning operation on the maintenance cost matrix, so as to obtain lazy-marked small-scale blocks and lazy-marked medium-scale blocks. The processing module 205 is used to perform a divide-and-conquer operation on the lazy-marked small blocks to obtain several constant blocks; based on all constant blocks, an optimization matrix is obtained; the computer vision image data is processed using a preset optimal transmission algorithm, and the optimization matrix is used to reduce the time complexity of maintaining the optimal transmission algorithm in a single iteration.
[0090] As can be seen, the embodiments of the present invention acquire computer vision image data; obtain a spanning tree structure based on the computer vision image data; process the spanning tree to obtain a dual solution; construct an adjustment cost matrix through the dual solution; judge the adjustment cost matrix, and when it is determined that it does not meet the requirements, perform an Eulerian circuit serialization mapping operation on the adjustment cost matrix to obtain a maintenance cost matrix; by transforming the global matrix reconstruction into a joint local optimization of the matrix and the tree structure, the structural information can be mapped one-to-one; through the Eulerian circuit serialization mapping operation, the information of the nodes on the tree can be transformed into a sequence operation, which can cope with complex dynamic topological changes such as global numerical increases or decreases, thereby improving the flexibility and adaptability of dynamic topology; This invention divides the maintenance cost matrix into several small blocks and several medium blocks using a dual-resolution matrix decomposition tree. Simultaneously, lazy tags are distributed to both the medium and small blocks. A divide-and-conquer operation is performed on the labeled small blocks, assigning them to constant blocks. These constant blocks are then merged to obtain the optimized matrix. The maintenance cost matrix is obtained by mapping the spanning tree structure to the adjustment cost matrix. Dividing the maintenance cost matrix into medium and small blocks and distributing instructions to the medium blocks controls the corresponding small blocks, reducing time complexity. Distributing lazy tags ensures that subsequent global modifications only require modification of the lazy tags, further reducing time complexity. Dividing small blocks into constant blocks reduces block complexity to a constant level, further reducing time complexity. The optimized matrix obtained through these operations significantly reduces computational time complexity. Finally, the optimal transfer algorithm is used to process the computer vision image data, and combined with the calculated optimized matrix, the time complexity of a single iteration in the optimal transfer algorithm is reduced.
[0091] In an optional embodiment, the determination module 202 performs an Euler circuit serialization mapping operation on the adjusted cost matrix to obtain the specific operation method for maintaining the cost matrix, which may include: Perform an Euler traversal on the spanning tree to obtain a one-dimensional Euler sequence; the one-dimensional Euler sequence corresponds one-to-one with the row and column order of the adjustment cost matrix; Based on the one-dimensional Euler sequence, an Euler circuit tree is obtained; the Euler circuit tree is used to provide a structured representation of the topology of the spanning tree. Using the one-dimensional Euler sequence in the Euler circuit tree as the rows and columns of the maintenance adjustment cost matrix, we obtain the maintenance cost matrix.
[0092] As can be seen, this optional embodiment, by performing an Eulerian circuit serialization mapping operation on the spanning tree, can make the arrangement order of the rows and columns of the adjustment cost matrix correspond one-to-one with the one-dimensional Eulerian sequence of the spanning tree, thereby ensuring that when cutting edges in the tree, the cut subtree must be a continuous segment, which can facilitate the maintenance of tree information related to the subtree as a whole; using the one-dimensional Eulerian sequence on the Eulerian circuit tree as the maintenance cost matrix for maintaining the adjustment cost matrix, since the changes in the maintenance cost matrix are consistent with the subtree, it can cope with complex dynamic topological changes such as global value increases or decreases, thereby improving the flexibility and adaptability of dynamic topology; at the same time, by maintaining the maintenance cost matrix here through the maintenance tree structure, the time complexity of maintaining the maintenance cost matrix can be reduced.
[0093] In another optional embodiment, the partitioning module 203 partitions the maintenance cost matrix using a dual-resolution matrix decomposition tree to obtain several small blocks and several medium blocks. The specific operation may include: The maintenance cost matrix is divided according to a preset first partitioning benchmark value to obtain several medium-sized blocks; The medium-sized blocks are divided according to a preset second dividing benchmark value to obtain several small-sized blocks; wherein the second dividing benchmark value is less than the first dividing benchmark value.
[0094] As can be seen, this optional embodiment divides a complete large matrix block into different medium-sized blocks and small-sized blocks; operation instructions can be issued to the small-sized blocks divided from the medium-sized blocks through the medium-sized blocks, so that subsequent maintenance operations are all carried out in the medium-sized blocks and small-sized blocks, thereby reducing the time complexity of matrix maintenance.
[0095] In another optional embodiment, the marking module 204 performs lazy marking update operations on the small-scale blocks and medium-scale blocks to obtain the specific operation method of lazy-marked small-scale blocks and lazy-marked medium-scale blocks, which may include: The maintenance cost matrix is lazy-labeled and distributed to obtain a lazy-labeled block; Based on the lazy-marked large blocks, the medium-sized blocks are lazy-marked and distributed to obtain lazy-marked medium-sized blocks; Based on the lazy-marked medium-sized blocks, lazy-marking is performed on the small-sized blocks to obtain lazy-marked small-sized blocks.
[0096] As can be seen, by placing lazy tags in small and medium-sized blocks, and configuring lazy tags for each level of block nodes in the dual-resolution matrix factorization tree, the reduction cost of batch addition and subtraction operations brought about by dual solution updates is delayed until the access time. It is not necessary to traverse and modify all elements in the block, but only the lazy tag part needs to be modified. This achieves efficient processing of batch updates and global queries, thereby reducing the time complexity required for maintenance.
[0097] In another optional embodiment, the specific operation method by which the processing module 205 performs a divide-and-conquer operation on the lazy-marked small blocks to obtain constant blocks may include: Divide and conquer the lazy-marked small blocks to obtain simulated small blocks; When it is determined that the size of the simulated block does not meet the preset constant standard, the divide-and-conquer operation is triggered to continue processing the simulated block; When it is determined that the size of the simulated block meets the preset constant standard, a constant block is obtained.
[0098] As can be seen, this optional embodiment obtains a constant block by further decomposing the lazy-marked small blocks; at this point, the constant block is at a constant level, and operating on it can reduce the time complexity of the operation.
[0099] In yet another alternative embodiment, the device may further include: The adjustment module is used to constrain and adjust the partitioning process of the maintenance cost matrix based on a preset dynamic block length adaptive adjustment algorithm. Furthermore, the specific operational methods by which this adjustment module constrains and adjusts the partitioning process of the maintenance cost matrix include: When it is determined that the size of the small block is greater than or equal to a preset first threshold, and / or the sum of two adjacent small blocks within any size block is less than or equal to a preset second threshold, the small block is adjusted to obtain an adjusted small block. When it is determined that the size block is greater than or equal to the preset third threshold, and / or the sum of any adjacent size blocks is less than or equal to the preset fourth threshold, the size block is adjusted to obtain the adjusted size block.
[0100] As can be seen, this optional embodiment, by setting a dynamic block length adaptive adjustment algorithm, enables the algorithm to dynamically adjust the length boundaries of each block according to the changes in node aggregation and distribution during operation, preventing some blocks from expanding or shrinking to an extreme extent, and maintaining the ideal worst-case time complexity boundary under any extreme topology, thereby improving the accuracy of the structure.
[0101] In yet another alternative embodiment, the device may further include: The modification module is used to mark the maintenance cost matrix, medium-sized blocks, and small-sized blocks to obtain the first data mark, the second data mark, and the third data mark. Based on the large lazy-marked block, the medium lazy-marked block, and the small lazy-marked block, we obtain the first lazy mark, the second lazy mark, and the third lazy mark; The first tag block is obtained based on the first data tag and the first lazy tag; the second tag block is obtained based on the second data tag and the second lazy tag; the third tag block is obtained based on the third data tag and the third lazy tag; the first tag block, the second tag block, and the third tag block are used to record the minimum value of the comprehensive data in the maintenance cost matrix, the medium-sized block, and the small-sized block; When a global modification instruction is received, the first lazy tag, the second lazy tag, or the third lazy tag is modified to obtain the first modification block corresponding to the first tag block, the second modification block corresponding to the second tag block, and the third modification block corresponding to the third tag block.
[0102] As can be seen, this optional embodiment obtains the minimum value of the comprehensive data by combining the minimum value in the block with the lazy tag; at this time, if it is necessary to modify the global data, only the lazy tag needs to be modified, thereby reducing the time required for global numerical modification operations.
[0103] Example 3 Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of a device including a memory and a processor, as disclosed in an embodiment of the present invention. Figure 4 As shown, the device including memory and processor may include: Memory 301 storing executable program code; Processor 302 coupled to memory 301; The processor 302 calls the executable program code stored in the memory 301 to execute some or all of the steps in any of the dual-resolution decomposition tree-based image processing methods in Embodiment 1 of the present invention.
[0104] Example 4 This invention discloses a computer storage medium storing computer instructions. When these computer instructions are invoked, they are used to execute some or all of the steps in any of the dual-resolution decomposition tree-based image processing methods disclosed in Embodiment 1 of this invention.
[0105] Example 5 This invention integrates the image processing method based on dual-resolution decomposition trees from Embodiment 1 into the traditional network simplex method and dynamic data structures, resulting in a dynamic optimal transmission method based on dual-resolution matrix decomposition trees. The specific operation of this method is as follows: Optimal Transport (OT) provides a mathematical framework for comparing probability distributions by incorporating underlying spatial geometry features. Its core objective is to find the minimum-cost transport scheme from the source domain to the target domain while satisfying supply and demand constraints. This theory has extremely wide applications in computer vision, machine learning, medicine, and operations research.
[0106] Modern optimal transport applications often operate in dynamic environments where data is continuously input and evolves. For example, in single-cell research, source and target distributions change over time, requiring transport schemes to adjust dynamically in real time. However, existing dynamic optimal transport solutions suffer from the following technical limitations: 1) While the traditional Network Simplex method can provide numerically stable and accurate solutions, it often faces serious efficiency problems in dynamic environments. After modifications in a dynamic environment, the initial solution is usually close to the new optimal solution, thus the number of iterations is typically small. The real efficiency bottleneck lies in the high cost of a single iteration: to maintain the global optimality in the duality of the linear programming, each iteration requires processing a large amount of data. middle The optimal number of transmission points is determined. A global check and maintenance of the reduced cost matrix, on the order of magnitude, is performed. This inherent computational cost is difficult to reduce, resulting in a worst-case time complexity of at least O(n log n). .
[0107] 2) Heuristic approximation algorithms are unstable and inaccurate: While entropy regularization methods, such as Sinkhorn, have low cost per iteration, they sacrifice accuracy and inevitably require a compromise between approximation quality and update efficiency. More seriously, their iteration count is extremely sensitive to the regularization parameter, making them prone to convergence instability when facing dynamic environment updates, and often requiring repeated initialization in each dynamic adjustment. The aforementioned nested mesh method is also inherently limited to providing only approximate solutions, failing to meet the demands of scenarios requiring extremely high accuracy.
[0108] 3) Poor local adaptability of traditional incremental network flow algorithms: Existing conventional network flow solutions based on augmenting paths often rely on complex residual networks and flow adjustment mechanisms for local updates. When faced with frequent changes in network topology during dynamic optimal transmission, these algorithms have poor adaptability and are difficult to use directly for efficient maintenance.
[0109] 4) Existing dynamic tree algorithms lack worst-case guarantees: Some existing technologies have proposed using a 2D skip orthogonal array combined with a dynamic tree. However, since this is a stochastic algorithm, it can only achieve linear maintenance time under the desired state; its worst-case time complexity remains limited. .
[0110] To address the aforementioned issues, this proposal suggests a dynamic optimal transmission method based on a dual-resolution matrix factorization tree. This method aims to reduce the maintenance time complexity of a single iteration from the worst-case scenario by deeply integrating the traditional network simplex method with dynamic data structures. Reduce to We record the two point sets of dynamically optimal transmission as follows: and Its flow distribution is and The cost matrix is Therefore, the optimization objective of this problem is to find a matrix. Satisfy all its elements , , Minimize ,in, Source distribution (source edge), representing source points. The quality, probability, or supply at the location; The target distribution (target edge) represents the target points. The quality, probability, or demand at the location; the specific process is as follows: (1) Dynamic topology decoupling and auxiliary node pool mechanism In a dynamic environment, in order to ensure that the total weight of the source and target domains in the optimal transmission problem always satisfies the hard constraint that the weights are equal to 1, this method pre-allocates and maintains a pool of auxiliary nodes with all weights of zero in memory for a long time.
[0111] This method strictly decouples all complex dynamic environmental changes (such as node addition, deletion, distribution drift, etc.) into a combination of two basic operations: "weight modification" and "position modification".
[0112] Weight modification: While keeping the total weight of the system unchanged, a certain amount of weight is transferred from one node to another.
[0113] Location Modification: Moves the physical or feature location of a node. This operation will simultaneously update the values of the corresponding rows or columns of the cost matrix in the objective function.
[0114] Based on the above decoupling mechanism, when the system needs to insert a new node, it first extracts a zero-weight placeholder node from the auxiliary node pool, deploys it to the target coordinate position through "position modification," and then assigns it actual mass through "weight modification." When a node disappears or is deleted, the system directly resets its weight to zero and returns it to the auxiliary node pool. This abstraction seamlessly integrates network topology changes into the basic weight and position flow.
[0115] (2) Matrix maintenance transformation based on network simplex method Traditional network simplex methods often converge with only a very small number of iterations after dynamic fine-tuning. The real computational bottleneck lies in the need to perform adjustments for each iteration. A global scan and feasibility check are performed on the scaled-down cost matrix.
[0116] This application's embodiments thoroughly transform the network simplex method from an algebraic perspective, introducing a dual solution and reducing modification costs. ,in ,in and For dual solutions, To modify the cost matrix, Let the cost matrix be denoted by . The entire iterative process of finding the in-basic and out-basic variables using the simplex method is abstracted and transformed into a purely dynamic matrix maintenance problem. Based on the theory of the optimal transport problem, the dynamic optimal transport problem can be transformed into a dynamic spanning tree maintenance problem. This scheme establishes a dynamic spanning tree maintenance structure based on this theory.
[0117] Euler circuit serialization mapping: This scheme introduces an Euler circuit tree to represent the current spanning tree topology of the optimal transmission scheme. By performing an Euler traversal on the spanning tree, the complex node associations are transformed into one-dimensional Euler sequence operations, thereby partitioning the two-dimensional reduced cost matrix into a grid according to the sequence dimension. By arranging the nodes in the Euler circuit order, the matrix can be... Rearrange to obtain a new matrix .
[0118] Under this transformation, the system's data structure maintenance requirements are precisely defined as supporting four core matrix operations: matrix splitting, merging, global numerical increment / decrement, and minimum value lookup. Specifically, when splitting the spanning tree, the Eulerian circuit sequence will be split and merged into two Eulerian circuit sequences, and the corresponding matrices will be merged into four matrices. Taking splitting as an example, assuming the tree... The edges are cut off and split into , The block is divided into , , , , in express In the matrix, it represents elements to The matrix corresponding to the elements in the matrix, such as Figure 5 As shown.
[0119] (3) Constructing a dual-resolution matrix decomposition tree and a divide-and-conquer architecture To achieve the goals of matrix partitioning, merging, global numerical increment / decrement, and minimum value lookup, this paper designs a dual-resolution matrix factorization tree. This involves dividing the matrix into several sub-matrices. Small blocks of a certain size, and divided into several smaller blocks of a certain size. The middle block, in which It is a suitable choice based on the actual situation. Real numbers in the range. The following three structures are defined: Hierarchical block divide-and-conquer structure: The complexity of rounding and minimum value lookup of the partitioned matrix sequence is significantly reduced.
[0120] Dual-resolution layer design: To further accelerate the construction of a hierarchical block structure consisting of large, medium, and small blocks, complex operations on the entire global matrix are devolved to individual local blocks for parallel or local processing using a divide-and-conquer strategy. This block divide-and-conquer technique simplifies the maintenance of the matrix structure. This scheme inserts a special dual-resolution intermediate layer between the conventional hierarchical blocks. When the basic operations of the simplex method cause the spanning tree to be cut and spliced, this structure can significantly reduce the complexity of node reorganization and maintenance when single-layer matrix blocks are split and merged.
[0121] Dynamic block length adaptive adjustment: The system has a built-in node load monitoring mechanism that dynamically adjusts the length boundary of each block according to the clustering and distribution changes of nodes during the algorithm operation, preventing some blocks from expanding or shrinking to an extreme extent, so as to maintain the ideal worst-case time complexity boundary under any extreme topology.
[0122] (4) Lazy Tags Based Delayed update mechanism When recalculating the dual variable in each simplex iteration, it is usually necessary to perform uniform addition or subtraction operations on a large range of elements in the matrix. If each element is instantiated and updated directly, it will again fall into the predicament of being extremely time-consuming.
[0123] This application introduces the classic lazy-marking deferred update technique used in tree structures. When a global or large-scale numerical modification operation is triggered, the system only accumulates the incremental value to be processed (i.e., marks it with a lazy mark) at the "block" level structure of the target operation layer, while postponing the actual computation to each specific matrix element at the lower level. The lazy mark is only triggered to be passed down and instantiated when a query operation is performed and a specific element at the lower level must be accessed. This mechanism successfully compresses the time consumption of global numerical modification operations to a constant level. Taking cutting as an example, the algorithm process is as follows: Input:The block D to be split;the sets and of affected medium and small blocks Output:The resulting blocks D1and D2,together with their minima D1. and D2.
[0124] foreach E∈ (D) do E. ←E. +D.
[0125] end D. ←0 foreach E∈ do foreach F∈ (E) do F. ←F. +E.
[0126] end E. ←0 end foreach F∈ do Execute recursive split on F,obtaining F1and F2Re-place F by F1and F2 Maintain the size of F1 and F2(split if>2 ,merge if< with aneighbor) end foreach E∈ do Split E into E1and E2 Maintain the size of E1and E2(split if>2 ,merge if< with aneighbor) E1. ← ,E2. ←
[0127] E1. ←0,E2. ←0 foreach F∈ (E1) do E1. ←min(E1. ,F. +F. ) end foreach F∈Subs(E2) do E2. ←min(E2). ,F. +F. ) end end Split D into D1 and D2 D1. ← D2. ←
[0128] D1. ←0,D2. ←0 foreach E∈ (D1) do D1. ←min(D1). E.min+E ) end Foreach E∈ (D2) do D2. ←min(D2). ,E.min+E. ) end (5) Deep integration of Link-Cut Tree and Spread Tree for path flow maintenance In addition to matrix maintenance for finding incoming base edges, dynamic optimal transmission also requires handling extreme value queries and updates of path traffic on the base tree (used to find outgoing base edges). This method deeply integrates the dynamic tree data structure Link-Cut Tree (LCT) at this stage.
[0129] The system utilizes a Link-Cut Tree structure to dynamically maintain traffic bottlenecks and extreme values along network flow paths, and employs a Splay Tree to specifically maintain interval operations for Euler sequences. This optimizes the time complexity of query operations for finding the minimum flow edge along complex paths in the tree, as well as the accompanying edge addition, deletion, and flow adjustment operations, to an amortized level. Level. The pseudocode for weight modification is shown below; Input: Indices , ;the weight change δ;a spanning tree To that yieldsthe optimal solution before the modi- fication;the reduced cost matrix . Output:A spanning tree ToPT that yields the optimal solution afterthe modification. 27 while δ>0 do 28Let emin be the edge with minimum capacity on the unique path from to in the current tree 29 ←min{δ,emin.cap} 30foreach edge on the path from to do 31 .cap← .cap -
[0130] 32 .cap← .cap+
[0131] 33end 34δ←δ-δ' 35if δ=0 then 36break; 37end 38Delete emin from the tree,splitting it into two subtrees T1and T2,where ∈T1 39Find , such that is minimum among all pairs with ∈A∩T2and ∈B∩T1 40Compute add h
[0132] 41For each node pot ∈ T2 do 42If pot ∈ A then 43
[0133] 44End 45Else 46
[0134] 47End 48End 49Add a new edge e new Connecting And With capacity (And its reverse edge With capacity 0) 50Update the reduced cost matrix Accordingly 51End The pseudocode for position modification is as follows.
[0135] Input: A spanning tree To that yields a feasible primal solution, and the reduced cost matrix . Output: A spanning tree that yields the optimal solution. 1Find indices Such that
[0136] 2Let ←
[0137] 3While minr < 0 do 4Let be the edge with minimum capacity on the unique path from to in the tree 5foreach edge on the path from to do 6 .cap← .cap-emin.cap 7 .cap← .cap+emin.cap 8end 9Create a new edge
[0138] 10 .from←
[0139] 11 .to← , 12 .capacity←
[0140] 13Let .cap← .cap 14Delete from the tree,splitting it into two subtrees T1andT2(assume ∈T1) 15Computeadd h
[0141] 16 foreach node pot in T1do 17 if pot∈A then 18
[0142] 19 end 20 else 21
[0143] 22 end 23end 24Add to reconnect T1and T2,obtaining the updated tree 25Update the reduced cost matrix
[0144] 26 end The beneficial effects of this application are as follows: Breaking the time complexity limit of single-step iteration: By introducing a novel "dual-resolution matrix factorization tree" technique, traditional global matrix reconstruction is transformed into joint local optimization of matrix and tree structures. This structure can significantly reduce the time complexity of complex operations on the reduced cost matrix in a single simplex iteration (such as splitting, merging, global value incrementing, and minimum value lookup) to the worst-case modification module. This enables extremely high-speed dynamic maintenance.
[0145] Providing an absolutely accurate optimal transmission scheme: This application abandons the heuristic or grid approximation approach that sacrifices accuracy for efficiency, and instead delves into the traditional network simplex method framework. By deeply integrating dynamic data structures with accurate algorithms, an excellent data structure is designed to overcome the bottleneck of efficiency in updating fundamental theories, ensuring that the transmission scheme solved in any dynamic scenario maintains strict global optimality and absolute accuracy in the sense of linear programming.
[0146] Enhanced dynamic topology adaptability: By splitting the dynamic optimal transmission maintenance steps and combining them with Eulerian circuit trees to handle the cutting and merging of the transmission tree, the algorithm can transform the information of the nodes on the tree into sequence operations, flexibly and stably coping with complex dynamic topology changes such as node additions and deletions and weight changes.
[0147] The advantages of this embodiment are as follows: The following section presents a detailed comparison of our method with other methods. In the dynamic optimal transport problem, we compare our method with the traditional network simplex method, the sinkhorn modified module approximation algorithm, and a currently high-performance method combining a 2D modified module skip orthogonal array with a dynamic tree. Using a self-synthesized Gaussian-distributed point set, we compare the average time of a single dynamic operation for different algorithms, using the network simplex method as the baseline. The algorithm speed is as follows: Figure 6 As shown; in, Figure 6The BMD Tree in the text represents the method used in this study, where BMD Tree / Weight modifies the weights of the BMD Tree, and BMD Tree / Position modifies the position of the BMD Tree. Other methods are compared. This method is compared to the method based on a 2D jump orthogonal array. Figure 6 The Skip List in the diagram is a dynamic method; Skip List / Weight modifies the weights of the Skip List, and Skip List / Position modifies its position. The weight and position modifications are handled differently, so their times are compared separately. The Sinkhorn algorithm and the Network Simplex method are static methods; they handle the two modification operations the same way, so their times are not compared separately. The nodes in the diagram represent the ratio of the average time of this algorithm to the average time of the Network Simplex method on this dataset. For the Sinkhorn algorithm, since it is an approximation algorithm, an approximation variable is included. The smaller the variable, the more accurate the result; therefore, it is used. , , For comparison, other algorithms are all exact algorithms, so the degree of approximation does not need to be considered; the baseline is the benchmark line for the network simplex method, and the above content is compared with this benchmark line. Figure 6 It is evident that the algorithm presented in this scheme yields excellent results in both operations.
[0148] In addition, this application embodiment also conducted test experiments based on real-world CIFAR-10 and MNIST datasets, and the test results are as follows: Figure 7 and Figure 8 As shown; The results show that, although the efficiency ratios of different algorithms vary across different datasets, the algorithm proposed in this study is optimal among all exact algorithms and has a significant advantage over the approximate algorithm Sinkhorn.
[0149] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0150] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0151] Finally, it should be noted that the above embodiments are merely preferred embodiments of the present invention and are only used to illustrate the technical solutions of the present invention, not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An image processing method based on dual-resolution decomposition trees, characterized in that, The method includes: Acquire computer vision image data; obtain a spanning tree based on the computer vision image data; process the spanning tree to obtain a dual solution; obtain an adjustment cost matrix based on the dual solution; When it is determined that the adjustment cost matrix does not meet the preset target requirements, the adjustment cost matrix is subjected to Euler circuit serialization mapping operation to obtain the maintenance cost matrix; The maintenance cost matrix is divided into several small blocks and several medium blocks using a dual-resolution matrix decomposition tree. When the dual-resolution matrix decomposition tree performs a partitioning operation on the maintenance cost matrix, a lazy-marking update operation is performed on the small-scale block and the medium-scale block to obtain a lazy-marked small-scale block and a lazy-marked medium-scale block. Divide and conquer the small blocks of lazy-marked size to obtain several constant blocks; Based on all the constant blocks, the optimization matrix is obtained; The computer vision image data is processed using a preset optimal transmission algorithm, and the optimization matrix is used to reduce the time complexity of maintaining the optimal transmission algorithm in a single iteration.
2. The image processing method based on dual-resolution decomposition tree according to claim 1, characterized in that, The step of performing an Euler circuit serialization mapping operation on the adjustment cost matrix to obtain the maintenance cost matrix includes: Perform an Euler traversal on the spanning tree to obtain a one-dimensional Euler sequence; the one-dimensional Euler sequence corresponds one-to-one with the row and column order of the adjustment cost matrix; Based on the one-dimensional Euler sequence, an Euler circuit tree is obtained; the Euler circuit tree is used to provide a structured representation of the topology of the spanning tree. The maintenance cost matrix is obtained by using the one-dimensional Euler sequence in the Euler circuit tree as the rows and columns for maintaining the adjustment cost matrix.
3. The image processing method based on dual-resolution decomposition tree according to claim 2, characterized in that, The maintenance cost matrix is divided into several small blocks and several medium blocks using a dual-resolution matrix decomposition tree, including: The maintenance cost matrix is divided according to a preset first partitioning benchmark value to obtain several medium-sized blocks; The medium-sized block is divided according to a preset second dividing benchmark value to obtain several smaller blocks; wherein the second dividing benchmark value is smaller than the first dividing benchmark value.
4. The image processing method based on dual-resolution decomposition tree according to claim 3, characterized in that, The step of performing lazy-marking update operations on the small-scale block and the medium-scale block to obtain lazy-marked small-scale blocks and lazy-marked medium-scale blocks includes: The maintenance cost matrix is then lazy-labeled and distributed to obtain a lazy-labeled block. Based on the lazy-marked large block, the medium-sized block is lazy-marked and distributed to obtain the lazy-marked medium-sized block; Based on the lazy-marked medium-sized block, the lazy-marked small-sized block is distributed to obtain a lazy-marked small-sized block.
5. The image processing method based on dual-resolution decomposition tree according to claim 4, characterized in that, The divide-and-conquer operation on the lazy-marked small blocks yields several constant blocks, including: The lazy-marked small blocks are divided and conquered to obtain simulated small blocks; When it is determined that the size of the simulated block does not meet the preset constant standard, a divide-and-conquer operation is triggered to continue processing the simulated block; When it is determined that the size of the simulated block meets the preset constant standard, a constant block is obtained.
6. The image processing method based on dual-resolution decomposition tree according to claim 5, characterized in that, The method further includes: Based on a preset dynamic block length adaptive adjustment algorithm, the partitioning process of the maintenance cost matrix is constrained and adjusted; And, the specific operation method for constraining and adjusting the partitioning process of the maintenance cost matrix includes: When it is determined that the size of the small block is greater than or equal to a preset first threshold, and / or the sum of any two adjacent size small blocks within any size block is less than or equal to a preset second threshold, the size small block is adjusted to obtain an adjusted small block; When it is determined that the size block is greater than or equal to a preset third threshold, and / or the sum of any adjacent size blocks is less than or equal to a preset fourth threshold, the size block is adjusted to obtain an adjusted size block.
7. The image processing method based on dual-resolution decomposition tree according to claim 6, characterized in that, The method further includes: The maintenance cost matrix, the medium-sized block, and the small-sized block are labeled to obtain a first data label, a second data label, and a third data label. Based on the large lazy tag block, the medium lazy tag block, and the small lazy tag block, we obtain the first lazy tag, the second lazy tag, and the third lazy tag; A first tag block is obtained based on the first data tag and the first lazy tag; a second tag block is obtained based on the second data tag and the second lazy tag; a third tag block is obtained based on the third data tag and the third lazy tag; the first tag block, the second tag block, and the third tag block are used to record the minimum comprehensive data value in the maintenance cost matrix, the medium-sized block, and the small-sized block; When a global modification instruction is received, the first lazy tag, the second lazy tag, or the third lazy tag is modified to obtain a first modification block corresponding to the first tag block, a second modification block corresponding to the second tag block, and a third modification block corresponding to the third tag block.
8. An image processing apparatus based on a dual-resolution decomposition tree, characterized in that, The device includes: A construction module is used to acquire computer vision image data; obtain a spanning tree based on the computer vision image data; process the spanning tree to obtain a dual solution; and obtain an adjustment cost matrix based on the dual solution. The judgment module is used to perform Euler circuit serialization mapping operation on the adjustment cost matrix to obtain the maintenance cost matrix when it is determined that the adjustment cost matrix does not meet the preset target requirements. The partitioning module is used to partition the maintenance cost matrix using a dual-resolution matrix decomposition tree to obtain several small blocks and several medium blocks. The marking module is used to perform lazy marking update operations on the small-scale block and the medium-scale block when the dual-resolution matrix decomposition tree performs a partitioning operation on the maintenance cost matrix, so as to obtain lazy-marked small-scale block and lazy-marked medium-scale block. The processing module is used to perform a divide-and-conquer operation on the lazy-marked small blocks to obtain several constant blocks; to obtain an optimization matrix based on all the constant blocks; to process the computer vision image data using a preset optimal transmission algorithm; and to use the optimization matrix to reduce the time complexity of maintaining the optimal transmission algorithm in a single iteration.
9. An apparatus comprising a memory and a processor, characterized in that, The device includes: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the image processing method based on dual-resolution decomposition tree as described in any one of claims 1-7.
10. A computer storage medium, characterized in that, The computer storage medium stores computer instructions, which, when invoked by a processor, are used to execute the image processing method based on a dual-resolution decomposition tree as described in any one of claims 1-7.
Citation Information
Patent Citations
Method for identifying running state of wheels of locomotive
CN101701845A
Large-scale sparse symmetric linear equation set parallel processing method based on elimination tree
CN110162736A