Target data location method, device and storage medium

By traversing the vector image matrix row by row and column by column, and using the storage order of column and row indices to determine the row and column coordinates of the target data, the problem of high memory consumption in existing technologies is solved, and efficient target data localization is achieved.

CN116049457BActive Publication Date: 2026-05-26ZHEJIANG DAHUA TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG DAHUA TECH CO LTD
Filing Date
2022-12-30
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing target data point localization methods have high memory resource consumption and low efficiency.

Method used

By traversing the vector image matrix row by row based on the matrix row index, the column index of the first vector data in each row is determined and stored; by traversing the matrix column index column by column, the row index of the second vector data in each column is determined and stored; and by utilizing the storage order of the column index and the row index, the row and column coordinates of the target data are determined.

Benefits of technology

It reduces memory usage, improves the efficiency and usability of target data location, avoids multiple traversal processes, and reduces the consumption of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116049457B_ABST
    Figure CN116049457B_ABST
Patent Text Reader

Abstract

This application relates to a target data localization method, apparatus, and storage medium. The method includes: traversing a vector image matrix row by row based on matrix row indexes, determining the column index of the first vector data in each row based on preset conditions, and storing them sequentially; traversing the vector image matrix column by column based on matrix column indexes, determining the row index of the second vector data in each column based on the preset conditions, and storing them sequentially; determining the row and column coordinates of the target data based on each column index and its corresponding storage order, and each row index and its corresponding storage order, wherein the target data is determined based on the first vector data and the second vector data, thereby achieving target data localization and solving the problem of high memory resource consumption in target data point localization methods in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing, and in particular to a method, apparatus and storage medium for target data localization. Background Technology

[0002] In image processing algorithms such as target tracking and feature point matching, it is often necessary to process images to obtain vector image matrices, identify unique candidate data points in each row and column of the vector image matrix that meet preset conditions, and then determine whether each candidate data point is the unique target data point in its row and column that meets the preset conditions. If so, the subsequent target tracking or feature point matching algorithm is executed based on the value of the target data point. In existing technologies, to achieve this process, it is typically necessary to store the entire vector image matrix in memory and iterate through each row and column to find the corresponding candidate data points, and then iterate through all candidate data points to determine whether each candidate data point is the unique target data point in its row and column that meets the preset conditions. This process requires a large amount of memory space and involves multiple traversals, resulting in low efficiency and high consumption of computational and memory resources.

[0003] There is currently no effective solution to the problem of high memory resource consumption in target data point localization methods in related technologies. Summary of the Invention

[0004] This embodiment provides a target data location method, apparatus, and storage medium to solve the problem of high memory resource consumption in target data point location methods in related technologies.

[0005] Firstly, this embodiment provides a target data localization method, the method comprising:

[0006] The vector image matrix is ​​traversed row by row based on matrix row indexing, and the column index of the first vector data in each row is determined and stored sequentially based on preset conditions; and

[0007] The vector image matrix is ​​traversed column by column based on the matrix column index, and the row index of the second vector data in each column is determined and stored sequentially based on the preset conditions.

[0008] Based on the column indexes and their corresponding storage order, and the row indexes and their corresponding storage order, the row and column coordinates of the target data are determined, and the target data is determined based on the first vector data and the second vector data.

[0009] In some embodiments, determining the row and column coordinates of the target data based on each of the column indices and their corresponding storage order, and each of the row indices and their corresponding storage order, includes:

[0010] Based on each column index and its corresponding storage order, and each row index and its corresponding storage order, determine the row and column coordinates of each first vector data and each second vector data;

[0011] Based on the row and column coordinates of each of the first vector data and each of the second vector data, the row and column coordinates of the target data are determined.

[0012] In some embodiments, determining the row and column coordinates of each first vector data and each second vector data based on each column index and its corresponding storage order, and each row index and its corresponding storage order, includes:

[0013] Based on the column indexes and their corresponding storage order, a first correspondence between the first column number and the first row number of the first vector data is determined; and

[0014] Based on each row index and its corresponding storage order, a second correspondence between the second row number and the second column number of the second vector data is determined.

[0015] In some embodiments, determining the row and column coordinates of the target data based on the row and column coordinates of each of the first vector data and each of the second vector data includes:

[0016] Traverse the row and column indices, where the row and column indices are any one of the first column number, the first row number, the second column number, and the second row number;

[0017] Based on the row and column numbers, the first correspondence, and the second correspondence, it is determined that target data exists in the first vector data and the second vector data, wherein the first row number and the second row number of the target data are the same, and the first column number and the second column number are the same;

[0018] The first row number and the first column number are determined as the row and column coordinates of the target data.

[0019] In some embodiments, the row and column number is the first column number, and determining the presence of target data in the first vector data and the second vector data based on the row and column number, the first correspondence, and the second correspondence includes:

[0020] Based on the first correspondence, determine the first row number corresponding to the first column number;

[0021] Based on the first row number, determine the corresponding second row number;

[0022] Based on the second correspondence, determine the second column number corresponding to the second row number;

[0023] If the first column number is the same as the second column number, the first vector data corresponding to the first row number and the first column number is determined to be the target data.

