Star catalogue file generation method and device, celestial body data query method and device, computer equipment and storage medium

By dividing the surface area of ​​the celestial sphere into local areas and storing files using columnar formats, the problem of large-scale star table data storage and query is solved, and low-cost and efficient celestial data storage and query is achieved.

CN120561084APending Publication Date: 2025-08-29ZHEJIANG LAB
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510723133.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-08-29

AI Technical Summary

Technical Problem

When storing and querying large-scale star table data, the prior art has problems such as high hardware resource consumption, high threshold and high cost, and the scalability and performance bottlenecks of relational databases are difficult to meet the needs of fast storage and query.

Method used

By dividing the surface area of ​​the celestial sphere into multiple local areas and determining the identifier of each local area, identifying the identifier based on the right to the right and declination of the celestial body data, sorting and storing the celestial body data using columnar storage files to generate target files and their index information.

Benefits of technology

It realizes low-cost and low-resource consumption celestial data storage and query, lowers the technical threshold, improves the efficiency and precision of data query, and avoids the need to traverse the entire file.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120561084A_ABST
    Figure CN120561084A_ABST
Patent Text Reader

Abstract

The invention provides a star catalogue file generation method and device, a celestial body data query method and device, computer equipment and a storage medium. The star catalogue file generation method comprises the steps of obtaining star catalogue data; dividing the celestial sphere surface area corresponding to the plurality of celestial bodies into a plurality of local areas, and determining an identifier of each local area; determining an identifier matched with each celestial body data according to the right ascension and declination included in the celestial body data and the identifier of each local area in the celestial sphere surface area; sorting the celestial body data of the plurality of celestial bodies based on the identifiers corresponding to the celestial body data; and writing the sequenced celestial body data of the plurality of celestial bodies into an initial column storage file matched with the identifier to obtain a target file stored with the celestial body data, and generating file index information corresponding to the target file. The celestial body data is stored by utilizing the column type storage file, so that the problems of high maintenance cost and high use threshold caused by utilizing a database to store data are relieved while the data query efficiency is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to a method, apparatus, computer equipment, and storage medium for generating a star catalog file and querying celestial data. Background Art

[0002] With the rapid development of astronomical observation technology, such as the widespread use of large survey telescopes and high-resolution detectors, the amount of astronomical data is growing exponentially. Among them, large-scale star catalogs, which record important information such as the position, brightness, and spectral characteristics of celestial objects, are becoming increasingly large and complex.

[0003] In related technologies, for the storage of large-scale star catalog data, text formats can be used, such as simple comma-separated values ​​(CSV) files. This method is easy to understand and process, but the storage efficiency is extremely low and the data parsing speed is slow. With the growth of data volume, relational databases have been tried to be used to store star catalog data. They have certain data management and query functions and can use query statements to perform complex queries. However, when faced with ultra-large-scale star catalogs, the scalability and performance bottlenecks of relational databases have gradually become prominent, making it difficult to meet the needs of fast storage and query. In recent years, distributed relational databases have been used to save and query large-scale star catalogs, but these databases often consume a lot of hardware resources, and their installation and use require professional technicians, making the threshold for installation and use high and the cost required also high. Summary of the Invention

[0004] In view of this, the present application provides a star catalog file generation, celestial data query method, device, computer equipment and storage medium, which generates a target file for storing celestial data to alleviate the problems of large hardware resource consumption, high threshold and high cost when storing data in the database.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for generating a star catalog file, comprising:

[0006] Acquiring star catalog data, wherein the star catalog data includes celestial body data of a plurality of celestial bodies;

[0007] Dividing the celestial surface area corresponding to the multiple celestial bodies into multiple local areas, and determining an identifier for each of the local areas;

[0008] Determining an identifier matching each of the celestial body data according to the right ascension and declination included in the celestial body data and the identifiers of each local area in the celestial surface area;

[0009] Based on the identifiers corresponding to the celestial body data, the celestial data of the multiple celestial bodies are sorted; the sorted celestial data of the multiple celestial bodies are written to an initial column storage file matching the identifier to obtain a target file storing the celestial body data, and file index information corresponding to the target file is generated, wherein the file index information is used to query celestial body data from the target file.

[0010] In an optional implementation, dividing the celestial surface areas corresponding to the multiple celestial bodies into multiple local areas and determining an identifier for each of the local areas includes:

[0011] Determine the number of levels for regional division and the level resolution corresponding to each level;

[0012] The celestial sphere surface area is divided into a plurality of local areas based on the level resolution corresponding to each level by using a layered equal-area pixelation algorithm, and a multi-level identifier of each local area is determined.

[0013] In an optional embodiment, after dividing the celestial sphere surface areas corresponding to the multiple celestial bodies into multiple local areas, the method further includes:

[0014] Determining partition identifiers of partitioned areas divided in the first level; wherein, among the multiple levels, the level resolution of the (i+1)th level is a target multiple of the level resolution of the (i)th level, where i is a positive integer less than N, and N is the number of levels; each of the partitioned areas includes a plurality of the local areas, and different partitioned areas include different local areas;

[0015] For each partition area, an initial column storage file corresponding to the partition area is generated, and a file name of the initial column storage file is determined based on a partition identifier of the partition area.

[0016] In an optional implementation, generating file index information corresponding to the target file includes:

[0017] Obtaining metadata information of the target file; wherein the metadata information includes: a storage location of the file, the number of data blocks included in the target file, and a range of identifiers of each level of celestial body data stored in each data block;

[0018] The metadata information is used to generate file index information corresponding to the target file.

[0019] In an optional implementation, the celestial data of the plurality of celestial bodies are sorted based on identifiers corresponding to the celestial data, and the sorted celestial data of the plurality of celestial bodies are written to an initial columnar storage file matching the identifier, to obtain a target file storing the celestial data, including:

[0020] Dividing the celestial body data of the plurality of celestial bodies into a plurality of subsets, wherein each subset includes a plurality of celestial body data;

[0021] For each subset, sorting the multiple pieces of celestial body data in the subset according to the identifiers;

[0022] Selecting celestial body data with the smallest identifier from each of the subsets to form a current data group, and deleting the celestial body data written into the current data group from each of the subsets;

