A three-dimensional data point search method in an airborne embedded environment
By using hash table compression and preprocessing, the problems of large storage space and slow search speed of 3D data points in airborne embedded environments are solved, enabling fast search and fitting, and making it suitable for embedded environments with limited hardware resources.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAN AVIATION COMPUTING TECH RES INST OF AVIATION IND CORP OF CHINA
- Filing Date
- 2023-08-22
- Publication Date
- 2026-07-14
AI Technical Summary
In airborne embedded environments, existing technologies for 3D data point databases occupy a large amount of storage space and have a slow search speed for adjacent data points.
A hash table is used to compress the range of three-dimensional coordinates. The database is preprocessed and sorted. A key existence judgment table and a hash table are combined for fast lookup. When the target point coordinates do not exist, the data value is fitted by two-dimensional search and three-dimensional linear interpolation.
It effectively reduces storage space waste, enables fast search and fitting, and is suitable for embedded environments with limited hardware resources.
Smart Images

Figure CN117762918B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer software applications, and in particular to a method for searching three-dimensional data points in an airborne embedded environment. Background Technology
[0002] In aerospace electromechanical applications, there exists a three-dimensional data point with coordinates H, α, and β, denoted as (H, α, β), where H is a floating-point number, α is an integer, and β is an integer. Each data point corresponds to four values, v1, v2, v3, and v4, all of which are floating-point numbers.
[0003]
[0004] Given a large number of 3D data points, it is required to specify a coordinate (H) t α t ,β t After that, it is necessary to be able to search for matching data points P from the existing data points. t (H t α t ,β t v 1t v 2t v 3t v 4t Or fit P in the absence of matching data points f (H f α f ,β f v 1f v 2f v 3f v 4f Furthermore, it requires real-time operation in embedded environments with limited hardware resources. Existing methods suffer from large database storage requirements and slow adjacent data point search speeds. Summary of the Invention
[0005] In view of this, the present invention provides a three-dimensional data point search method in an airborne embedded environment to solve the technical problems of large database storage space occupation and slow adjacent data point search speed in the prior art.
[0006] The present invention provides a method for searching three-dimensional data points in an airborne embedded environment, comprising: Step 1, compressing the three-dimensional coordinate range of a database using a hash table to obtain the compressed database, wherein the hash table is obtained based on the database and the database includes multiple data points;
[0007] Furthermore, step one also includes: preprocessing the database and sorting each data point (H, α, β) in the database: sorting in ascending order of α when α elements are different, sorting in ascending order of β when α elements are the same, and sorting in ascending order of H when α and β elements are the same; and compressing the sorted database using a hash table.
[0008] Furthermore, the preprocessed database is stored in Flash memory.
[0009] Step 2: Obtain the target point coordinates, establish a keyword existence judgment table, and use the keyword existence judgment table and hash table to search for the target point coordinates in the database to obtain the search results; if the search results indicate that the target point coordinates exist, output the target point data value; if the search results indicate that the target point coordinates do not exist, execute Step 3 and Step 4.
[0010] Step 3: If the target point coordinates do not exist, use the target point coordinates (H) t α t ,β t Centered on αβ, find four two-dimensional data points that satisfy the two-dimensional search conditions in the αβ plane, and search for the eight closest fitting data points to the four two-dimensional data points along the directions of H increasing and H decreasing respectively.
[0011] Furthermore, in step three, the target point coordinates (H) are used. t α t ,β t ) of α t β t A search circle is constructed with the center as the center, and the radius of the search circle is controlled by a combination of doubling and binary search to obtain the two-dimensional data points.
[0012] Step 4: Fit the data values of the target point to the fitted data points to obtain the fitted data value of the target point.
[0013] Furthermore, in step four, three-dimensional linear interpolation is used to fit the data values of the target point.
[0014] Compared with the prior art, the beneficial effects that can be achieved by the above-mentioned at least one technical solution adopted by the present invention include at least the following: The present invention provides a three-dimensional data point search method in an airborne embedded environment, which uses multiple hash tables to compress the three-dimensional coordinate range, efficiently stores large-scale three-dimensional data points, and effectively reduces the waste of storage space while ensuring fast search. Attached Figure Description
[0015] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart illustrating a three-dimensional data point search method in an airborne embedded environment provided by an embodiment of the present invention. Detailed Implementation
[0017] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0018] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. This application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0019] This invention provides a three-dimensional data point search method in an airborne embedded environment. It uses multiple hash tables to compress the three-dimensional coordinate range, efficiently stores large-scale three-dimensional data points, and effectively reduces storage space waste while ensuring fast search.
[0020] like Figure 1 As shown, the present invention provides a method for searching three-dimensional data points in an airborne embedded environment, comprising:
[0021] Step 1: Compress the three-dimensional coordinate range of the database using a hash table to obtain the compressed database. The hash table is obtained based on the database, and the database includes multiple data points.
[0022] Furthermore, step one also includes: preprocessing the database and sorting each data point (H, α, β) in the database: sorting in ascending order of α when α elements are different, sorting in ascending order of β when α elements are the same, and sorting in ascending order of H when α and β elements are the same; and compressing the sorted database using a hash table.
[0023] Furthermore, the preprocessed database is stored in Flash memory.
[0024] Specifically, the database is first preprocessed and pre-stored. Preprocessing: All data points are sorted in ascending order, first α, then β, and finally H. That is, if α and β are the same, H is sorted in ascending order; if α is the same, β is sorted in ascending order; and so on. Let the minimum value of α, β, and H be denoted as α... min ,β min H min Let the maximum values of α, β, and H be α, β, and H respectively. max ,β max H max Pre-storage: Pre-processed data points are stored in Flash memory to ensure data points are not lost after power failure. Before the search and fitting process, 3D data points are stored in Flash memory. Since Flash memory read speed is slower than RAM, 3D data points are read from Flash memory and then stored in RAM to accelerate the search and fitting process.
[0025] Considering that H is a floating-point number, α is an integer, and β is an integer in (H, α, β), in order to achieve fast lookup, (H, α, β) is rounded down to (x, y, z), and the relationship is shown in equation (1):
[0026]
[0027] Since the H intervals in the data are large, the case where [] is the same under the same α and β does not occur. Therefore, the case where z is the same after rounding multiple floating-point Hs can be disregarded.
[0028] The data points P(z, x, y, v1, v2, v3, v4) are stored using a three-dimensional array in C language. Since C language array indices start from zero, (xx...) min yy min ,zz min Using ) as array indices, we can determine whether a data point exists and, if it does, v1, v2, v3, v4 based on the time complexity. Correspondingly, the required storage space is (in bytes): (z max -z min +1)×(x max -x min +1)×(y max -y min +1)×16.
[0029] The size of the three-dimensional array can be determined by equation (2):
[0030]
[0031] Since the data points are not contiguous along the x, y, and z axes, this results in wasted storage space. The required storage space is several to tens of times, or even more, than that required for dense storage of existing data points. This is tolerable for small datasets, but clearly unacceptable for larger datasets. Therefore, a hash table is used to compress the coordinates, transforming the discontinuous coordinates of the data points into contiguous ones after mapping them through the hash table.
[0032] Suppose that after sorting x in ascending order, there are a distinct numbers. Let S denote these a distinct x. x ={x1, x2, x3, ..., x a} is called the x sequence.
[0033] For {x1, x2, x3, ..., x...} a Each element x in} i Let i = 1, 2, ..., a, each corresponding to a sequence of y. There are a total of a y sequences, and the number of elements in these a y sequences is denoted as b1, b2, ..., b... a Let these a sequences of y be denoted as .
[0034] For each element in the *a* y sequences, there is a corresponding z sequence, denoted as S. z,i,j i = 1, 2, ..., a, j = 1, 2, ..., b i .
[0035] For example: x1 corresponds to a set of y sequences There are b1 elements, and x2 corresponds to a set of y sequences. There are b2 elements.
[0036] Use the following hash table to compress database storage space:
[0037] x requires one table, denoted as T. x The table length is a.
[0038] y needs a tables, denoted as T. y,1 T y,2 , ..., T y,a The table lengths are b1, b2, ..., b a .
[0039] z requires b1 + b2 + b3 + ... + b a Zhang Biao, denoted as T z,1,1 , ..., T z,1,b1 T z,2,1 , ..., T z,2,b2 ,..,T z,a,b1 , ..., T z,a,ba, The table lengths are c respectively. 1,1 c1,b1 c 2,1 c 2,b2 c a,1 c a,ba .
[0040] After being compressed using a hash table, the size of the three-dimensional array is as shown in equation (3):
[0041]
[0042] The sizes of the three-dimensional arrays before and after compression are shown in Table 1 below:
[0043] Table 1: Size of the 3D array before and after compression
[0044]
[0045] As shown in Table 1, the size of the three-dimensional array is effectively reduced after hash table compression, significantly reducing memory overhead. This makes the search method easier to implement in embedded environments with limited hardware resources, or allows for searching on more data points with the same hardware resources.
[0046] Step 2: Obtain the target point coordinates, establish a keyword existence judgment table, and use the keyword existence judgment table and hash table to search for the target point coordinates in the database to obtain the search results; if the search results indicate that the target point coordinates exist, output the target point data value; if the search results indicate that the target point coordinates do not exist, execute Step 3 and Step 4.
[0047] Specifically, this involves finding / retrieving target data points. A key existence check table is established, combined with a hash table, to achieve fast lookup of target data points. When the target data point exists, its value is quickly provided; if it does not exist, the key existence check table directly indicates that the target does not exist. The target point coordinates are (Ht, αt, βt), which are converted to (x, y, z). Then (xx...) min yy min ,zz min ) is used as the subscript of a three-dimensional array, denoted as (x xb y xb , z xb Based on step one, obtain the hash table described in Table 2:
[0048] Table 2: Hash Table
[0049]
[0050] Specifically, taking x as an example, if the input coordinates x xb It does not exist in the database, i.e., hash table H. xThere is no keyword x in the text. xb Then x xb After hash mapping H x The resulting hash address H x (x xb The hash address is meaningless; there is no data point at that hash address. Therefore, when x is... xb As the key, it is used in hash mapping H x Before obtaining the hash address to access the data point, x should first be determined. xb Is it a hash table H? x The keyword. Taking x as an example again, to determine x... xb Is it a hash table H? x Keywords, construct table H x Keyword Existence Judgment Table E x Table H x The key exists in the judgment table, which is the x sequence S. x ={x1, x2, x3, ..., x a When input x xb Then, based on x1 and x a By combining this with the binary search method, x can be quickly determined. xb Is it a hash table H? x The key is used for the judgment, and the judgment for other hash tables is similar. First, based on the judgment table E... x Determine x xb Is it a keyword? If not, it means the x-coordinate is x. xb If the data point does not exist, the search ends. If it does, then use x... xb Hash function for key / table H x Obtain the hash address H x (x xb ).
[0051] Then, according to H x (x xb Determine E y and H y If according to E y , determine y xb If it does not exist, it means the y-coordinate is y. xb If the data point does not exist, the search ends. If it does, then H... y , and y xb Hash function / table H y Obtain the hash address H y , (y xb ).
[0052] Finally, according to H x (x xb ) and H y , (y xb Determine Ez and H z If according to E z Determine z zb If it does not exist, it means the z-coordinate is z. xb If the data point does not exist, the search ends. If it does, then use H... x (x xb H y ,﹒ (y xb ), Hz, (y zb The target data points v1, v2, v3, and v4 are obtained.
[0053] Step 3: If the target point coordinates do not exist, use the target point coordinates (H) t α t ,β t Centered on αβ, find four two-dimensional data points that satisfy the two-dimensional search conditions in the αβ plane, and search for the eight closest fitting data points to the four two-dimensional data points along the directions of H increasing and H decreasing respectively.
[0054] Furthermore, in step three, the target point coordinates (H) are used. t α t ,β t ) of α t β t A search circle is constructed with the center as the center, and the radius of the search circle is controlled by a combination of doubling and binary search to obtain the two-dimensional data points.
[0055] Specifically, when the coordinates of the target point cannot be found, four points in the XY plane that satisfy the following two-dimensional search conditions are found, centered on the coordinates of the target point, as shown in equation (4):
[0056]
[0057] To find four points that satisfy the above conditions, in the XY plane, with the target data point coordinates as the center, let the initial value of radius r be 1, and determine whether there are x, y coordinates that satisfy the conditions shown in equation (5) within a circle of radius r:
[0058]
[0059] As r increases, the first p to satisfy the above conditions a p b p c p d That is, p α p β p γ p δ To speed up the search, r is initially set to 1. When there are no p values within the circle that satisfy the condition... ap b p c p d When r is multiplied by 2, if there are multiple p that satisfy the condition... a p b p c p d When the value of r is backed up to r / 2, a binary search is performed to search up to r to quickly obtain p. α p β p γ p δ .
[0060] According to p in the z-axis direction α p β p γ p δ A search is performed to obtain 8 data points in the z-direction for fitting. When the target data point does not exist in the existing data points, the radius of the circle is controlled by a combination of doubling and binary search, with the target data point coordinates as the center and an initial radius of 1. It is then determined whether there are four data points for fitting within the circle, thus obtaining eight data points for fitting.
[0061] Specifically, after obtaining p α p β p γ p δ Since the data points have already been sorted in ascending order (x, then y, then z) during preprocessing and pre-storage, P can be obtained easily and quickly. A P B P C P D P E P F P G P H That is, the 8 fitted data points that are closest to the 4 two-dimensional data points, as shown in equation (6):
[0062]
[0063] Step 4: Fit the data values of the target point to the fitted data points to obtain the fitted data value of the target point.
[0064] Furthermore, in step four, three-dimensional linear interpolation is used to fit the data values of the target point.
[0065] Specifically, input the above P A P B P C P D P E P F PG P H For the data points used for fitting, three-dimensional linear interpolation is used to obtain the fitted value of the target data point, that is, to fit an estimated value of the target data based on the existing data points around the target data point.
[0066] The embodiments of the present invention achieve the following technical effects:
[0067] 1. This invention uses multiple hash tables to compress the range of three-dimensional coordinates, efficiently store large-scale three-dimensional data points, and effectively reduce the waste of storage space while ensuring fast search.
[0068] 2. This invention achieves fast lookup of target data points by establishing a keyword existence judgment table and combining it with a hash table. When the target data point exists, the value of the target data point is quickly given. When the target data point does not exist, the target does not exist directly based on the keyword existence judgment table.
[0069] 3. This invention can fit an estimated value of a target data point based on existing data points around the target data point, and quickly search for target data points or fit the target data point when it does not exist.
[0070] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for searching three-dimensional data points in an airborne embedded environment, characterized in that: Step 1: Compress the three-dimensional coordinate range of the database using a hash table to obtain the compressed database. The hash table is obtained based on the database, and the database includes multiple data points. Step 2: Obtain the target point coordinates, establish a keyword existence judgment table, and use the keyword existence judgment table and hash table to search for the target point coordinates in the database to obtain the search results; if the search results indicate that the target point coordinates exist, output the target point data value; if the search results indicate that the target point coordinates do not exist, continue to execute Step 3 and Step 4. Step 3: If the target point coordinates do not exist, use the target point coordinates ( H t , α t , β t Centered on αβ, find four two-dimensional data points that satisfy the two-dimensional search conditions in the αβ plane, and search for the eight fitting data points that are closest to the four two-dimensional data points along the directions of H increasing and H decreasing, respectively. Step 4: Fit the data values of the target point to the fitted data points to obtain the fitted data value of the target point; Step one also includes: The database is preprocessed by sorting the data points with coordinates (H, α, β) in the database: when the α elements are different, they are sorted in ascending order of α; when α is the same, they are sorted in ascending order of β; when both α and β are the same, they are sorted in ascending order of H; the sorted database is then compressed using a hash table.
2. The method for searching three-dimensional data points in an airborne embedded environment according to claim 1, characterized in that, The preprocessed database is stored in Flash.
3. The method for searching three-dimensional data points in an airborne embedded environment according to claim 1, characterized in that, In step three, the target point coordinates are respectively ( H t , α t , β t )middle α t , β t A search circle is constructed with the center as the center, and the radius of the search circle is controlled by a combination of doubling and binary search methods to obtain the two-dimensional data points that satisfy the two-dimensional search conditions.
4. The method for searching three-dimensional data points in an airborne embedded environment according to claim 1, characterized in that, In step four, three-dimensional linear interpolation is used to fit the data values of the target point.
Citation Information
Patent Citations
Data search method and device, electronic equipment and storage medium
CN112699223A
Method for Creating a Scalable Graph Database Using Coordinate Data Elements
US20080243908A1