[0024] In some embodiments, after determining the first row number and the first column number as the row and column coordinates of the target data, the method further includes:

[0025] Based on the first row number and the first column number, determine whether the target data in the vector image matrix is ​​in a valid state;

[0026] If the target data is valid, the data in the row and column corresponding to the first row number and the first column number will be set to invalid.

[0027] In some embodiments, the traversal row and column indices include:

[0028] Compare the number of row numbers and column numbers, and iterate through the ones with fewer numbers.

[0029] In some embodiments, determining the first correspondence between the first column number and the first row number of the first vector data based on each of the column indices and their corresponding storage order includes:

[0030] Based on the storage order of each column index, determine the first row number corresponding to each column index;

[0031] Based on the values ​​of each column index and the matrix row index value corresponding to the first row number, the first column number corresponding to each column index is determined;

[0032] The first correspondence is determined based on the first row number and the first column number corresponding to the column index.

[0033] Secondly, this embodiment provides a target data positioning device, the device comprising:

[0034] The first traversal module is used to traverse the vector image matrix row by row based on the matrix row index, determine the column index of the first vector data in each row based on preset conditions, and store them sequentially.

[0035] The second traversal module is used to traverse the vector image matrix column by column based on the matrix column index, determine the row index of the second vector data in each column based on the preset conditions, and store them sequentially.

[0036] The determining module is used to determine the row and column coordinates of the target data based on each column index and its corresponding storage order, and each row index and its corresponding storage order, wherein the target data is determined based on the first vector data and the second vector data.

[0037] Thirdly, this embodiment provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the target data location method described in the first aspect.

[0038] Compared with related technologies, the target data localization method provided in this embodiment traverses the vector image matrix row by row based on the matrix row index, determines the column index of the first vector data in each row based on preset conditions and stores them sequentially, storing the column index of the vector data in each row that meets the preset conditions into memory; it also traverses the vector image matrix column by column based on the matrix column index, determines the row index of the second vector data in each column based on the preset conditions and stores them sequentially, storing the row index of the vector data in each column that meets the preset conditions into memory, without needing to store the vector data itself, thus saving memory space; and determines the row and column coordinates of the target data based on each column index and its corresponding storage order, as well as each row index and its corresponding storage order. The target data is determined based on the first and second vector data, that is, according to the column index and storage order of the first vector data stored in memory, and the row index and storage order of the second vector data, the row and column coordinate values ​​of the first and second vector data are obtained, and the row and column coordinates of the target data are determined based on these row and column coordinate values, thus achieving the localization of the target data. This solves the problem of high memory resource consumption in target data point localization methods in related technologies.

[0039] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description

[0040] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0041] Figure 1 This is a computer hardware device block diagram of a target data location method according to some embodiments of this application;

[0042] Figure 2 This is a flowchart of a target data location method according to some embodiments of this application;

[0043] Figure 3 This is a flowchart illustrating how target data row and column coordinates are determined based on column indexes, row indexes, and their storage order, according to some embodiments of this application.

[0044] Figure 4 This is a flowchart illustrating the determination of the row and column coordinates of the first and second vector data according to some embodiments of this application;

[0045] Figure 5 This is a flowchart illustrating the determination of the row and column coordinates of target data based on the row and column coordinates of first and second vector data, according to some embodiments of this application.

[0046] Figure 6 This is a flowchart illustrating the determination of the presence of target data in the first and second vector data according to some embodiments of this application;

[0047] Figure 7 This is a flowchart illustrating the determination of a first correspondence relationship in some embodiments of this application;

[0048] Figure 8 This is a flowchart of a target data location method according to some preferred embodiments of this application;

[0049] Figure 9 This is a structural block diagram of a target data positioning device according to some embodiments of this application. Detailed Implementation

[0050] To better understand the purpose, technical solution, and advantages of this application, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0051] Unless otherwise defined, the technical or scientific terms used in this application shall have the general meaning as understood by one of ordinary skill in the art to which this application pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these,” used in this application, do not indicate quantitative limitation and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to such processes, methods, products, or devices. The terms “connected,” “linked,” and “coupled,” used in this application, are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. The term “multiple” used in this application refers to two or more. The "and / or" operator describes the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: A alone, A and B simultaneously, and B alone. Typically, the character " / " indicates that the objects before and after it are in an "or" relationship. The terms "first," "second," and "third," etc., used in this application are merely for distinguishing similar objects and do not represent a specific ordering of the objects.

[0052] The target data location method embodiments provided in this application can be executed in a terminal, computer, server or similar computing device. Figure 1 This is a hardware device block diagram of a computer for a target data localization method in some embodiments of this application. For example... Figure 1 As shown, a computer may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 and a memory 104 for storing data are also included. The processor 102 may be, but is not limited to, a microprocessor (MCU) or a programmable logic device (FPGA). The computer may also include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that… Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the computer described above. For example, the computer may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown are illustrated.

[0053] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the target data positioning method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0054] The transmission device 106 is used to receive or transmit data used by the target data positioning method via a network. This network includes a wireless network provided by a computer's communications provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 can be a radio frequency (RF) module for wireless communication with the Internet.