[0023] Determine candidate celestial body data with the smallest identifier in the current data group, and write the candidate celestial body data into a corresponding column storage file;

[0024] Deleting the candidate celestial body data from the current data group, selecting the celestial body data with the smallest identifier from the subset corresponding to the candidate celestial body data again, and updating the selected celestial body data with the smallest identifier to the current data group;

[0025] Return to the step of determining the candidate celestial body data with the smallest identifier in the current data group, until the celestial body data of the plurality of celestial bodies are all written into the column storage file, thereby obtaining a target file storing the celestial body data.

[0026] In an optional implementation, writing the sorted celestial body data of the plurality of celestial bodies into an initial column storage file matching the identifier to obtain a target file storing the celestial body data includes:

[0027] An encoding and compression operation is performed on the sorted celestial body data of the plurality of celestial bodies, and the compressed celestial body data is written into an initial column storage file matching the identifier, to obtain a target file storing the celestial body data.

[0028] In a second aspect, an embodiment of the present disclosure further provides a celestial body data query method, the method comprising:

[0029] Receive data query information input by the user;

[0030] Determining a target identifier of a target level corresponding to the celestial body data to be queried according to the position data indicated by the data query information;

[0031] Determining, based on the file index information corresponding to the target file and the target identifier of the target level, the file name of the candidate file storing the celestial body data to be queried and the position number of the target data block in the candidate file;

[0032] According to the file name of the candidate file and the position number of the target data block in the candidate file, the target celestial body data queried by the user is determined from the target data block of the candidate file, wherein the target file is generated using the star catalog file generation method described in the first aspect or any embodiment.

[0033] In an optional embodiment, determining the target celestial body data queried by the user from the target data block of the candidate file based on the file name of the candidate file and the position number of the target data block in the candidate file includes:

[0034] Reading the target data block in the candidate file according to the file name of the candidate file and the position number of the target data block in the candidate file;

[0035] According to the screening condition indicated by the data query information, the celestial body data stored in the target data block is screened to obtain the target celestial body data queried by the user.

[0036] In a third aspect, an embodiment of the present disclosure further provides a star catalog file generation device, the device comprising:

[0037] an acquisition module, configured to acquire star catalog data, wherein the star catalog data includes celestial body data of a plurality of celestial bodies;

[0038] a division module, configured to divide the celestial surface area corresponding to the plurality of celestial bodies into a plurality of local areas, and determine an identifier for each of the local areas;

[0039] A first determining module is configured to determine an identifier matching each of the celestial body data according to the right ascension and declination included in the celestial body data and the identifiers of each local area in the celestial surface area;

[0040] A generation module is configured to sort the celestial data of the plurality of celestial bodies based on identifiers corresponding to the celestial data; write the sorted celestial data of the plurality of celestial bodies into an initial columnar storage file that matches the identifier, obtain a target file storing the celestial data, and generate file index information corresponding to the target file, wherein the file index information is used to query celestial data from the target file.

[0041] In a fourth aspect, an embodiment of the present disclosure further provides a celestial body data query device, the device comprising:

[0042] A receiving module, used for receiving data query information input by a user;

[0043] A second determining module is configured to determine a target identifier of a target level corresponding to the celestial body data to be queried based on the position data indicated by the data query information;

[0044] a third determining module, configured to determine, based on the file index information corresponding to the target file and the target identifier of the target level, the file name of the candidate file storing the celestial body data to be queried and the position number of the target data block in the candidate file;

[0045] The fourth determination module is used to determine the target celestial body data queried by the user from the target data block of the candidate file based on the file name of the candidate file and the position number of the target data block in the candidate file, wherein the target file is generated using the star catalog file generation method described in the first aspect or any embodiment.

[0046] In a fifth aspect, this specification provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the star catalog file generation method described above, or, when executed by a processor, implements the steps of the celestial data query method described above.

[0047] In a sixth aspect, this specification provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the star catalog file generation method described above are implemented, or the steps of the celestial body data query method described above are implemented.

[0048] In this application, the celestial surface area corresponding to multiple celestial bodies is divided into multiple local areas, and an identifier for each local area is determined. Then, based on the right ascension and declination included in the celestial data, as well as the identifiers of each local area in the celestial surface area, an identifier matching each celestial data is determined, so as to utilize the identifiers of the celestial data to achieve orderly storage of the celestial data. Furthermore, the celestial data of multiple celestial bodies can be sorted based on the identifiers corresponding to the celestial data; the sorted celestial data of the multiple celestial bodies are written to the initial columnar storage file that matches the identifier, obtaining a target file storing the celestial data, and generating file index information corresponding to the target file. By using the target file to store celestial data, the storage and maintenance costs of the celestial data are low due to the low cost of file storage and maintenance, the hardware resources required for the file are also reduced, and no technical personnel are required to operate, so the threshold for using celestial data storage and query is low. At the same time, this application chooses columnar storage files to store celestial data, so as to use columnar storage files to achieve fine division and storage of celestial data. By writing the sorted celestial data of multiple celestial bodies into columnar storage files in an orderly manner, the target file can be subsequently queried finely and efficiently based on the file index information without traversing the entire target file, thereby ensuring data query efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The exemplary embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation of this specification. In the drawings:

[0050] Figure 1 This is a flow chart of a method for generating a star catalog file according to an embodiment of the present application;

[0051] Figure 2 This is a schematic diagram of a method for generating a star catalog file according to an embodiment of the present application;

[0052] Figure 3 This is a flow chart of a celestial data query method shown in one embodiment of the present application;

[0053] Figure 4 This is a schematic diagram of a celestial data query method shown in an embodiment of the present application;

[0054] Figure 5 This is a schematic diagram of a star catalog file generating device according to an embodiment of the present application;

[0055] Figure 6 This is a schematic diagram of a celestial data query device according to an embodiment of the present application;

[0056] Figure 7It is a schematic diagram of a computer device provided by this application. DETAILED DESCRIPTION

[0057] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0058] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0059] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0060] To facilitate understanding of this embodiment, a star catalog file generation method disclosed in an embodiment of the present disclosure is first introduced in detail. The execution subject of the star catalog file generation method provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities. The computer device includes, for example, a terminal device or a server or other processing device. The terminal device can be a user equipment (UE), a mobile device, a user terminal, a personal digital assistant (PDA), a handheld device, a computing device, an embedded device, etc. In some possible implementations, the star catalog file generation method can be implemented by a processor calling computer-readable instructions stored in a memory.

