A method and system for optimizing the retrieval of astronomical star catalogs
By constructing query tables and maintenance tables, and combining binary search and angular distance calculation, the problems of slow retrieval speed and missing edge data in massive astronomical star catalogs are solved, achieving efficient and accurate astronomical star catalog retrieval.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-08
- Publication Date
- 2026-04-03
AI Technical Summary
When rapidly locating celestial information in a specific region within a massive astronomical catalog, existing methods suffer from slow retrieval speed, insufficient accuracy, and omission of marginal data.
Build query tables and maintenance tables, narrow the search scope through binary search and indexing techniques, and solve edge problems by combining angular distance calculations of right ascension and declination ranges, thereby improving search speed and accuracy.
It effectively solves the problem of missing edge data without reducing retrieval speed, ensures retrieval accuracy, and improves the efficiency and accuracy of astronomical catalog retrieval.
Smart Images

Figure CN116521949B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an optimization method for retrieving astronomical star catalogs, belonging to the field of rapid retrieval of astronomical star catalogs. Background Technology
[0002] In astronomical research, astronomers observe and study celestial information in specific regions. Whether locating this data within a vast astronomical catalogue or quickly pinpointing celestial objects during astronomical observation, fast search speeds are essential. When searching astronomical catalogues, the search object is the entire sky, encompassing over a billion catalogues, and this number continues to increase with the advancement of observational equipment.
[0003] Reducing the scope of star catalog data that needs to be calculated efficiently is a challenge when dealing with massive star catalogs. With the improvement of astronomical observation equipment performance and the demand for multi-band observation, the amount of astronomical star catalog data is incomparable. If all the star catalog data were loaded into memory for calculation to find celestial objects that meet our requirements, the time cost of reading and calculation would be enormous and unacceptable. To reduce the amount of star catalog data that needs to be read into memory, the mainstream method in the field of astronomical star catalog retrieval is to divide the entire sky into numerous grids and encode them. The goal is to map points on the celestial surface to the divided grids, reducing the two-dimensional coordinates to one-dimensional. In astronomical star catalog retrieval, only a certain range of grids within the retrieval center is read into memory for calculation, reducing the difficulty of the retrieval. The most widely used methods include HTM and Healpix. These two methods divide the celestial sphere into triangles and curved quadrilaterals of different precision sizes, respectively. Although they can reduce the computation area and speed up the retrieval, some data is outside the retrieval area because the retrieval area coincides with the edge of the triangle or quadrilateral. Additional algorithm design is needed to solve the omission of this part of the data, which increases the cost of retrieval. If this is not solved, it will lead to a decrease in retrieval accuracy. Summary of the Invention
[0004] This invention provides a retrieval optimization method for astronomical star catalogs, which can be used to achieve optimized retrieval of astronomical star catalog data.
[0005] The technical solution of this invention is:
[0006] According to one aspect of the present invention, a retrieval optimization method for astronomical star catalogs is provided, comprising: constructing a query table; constructing a maintenance table based on the query table; obtaining a first array Ra[] and a second array dec[] based on the query table; obtaining a third array ID[] based on the maintenance table; and obtaining the Zone-ID retrieval range [ZoneID] based on the input target data point coordinates (x, y) and the target data point retrieval radius r. minZoneID max ]; Among them, ZoneID min ZoneID max These represent the minimum and maximum Zone-IDs to be retrieved, respectively; the calculated ZoneIDs are then stored in the third array ID[]. min ZoneID max Perform the first filtering, and retrieve the ZoneID based on the records in the maintenance table. min ZoneID max In the query table, at the starting and ending positions s1, s2 of the index; perform a second filtering within the range [dec[s1], dec[s2]] of the second array dec[] to obtain Dec. min Dec max Query the start and end positions of the index in the table: s3, s4; where Dec min Dec max These represent the minimum and maximum declinations to be retrieved, respectively; the first array Ra[] is traversed within the range [Ra[s3], Ra[s4]] to locate the value at Ra. min and Ra max Data between, for the right ascension range [Ra] min ,Ra max The data within the range is used to calculate the angular distance between the input target data point coordinates (x, y) and the target data point coordinates to obtain the search results; where Ra min Ra max These represent the minimum and maximum right ascension to be retrieved, respectively.
[0007] The lookup table has the following attributes: Zone-ID, Ra, dec, and loc. During storage, the lookup table is sorted, first by Zone-ID from smallest to largest, and then by dec if Zone-IDs are the same. Specifically, Zone-ID is a column in the lookup table that imports the sum of Ra and dec from the original astronomical catalog data; Ra is a column in the lookup table that imports the right ascension Ra value from the original astronomical catalog data; dec is a column in the lookup table that imports the declination dec value from the original astronomical catalog data; and loc is a column in the lookup table that records the row position from the original astronomical catalog data.
[0008] The step of obtaining the first array Ra[] and the second array dec[] based on the lookup table includes: reading Ra and dec from the lookup table and storing them into the first array Ra[] and the second array dec[], respectively.
[0009] The step of constructing a maintenance table based on the query table includes: traversing the Zone-ID column in the query table and constructing the maintenance table, where the maintenance table's attributes are Zone-ID. new Zone-IDstart Zone-ID end Among them, Zone-ID new This indicates a column in the maintenance table that records all Zone-IDs after deduplication from the query table; when there are no duplicate Zone-IDs in the query table, the Zone-ID is... start Zone-ID end The values are the same; when there are duplicate values for Zone-ID in the query table, Zone-ID start Zone-ID end These represent the start and end index positions of the Zone-ID in the query table, respectively.
[0010] The step of obtaining the third array ID[] based on the maintenance table includes: reading the Zone-ID from the maintenance table. new To the third array ID[].
[0011] The calculated ZoneID is obtained from the third array ID[]. min ZoneID max Perform the first filtering, and retrieve the ZoneID based on the records in the maintenance table. min ZoneID max The indexes in the query table start and end positions s1, s2 include: calculating the minimum and maximum Zone-ID retrieval ranges based on the input target data point coordinates (x, y) and the target data point retrieval radius r. min ZoneID max ]; In the third array ID[], calculate the ZoneID min ZoneID max Perform the first binary search to retrieve the ZoneID from the records in the maintenance table. min ZoneID max Find the start and end positions of the index s1, s2 in the query table; where ZoneID min = ZoneID max = .
[0012] The second filtering is performed within the range [dec[s1], dec[s2]] of the second array dec[] to obtain Dec min Dec max In the query table, at the starting and ending positions s3 and s4 of the index, including the range [dec[s1], dec[s2]] of the second array dec[], a second binary search is performed to find Dec. min Dec max Query the start and end positions of the index in the table: s3, s4; where Decmin = Dec max = .
[0013] The first array Ra[] is traversed within the range [Ra[s3], Ra[s4]] to locate Ra. min and Ra max Data between, for the right ascension range [Ra] min ,Ra max The data within the array Ra[] is used to calculate the angular distance between the input target data point coordinates (x, y) and the target data point coordinates. The retrieval results are obtained by traversing the range [Ra[s3], Ra[s4]] of the array Ra[] and locating the target data point within Ra[]. min and Ra max The data between [Ra] min ,Ra max The data within the specified range is compared with the input target data point coordinates (x, y) to calculate the angular distance. The angular distance result is then compared with the search radius r. Based on the lookup table loc for angular distances less than the search radius r, the original astronomical catalog data is located to obtain the search result; Ra min = Ra max = .
[0014] According to another aspect of the present invention, a retrieval optimization system for astronomical star catalogs is provided, comprising: a first construction module for constructing a query table; a second construction module for constructing a maintenance table based on the query table; a first acquisition module for acquiring a first array Ra[] and a second array dec[] based on the query table; and acquiring a third array ID[] based on the maintenance table; and a second acquisition module for acquiring a Zone-ID retrieval range [ZoneID] based on the input target data point coordinates (x, y) and the target data point retrieval radius r. min ZoneID max ]; Among them, ZoneID min ZoneID max These represent the minimum and maximum Zone-IDs to be retrieved, respectively; the third acquisition module is used to retrieve the calculated ZoneIDs from the third array ID[]. min ZoneID max Perform the first filtering, and retrieve the ZoneID based on the records in the maintenance table. min ZoneID max The query table is located at the starting and ending positions s1, s2; the fourth module is used to perform a second filtering within the range [dec[s1], dec[s2]] of the second array dec[] to obtain Dec. min Decmax Query the start and end positions of the index in the table: s3, s4; where Dec min Dec max These represent the minimum and maximum declinations to be retrieved, respectively; the fifth acquisition module is used to traverse the range [Ra[s3], Ra[s4]] of the first array Ra[] and locate the value at Ra. min and Ra max Data between, for the right ascension range [Ra] min ,Ra max The data within the range is used to calculate the angular distance between the input target data point coordinates (x, y) and the target data point coordinates to obtain the search results; where Ra min Ra max These represent the minimum and maximum right ascension to be retrieved, respectively.
[0015] According to another aspect of the present invention, a processor is provided for running a program, wherein the program, when running, executes the retrieval optimization method for astronomical star catalogs as described in any one of the preceding claims.
[0016] The beneficial effects of this invention are as follows: Based on the query table, a maintenance table is constructed. By performing a first binary search on the maintenance table, the original binary search and traversal approach can be replaced. Once the Zone-ID value is found, its start and end index positions in the original query table Zone-ID can be quickly found through the index, thereby reducing query time and improving the astronomical catalog retrieval speed. Then, the target range of Dec is further narrowed down, and angular distance is calculated based on the narrowed search range using right ascension. In the above search and angular distance calculation process, while minimizing the search range, the edge problem can be effectively solved, achieving a retrieval speed no weaker than existing optimization methods, while ensuring retrieval accuracy. Attached Figure Description
[0017] Figure 1 This is a flowchart of the present invention;
[0018] Figure 2 This is a schematic diagram of celestial bodies for the algorithm of this invention;
[0019] Figure 3 This is a diagram illustrating the search scope defined by declination;
[0020] Figure 4 This is a diagram illustrating how adding redundant data can solve the boundary source leakage problem;
[0021] Figure 5 This is a comparison chart of the retrieval speed of this invention and mainstream methods. Detailed Implementation
[0022] The invention will be further described below with reference to the accompanying drawings and embodiments, but the scope of the invention is not limited to the description.
[0023] Example 1: As Figure 1-5 As shown, according to one aspect of the present invention, a retrieval optimization method for astronomical star catalogs is provided, comprising: constructing a query table; constructing a maintenance table based on the query table; obtaining a first array Ra[] and a second array dec[] based on the query table; obtaining a third array ID[] based on the maintenance table; and obtaining the Zone-ID retrieval range [ZoneID] based on the input target data point coordinates (x, y) and the target data point retrieval radius r. min ZoneID max ]; Among them, ZoneID min ZoneID max These represent the minimum and maximum Zone-IDs to be retrieved, respectively; the calculated ZoneIDs are then stored in the third array ID[]. min ZoneID max Perform the first filtering, and retrieve the ZoneID based on the records in the maintenance table. min ZoneID max In the query table, at the starting and ending positions s1, s2 of the index; perform a second filtering within the range [dec[s1], dec[s2]] of the second array dec[] to obtain Dec. min Dec max Query the start and end positions of the index in the table: s3, s4; where Dec min Dec max These represent the minimum and maximum declinations to be retrieved, respectively. min Dec max [ represents the declination range; traverse the range [Ra[s3], Ra[s4]] of the first array Ra[] to locate Ra. min and Ra max Data between, for the right ascension range [Ra] min ,Ra max The data within the range is used to calculate the angular distance between the input target data point coordinates (x, y) and the target data point coordinates to obtain the search results; where Ra min Ra max These represent the minimum and maximum right ascension to be retrieved, respectively.
[0024] Furthermore, the table attributes of the query table are Zone-ID, Ra, dec, and loc. During storage, the query table is sorted, firstly by Zone-ID from smallest to largest, and then by dec if Zone-ID is the same. Zone-ID is a column in the query table, importing the sum of Ra+dec from the original astronomical catalog data; Ra is a column in the query table, importing the right ascension Ra value from the original astronomical catalog data; dec is a column in the query table, importing the declination dec value from the original astronomical catalog data; and loc is a column in the query table, recording the row position in the original astronomical catalog data. Based on loc, the position of the original catalog can be located, thereby obtaining the physical information corresponding to loc in the original catalog.
[0025] Furthermore, the step of constructing a maintenance table based on the query table includes: traversing the Zone-ID column in the query table to construct the maintenance table, wherein the table attribute of the maintenance table is Zone-ID. new Zone-ID start Zone-ID end Among them, Zone-ID new This indicates a column in the maintenance table that records all Zone-IDs after deduplication from the query table; when there are no duplicate Zone-IDs in the query table, the Zone-ID is... start Zone-ID end The values are the same; when there are duplicate values for Zone-ID in the query table, Zone-ID start Zone-ID end These represent the start and end index positions of the Zone-ID in the query table. For example, if there are 10 duplicate Zone-ID values of 100 in the query table, then when these duplicate Zone-ID values are imported into the maintenance table, the recorded Zone-IDs will be... new The value is 10, Zone-ID start Zone-ID end These represent the start and end index positions of 10 in the query table. It should be noted that Zone-ID... new Record all Zone-IDs after deduplication from the query table, i.e., Zone-ID new The number of Zone-IDs recorded is the total number of different Zone-IDs that exist in the query table.
[0026] Furthermore, the step of obtaining the first array Ra[] and the second array dec[] based on the lookup table includes: reading Ra and dec from the lookup table and storing them into the first array Ra[] and the second array dec[], respectively.
[0027] Furthermore, obtaining the third array ID[] based on the maintenance table includes: reading the Zone-ID from the maintenance table. new To the third array ID[].
[0028] Furthermore, the calculated ZoneID is obtained from the third array ID[]. min ZoneID max Perform the first filtering, and retrieve the ZoneID based on the records in the maintenance table. min ZoneID max The indexes in the query table start and end positions s1, s2 include: calculating the minimum and maximum Zone-ID retrieval ranges based on the input target data point coordinates (x, y) and the target data point retrieval radius r. min ZoneID max ]; In the third array ID[], calculate the ZoneID min ZoneID max Perform the first binary search to retrieve the ZoneID from the records in the maintenance table. min ZoneID max Find the start and end positions of the index s1, s2 in the query table; where ZoneID min = ZoneID max = It should be noted that the Zone-ID is based on the records in the maintenance table. new Find ZoneID min If duplicate Zone-IDs exist in the query table, then refer to the maintained Zone-ID table. new Corresponding Zone-ID start Find ZoneID min The index in the query table is used as the starting position s1; based on the Zone-ID of the records in the maintenance table. new Find ZoneID max If duplicate Zone-IDs exist in the query table, then refer to the maintained Zone-ID table. new Corresponding Zone-ID end Find ZoneID max In the query table, the index is used as the termination position s2; otherwise, if the ZoneID is found based on the records in the maintenance table... min / ZoneID max To ensure that no duplicate Zone-IDs exist in the query table, the Zone-ID is found directly from the records in the maintenance table. min / ZoneID max The index in the lookup table is s1 / s2 (s1 corresponds to ZoneID). mins2 corresponds to ZoneID max );
[0029] Furthermore, the second filtering is performed within the range [dec[s1], dec[s2]] of the second array dec[] to obtain Dec. min Dec max In the query table, at the starting and ending positions s3 and s4 of the index, including the range [dec[s1], dec[s2]] of the second array dec[], a second binary search is performed to find Dec. min Dec max The query table retrieves the start and end positions of the index, s3 and s4; where Dec... min = Dec max = ;
[0030] Furthermore, the first array Ra[] is traversed within the range [Ra[s3], Ra[s4]] to locate Ra. min and Ra max Data between, for the right ascension range [Ra] min ,Ra max The data within the array Ra[] is used to calculate the angular distance between the input target data point coordinates (x, y) and the target data point coordinates. The retrieval results are obtained by traversing the range [Ra[s3], Ra[s4]] of the array Ra[] and locating the target data point within Ra[]. min and Ra max The data between [Ra] min ,Ra max The data within the specified range is compared with the input target data point coordinates (x, y) to calculate the angular distance. The angular distance result is then compared with the search radius r. Based on the lookup table loc for angular distances less than the search radius r, the original astronomical catalog data is located to obtain the search result; Ra min = Ra max = .
[0031] According to another aspect of the present invention, a retrieval optimization system for astronomical star catalogs is provided, comprising: a first construction module for constructing a query table; a second construction module for constructing a maintenance table based on the query table; a first acquisition module for acquiring a first array Ra[] and a second array dec[] based on the query table; and acquiring a third array ID[] based on the maintenance table; and a second acquisition module for acquiring a Zone-ID retrieval range [ZoneID] based on the input target data point coordinates (x, y) and the target data point retrieval radius r. min ZoneID max ]; Among them, ZoneIDmin ZoneID max These represent the minimum and maximum Zone-IDs to be retrieved, respectively; the third acquisition module is used to retrieve the calculated ZoneIDs from the third array ID[]. min ZoneID max Perform the first filtering, and retrieve the ZoneID based on the records in the maintenance table. min ZoneID max The query table is located at the starting and ending positions s1, s2; the fourth module is used to perform a second filtering within the range [dec[s1], dec[s2]] of the second array dec[] to obtain Dec. min Dec max Query the start and end positions of the index in the table: s3, s4; where Dec min Dec max These represent the minimum and maximum declinations to be retrieved, respectively; the fifth acquisition module is used to traverse the range [Ra[s3], Ra[s4]] of the first array Ra[] and locate the value at Ra. min and Ra max Data between, for the right ascension range [Ra] min ,Ra max The data within the range is used to calculate the angular distance between the input target data point coordinates (x, y) and the target data point coordinates to obtain the search results; where Ra min Ra max These represent the minimum and maximum right ascension to be retrieved, respectively.
[0032] According to another aspect of the present invention, a processor is provided for running a program, wherein the program executes the retrieval optimization method for astronomical star catalogs described in any one of the foregoing embodiments.
[0033] The total time T of the retrieval optimization method for astronomical star catalogs (i.e., CS-Zone) of this invention is:
[0034] T = T1 + T2 + T3 + T4
[0035] Where T1, T2, T3, and T4 represent the time for the first binary search, the second binary search, the traversal search, and the angular distance calculation, respectively. The computation speed of T4 depends on the size M of the data found during the traversal search in T3, and the time t3 for a single angular distance calculation, i.e., T3 = M * t3. The technical solution of this invention constructs a maintenance table based on the query table. By performing a first binary search on the maintenance table, the original binary search and traversal approach can be replaced. Once the Zone-ID value is found, its start and end index positions in the original Zone-ID search table can be quickly found through the index, thereby reducing the query time T1 and improving the astronomical catalog retrieval speed. Then, the target range of Dec is further narrowed, and the angular distance is calculated based on the reduced right ascension. In the above search and angular distance calculation process, while minimizing the search range, edge problems are effectively solved, achieving a retrieval speed comparable to existing optimization methods while ensuring retrieval accuracy.
[0036] Specifically, the basic idea of the CS-Zone algorithm in this invention is to dynamically compress the query range within an approximate curved square centered on a given point (x, y), with the surrounding area at a distance slightly greater than the retrieval radius r. Figure 2 As shown. Adding and subtracting a search radius to the declination can roughly give the required declination range, as shown below. Figure 3 As shown, The same applies to right ascension: Next, by simply adding the ranges of right ascension and declination, a one-dimensional data range based on the sum of right ascension and declination can be obtained. Then, by using Ra+dec as the encoding basis, and taking the smallest integer not greater than Ra+dec for all star catalogs, the range of all star catalogs is narrowed. That is, the search range in a single astronomical star catalog retrieval task is: the maximum search range is... The minimum retrieval is Based on the above, by adding or subtracting a certain amount from x and y within the data range defined by the initial screening, the search range is expanded. For example... Figure 4 As shown, the search range for right ascension and declination is expanded outward by 1 arcsecond to directly cover the edge data, thus obtaining the ZoneID. min = ZoneID max = As the above analysis shows, the simple yet effective method employed in this invention addresses the "boundary source leakage" problem by slightly expanding the search range without adding any other complex procedures. This method allows us to maintain both good astronomical catalog retrieval efficiency and search accuracy.
[0037] Furthermore, the optimization method CS-Zone of this invention and the existing mainstream optimization method HealPix are implemented in a database to compare the optimization effects of our algorithm and the commonly used HealPix on the retrieval speed of massive astronomical data under the same data volume.
[0038] Using the astropy and Healpix packages in Python, we successfully implemented HealPix in the ClickHouse database. In this process, we needed to set the HealPix index level to 12. This level improves the accuracy of data queries without causing data corruption due to overly coarse granularity. Furthermore, the chosen level does not lead to a decrease in query quality.
[0039] This invention tested two methods on a single machine with different amounts of star catalog data. Experimental data was extracted from Gaia DR2, including astronomical records of varying orders of magnitude, ranging from 100,000,000 to 1,500,000,000 records. In the experiment, a full-sky astronomical catalog search was performed with a search radius of 1000 arcseconds and a search center at (45, 51). Figure 5 The results show that the Uranus catalog retrieval speed optimized by the CS-Zone algorithm is significantly faster than the mainstream HealPix optimization method, demonstrating the feasibility and superiority of the CS-Zone algorithm in optimizing the retrieval speed of massive astronomical catalogs.
[0040] Meanwhile, regarding retrieval accuracy, the number of result sets given by each HealPix-optimized astronomical catalog retrieval method varied. This analysis indicates that the retrieval method based on the HealPix algorithm did not address the boundary source leakage problem. By performing the same astronomical catalog retrieval on gaia dr2 at the National Astronomical Data Center, the result set was compared with the two result sets of this invention. As shown in Table 1, the astronomical catalog retrieval method based on HealPix optimization, which did not address the boundary source leakage problem, had a smaller result set. However, comparing the result set of the CS-Zone algorithm with the result set from the National Astronomical Data Center showed that not only was the number of result sets the same, but the data was also identical. Therefore, we can conclude that the method in the CS-Zone algorithm that addresses the boundary source leakage problem is truly effective and does not incur excessive time consumption.
[0041] Table 1
[0042]
[0043] The specific embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.
Claims
1. A retrieval optimization method for astronomical star catalogs, characterized in that, include: Construct the query table; Based on the query table, construct and maintain the table; Based on the lookup table, obtain the first array Ra[] and the second array dec[]; based on the maintenance table, obtain the third array ID[]. Based on the input target data point coordinates (x, y) and the target data point retrieval radius r, obtain the Zone-ID retrieval range [ZoneID]. min ZoneID max ]; Among them, ZoneID min ZoneID max These represent the minimum and maximum Zone-IDs to be retrieved, respectively. The calculated ZoneID is stored in the third array ID[]. min ZoneID max Perform the first filtering, and retrieve the ZoneID based on the records in the maintenance table. min ZoneID max Find the start and end positions of the index in the query table: s1, s2; Perform a second filtering operation within the range [dec[s1], dec[s2]] of the second array dec[] to obtain Dec. min Dec max Query the start and end positions of the index in the table: s3, s4; where Dec min Dec max These represent the minimum and maximum declinations to be retrieved, respectively. Traverse the range [Ra[s3], Ra[s4]] of the first array Ra[] and locate Ra. min and Ra max Data between, for the right ascension range [Ra] min ,Ra max The data within the range is used to calculate the angular distance between the input target data point coordinates (x, y) and the target data point coordinates to obtain the search results; where Ra min Ra max These represent the minimum and maximum right ascension to be retrieved, respectively. The step of constructing a maintenance table based on the query table includes: traversing the Zone-ID column in the query table and constructing the maintenance table, where the maintenance table's attributes are Zone-ID. new Zone-ID start Zone-ID end Among them, Zone-ID new This indicates a column in the maintenance table that records all Zone-IDs after deduplication from the query table; when there are no duplicate Zone-IDs in the query table, the Zone-ID is... start Zone-ID end The values are the same; when there are duplicate values for Zone-ID in the query table, Zone-ID start Zone-ID end These represent the start and end index positions of the Zone-ID in the query table, respectively. The calculated ZoneID is obtained from the third array ID[]. min ZoneID max Perform the first filtering, and retrieve the ZoneID based on the records in the maintenance table. min ZoneID max The indexes in the query table start and end positions s1, s2 include: calculating the minimum and maximum Zone-ID retrieval ranges based on the input target data point coordinates (x, y) and the target data point retrieval radius r. min ZoneID max ]; In the third array ID[], calculate the ZoneID min ZoneID max Perform the first binary search to retrieve the ZoneID from the records in the maintenance table. min ZoneID max Find the start and end positions of the index s1, s2 in the query table; where ZoneID min = ZoneID max = ; The second filtering is performed within the range [dec[s1], dec[s2]] of the second array dec[] to obtain Dec min Dec max In the query table, at the starting and ending positions s3 and s4 of the index, including the range [dec[s1], dec[s2]] of the second array dec[], a second binary search is performed to find Dec. min Dec max Query the start and end positions of the index in the table: s3, s4; where Dec min = Dec max = ; The first array Ra[] is traversed within the range [Ra[s3], Ra[s4]] to locate Ra. min and Ra max Data between, for the right ascension range [Ra] min ,Ra max The data within the array Ra[] is used to calculate the angular distance between the input target data point coordinates (x, y) and the target data point coordinates. The retrieval results are obtained by traversing the range [Ra[s3], Ra[s4]] of the array Ra[] and locating the target data point within Ra[]. min and Ra max The data between [Ra] min ,Ra max The data within the specified range is compared with the input target data point coordinates (x, y) to calculate the angular distance. The angular distance result is then compared with the search radius r. Based on the lookup table loc for angular distances less than the search radius r, the original astronomical catalog data is located to obtain the search result; Ra min = Ra max = .
2. The retrieval optimization method for astronomical star catalogs according to claim 1, characterized in that, The lookup table has the following attributes: Zone-ID, Ra, dec, and loc. During storage, the lookup table is sorted, first by Zone-ID from smallest to largest, and then by dec if Zone-IDs are the same. Specifically, Zone-ID is a column in the lookup table that imports the sum of Ra and dec from the original astronomical catalog data; Ra is a column in the lookup table that imports the right ascension Ra value from the original astronomical catalog data; dec is a column in the lookup table that imports the declination dec value from the original astronomical catalog data; and loc is a column in the lookup table that records the row position from the original astronomical catalog data.
3. The retrieval optimization method for astronomical star catalogs according to claim 2, characterized in that, The step of obtaining the first array Ra[] and the second array dec[] based on the lookup table includes: reading Ra and dec from the lookup table and storing them into the first array Ra[] and the second array dec[], respectively.
4. The retrieval optimization method for astronomical star catalogs according to claim 1, characterized in that, The step of obtaining the third array ID[] based on the maintenance table includes: reading the Zone-ID from the maintenance table. new To the third array ID[].
5. A retrieval optimization system for astronomical star catalogs, characterized in that, include: The first construction module is used to build the query table; The second construction module is used to construct and maintain tables based on the query table; The first acquisition module is used to obtain the first array Ra[] and the second array dec[] based on the query table; and to obtain the third array ID[] based on the maintenance table. The second acquisition module is used to obtain the Zone-ID retrieval range [ZoneID] based on the input target data point coordinates (x, y) and the target data point retrieval radius r. min ZoneID max ]; Among them, ZoneID min ZoneID max These represent the minimum and maximum Zone-IDs to be retrieved, respectively. The third acquisition module is used to retrieve the calculated ZoneID from the third array ID[]. min ZoneID max Perform the first filtering, and retrieve the ZoneID based on the records in the maintenance table. min ZoneID max Find the start and end positions of the index in the query table: s1, s2; The fourth module is used to perform a second filtering within the range [dec[s1], dec[s2]] of the second array dec[] to obtain Dec[s1]. min Dec max Query the start and end positions of the index in the table: s3, s4; where Dec min Dec max These represent the minimum and maximum declinations to be retrieved, respectively. The fifth acquisition module is used to traverse the range [Ra[s3], Ra[s4]] of the first array Ra[] and locate the position in Ra[s3]. min and Ra max Data between, for the right ascension range [Ra] min ,Ra max The data within the range is used to calculate the angular distance between the input target data point coordinates (x, y) and the target data point coordinates to obtain the search results; where Ra min Ra max These represent the minimum and maximum right ascension to be retrieved, respectively. The step of constructing a maintenance table based on the query table includes: traversing the Zone-ID column in the query table and constructing the maintenance table, where the maintenance table's attributes are Zone-ID. new Zone-ID start Zone-ID end Among them, Zone-ID new This indicates a column in the maintenance table that records all Zone-IDs after deduplication from the query table; when there are no duplicate Zone-IDs in the query table, the Zone-ID is... start Zone-ID end The values are the same; when there are duplicate values for Zone-ID in the query table, Zone-ID start Zone-ID end These represent the start and end index positions of the Zone-ID in the query table, respectively. The calculated ZoneID is obtained from the third array ID[]. min ZoneID max Perform the first filtering, and retrieve the ZoneID based on the records in the maintenance table. min ZoneID max The indexes in the query table start and end positions s1, s2 include: calculating the minimum and maximum Zone-ID retrieval ranges based on the input target data point coordinates (x, y) and the target data point retrieval radius r. min ZoneID max ]; In the third array ID[], calculate the ZoneID min ZoneID max Perform the first binary search to retrieve the ZoneID from the records in the maintenance table. min ZoneID max Find the start and end positions of the index s1, s2 in the query table; where ZoneID min = ZoneID max = ; The second filtering is performed within the range [dec[s1], dec[s2]] of the second array dec[] to obtain Dec min Dec max In the query table, at the starting and ending positions s3 and s4 of the index, including the range [dec[s1], dec[s2]] of the second array dec[], a second binary search is performed to find Dec. min Dec max Query the start and end positions of the index in the table: s3, s4; where Dec min = Dec max = ; The first array Ra[] is traversed within the range [Ra[s3], Ra[s4]] to locate Ra. min and Ra max Data between, for the right ascension range [Ra] min ,Ra max The data within the array Ra[] is used to calculate the angular distance between the input target data point coordinates (x, y) and the target data point coordinates. The retrieval results are obtained by traversing the range [Ra[s3], Ra[s4]] of the array Ra[] and locating the target data point within Ra[]. min and Ra max The data between [Ra] min ,Ra max The data within the specified range is compared with the input target data point coordinates (x, y) to calculate the angular distance. The angular distance result is then compared with the search radius r. Based on the lookup table loc for angular distances less than the search radius r, the original astronomical catalog data is located to obtain the search result; Ra min = Ra max = .
6. A processor, characterized in that, The processor is used to run a program, wherein the program executes the retrieval optimization method for astronomical star catalogs as described in any one of claims 1-4.
Citation Information
Patent Citations
Proximal point query method and query apparatus
CN107402983A