[0055] This embodiment provides a method for locating target data. Figure 2 This is a flowchart of a target data location method according to some embodiments of this application, such as... Figure 2 As shown, the process includes the following steps:

[0056] Step S201: Traverse the vector image matrix row by row based on the matrix row index, determine the column index of the first vector data in each row based on preset conditions, and store them sequentially.

[0057] In image processing tasks such as feature point matching and target tracking, to determine whether the vector data in a vector image matrix meets preset conditions, the matrix can be traversed row by row or column by column. The preset conditions can be the maximum or minimum value of the row or column containing the vector data, a specific threshold range, etc. In this embodiment, each row or column of the vector image matrix contains exactly one vector data that meets the preset conditions. When traversing the vector image matrix row by row, the vector data corresponding to that row can be found based on the row index, and each vector data in that row can be determined individually to meet the preset conditions. The matrix row index refers to the storage address or position number of each row in the vector image matrix. When all the vector data in a row has been traversed, the position of the first vector data that uniquely meets the preset conditions in that row is determined, i.e., the column index of the first vector data, and this column index is stored in memory; then the traversal of the next row is performed.

[0058] For example, the vector image matrix is ​​an M*N matrix, where M = 100 and N = 200. Based on the matrix row index, the row index of the second row is 2300. After traversal, the first vector data in the second row is determined to be the 50th data item in the second row. Therefore, the column index of this first vector data can be 50, i.e., the column number of the data; or the column index of the first vector data can be 2300 + 50 - 1 = 2349. That is, the column index can be used to represent or calculate the column number of the first vector data.

[0059] Step S202: Traverse the vector image matrix column by column based on the matrix column index, determine the row index of the second vector data in each column based on the preset condition, and store them sequentially.

[0060] Similar to step S201, the vector image matrix can also obtain the row index of the second vector data by traversing each column. The preset conditions in this step are exactly the same as those in step S201. The vector data in each column can be found through the matrix column index, and it can be determined whether the vector data in that column satisfies the preset conditions. The matrix column index is the storage address or position number of that column. After traversing all the vector data in that column, the location of the unique second vector data that satisfies the preset conditions is determined, i.e., the row index of that second vector data, and this row index is stored in memory; then the traversal of the next column is performed. This row index can be used to represent or calculate the row number of the second vector data.

[0061] Step S203: Based on the column index and its corresponding storage order, and the row index and its corresponding storage order, determine the row and column coordinates of the target data. The target data is determined based on the first vector data and the second vector data.

[0062] Based on the column index of each first vector data, the column number of the first vector data can be obtained; based on the row index of each second vector data, the row number of the second vector data can be obtained; and the storage order determines the row number of the first vector data and the column number of the second vector data. Based on the above information, it is comprehensively determined whether target data exists in the first and second vector data. This target data must simultaneously meet the preset conditions of its row and column; that is, the target data is the only data in the vector image matrix that meets the preset conditions in both its row and column.

[0063] Through the above steps S201 to S203, the vector image matrix is ​​traversed row by row based on the matrix row index. The column index of the first vector data in each row is determined based on preset conditions and stored sequentially. The column index of the vector data in each row that meets the preset conditions is stored in memory. The vector image matrix is ​​traversed column by column based on the matrix column index. The row index of the second vector data in each column is determined based on the preset conditions and stored sequentially. The row index of the vector data in each column that meets the preset conditions is stored in memory. It is not necessary to store the vector data itself, thus saving the memory space used. The row and column coordinates of the target data are determined based on the column index and the corresponding storage order, as well as the row index and the corresponding storage order. The target data is determined based on the first vector data and the second vector data. That is, the row and column coordinate values ​​of the first vector data and the second vector data are obtained according to the column index and storage order of the first vector data stored in memory, as well as the row index and storage order of the second vector data. The row and column coordinates of the target data are determined according to the row and column coordinate values, thus realizing the positioning of the target data. This solves the problem of high memory resource consumption in the target data point positioning methods in related technologies.

[0064] In some of these embodiments, Figure 3 This is a flowchart illustrating how some embodiments of this application determine the row and column coordinates of target data based on column indexes, row indexes, and their storage order, such as... Figure 3 As shown, the process includes the following steps:

[0065] Step S301: Based on the column index and its corresponding storage order, and the row index and its corresponding storage order, determine the row and column coordinates of each first vector data and each second vector data.

[0066] As can be seen from steps S201 and S202, the column index of each first vector data can represent or calculate the column number of the first vector data; the row index of each second vector data can represent or calculate the row number of the second vector data; and the column indexes of each first vector data are stored in the order of row-by-row traversal, while the row indexes of each second vector data are stored in the order of column-by-column traversal. Therefore, the row number of the first vector data and the column number of the second vector data can be determined according to the storage order.

[0067] Based on the above information, the column number corresponding to the column index of the first vector data is associated with the row number corresponding to the storage order of the column index to determine the row and column coordinates of the first vector data; the row number corresponding to the row index of the second vector data is associated with the column number corresponding to the storage order of the row index to determine the row and column coordinates of the second vector data.