[0061] See also Figure 1 FIG. 1 is a flow chart of a method for generating a star catalog file according to an embodiment of the present invention, wherein the method includes steps S101 to S104, wherein:

[0062] S101, acquiring star catalog data, wherein the star catalog data includes celestial body data of multiple celestial bodies;

[0063] S102, dividing the celestial surface area corresponding to the multiple celestial bodies into multiple local areas, and determining an identifier for each of the local areas;

[0064] S103, determining an identifier matching each celestial body data according to the right ascension and declination included in the celestial body data and the identifiers of each local area in the celestial surface area;

[0065] S104. Sort the celestial data of the multiple celestial bodies based on identifiers corresponding to the celestial data; write the sorted celestial data of the multiple celestial bodies into an initial columnar storage file that matches the identifier, obtain a target file storing the celestial data, and generate file index information corresponding to the target file, wherein the file index information is used to query celestial data from the target file.

[0066] In this application, the celestial surface area corresponding to multiple celestial bodies is divided into multiple local areas, and an identifier for each local area is determined. Then, based on the right ascension and declination included in the celestial data, as well as the identifiers of each local area in the celestial surface area, an identifier matching each celestial data is determined, so as to utilize the identifiers of the celestial data to achieve orderly storage of the celestial data. Furthermore, the celestial data of multiple celestial bodies can be sorted based on the identifiers corresponding to the celestial data; the sorted celestial data of the multiple celestial bodies are written to the initial columnar storage file that matches the identifier, obtaining a target file storing the celestial data, and generating file index information corresponding to the target file. By using the target file to store celestial data, the storage and maintenance costs of the celestial data are low due to the low cost of file storage and maintenance, the hardware resources required for the file are also reduced, and no technical personnel are required to operate, so the threshold for using celestial data storage and query is low. At the same time, this application chooses columnar storage files to store celestial data, so as to use columnar storage files to achieve fine division and storage of celestial data. By writing the sorted celestial data of multiple celestial bodies into columnar storage files in an orderly manner, the target file can be subsequently queried finely and efficiently based on the file index information without traversing the entire target file, thereby ensuring data query efficiency.

[0067] S101 to S104 are described in detail below.

[0068] For S101:

[0069] The star catalog data includes celestial data for multiple celestial bodies, including but not limited to right ascension, declination, and multi-dimensional observational attributes. The specific content of the celestial data can be determined based on actual conditions and is not specifically limited here.

[0070] For example, the star catalog data can be read line by line from the original star catalog CSV file concurrently. Each celestial body data in the star catalog data fully describes the information of a celestial body, thereby achieving efficient acquisition of the star catalog data.

[0071] For S102:

[0072] During implementation, the celestial surface area corresponding to multiple celestial bodies can be divided into multiple local areas, and an identifier can be determined for each local area, with different identifiers corresponding to different local areas. For example, the celestial surface area can be evenly or unevenly divided into m parts, resulting in m local areas. For example, a layered equal-area pixelation algorithm can be used to evenly divide the celestial surface area into multiple local areas.

[0073] In an optional embodiment, the celestial surface area corresponding to the multiple celestial bodies is divided into multiple local areas, and an identifier for each of the local areas is determined, including: determining the number of levels of area division and the level resolution corresponding to each level; using a layered equal-area pixelation algorithm, based on the level resolution corresponding to each level, the celestial surface area is divided into multiple local areas, and a multi-level identifier for each of the local areas is determined.

[0074] The number of levels and the level resolution corresponding to each level can be set according to business needs. Preferably, the number of levels can be set to 4, i.e., 4 levels, and the level resolution nside value of each level can be 8, 16, 32, or 64. That is, the nside value of the first level can be 8, the nside value of the second level can be 16, the nside value of the third level can be 32, and the nside value of the fourth level can be 64.

[0075] During implementation, the Hierarchical Equal Area iso Latitude Pixelation of a sphere (HEALPix) algorithm is used to divide the celestial surface into multiple local areas based on the hierarchical resolution corresponding to each level. The number of divided areas in each level is determined by the hierarchical resolution of the level, that is, n = 12 × nside 2 .

[0076] Specifically, at the first level, HEALPix can divide the celestial surface into 768 partitions. At the second level, HEALPix can evenly divide each of the 768 partitions into 4 partitions, resulting in 3072 partitions. Similarly, the celestial surface can be divided into multiple local regions at multiple levels. For example, if the number of levels is 4, the number of local regions is 49152.

[0077] For example, using a 4-level hierarchy, the celestial surface is divided into 768 first partitions according to the hierarchical equal-area pixelation algorithm and nside = 8. Each first partition is assigned an identifier (i.e., Healpixid) ranging from 0 to 767. For the second level, the hierarchical equal-area pixelation algorithm and nside = 16 are used to divide each first partition into four equal parts, resulting in 3072 second partitions. The identifiers for the second partitions can be (0, 0), (0, 1), (0, 2), (0, 3), (1, 0), and so on. Similarly, the celestial surface can be divided into multiple local regions, and multiple levels of identifiers can be determined for each local region.

[0078] During implementation, the multi-level identifiers of each local area can also be determined. For example, when the number of levels is 4, the multi-level identifiers of the local area (i.e., Healpixid) can be (0, 1, 4, 15), (0, 1, 4, 16), (0, 1, 5, 16), and so on. Taking (0, 1, 4, 15) as an example, 0 represents the identifier at the first level, 1 represents the identifier at the second level, 4 represents the identifier at the third level, and 15 represents the identifier at the fourth level. The multi-level identifiers of different local areas are different. Through the multi-level identifiers, the local area can be identified more accurately, so that the accurate marking of celestial data can be achieved later.

[0079] The above process enables a fine division of the celestial surface area so that celestial data can be accurately marked later, thereby achieving orderly storage and efficient indexing of celestial data.

