Embedded star catalogue data storage and query method oriented to bare computer environment
By employing GeoHash encoding and B+ tree structure for star block storage in a bare-metal DSP environment, the real-time performance issue of star chart querying in a bare-metal DSP environment is solved, achieving efficient star table data querying and storage.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-03-13
AI Technical Summary
In embedded platforms, under the bare-metal environment of DSPs, traditional star map storage and query technologies are difficult to meet real-time requirements. Due to resource constraints, existing technologies cannot effectively deploy efficient star map query methods.
GeoHash encoding technology is used to store star blocks, and B+ tree structure is used for indexing. Combined with the initial selection of star blocks and the determination of navigation stars, efficient querying of star table data is achieved.
Low-latency, high-throughput star table data query was achieved in the DSP bare-metal environment, improving query speed and storage efficiency, and adapting to multi-core parallel computing.
Smart Images

Figure CN121658482A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of embedded data query and processing technology, specifically to an embedded star table data storage and query method for bare-metal environments. Background Technology
[0002] With the rapid development of modern astronomical optical imaging technology, the image resolution and frame rate of scientific cameras have continued to improve, leading to a dramatic increase in the amount of data in astronomical images. This poses a severe challenge to traditional image processing systems based on general-purpose central processing units (CPUs): on the one hand, the massive amount of image data places extremely high demands on the system's memory bandwidth and computing power, making it increasingly difficult for the CPU to handle such tasks and meet real-time requirements; on the other hand, in embedded platforms such as satellites, space probes, and portable astronomical observation instruments, the problem cannot be solved by infinitely improving CPU performance due to limitations in size, weight, power consumption, and cost.
[0003] Digital Signal Processors (DSPs), with their Harvard architecture, hardware multiply-accumulate units, and parallel processing capabilities, possess natural advantages in handling streaming data and intensive mathematical computations, making them ideally suited for processing astronomical image data in embedded platforms. However, DSPs typically operate in a "bare-metal environment" without an operating system or with only a lightweight real-time operating system. In such resource-constrained scenarios, traditional star map storage and query techniques, which rely on large amounts of memory and complex virtual memory management, are difficult to deploy effectively, and their performance and efficiency cannot meet the demands of real-time tasks. Existing general-purpose query methods heavily rely on virtual memory management to achieve flexible data structures and dynamic memory allocation, which conflicts with the programming model of DSPs operating in a bare-metal environment or a lightweight real-time operating system that directly manipulates physical addresses and emphasizes the locality of data access.
[0004] There is an urgent need in this field for an innovative technology that can fundamentally solve the mismatch between DSP architecture and star chart query tasks, and achieve low-latency, high-throughput querying of massive star chart data in a bare-metal environment. Summary of the Invention
[0005] To address the mismatch between DSP architecture and star chart query tasks in existing technologies, this invention provides an embedded star table data storage and query method for bare-metal environments.
[0006] An embedded star table data storage and query method for bare-metal environments, the method is implemented by the following steps:
[0007] Step 1: Star Block Storage;
[0008] Step 11: During the observation period, calculate the visible sky range based on the station location, and divide the sky into visible and invisible sky areas;
[0009] Steps one and two: Store the stars in the visible sky region of the star catalog as star blocks, that is: store star blocks; specifically:
[0010] Stars with high declination are classified as polar star blocks. Stored in the form of The declination of polar star clusters; stars in the visible sky region are assigned their right ascension. and declination The ranges are respectively , Storage is performed, namely: general area star blocks. ;in, , and , Right ascension Upper and lower limits and declination The upper and lower bounds;
[0011] Step 13: Use GeoHash encoding technology to encode the stars in the visible sky area, use them as the primary key value, and use a B+ tree storage structure to complete the storage of star blocks;
[0012] Step 2: Initial selection of star blocks;
[0013] Setting the star map captured by the astronomical camera to Divide the star map into sections centered on the image. If the range of the star map's position is... R is the camera's field of view radius; therefore, the star map is said to fall entirely on polar star blocks, and the initially selected star blocks are polar star blocks. If the range of the star map position is Then, based on the declination of the upper edge of the star map Define the range of right ascension direction in the general area star blocks to further determine the initial star blocks;
[0014] Step 3: Determining the navigation satellite;
[0015] Select the storage star blocks that share common parts with the initial star blocks obtained in step two as the calibration stars of the initial star blocks, and arrange the calibration stars in order from brightest to darkest to form an authentication calibration star table, so as to realize the star table data query.
[0016] The beneficial effects of this invention are:
[0017] 1. The storage and query method described in this invention employs GeoHash encoding technology during the storage of geographic blocks. This encoding technology has the following advantages: local order preservation, meaning that spatially proximate blocks have closely spaced codes; geometric intuitiveness, meaning that the code length represents the degree of grid subdivision, and code growth indicates grid subdivision along latitude and longitude; and it is a mature and standardized geocoding technology, currently the most commonly used. Furthermore, considering the low computing power and limited storage space in bare-metal environments, this encoding technology uses spatial encoding instead of composite lookups, which is not only faster but also avoids wasting storage space.
[0018] 2. The storage and query method described in this invention uses GeoHash codes as primary keys for stars within the visible sky area, storing them in an easily searchable format. Specifically, it employs a B+ tree structure, which has the following characteristics: First, it has a balanced multi-way tree, optimizing search efficiency and evening out search overhead; second, the tree only stores indexes, not data, reducing data space; third, all data is stored in leaf nodes, further evening out search overhead; and fourth, leaf nodes are linked by linked lists, further optimizing range search capabilities. The four-layer structure for storing 100 GeoHash codes in a B+ tree is as follows: Figure 2 (As shown) is stored.
[0019] 3. The storage and query method described in this invention, for star images (referred to as star maps) captured by astronomical cameras, initially decomposes them into preliminary selected star blocks using a partitioning method, and then queries the corresponding stored star blocks in the bare-metal environment, which has high flexibility and adaptability. This method is compatible with the GeoHash encoding method, which is beneficial for parallel computing on multi-core bare-metal machines and can speed up the query speed many times over. Attached Figure Description
[0020] Figure 1 This is a diagram illustrating the effect of calculating the visible sky area in an embedded star catalog data storage and query method for bare-metal environments as described in this invention.
[0021] Figure 2 A schematic diagram of a four-layer structure for storing 100 GeoHash codes in a B+ tree;
[0022] Figure 3 This is a schematic diagram of the initial selection of the right ascension range of star blocks when the declination of the star map is below the transition point; where (a) is a schematic diagram of the position of the star map on the celestial sphere at this time; and (b) is a schematic diagram of the projection of this star map onto the circular surface enclosed by the celestial equator.
[0023] Figure 4 This is a schematic diagram of the right ascension range of the initial selected star blocks in the lower polar region when the declination altitude of the star map is above the transition point; where (a) is a schematic diagram of the position of the star map on the celestial sphere at this time; and (b) is a schematic diagram of the spherical triangle when calculating the right ascension range of the initial selected star blocks in this star map.
[0024] Figure 5 This is a schematic diagram of the calculation range for the initial star block selection. Detailed Implementation
[0025] Combination Figures 1 to 4 This embodiment describes an embedded star table data storage and query method for a bare-metal environment. In this embodiment, the DSP model is TMS320C6678, with 8 cores, a maximum clock speed of 1.25GHz, 2GB of DDR3 memory, 256MB of NAND Flash storage, and related interfaces including PCIe, SATA, RS422, and one FMC port that can be used for expansion.
[0026] The method described in this embodiment includes two main parts: star block storage and star block filtering; it is specifically implemented by the following steps:
[0027] Step 1. Star block storage;
[0028] Step 1-1. During the observation period, calculate the visible starry sky range based on the geographical location of the station. The specific method is to calculate the direction vector from the Earth's center to the station. Go to the Earth's core vertical plane , The entire sky is divided into two parts: visible and invisible.
[0029] Steps 1-2. Filter out the stars in the visible sky region of the star catalog and store them in the DSP as star blocks (i.e., store star blocks). First, store stars with larger declinations as polar star blocks. Stored in the form of, where, Let be the declination of the polar region. Under this definition, the spherical radius of the polar region is . ,Require The right ascension of all stars in the visible sky region is greater than the camera's field of view radius R. Then, the right ascension of all stars in the visible sky region is determined by the common area's star clusters. and declination The ranges are respectively , The format of storage (polar star blocks are actually stored twice, that is: once according to the polar method and once according to the ordinary visible sky area) is called ordinary area star block. ;in, , and , Right ascension Upper and lower limits and declination The upper and lower bounds;
[0030] Steps 1-3. For stars in the visible sky region, based on the required storage encoding precision, GeoHash encoding is used to encode them and these codes serve as primary keys. The data is then stored using a B+ tree storage structure. Specifically:
[0031] The right ascension and declination of stars are alternately encoded into a base-32 prefix index code; in the celestial coordinate system, one GeoHash code corresponds to a range of... , The Puqu Star Block It should be noted that, according to the definition of GeoHash in the geographic latitude and longitude representation, the right ascension needs to be subtracted by 180° for encoding.
[0032] In this embodiment, a 3-bit Base-32 GeoHash code is used (3 bits of Base-32 correspond to 15 bits of binary code), corresponding to an 8-bit binary code for right ascension and a 7-bit binary code for declination. In terms of precision, the 3-bit code corresponds to a spherical grid with an error of ±0.7 degrees. Thus, for a right ascension range of... The range of declination is within The number of GeoHash spherical squares that need to be completely covered by the general area star block is:
[0033] ;in, It is half the right ascension range of the Puqu constellation. It is half the declination range of the Puqu constellation; This is the floor symbol.
[0034] In this embodiment, the 3-bit GeoHash code is calculated and used as the primary key value. It is stored in a searchable format, and a feasible approach is a B+ tree. This storage structure has the following characteristics: First, it has a balanced multi-way tree, which optimizes search efficiency and evens out search overhead; second, the tree only stores indexes, not data, reducing data space; third, all data is stored in leaf nodes, further evening out search overhead; fourth, leaf nodes are linked by linked lists, further optimizing range search capabilities. 100 GeoHash codes are stored in the B+ tree using a 4-level structure, as follows: Figure 2 As shown.
[0035] In this embodiment, the specific advantages of the GeoHash encoding technology include: local order preservation, meaning that spatially proximate regions have similar codes; geometric intuition, meaning that the code length represents the degree of grid subdivision, and code growth indicates grid subdivision along latitude and longitude; and maturity and standardization, making it the most commonly used geocoding technology currently. Furthermore, this technology uses spatial encoding instead of composite lookup, which is not only faster but also reduces on-chip storage space waste.
[0036] Based on the star block storage in step 1, star table data query is performed. The star table data query includes two steps: initial selection of star blocks and determination of navigation stars.
[0037] Step 2. Initial selection of star blocks;
[0038] Step 21. If the star map (or star chart) taken by the astronomical camera is in... With the image center as the center and the camera's field of view radius as R, we can consider dividing the star map and using a preliminary selection of star blocks to replace the original star map.
[0039] If the lower edge of the star chart has a declination Declination greater than or equal to polar star blocks ,Right now: At this point, it indicates that the observation position is relatively high (higher than). Figure 5 Point E in the diagram, the location of point E. If the star map falls entirely on a polar block, then the initially selected block is the polar block. Otherwise, that is: Proceed to step 22;
[0040] Step 22. Based on the declination at the top edge of the star chart Define the range of the right ascension direction in the general area star block; such as Figure 3 As shown. Among them, Figure 3 (a) is a schematic diagram of the position of the star map on the celestial sphere at this time; (b) is a schematic diagram of the projection of the star map onto the circular surface enclosed by the celestial equator.
[0041] When the upper edge of the star map is low, the tangent along the edge of the star map should be selected as the right ascension limit of the initial general area star block, and the projection method is used to calculate formula (1):
[0042] (1)
[0043] After sorting, we can obtain:
[0044] Step 23. When the upper edge of the star chart is high (the upper edge of the star chart is near the celestial pole, but the lower edge of the star chart is still below the polar region, i.e.) ),like Figure 4 As shown, (a) is a schematic diagram of the star map's position on the celestial sphere at this time; (b) is a schematic diagram of the spherical triangle used to calculate the initial right ascension range of the star blocks in this star map; the declination of the selected polar star blocks is shown. The right ascension value of point A, which intersects with the edge of the star map, is taken as the right ascension limit of the initial selected general area star block (at this time, it is the lower general area star block of the polar region). Point B is the center of the star map. Equation (2) is obtained by using the cosine theorem of spherical triangles:
[0045] (2)
[0046] After sorting, we can obtain:
[0047] Step 24. Combine (1) and (2) to avoid the initial star block being too large. Thus, equation (3) is derived.
[0048] (3)
[0049] The transition point condition in the simultaneous equation (3) can be obtained from the bipartite equation (4). Mathematical derivation shows that... ,and It can be expressed as follows:
[0050] (4)
[0051] In the formula, Transition point ( Figure 5 (Point C in the middle).
[0052] Step 25. Based on the transition point determined in Step 24, select the initial star block, such as... Figure 5 As shown.
[0053] (1) When When (i.e., below) Figure 5 Point C in the middle) selects the general area star block. As a preliminary star block, at this time... The value is case1 in equation (3);
[0054] (2) When and At times, (such as) Figure 5 Between points C and D, the position of point D is... The initial selection of satellite blocks is divided into two parts: polar region and sub-polar region satellite blocks. ,(at this time, The values are taken from case 2 in equation (3) and the polar region upper general region star block. ,at this time, The value is case1 in equation (3);
[0055] (3) When and At times, (such as) Figure 5 The initial star block (between points D and E) is divided into two parts, namely the polar star block. and polar region sub-region star block ,at this time, The value is case2 in equation (3).
[0056] In this embodiment, if the above (1) to (3) calculations of the general area star blocks yield... or At that time, since the range of right ascension is always between 0 and 1, The value should be taken between these two ranges, and the block should be divided into two general area blocks for processing.
[0057] In this embodiment, the sky area covered by a single frame of starry sky image can always be covered by 1 to 4 initially selected star blocks.
[0058] Step 3. Determining the navigation satellite;
[0059] The navigation star is determined using the initial star block selection in step 2; the specific steps are as follows:
[0060] Step 31. Select storage blocks, that is, select storage blocks that share common areas with the initially selected blocks. The initially selected blocks may contain polar region blocks. In this case, it can be directly retrieved from the DSP. For general area satellite blocks... First, calculate its four vertices. , , and The GeoHash encodings are the extreme vertex positions of the storage area.
[0061] Step 32. Select calibration stars. From the storage star blocks selected in Step 31, select calibration stars for the initially selected star blocks. The calibration stars must meet the following conditions. , ;in, The upper and lower limits of right ascension and declination for observing star charts;
[0062] Step 33. Authenticate the calibration stars selected in Step 32. Perform stellar self-correction on the selected calibration stars and arrange them in order of magnitude from brightest to darkest to form a new star catalog. In this embodiment, arranging the calibration stars in order of brightness to darkness can improve the speed and accuracy of subsequent star chart matching.
[0063] Table 1 shows the timeliness of data storage and search queries using the storage and retrieval method of this invention.
[0064] Table 1
[0065]
[0066] As shown in Table 1, the query time only differs by 0.014 seconds when the number of stored star blocks changes from 1,000 to 10 million. This demonstrates that the storage and query method described in this embodiment has a fast query speed.
[0067] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0068] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. An embedded star table data storage and query method for bare-metal environments, characterized by: This method is implemented by the following steps: Step 1: Star Block Storage; Step 11: During the observation period, calculate the visible sky range based on the station location, and divide the sky into visible and invisible sky areas; Steps one and two: Store the stars in the visible sky region of the star catalog as star blocks, that is: store star blocks; specifically: Stars with high declination are classified as polar star blocks. Stored in the form of The declination of polar star masses; Stars in the visible sky are arranged according to their right ascension. and declination The ranges are respectively , Storage is performed, namely: general area star blocks. ;in, , and , Right ascension Upper and lower boundaries and declination The upper and lower bounds; Step 13: Use GeoHash encoding technology to encode the stars in the visible sky area, use them as the primary key value, and use a B+ tree storage structure to complete the storage of star blocks; Step 2: Initial selection of star blocks; Setting the star map captured by the astronomical camera to Divide the star map into sections centered on the image. If the range of the star map's position is... R is the camera's field of view radius; therefore, the star map is said to fall entirely on polar star blocks, and the initially selected star blocks are polar star blocks. If the range of the star map position is Then, based on the declination of the upper edge of the star map Define the range of right ascension direction in the general area star blocks to further determine the initial star blocks; Step 3: Determining the navigation satellite; Select the storage star blocks that share common parts with the initial star blocks obtained in step two as the calibration stars of the initial star blocks, and arrange the calibration stars in order from brightest to darkest to form an authentication calibration star table, so as to realize the star table data query.
2. The embedded star table data storage and query method for bare-metal environment according to claim 1, characterized in that: In step one, the direction vector from the geocenter to the station is calculated during the observation period. Go to the Earth's core vertical plane , The entire sky is divided into visible sky areas and invisible sky areas.
3. The embedded star table data storage and query method for bare-metal environment according to claim 1, characterized in that: In steps one and two, the spherical radius of the polar region star block is set to... ,Require It is greater than the camera's field of view radius R.
4. The embedded star table data storage and query method for bare-metal environment according to claim 1, characterized in that: In steps one and three, GeoHash encoding technology is used to alternately encode the right ascension and declination of stars in the visible sky region into the Base-32 prefix index code; on the celestial sphere, one GeoHash code corresponds to a range of... , The Puqu Star Block According to the definition of GeoHash in the geographic latitude and longitude representation, the right ascension minus 180° is encoded.
5. The embedded star table data storage and query method for bare-metal environment according to claim 4, characterized in that: Using a 3-bit Base-32 GeoHash code, for a right ascension range of... The declination range is The number of GeoHash spherical squares completely covered by the general area star block is ;in, It is half the right ascension of the Puqu constellation. It is half the declination of the Puqu constellation. This is the floor symbol.
6. The embedded star table data storage and query method for bare-metal environment according to claim 4, characterized in that: In step two, the method for further determining the initial star blocks is as follows: First, when the upper edge of the star chart is low, the tangent along the edge of the star chart is selected as the initial right ascension limit of the star block; Formula 1 ; Secondly, when the upper edge of the star chart is high and located near the pole, select the declination of the polar star blocks. The intersection point with the edge of the star map is taken as the right ascension limit of the initial star block, expressed by the following formula: Formula 2 ; By combining the two formulas above, we can obtain the transition point. The transition point and It can be expressed as follows: ; Then, the initial star blocks are determined based on the transition points, specifically in the following cases: when When that happens, select the general area star block. As a preliminary star block, among them Calculate using Formula 1; when and At that time, the initial selection of star blocks is divided into two parts: polar region sub-general region star blocks. ,in, Calculations were performed using Formula 2; and the polar region upper general region star blocks. ,in, Calculate using Formula 1; when and At that time, the initial selection of star blocks was divided into two parts: polar star blocks. And polar sub-regional star blocks ,in, Calculate using Formula 2.
7. The embedded star table data storage and query method for bare-metal environment according to claim 1, characterized in that: In step three, the navigation star is determined using the initial selected star blocks, which contain polar star blocks. In the case of a specific location, the navigation star is selected directly from the storage block; for general area blocks... Then calculate its four vertices. , , and The GeoHash encoding is the limit vertex position of the storage area.
8. The embedded star table data storage and query method for bare-metal environment according to claim 7, characterized in that: The calibration star meets the following conditions: , ,in, , , , The upper and lower limits of right ascension and declination for observing star charts.
9. The embedded star table data storage and query method for bare-metal environment according to claim 8, characterized in that: The selected calibration stars are arranged in order of brightness (brighter than darker) to form a new star catalog.