[0068] Step S302: Determine the row and column coordinates of the target data based on the row and column coordinates of each first vector data and each second vector data.

[0069] When the row and column coordinates of each first vector data and each second vector data in the vector image matrix are known, it is possible to determine whether there is target data in the first and second vector data by traversing and comparing any coordinate. The target data can simultaneously meet the preset conditions of its row and column, that is, the target data is the only data in the row and column of the vector image matrix that meets the preset conditions.

[0070] Through the above steps S301-S302, the row and column coordinates of each first vector data and each second vector data are determined based on the column index and its corresponding storage order, as well as the row index and its corresponding storage order. By obtaining the row and column coordinates of the first vector data that meets the preset conditions in each row of the vector image matrix, and the row and column coordinates of the second vector data that meets the preset conditions in each column, the specific positions of the first and second vector data in the matrix are determined. Based on the row and column coordinates of each first vector data and each second vector data, the row and column coordinates of the target data are determined. Based on the specific positions of the first and second vector data in the matrix, it is determined whether there are overlapping target data points between the first and second vector data. It is not necessary to compare the specific values ​​of the vector data, but to determine the target data by comparing the row and column coordinates of the vector data, which reduces the memory space occupied and improves the practicality of the target data positioning method.

[0071] In some of these embodiments, Figure 4 This is a flowchart illustrating the determination of the row and column coordinates of the first and second vector data in some embodiments of this application, such as... Figure 4 As shown, the process includes the following steps:

[0072] Step S401: Based on the column indexes and their corresponding storage order, determine the first correspondence between the first column number and the first row number of the first vector data.

[0073] Based on the column index of the first vector data, the column number of the first vector data can be obtained; based on the storage order of the column indices of each first vector data, the row number order of each first vector data can be obtained. By mapping the row number order and column number one-to-one with each first vector data, the first column number and first row number of each first vector data can be obtained.

[0074] Step S402: Based on each row index and its corresponding storage order, determine the second correspondence between the second row number and the second column number of the second vector data.

[0075] Based on the row index of the second vector data, the row number of that second vector data can be obtained; based on the storage order of the row indices of each second vector data, the column number order of each second vector data can be obtained. By mapping the column number order and row number one-to-one with each second vector data, the second correspondence between the second column number and the second row number of each second vector data can be obtained.

[0076] Through the above steps S401 to S402, based on each column index and its corresponding storage order, the first correspondence between the first column number and the first row number of the first vector data is determined, and the correspondence between the row and column coordinates of the first vector data is established; based on each row index and its corresponding storage order, the second correspondence between the second row number and the second column number of the second vector data is determined, and the correspondence between the row and column coordinates of the second vector data is established, thereby obtaining the row and column coordinates of the first and second vector data, which forms the basis for traversal and comparison to obtain data.

[0077] In some of these embodiments, Figure 5 This is a flowchart illustrating the determination of the row and column coordinates of target data based on the row and column coordinates of first and second vector data, as shown in some embodiments of this application. Figure 5 As shown, the process includes the following steps:

[0078] Step S501: Traverse the row and column numbers, where the row and column numbers are any one of the first column number, the first row number, the second column number, and the second row number.

[0079] Based on the first column or first row number of each first vector data, or based on the second column or second row number of each second vector data, the vector data corresponding to each row or column of the entire vector image matrix is ​​compared one by one.

[0080] Step S502: Based on the row and column numbers, the first correspondence and the second correspondence, it is determined that there is target data in the first vector data and the second vector data, and the first row number and the second row number of the target data are the same.

[0081] Based on the first and second correspondences, determine the row or column number of the first or second vector data that corresponds to the row and column number, and determine whether the corresponding first and second vector data overlap based on the row or column number.

[0082] Step S503: Determine the first row number and the first column number as the row and column coordinates of the target data.

[0083] Through the steps S501 to S503 described above, the entire vector image matrix is ​​traversed by row and column indices, which can be any one of the first column number, first row number, second column number, and second row number, to avoid missing rows or columns. Based on the row and column indices, the first correspondence, and the second correspondence, it is determined that target data exists in the first and second vector data. The first row number and the second row number of the target data are consistent, and the first column number and the second column number are consistent. When the row and column indices are completely consistent, the existence of the target data is confirmed. By determining the first row number and the first column number as the row and column coordinates of the target data, the location of the target data is obtained. The location of the target data is determined through simple data traversal and comparison, thereby improving the efficiency of target location and reducing memory space usage.

[0084] In some of these embodiments, the first column number is used as the row and column number, for example. Figure 6 This is a flowchart illustrating how, according to some embodiments of this application, target data is determined to exist in first and second vector data based on row and column indices, a first correspondence, and a second correspondence. Figure 6 As shown, the process includes the following steps:

[0085] Step S601: Based on the first correspondence, determine the first row number corresponding to the first column number.

[0086] Based on the correspondence between row and column numbers of each first vector data, find the first row number corresponding to the first column number.

[0087] Step S602: Determine the corresponding second row number based on the first row number.