[0080] In an optional embodiment, after dividing the celestial surface area corresponding to the multiple celestial bodies into multiple local areas, it also includes: determining a partition identifier of the partition area divided in the first level; wherein, among the multiple levels, the level resolution of the i+1th level is a target multiple of the level resolution of the i-th level, i is a positive integer less than N, and N is the number of levels; each of the partition areas contains multiple local areas, and different partition areas contain different local areas; for each partition area, generating an initial column storage file corresponding to the partition area, and determining the file name of the initial column storage file based on the partition identifier of the partition area.

[0081] As can be seen from the preceding description, among multiple levels, the level resolution of the i+1th level is a target multiple of the level resolution of the ith level, where i is a positive integer less than N and N is the number of levels. For example, if the number of levels is N=4, the level resolution nside of the first level can be 8, and the level resolution of the second level can be 16, meaning the level resolution of the first level is twice that of the second level. Similarly, the level resolution of the third level can be 32, and the level resolution of the fourth level can be 64.

[0082] For example, when dividing the celestial surface area into multiple local areas, the celestial surface area can be divided into 768 partition areas in the first level. In the second level, each partition area in the first level can be divided to obtain multiple partition areas in the second level, and so on, until the fourth level division is completed. It can be seen that each partition area in the first level includes multiple local areas, and different partition areas contain different local areas.

[0083] After dividing the celestial surface area corresponding to multiple celestial bodies into multiple local areas, a corresponding initial column storage file can also be generated for each partition area in the first level. For example, if the level resolution of the first level is 8, the first level can divide the celestial surface area into 768 partition areas, and an initial column storage file can be generated for each of the 768 partition areas, so that for each partition area, the celestial body data of the multiple local areas included in the partition area can be stored in the initial column storage file corresponding to the partition area.

[0084] It has been proven that for most sized star catalogs, choosing Healpixid with nside=8 as the partition index, which precisely divides the star catalog into 768 partitions, can achieve excellent performance in various query scenarios and effectively balance the relationship between the number of partitions and query efficiency.

[0085] Specifically, the partition identifiers of the partitioned areas in the first level are determined. For example, if the first level is divided into 768 partitioned areas, the identifiers of the multiple partitioned areas can be positive integers ranging from 0 to 767. For each partitioned area in the first level, an initial columnar storage file corresponding to the partitioned area is generated. For example, the columnar storage file can be a Parquet format file. Based on the partition identifier of the partitioned area, the file name of the initial columnar storage file is determined. For example, the partition identifier can be directly used as the file name of the columnar storage file, or the partition identifier can be used as part of the file name of the columnar storage file.

[0086] By creating an independent column storage file for each partition area in the first level and using the identifier of the partition area to generate the file name of the column storage file, a correspondence between the file and the star catalog area can be established. Subsequently, the star data can be stored in the corresponding column storage file more simply and efficiently. The generation and maintenance of the file are relatively simple, and the subsequent retrieval of the file is also more convenient and orderly.

[0087] For S103:

[0088] After determining the identifier of each local area, for each celestial data in the star catalog data, the identifier matching each celestial data is determined based on the right ascension and declination included in the celestial data, as well as the identifiers of each local area in the celestial surface area. That is, the right ascension and declination are converted to the coordinate system, for example, the right ascension and declination are converted from the original coordinate system to the Healpix coordinate system to obtain the identifier matching the celestial data.

[0089] For example, astronomy library functions, such as the relevant functions in the Astropy library, can be used to efficiently convert the original coordinates (right ascension and declination) of celestial bodies into the Healpix coordinate system, and accurately calculate the multi-level identifiers of the celestial data of each celestial body to provide technical support for subsequent data storage and data retrieval.

[0090] For S104:

[0091] After determining the identifiers that match each celestial body data, the celestial data of multiple celestial bodies can be sorted according to the identifiers corresponding to the celestial body data, so that the sorted celestial data of multiple celestial bodies can be written to the corresponding column storage file. For example, the celestial data of multiple celestial bodies can be traversed and sorted in ascending order of identifiers.

[0092] During implementation, distributed computing frameworks such as Apache Flink can be used to achieve parallel distribution of data, greatly improving data storage efficiency and ensuring that data from multiple celestial bodies can be quickly and accurately returned to the columnar storage files of designated partitions.

[0093] Columnar storage files, for example, can be Parquet files, which contain multiple data blocks, such as RowGroups. Each RowGroup can store multiple pieces of celestial data. During implementation, celestial data can be written sequentially and orderly to the corresponding RowGroups in the Parquet file. RowGroups serve as the smallest data block for retrieval and reading and writing data to the star catalog, providing a highly efficient physical storage structure for query operations.

[0094] Considering that the amount of celestial data is relatively large, the device performance of the execution device may not be able to support the complete sorting of the entire celestial data. In order to alleviate the above problem, this application completes the sorting of celestial data through two sortings, and writes the celestial data into the corresponding column storage file to realize file generation.

[0095] In an optional implementation, the celestial data of the plurality of celestial bodies are sorted based on identifiers corresponding to the celestial data, and the sorted celestial data of the plurality of celestial bodies are written to an initial column storage file matching the identifier to obtain a target file storing the celestial data, including:

[0096] Step a1: dividing the celestial body data of the plurality of celestial bodies into a plurality of subsets, wherein each subset includes a plurality of celestial body data;

[0097] Step a2: for each subset, sorting the multiple pieces of celestial body data in the subset according to the identifiers;

[0098] Step a3, selecting the celestial body data with the smallest identifier from each of the subsets to form a current data group, and deleting the celestial body data in each subset that has been written into the current data group;

[0099] Step a4: determining the candidate celestial body data with the smallest identifier in the current data group, and writing the candidate celestial body data into the corresponding column storage file;

[0100] Step a5: deleting the candidate celestial body data from the current data set, and selecting the celestial body data with the smallest identifier from the subset corresponding to the candidate celestial body data again, and updating the selected celestial body data with the smallest identifier to the current data set;

[0101] Step a6: Return to the step of determining the candidate celestial body data with the smallest identifier in the current data group, until the celestial body data of the plurality of celestial bodies are all written into the column storage file, thereby obtaining a target file storing the celestial body data.