[0088] In the correspondence between row and column numbers of each second vector data, find the second row number that is the same as the first row number.

[0089] Step S603: Based on the second correspondence, determine the second column number corresponding to the second row number.

[0090] Based on the correspondence between row and column numbers of each second vector data, find the second column number corresponding to the second row number.

[0091] Step S604: If the first column number and the second column number are the same, determine the first vector data corresponding to the first row number and the first column number as the target data.

[0092] The first column number is the same as the second column number, and the first row number is the same as the second row number. This indicates that the corresponding first vector data and second vector data overlap, thus obtaining the target data.

[0093] 0. Through the above steps S601 to S604, based on the first correspondence relationship, the first row number corresponding to the first column number is determined, and the row and column coordinates of the first vector data are obtained; based on the first row number, the corresponding second row number is determined, and the row number matching the first vector data is found among the row numbers of each second vector data; based on the second correspondence relationship, the second column number corresponding to the second row number is determined, and the corresponding second vector data is obtained.

[0094] The row and column coordinates are used to determine the target data. When the first column number and the second column number are the same, the first vector data corresponding to the first row number and the first column number is determined to be the target data. When the first vector data and the second vector data are matched, the existence of the target data is confirmed. The target data is located by matching the row and column coordinates, which reduces the memory space occupied and improves the positioning efficiency of the target data.

[0095] In some embodiments, operations on the vector image matrix are also involved after determining the row and column coordinates of the target data. These operations include the following steps:

[0096] Step S11: Based on the first row number and the first column number, determine whether the target data in the vector image matrix is ​​in a valid state.

[0097] Each vector image matrix can include multiple target data. When traversing the entire matrix based on the row or column number of the first or second vector data, the validity or invalidity of the data can be used to reduce the number of data points.

[0098] Minimize the number of rows or columns traversed. When data is in an invalid state, it means the target data in the row or column containing that data has been located and no further traversal is needed. When data is in a valid state, it means the target data in the row or column containing that data has not yet been located. After determining the row and column coordinates of one of the target data during the traversal, it is advisable to first determine whether that target data is in a valid state to avoid redundant location.

[0099] S12, if the target data is valid, set the data with 0 in the row and column corresponding to the first row number and the first column number to invalid.

[0100] If the target data is valid, the data in the row and column containing the target data is invalidated, meaning that no further positioning is required, thus improving the positioning efficiency of subsequent target data in other rows and columns.

[0101] Through the above steps S11 to S12, the target data in the vector image matrix is ​​determined to be valid based on the first row number and the first column number, thus avoiding repeated positioning of the target data. If the target data is valid, the data in the row and column corresponding to the first row number and the first column number is set to invalid, thereby improving the positioning efficiency of target data in other rows and columns.

[0102] In some embodiments, a specific method for traversing row and column numbers is involved. This method includes comparing the number of each row and column number and traversing the rows with fewer numbers.

[0103] Each traversal consumes computation time and resources. Reducing the number of traversals can improve the efficiency of target data localization and reduce the consumption of computational resources. By comparing the number of row or column numbers of the first or second vector data, that is, the number of rows and columns of the vector image matrix, traversing only the data with fewer rows can reduce the number of traversals.

[0104] In some of these embodiments, Figure 7 This is a flowchart illustrating how some embodiments of this application determine the first correspondence based on column indexes and their corresponding storage order, such as... Figure 7 As shown, the process includes the following steps:

[0105] Step S701: Determine the first row number corresponding to each column index based on the storage order of each column index.

[0106] The column indices of the first vector data are stored in a row-by-row traversal order, so the first row number corresponding to each column index can be determined based on this storage order.

[0107] Step S702: Determine the first column number corresponding to each column index based on the values ​​of each column index and the matrix row index value corresponding to the first row number.

[0108] In this embodiment, the column index is equal to the sum of the matrix row index of the row containing the first vector data and the column number of the first vector data. Therefore, based on the first row number obtained in step S701, the matrix row index corresponding to that row can be obtained, and then based on the difference between the column index and the matrix row index, the first column number corresponding to that column index can be obtained.

[0109] Step S703: Determine the first correspondence based on the first row number and first column number corresponding to the column index.

[0110] Through the above steps S701 to S703, the first row number corresponding to each column index is determined based on the storage order of each column index, and the row number information of the column index is obtained; the first column number corresponding to each column index is determined based on the value of each column index and the matrix row index value corresponding to the first row number, and the column number information of the column index is obtained; the first correspondence is determined based on the first row number and the first column number corresponding to the column index, and the row and column coordinates of the first vector data corresponding to the column index are obtained.

[0111] The present embodiment will now be described and illustrated through preferred embodiments. Figure 8 This is a flowchart of the target data location method according to a preferred embodiment of this invention. Figure 8 As shown, the process includes the following steps:

[0112] Step S801: Traverse the vector image matrix row by row based on the matrix row index, determine the column index of the first vector data in each row based on preset conditions, and store them sequentially;

[0113] Step S802: Traverse the vector image matrix column by column based on the matrix column index, determine the row index of the second vector data in each column based on the preset condition, and store them sequentially;

[0114] Step S803: Determine the first row number corresponding to each column index based on the storage order of each column index;

[0115] Step S804: Determine the first column number corresponding to each column index based on the values ​​of each column index and the matrix row index value corresponding to the first row number;

[0116] Step S805: Determine the first correspondence based on the first row number and first column number corresponding to the column index;

[0117] Step S806: Based on each row index and its corresponding storage order, determine the second correspondence between the second row number and the second column number of the second vector data;

[0118] Step S807: Compare the number of first column numbers and first row numbers, and traverse the first column numbers with fewer numbers;

[0119] Step S808: Based on the first correspondence, determine the first row number corresponding to the first column number;

[0120] Step S809: Determine the corresponding second row number based on the first row number;

[0121] Step S810: Based on the second correspondence, determine the second column number corresponding to the second row number;

[0122] Step S811: If the first column number and the second column number are the same, determine the first vector data corresponding to the first row number and the first column number as the target data, and determine the row and column coordinates of the first row number and the first column number as the target data;

[0123] Step S812: Based on the first row number and the first column number, determine whether the target data in the vector image matrix is ​​in a valid state;

[0124] Step S813: If the target data is valid, invalidate the data in the row and column corresponding to the first row number and the first column number;

[0125] Step S814: Repeat steps S807 to S813 until all first column numbers have been traversed to obtain all target data of the vector image matrix.

[0126] Through the above steps S801 to S814, the column index and row index of the vector data in the vector image matrix that meet the preset conditions in each row and each column are stored into memory in sequence; according to the column index and row index and the corresponding storage order, the row and column correspondence of each first vector data and each second vector data is determined; by traversing a smaller number of row numbers or column numbers, the number of traversals is reduced, and the positioning efficiency is improved; by comparing the row and column correspondence with the row numbers or column numbers to be traversed, the row and column coordinates of each first vector data and each second vector data are compared to determine the overlapping data between them, thus determining the existence of the target data; the positioning of the target data is completed by matching the row and column coordinates, which reduces the occupation of memory space and improves the positioning efficiency of the target data.

[0127] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0128] In some embodiments, this application also provides a target data positioning device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. The terms "module," "unit," "subunit," etc., used below refer to combinations of software and / or hardware that perform predetermined functions.

[0129] In some embodiments, Figure 9 This is a structural block diagram of the target data positioning device in this embodiment, as shown below. Figure 9 As shown, the device includes:

[0130] The first traversal module 91 is used to traverse the vector image matrix row by row based on the matrix row index, determine the column index of the first vector data in each row based on preset conditions, and store them sequentially.

[0131] The second traversal module 92 is used to traverse the vector image matrix column by column based on the matrix column index, determine the row index of the second vector data in each column based on the preset condition, and store them sequentially.

[0132] The determination module 93 is used to determine the row and column coordinates of the target data based on the column index and its corresponding storage order, and the row index and its corresponding storage order. The target data is determined based on the first vector data and the second vector data.

[0133] In this embodiment, the target data positioning device traverses the vector image matrix row by row based on the matrix row index using the first traversal module 91. It determines the column index of the first vector data in each row based on preset conditions and stores it sequentially, storing the column index of the vector data in each row that meets the preset conditions into memory. The second traversal module 92 traverses the vector image matrix column by column based on the matrix column index. It determines the row index of the second vector data in each column based on the preset conditions and stores it sequentially, storing the row index of the vector data in each column that meets the preset conditions into memory. This eliminates the need to store the vector data itself, saving memory space. The determination module 93 determines the row and column coordinates of the target data based on the column index and its corresponding storage order, as well as the row index and its corresponding storage order. The target data is determined based on the first and second vector data. That is, according to the column index and storage order of the first vector data stored in memory, and the row index and storage order of the second vector data, the row and column coordinate values ​​of the first and second vector data are obtained. The row and column coordinates of the target data are then determined based on these values, achieving target data positioning and solving the problem of high memory resource consumption in target data point positioning methods in related technologies.

[0134] In some embodiments, the determining module includes a first determining submodule and a second determining submodule. The first determining submodule is used to determine the row and column coordinates of each first vector data and each second vector data based on each column index and its corresponding storage order, and each row index and its corresponding storage order. The second determining submodule is used to determine the row and column coordinates of the target data based on the row and column coordinates of each first vector data and each second vector data.

[0135] In this embodiment, the target data positioning device determines the row and column coordinates of each first vector data and each second vector data based on the column index and its corresponding storage order, as well as the row index and its corresponding storage order, through a first determining submodule. It then determines the specific positions of the first and second vector data within the vector image matrix by acquiring the row coordinates of the first vector data that meets preset conditions and the row coordinates of the second vector data that meets preset conditions in each column. Finally, a second determining submodule determines the row and column coordinates of the target data based on the row and column coordinates of the first and second vector data. Based on the specific positions of the first and second vector data within the matrix, it determines whether there are overlapping target data points between the first and second vector data. This method eliminates the need to compare the specific values ​​of the vector data; instead, it determines the target data by comparing the row and column coordinates, reducing memory usage and improving the practicality of the target data positioning method.