[0102] During implementation, the celestial data of multiple celestial bodies can be divided into multiple subsets, each subset including multiple pieces of celestial data. For example, each subset can include no more than a preset number of pieces of celestial data. Exemplarily, the celestial data of multiple celestial bodies can be sequentially written into a cache queue. When the cache queue contains a preset number of celestial data (e.g., 50,000 pieces), the preset number of celestial data in the cache queue is treated as a subset. The cache queue is then cleared, and the remaining celestial data is sequentially written into the cache queue again. This process is repeated multiple times until all celestial data is divided, thereby obtaining multiple subsets.

[0103] For each subset, the multiple pieces of celestial data in the subset are sorted in ascending order of identifiers. During implementation, the multiple pieces of celestial data can be sorted in ascending order of their multi-level identifiers. For example, if the multi-level identifiers of celestial data one are (0, 1, 4, 16), the multi-level identifiers of celestial data two are (0, 1, 4, 15), and the multi-level identifiers of celestial data three are (0, 1, 5, 16), then the sorting order is celestial data two, celestial data one, and celestial data three. The multi-level Healpixid gradient sorting strategy adopted in this application can provide filtering conditions of different precisions for the subsequent data retrieval process, achieving more efficient data retrieval.

[0104] After the celestial data in each subset are sorted, the celestial data with the smallest identifier can be selected from each subset to form the current data group, that is, the number of celestial data included in the current data group is the same as the number of subsets, and then the celestial data written to the current data group from each subset is deleted. For example, if the number of subsets is 20, the celestial data with the smallest identifier is selected from each of the 20 subsets to form the current data group, that is, the current data group includes 20 celestial data. Then, the candidate celestial data with the smallest identifier in the current data group is determined, for example, the candidate celestial data with the smallest identifier among the 20 celestial data is determined, and the candidate celestial data is written to the corresponding column storage file, that is, the candidate celestial data is written to the column storage file corresponding to the identifier.

[0105] After the candidate celestial body data is written into the columnar storage file, the candidate celestial body data can be deleted from the current data group, and the celestial body data with the smallest identifier can be selected again from the subset corresponding to the candidate celestial body data. After the celestial body data is written into the current data group, the celestial body data can be deleted from the corresponding subset. The currently selected celestial body data with the smallest identifier is updated to the current data group to obtain an updated current data group. Return to step a4 to determine the candidate celestial body data with the smallest identifier in the updated current data group. Repeat the above process multiple times until all the celestial body data of multiple celestial bodies are written into the columnar storage file, and a target file storing the celestial body data is obtained. For example, the celestial body data can be written into the RowGroup of the corresponding Parquet format file in sequence, and then after the current RowGroup is full, it is written into the next RowGroup in sequence until all the celestial body data are written into the RowGroup of the corresponding Parquet format file. During the data writing stage, this application sorts the celestial body data according to multi-level identifiers, so that the Healpix values ​​(i.e., identifiers) within the same RowGroup are continuously distributed, and the Healpix values ​​of different RowGroups are also continuously distributed without crossing, so that orderly and efficient data queries can be achieved later.

[0106] Through the above process, while sorting the celestial data of multiple celestial bodies, the celestial data is written into the corresponding column storage files, realizing orderly writing of data and providing technical support for efficient retrieval of subsequent data.

[0107] In an optional implementation, the celestial data of the sorted multiple celestial bodies are written to an initial column storage file that matches the identifier to obtain a target file storing the celestial data, including: performing encoding and compression operations on the sorted celestial data of the multiple celestial bodies, writing the compressed celestial data to the initial column storage file that matches the identifier to obtain a target file storing the celestial data.

[0108] The encoding and compression method can be determined based on business needs and is not specifically limited here. Specifically, after sorting the plurality of celestial body data, the sorted celestial body data is encoded and compressed, and the compressed celestial body data is written to the initial columnar storage file that matches the identifier, thereby obtaining a target file storing the celestial body data.

[0109] With reference to the above-mentioned embodiment, after determining the candidate celestial body data with the smallest identifier in the current data group in step a4, the candidate celestial body data may be encoded and compressed, and the compressed candidate celestial body data may be written to the corresponding column storage file.

[0110] Through the above process, the file size of the generated target file can be reduced, the disk space occupied by the stored file can be saved, and the storage space of the device can be saved.

[0111] After obtaining the target file, file index information corresponding to the target file can also be generated so that the file index information can be used to efficiently retrieve and query the celestial data in the target file. For example, the file index information can be constructed based on the identifier of the celestial data stored in the target file.

[0112] In an optional embodiment, generating file index information corresponding to the target file includes: obtaining metadata information of the target file; wherein the metadata information includes: the storage location of the file, the number of data blocks included in the target file, and the range of identifiers of each level of celestial data stored in each data block; and using the metadata information, generating file index information corresponding to the target file.

[0113] During implementation, when celestial data is written to a columnar storage file, the metadata information of the columnar storage file can be synchronously recorded so that the metadata information of the target file (i.e., the columnar storage file storing the celestial data) can be directly obtained later without additional settings or programming.

[0114] Metadata information can include the storage location of the celestial data stored in the file, the number of data blocks in the target file, and the range of identifiers for each level of celestial data stored in each data block. For example, if the columnar storage file is in Parquet format, the metadata information can include the file's storage location, the number of RowGroups within the file, and the range of identifiers for each level of each RowGroup within the file. In practice, there are four levels of identifiers, and RowGroups will record the range of identifiers for these four levels of celestial data stored within them.

[0115] The file storage location is the file-level index information, also known as the global index information; the range of the hierarchical identifiers of the celestial data stored in each data block is the data block-level index information, also known as the local index information. By setting up global and local index information, the data index information is more comprehensive, allowing subsequent data retrieval at different levels and quickly identifying data blocks that meet the requirements, effectively avoiding the reading of large numbers of irrelevant data blocks and improving data retrieval efficiency.

[0116] Optionally, the metadata information may also include, but is not limited to: data type, column name, storage location of data in the file, encoding compression method, file path of the columnar storage file, etc.

[0117] After obtaining the metadata information of the target file, file index information for the target file can be generated based on the metadata information. For example, the metadata information can be adjusted according to the target format to generate file index information corresponding to the target file. For example, the file index information can be stored in an index database so that the data block location of the celestial body data to be queried can be determined from the index database.