[0136] In some embodiments, the first determining submodule includes a first determining unit and a second determining unit. The first determining unit is used to determine a first correspondence between the first column number and the first row number of the first vector data based on each column index and the corresponding storage order. The second determining unit is used to determine a second correspondence between the second row number and the second column number of the second vector data based on each row index and the corresponding storage order.

[0137] In this embodiment, the target data positioning device determines the first correspondence between the first column number and the first row number of the first vector data based on the column index and the corresponding storage order by the first determining unit, and establishes the correspondence between the row and column coordinates of the first vector data; and determines the second correspondence between the second row number and the second column number of the second vector data based on the row index and the corresponding storage order by the second determining unit, and establishes the correspondence between the row and column coordinates of the second vector data, thereby obtaining the row and column coordinates of the first vector data and the second vector data, which forms the basis for traversal and comparison to obtain data.

[0138] In some embodiments, the second determining submodule includes a traversal unit, a third determining unit, and a fourth determining unit. The traversal unit is used to traverse the row and column indices, which are any one of the first column number, the first row number, the second column number, and the second row number. The third determining unit is used to determine, based on the row and column indices, the first correspondence, and the second correspondence, that target data exists in the first vector data and the second vector data, wherein the first row number and the second row number of the target data are the same, and the first column number is the same as the second column number. The fourth determining unit is used to determine that the first row number and the first column number are the row and column coordinates of the target data.

[0139] In this embodiment, the target data positioning device traverses the row and column indices (which can be any one of the first column number, first row number, second column number, and second row number) through a traversal unit, performing a complete row- or column-based traversal of the entire vector image matrix to avoid missing rows or columns. A third determining unit, based on the row and column indices, a first correspondence, and a second correspondence, determines that target data exists in the first and second vector data. The first row number and second row number of the target data are consistent, as are the first column number and second column number. When the row and column indices are completely consistent, the existence of the target data is confirmed. A fourth determining unit determines the first row number and first column number as the row and column coordinates of the target data, obtaining the target data's location. By determining the target data's location through simple data traversal and comparison, the efficiency of target positioning is improved, and memory space usage is reduced.

[0140] In some embodiments, the third determining unit includes a first determining subunit, a second determining subunit, a third determining subunit, and a fourth determining subunit. The first determining subunit is used to determine the first row number corresponding to the first column number based on the first correspondence relationship. The second determining subunit is used to determine the corresponding second row number based on the first row number. The third determining subunit is used to determine the second column number corresponding to the second row number based on the second correspondence relationship. The fourth determining subunit is used to determine the first vector data corresponding to the first row number and the first column number as the target data when the first column number and the second column number are consistent.

[0141] In this embodiment, the target data positioning device determines the first row number corresponding to the first column number based on a first correspondence relationship using a first determining subunit, thereby obtaining the row and column coordinates of the first vector data. It then determines the corresponding second row number based on the first row number using a second determining subunit, and searches for a row number matching the first vector data among the row numbers of each second vector data set. Finally, it determines the second column number corresponding to the second row number based on a second correspondence relationship, thereby obtaining the row and column coordinates of the corresponding second vector data. A fourth determining subunit, when the first column number and the second column number match, determines that the first vector data corresponding to the first row number and the first column number is the target data. When the first vector data matches the second vector data, the existence of the target data is confirmed. By matching the row and column coordinates, the positioning of the target data is completed, reducing memory space usage and improving the positioning efficiency.

[0142] In some embodiments, the second determining submodule further includes a fifth determining unit and an invalidating unit. The fifth determining unit is used to determine whether the target data in the vector image matrix is ​​in a valid state based on the first row number and the first column number. The invalidating unit is used to invalidate the data in the row and column corresponding to the first row number and the first column number if the target data is valid.

[0143] In this embodiment, the target data positioning device determines whether the target data in the vector image matrix is ​​valid based on the first row number and the first column number through the fifth determining unit, thereby avoiding repeated positioning of the target data; and invalidates the data in the row and column corresponding to the first row number and the first column number when the target data is valid through the invalidating unit, thereby improving the positioning efficiency of target data in other rows and columns.

[0144] In some embodiments, the first determining unit includes a sixth determining subunit, a seventh determining subunit, and an eighth determining subunit. The sixth determining subunit is used to determine the first row number corresponding to each column index based on the storage order of each column index. The seventh determining subunit is used to determine the first column number corresponding to each column index based on the value of each column index and the matrix row index value corresponding to the first row number. The eighth determining subunit is used to determine the first correspondence based on the first row number and the first column number corresponding to the column index.

[0145] In this embodiment, the target data positioning device determines the first row number corresponding to each column index based on the storage order of each column index by the sixth determining subunit, thereby obtaining the row number information of the column index; determines the first column number corresponding to each column index based on the value of each column index and the matrix row index value corresponding to the first row number, thereby obtaining the column number information of the column index; and determines the first correspondence based on the first row number and the first column number corresponding to the column index by the eighth determining subunit, thereby obtaining the row and column coordinates of the first vector data corresponding to that column index.