[0118] Through the above process, this application can generate more comprehensive file index information of the target file, providing data support for subsequent efficient data retrieval.

[0119] See also Figure 2 The schematic diagram of the star catalog file generation method shown in Figure 2 , an example is given to illustrate the star catalog file generation method of this application.

[0120] First, the original star catalog is read row by row concurrently.

[0121] During implementation, the original star catalog can be extracted from the original star catalog CSV file in parallel and row by row to obtain the star catalog data.

[0122] Secondly, you can encode the partitions according to NS8HIDX.

[0123] During implementation, each celestial data in the star catalog data is partitioned, that is, the identifier corresponding to each celestial data is determined, and the identifier is matched with the identifier of the celestial surface area, which also realizes the partitioning of the celestial data. Figure 2 In the example, multiple celestial body data are divided into n partitions. When nside=8, n is 768.

[0124] Then, multiple sorting is performed according to (NS8, NS16, NS32, NS64).

[0125] During implementation, the celestial data of multiple celestial bodies are sorted according to multi-level identifiers.

[0126] Finally, fix the RowGroup size and write to the Parquet file.

[0127] During implementation, the size of the RowGroup in the Parquet file is fixed, and then the sorted celestial data are written sequentially into the Parquet file that matches the identifier. Figure 2 The Parquet-1 file, Parquet-2 file, ..., Parquet-n file in the .. file constitute the target file. Each Parquet file includes multiple RowGroups, and each RowGroup stores multiple celestial data.

[0128] See also Figure 3FIG. 1 is a flowchart of a celestial body data query method provided in an embodiment of the present application, wherein the execution subject of the method may be a terminal device, a server, or other processing device. Specifically, the method includes steps S301 to S304, wherein:

[0129] S301, receiving data query information input by the user;

[0130] S302, determining a target identifier of a target level corresponding to the celestial body data to be queried according to the position data indicated by the data query information;

[0131] S303: Determine the file name of the candidate file storing the celestial body data to be queried and the position number of the target data block in the candidate file according to the file index information corresponding to the target file and the target identifier of the target level;

[0132] S304. Determine the target celestial body data queried by the user from the target data block of the candidate file according to the file name of the candidate file and the position number of the target data block in the candidate file, wherein the target file is generated using the star catalog file generation method described in the above embodiment.

[0133] The data query information entered by the user can include the location information of celestial data, including right ascension and declination. The location data indicated in the data query information can be converted to an identifier, such as Healpixid, through coordinate system transformation. The target identifier at the target level can be any level, enabling data queries at any level.

[0134] According to the file index information of the target file and the target identifier of the target level, the file name of the candidate file storing the celestial data to be queried and the position number of the target data block in the candidate file can be determined. For example, the file name of the candidate Parquet file storing the celestial data to be queried and the position number of the RowGroup of the celestial data to be queried in the candidate Parquet file can be queried. For example, based on the target identifier, the candidate files including the query range corresponding to the target identifier can be determined first, that is, based on the query range, the candidate files whose Healpix maximum value is greater than or equal to the lower limit of the query range and whose Healpix minimum value is less than or equal to the upper limit of the query range are determined in the global index. Then, from the RowGroup of the candidate file, the target data block whose position code is located in the query range is determined.

[0135] Then, the target celestial body data of the user's query can be determined from the target data block in the candidate file based on the file name of the candidate file and the position number of the target data block in the candidate file. The target file is generated using the star catalog file generation method described in the previous embodiment, which will not be repeated here.

[0136] The present application determines the file name of a candidate file storing the celestial body data to be queried and the position number of the target data block in the candidate file based on the file index information corresponding to the target file and the target identifier of the target level; and then determines the target celestial body data queried by the user from the target data block in the candidate file based on the file name of the candidate file and the position number of the target data block in the candidate file, thereby improving the storage efficiency of a large amount of astronomical data while ensuring the retrieval speed of the data.

[0137] In an optional implementation, the target celestial body data queried by the user is determined from the target data block of the candidate file based on the file name of the candidate file and the position number of the target data block in the candidate file, including: reading the target data block in the candidate file based on the file name of the candidate file and the position number of the target data block in the candidate file; and filtering the celestial body data stored in the target data block based on the filtering conditions indicated by the data query information to obtain the target celestial body data queried by the user.

[0138] During implementation, the target data blocks in the candidate files can be traversed according to the file names of the candidate files and the position numbers of the target data blocks in the candidate files. Based on the filtering conditions indicated by the data query information and the predicate-based nature of the columnar storage file, the celestial data stored in the target data blocks can be accurately filtered to obtain the target celestial data queried by the user.

[0139] The screening conditions can be set according to business needs and are not specifically limited here. For example, the screening conditions may include but are not limited to one or more of magnitude range, spectral type, color index, kinematic parameters, etc.

[0140] During implementation, the number of concurrent reads can be determined based on the hardware conditions of the device. That is, after determining the target data block, the number of concurrent reads of celestial body data from the target data block is determined. For example, if the hardware conditions are good, the number of concurrent reads can be large; conversely, if the hardware conditions are poor, the number of concurrent reads can be small.

[0141] See also Figure 4 The schematic diagram of the astronomical data query process shown in the figure is combined with Figure 4, an example explanation of the celestial data query method is given. Specifically, the user can initiate a query in the application on the user side. The query engine obtains the query conditions (i.e., data query information). The query engine converts the location conditions in the query conditions into Healpixid (i.e., target identifier) ​​and sends the Healpixid to the index database. The index database stores the file index information of the target file, and the index database can be, for example, an Elasticsearch database. The index database determines the RowGroup location list (i.e., the location number of the target data block) based on the file index information and Healpixid corresponding to the target file. The query engine obtains the RowGroup location list from the index database, and concurrently reads the celestial data from the file system (i.e., the target file) according to the RowGroup location list, and performs data filtering according to the filtering conditions in the query conditions to determine the celestial data queried by the user, and then sends the celestial data queried by the user to the user side to complete the data query.

[0142] Corresponding to the embodiment of the aforementioned star catalog file generation method, the present application also provides an embodiment of a star catalog file generation device. Figure 5 A schematic diagram of the star catalog file generation device provided in this application, specifically including:

[0143] An acquisition module 501 is configured to acquire star catalog data, wherein the star catalog data includes celestial body data of a plurality of celestial bodies;

[0144] A division module 502 is configured to divide the celestial surface area corresponding to the plurality of celestial bodies into a plurality of local areas, and determine an identifier for each of the local areas;

[0145] A first determining module 503 is configured to determine an identifier matching each of the celestial body data according to the right ascension and declination included in the celestial body data and the identifiers of each local area in the celestial surface area;

[0146] A generation module 504 is configured to sort the celestial data of the plurality of celestial bodies based on identifiers corresponding to the celestial data; write the sorted celestial data of the plurality of celestial bodies into an initial columnar storage file that matches the identifier, obtain a target file storing the celestial data, and generate file index information corresponding to the target file, wherein the file index information is used to query celestial data from the target file.

[0147] In an optional implementation, the division module 502, when dividing the celestial surface area corresponding to the multiple celestial bodies into multiple local areas and determining an identifier for each of the local areas, is configured to:

[0148] Determine the number of levels for regional division and the level resolution corresponding to each level;

[0149] The celestial sphere surface area is divided into a plurality of local areas based on the level resolution corresponding to each level by using a layered equal-area pixelation algorithm, and a multi-level identifier of each local area is determined.

[0150] In an optional implementation, the division module 502, after dividing the celestial surface areas corresponding to the multiple celestial bodies into multiple local areas, is further configured to:

[0151] Determining partition identifiers of partitioned areas divided in the first level; wherein, among the multiple levels, the level resolution of the (i+1)th level is a target multiple of the level resolution of the (i)th level, where i is a positive integer less than N, and N is the number of levels; each of the partitioned areas includes a plurality of the local areas, and different partitioned areas include different local areas;

[0152] For each partition area, an initial column storage file corresponding to the partition area is generated, and a file name of the initial column storage file is determined based on a partition identifier of the partition area.

[0153] In an optional implementation, the generating module 504, when generating the file index information corresponding to the target file, is configured to:

[0154] Obtaining metadata information of the target file; wherein the metadata information includes: a storage location of the file, the number of data blocks included in the target file, and a range of identifiers of each level of celestial body data stored in each data block;

[0155] The metadata information is used to generate file index information corresponding to the target file.

[0156] In an optional implementation, the generation module 504, when sorting the celestial data of the plurality of celestial bodies based on the identifiers corresponding to the celestial data and writing the sorted celestial data of the plurality of celestial bodies to an initial columnar storage file matching the identifiers, to obtain a target file storing the celestial data, is configured to:

[0157] Dividing the celestial body data of the plurality of celestial bodies into a plurality of subsets, wherein each subset includes a plurality of celestial body data;

[0158] For each subset, sorting the multiple pieces of celestial body data in the subset according to the identifiers;

[0159] Selecting celestial body data with the smallest identifier from each of the subsets to form a current data group, and deleting the celestial body data written into the current data group from each of the subsets;

[0160] Determine candidate celestial body data with the smallest identifier in the current data group, and write the candidate celestial body data into a corresponding column storage file;

[0161] Deleting the candidate celestial body data from the current data group, selecting the celestial body data with the smallest identifier from the subset corresponding to the candidate celestial body data again, and updating the selected celestial body data with the smallest identifier to the current data group;

[0162] Return to the step of determining the candidate celestial body data with the smallest identifier in the current data group, until the celestial body data of the plurality of celestial bodies are all written into the column storage file, thereby obtaining a target file storing the celestial body data.

[0163] In an optional implementation, the generating module 504, when writing the sorted celestial body data of the plurality of celestial bodies to the initial column storage file matching the identifier to obtain a target file storing the celestial body data, is configured to:

[0164] An encoding and compression operation is performed on the sorted celestial body data of the plurality of celestial bodies, and the compressed celestial body data is written into an initial column storage file matching the identifier, to obtain a target file storing the celestial body data.

[0165] Corresponding to the aforementioned embodiment of the celestial body data query method, the present application also provides an embodiment of a celestial body data query device. Figure 6 A schematic diagram of the celestial data query device provided for this application, specifically including:

[0166] Receiving module 601, for receiving data query information input by a user;

[0167] A second determining module 602 is configured to determine a target identifier of a target level corresponding to the celestial body data to be queried based on the position data indicated by the data query information;

[0168] The third determining module 603 is configured to determine the file name of the candidate file storing the celestial body data to be queried and the position number of the target data block in the candidate file based on the file index information corresponding to the target file and the target identifier of the target level;

[0169] The fourth determination module 604 is used to determine the target celestial body data queried by the user from the target data block of the candidate file based on the file name of the candidate file and the position number of the target data block in the candidate file, wherein the target file is generated using the star catalog file generation method described above.

[0170] In an optional implementation, the fourth determination module 604, when determining the target celestial body data queried by the user from the target data block of the candidate file based on the file name of the candidate file and the position number of the target data block in the candidate file, is configured to:

[0171] Reading the target data block in the candidate file according to the file name of the candidate file and the position number of the target data block in the candidate file;

[0172] According to the screening condition indicated by the data query information, the celestial body data stored in the target data block is screened to obtain the target celestial body data queried by the user.

[0173] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0174] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0175] The present application also provides a computer-readable storage medium, which stores a computer program that can be used to execute the above Figure 1 The star catalog file generation method provided, or for executing the above Figure 3 Provided celestial data query methods.

[0176] This application also provides Figure 7 The schematic structural diagram of the computer device shown in FIG. Figure 7 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 The star catalog file generation method shown in Figure 3 Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware. In other words, the execution body of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.

[0177] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0178] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0179] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0180] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0181] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0182] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0183] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0184] This specification may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including storage devices.

[0185] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

[0186] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for generating a star catalog file, characterized in that: The method comprises: Acquiring star catalog data, wherein the star catalog data includes celestial body data of a plurality of celestial bodies; Dividing the celestial surface area corresponding to the multiple celestial bodies into multiple local areas, and determining an identifier for each of the local areas; Determining an identifier matching each of the celestial body data according to the right ascension and declination included in the celestial body data and the identifiers of each local area in the celestial surface area; Based on the identifiers corresponding to the celestial body data, the celestial data of the multiple celestial bodies are sorted; the sorted celestial data of the multiple celestial bodies are written to an initial column storage file matching the identifier to obtain a target file storing the celestial body data, and file index information corresponding to the target file is generated, wherein the file index information is used to query celestial body data from the target file.

2. The method according to claim 1, characterized in that The step of dividing the celestial surface area corresponding to the plurality of celestial bodies into a plurality of local areas and determining an identifier for each of the local areas includes: Determine the number of levels for regional division and the level resolution corresponding to each level; The celestial sphere surface area is divided into a plurality of local areas based on the level resolution corresponding to each level by using a layered equal-area pixelation algorithm, and a multi-level identifier of each local area is determined.

3. The method according to claim 2, characterized in that After dividing the celestial sphere surface areas corresponding to the multiple celestial bodies into multiple local areas, the method further includes: Determining partition identifiers of partitioned areas divided in the first level; wherein, among the multiple levels, the level resolution of the (i+1)th level is a target multiple of the level resolution of the (i)th level, where i is a positive integer less than N, and N is the number of levels; each of the partitioned areas includes a plurality of the local areas, and different partitioned areas include different local areas; For each partition area, an initial column storage file corresponding to the partition area is generated, and a file name of the initial column storage file is determined based on a partition identifier of the partition area.

4. The method according to claim 1, wherein Generating file index information corresponding to the target file includes: Obtaining metadata information of the target file; wherein the metadata information includes: a storage location of the file, the number of data blocks included in the target file, and a range of identifiers of each level of celestial body data stored in each data block; The metadata information is used to generate file index information corresponding to the target file.

5. The method according to any one of claims 1 to 4, characterized in that: Sorting the celestial data of the plurality of celestial bodies based on identifiers corresponding to the celestial data, and writing the sorted celestial data of the plurality of celestial bodies into an initial column storage file matching the identifier, to obtain a target file storing the celestial data, including: Dividing the celestial body data of the plurality of celestial bodies into a plurality of subsets, wherein each subset includes a plurality of celestial body data; For each subset, sorting the multiple pieces of celestial body data in the subset according to the identifiers; Selecting celestial body data with the smallest identifier from each of the subsets to form a current data group, and deleting the celestial body data written into the current data group from each of the subsets; Determine candidate celestial body data with the smallest identifier in the current data group, and write the candidate celestial body data into a corresponding column storage file; Deleting the candidate celestial body data from the current data group, selecting the celestial body data with the smallest identifier from the subset corresponding to the candidate celestial body data again, and updating the selected celestial body data with the smallest identifier to the current data group; Return to the step of determining the candidate celestial body data with the smallest identifier in the current data group, until the celestial body data of the plurality of celestial bodies are all written into the column storage file, thereby obtaining a target file storing the celestial body data.

6. The method according to any one of claims 1 to 4, characterized in that: Writing the sorted celestial body data of the plurality of celestial bodies into an initial column storage file matching the identifier to obtain a target file storing the celestial body data includes: An encoding and compression operation is performed on the sorted celestial body data of the plurality of celestial bodies, and the compressed celestial body data is written into an initial column storage file matching the identifier, to obtain a target file storing the celestial body data.

7. A celestial body data query method, characterized in that: The method comprises: Receive data query information input by the user; Determining a target identifier of a target level corresponding to the celestial body data to be queried according to the position data indicated by the data query information; Determining, based on the file index information corresponding to the target file and the target identifier of the target level, the file name of the candidate file storing the celestial body data to be queried and the position number of the target data block in the candidate file; According to the file name of the candidate file and the position number of the target data block in the candidate file, the target celestial body data queried by the user is determined from the target data block in the candidate file, wherein the target file is generated using the star catalog file generation method described in any one of claims 1-6.

8. The method according to claim 7, characterized in that The step of determining the target celestial body data queried by the user from the target data block of the candidate file according to the file name of the candidate file and the position number of the target data block in the candidate file comprises: Reading the target data block in the candidate file according to the file name of the candidate file and the position number of the target data block in the candidate file; According to the screening condition indicated by the data query information, the celestial body data stored in the target data block is screened to obtain the target celestial body data queried by the user.

9. A star catalog file generating device, characterized in that: The device comprises: an acquisition module, configured to acquire star catalog data, wherein the star catalog data includes celestial body data of a plurality of celestial bodies; a division module, configured to divide the celestial surface area corresponding to the plurality of celestial bodies into a plurality of local areas, and determine an identifier for each of the local areas; A first determining module is configured to determine an identifier matching each of the celestial body data according to the right ascension and declination included in the celestial body data and the identifiers of each local area in the celestial surface area; A generation module is configured to sort the celestial data of the plurality of celestial bodies based on identifiers corresponding to the celestial data; write the sorted celestial data of the plurality of celestial bodies into an initial columnar storage file that matches the identifier, obtain a target file storing the celestial data, and generate file index information corresponding to the target file, wherein the file index information is used to query celestial data from the target file.

10. A celestial body data query device, characterized in that: The device comprises: A receiving module, used for receiving data query information input by a user; A second determining module is configured to determine a target identifier of a target level corresponding to the celestial body data to be queried based on the position data indicated by the data query information; a third determining module, configured to determine, based on the file index information corresponding to the target file and the target identifier of the target level, the file name of the candidate file storing the celestial body data to be queried and the position number of the target data block in the candidate file; A fourth determination module is used to determine the target celestial body data queried by the user from the target data block of the candidate file based on the file name of the candidate file and the position number of the target data block in the candidate file, wherein the target file is generated using the star catalog file generation method described in any one of claims 1-6.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the star catalog file generation method described in any one of claims 1 to 6 is implemented, or when the program is executed by a processor, the celestial data query method described in claim 7 or 8 is implemented.

12. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the star catalog file generation method described in any one of claims 1 to 6 is implemented, or the celestial body data query method described in claim 7 or 8 is implemented.

Citation Information

Cited By

  • Celestial body retrieval method and device, electronic equipment and storage medium

    CN120892588A

  • Celestial object retrieval methods, devices, electronic equipment, and storage media

    CN120892588B

  • Star catalogue data management method and star catalogue data management system

    CN122045200A