[0146] Furthermore, in conjunction with the target data location method provided in the above embodiments, this embodiment can also provide a storage medium for implementation. The storage medium stores a computer program; when executed by a processor, the computer program implements any of the target data location methods in the above embodiments.

[0147] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.

[0148] It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. All other embodiments derived by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.

[0149] Obviously, the accompanying drawings are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar situations based on these drawings without any creative effort. Furthermore, it is understood that although the work done in this development process may be complex and lengthy, for those skilled in the art, certain design, manufacturing, or production modifications made based on the technical content disclosed in this application are merely conventional technical means and should not be considered as insufficient disclosure of this application.

[0150] The term "embodiment" in this application refers to a specific feature, structure, or characteristic described in connection with an embodiment that may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily imply the same embodiment, nor does it imply that it is mutually exclusive with or independent of other embodiments. It will be clearly or implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0151] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the appended claims.

Claims

1. A method for locating target data, characterized in that, The method includes: Based on the matrix row index, the vector image matrix is ​​traversed row by row to determine the column index of the first vector data in each row that meets the preset conditions and stored sequentially; and Based on the matrix column index, the vector image matrix is ​​traversed column by column to determine the row index of the second vector data in each column that meets the preset condition and stored sequentially. Based on the column index and its corresponding storage order, and the row index and its corresponding storage order, the row and column coordinates of the target data are determined. The target data is determined based on the first vector data and the second vector data, and satisfies the preset conditions of the row and column. Determining the row and column coordinates of the target data based on each column index and its corresponding storage order, and each row index and its corresponding storage order, includes: Based on each column index and its corresponding storage order, and each row index and its corresponding storage order, determine the row and column coordinates of each first vector data and each second vector data; Based on the row and column coordinates of each of the first vector data and each of the second vector data, the row and column coordinates of the target data are determined.

2. The method according to claim 1, characterized in that, The determination of the row and column coordinates of each first vector data and each second vector data based on each column index and its corresponding storage order, and each row index and its corresponding storage order, includes: Based on the column indexes and their corresponding storage order, a first correspondence between the first column number and the first row number of the first vector data is determined; and Based on each row index and its corresponding storage order, a second correspondence between the second row number and the second column number of the second vector data is determined.

3. The method according to claim 2, characterized in that, Determining the row and column coordinates of the target data based on the row and column coordinates of each of the first vector data and each of the second vector data includes: Traverse the row and column indices, where the row and column indices are any one of the first column number, the first row number, the second column number, and the second row number; Based on the row and column numbers, the first correspondence, and the second correspondence, it is determined that target data exists in the first vector data and the second vector data, wherein the first row number and the second row number of the target data are the same, and the first column number and the second column number are the same; The first row number and the first column number are determined as the row and column coordinates of the target data.

4. The method according to claim 3, characterized in that, The row and column number is the first column number, and the step of determining the existence of target data in the first vector data and the second vector data based on the row and column number, the first correspondence, and the second correspondence includes: Based on the first correspondence, determine the first row number corresponding to the first column number; Based on the first row number, determine the corresponding second row number; Based on the second correspondence, determine the second column number corresponding to the second row number; If the first column number is the same as the second column number, the first vector data corresponding to the first row number and the first column number is determined to be the target data.

5. The method according to claim 3, characterized in that, After determining that the first row number and the first column number are the row and column coordinates of the target data, the method further includes: Based on the first row number and the first column number, determine whether the target data in the vector image matrix is ​​in a valid state; If the target data is valid, the data in the row and column corresponding to the first row number and the first column number will be set to invalid.

6. The method according to claim 3, characterized in that, The traversal row and column indices include: Compare the number of row numbers and column numbers, and iterate through the ones with fewer numbers.

7. The method according to claim 2, characterized in that, The step of determining the first correspondence between the first column number and the first row number of the first vector data based on each column index and its corresponding storage order includes: Based on the storage order of each column index, determine the first row number corresponding to each column index; Based on the values ​​of each column index and the matrix row index value corresponding to the first row number, the first column number corresponding to each column index is determined; The first correspondence is determined based on the first row number and the first column number corresponding to the column index.

8. A target data positioning device, characterized in that, The target data positioning device includes: The first traversal module is used to traverse the vector image matrix row by row based on the matrix row index, determine the column index of the first vector data that meets the preset conditions in each row, and store them sequentially. The second traversal module is used to traverse the vector image matrix column by column based on the matrix column index, determine the row index of the second vector data in each column that meets the preset condition, and store them sequentially. The determining module is used to determine the row and column coordinates of the target data based on the column index and its corresponding storage order, and the row index and its corresponding storage order. The target data is determined based on the first vector data and the second vector data and satisfies the preset conditions of the row and column. The determining module includes a first determining submodule and a second determining submodule. The first determining submodule is used to determine the row and column coordinates of each first vector data and each second vector data based on each column index and its corresponding storage order, and each row index and its corresponding storage order. The second determining submodule is used to determine the row and column coordinates of the target data based on the row and column coordinates of each first vector data and each second vector data.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the target data location method according to any one of claims 1 to 7.