An astronomical data indexing method, device, equipment and medium

By using the preset sky-division division protocol to determine the spatial coding ID and filter it, the problem of excessive memory overhead and time cost in astronomical data retrieval is solved, and efficient astronomical data query and simplified business operations are achieved.

CN118708590BActive Publication Date: 2025-05-30WUHAN DAMENG DATABASE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410848882.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2025-05-30
Estimated Expiration
2044-06-27

AI Technical Summary

Technical Problem

The prior art has problems of high memory overhead and time cost in astronomical data retrieval, especially in the cone retrieval process of multi-band data.

Method used

By obtaining astronomical data query statements, the preset sky-division division protocol is used to determine the spatial encoding ID and corresponding spatial encoding type within the search range where the coordinates of the astronomical data center are located, and filtering them based on this information to obtain an index record that meets the filtering conditions, and finally projected in the target astronomical star table to determine the data query results.

Benefits of technology

It realizes efficient query of astronomical data, simplifies business operation steps, reduces the storage of additional intermediate IDs, and reduces the calculation cost during filtering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708590B_ABST
    Figure CN118708590B_ABST
Patent Text Reader

Abstract

The present invention discloses an astronomical data indexing method, device, equipment and medium. The method includes: obtaining an astronomical data query statement, which includes a filtering character, a target table name, astronomical data center coordinates and a retrieval function type; determining a spatial coding ID and a corresponding spatial coding type within the retrieval range where the astronomical data center coordinates are located in a target astronomical star table corresponding to the target table name according to a preset celestial region division protocol; filtering the spatial coding IDs within the retrieval range according to the spatial coding type of the spatial coding ID and the retrieval function type to obtain index records that meet the filtering conditions; and performing projection in the target astronomical star table according to the index records and the filtering character to determine the data query result. It realizes efficient query of astronomical data, simplifies the business operation steps, solves the problem of saving additional intermediate IDs in the prior art, and reduces the computational cost during filtering in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of database technology, and in particular, to an astronomical data indexing method, device, equipment and medium. Background Art

[0002] With the development of science and technology, astronomy has entered a new era of data explosion and rich information. The multi-band data has grown rapidly, and there are observation projects in the gamma-ray, X-ray, ultraviolet, optical, infrared, and radio bands. The amount of astronomical data is very large, and the total amount has reached the PB level. It can be seen that how to efficiently retrieve astronomical data has become an urgent problem in the current astronomical field.

[0003] The existing indexing scheme calculates the corresponding ID of the spherical region where each row of data is located through the celestial region division protocol. A B+ tree index is created on the calculated ID column. For each conical retrieval, the involved IDs are stored in an auxiliary table. Using the condition of the same ID, the auxiliary table and the original star catalog are joined, and then filtered by the distance condition on this basis to obtain the result set of the conical retrieval.

[0004] The above scheme relies on the implementation of the B+ tree index and multi-table join query inside the database, and needs to store the PixelID involved in each retrieval completely in memory or an auxiliary table, which will result in uncontrollable memory overhead and time cost. Summary of the Invention

[0005] The present invention provides an astronomical data indexing method, device, equipment and medium to achieve efficient query of astronomical data.

[0006] According to a first aspect of the present invention, there is provided an astronomical data indexing method, including:

[0007] Obtain an astronomical data query statement, where the astronomical data query statement includes a filtering character, a target table name, an astronomical data center coordinate, and a retrieval function type;

[0008] According to a preset celestial region division protocol, determine the spatial coding ID and the corresponding spatial coding type within the retrieval range where the astronomical data center coordinate is located in the target astronomical star catalog corresponding to the target table name;

[0009] Filter the spatial coding IDs within the retrieval range according to the spatial coding type of the spatial coding ID and the retrieval function type to obtain index records that meet the filtering conditions;

[0010] Perform projection in the target astronomical star catalog according to the index records and the filtering character to determine the data query result.

[0011] According to a second aspect of the present invention, there is provided an astronomical data indexing device, comprising:

[0012] A statement acquisition module, configured to acquire an astronomical data query statement, where the astronomical data query statement includes a filtering character, a target table name, an astronomical data center coordinate, and a retrieval function type;

[0013] A type determination module, configured to determine a spatial coding ID and a corresponding spatial coding type within a retrieval range where the astronomical data center coordinate is located in a target astronomical star catalog corresponding to the target table name according to a preset celestial region division protocol;

[0014] A record determination module, configured to filter the spatial coding IDs within the retrieval range according to the spatial coding type of the spatial coding ID and the retrieval function type to obtain index records that meet the filtering conditions;

[0015] A result determination module, configured to perform projection in the target astronomical star catalog according to the index records and the filtering character to determine a data query result.

[0016] According to a third aspect of the present invention, there is provided an electronic device, where the electronic device includes:

[0017] At least one processor; and

[0018] A memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the astronomical data indexing method according to any embodiment of the present invention.

[0020] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the astronomical data indexing method according to any embodiment of the present invention is implemented.

[0021] The technical solution of the embodiment of the present invention obtains an astronomical data query statement, which includes a filtering character, a target table name, the astronomical data center coordinates, and a retrieval function type; determines the spatial coding ID and the corresponding spatial coding type within the retrieval range where the astronomical data center coordinates are located in the target astronomical star table according to a preset celestial region division protocol; filters the spatial coding IDs within the retrieval range according to the spatial coding type of the spatial coding ID and the retrieval function type to obtain index records that meet the filtering conditions; and projects in the target astronomical star table according to the index records and the filtering character to determine the data query result. By determining the spatial coding ID according to the preset celestial region division protocol and based on the spatial coding type and filtering conditions, filtering is performed during the retrieval process to obtain index records. It realizes the efficient query of astronomical data, simplifies the business operation steps, solves the problem of saving additional intermediate IDs in the prior art, and reduces the calculation cost during filtering in the prior art.

[0022] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0024] Figure 1 is a flowchart of an astronomical data indexing method provided in Embodiment 1 of the present invention;

[0025] Figure 2 is a flowchart of an astronomical data indexing method provided in Embodiment 2 of the present invention;

[0026] Figure 3 is an example diagram of the celestial region division result in an astronomical data indexing method provided in Embodiment 2 of the present invention;

[0027] Figure 4 is a schematic structural diagram of an astronomical data indexing device provided in Embodiment 3 of the present invention;

[0028] Figure 5 is a schematic structural diagram of an electronic device for implementing the embodiments of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0029] To enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0031] Embodiment 1

[0032] Figure 1 The present invention provides a flowchart of an astronomical data indexing method for Embodiment 1. This embodiment is applicable to the situation of indexing astronomical data in a database. This method can be executed by an astronomical data indexing device, which can be implemented in the form of hardware and / or software, and the astronomical data indexing device can be configured in an electronic device. As Figure 1 shown, the method includes:

[0033] S110. Obtain an astronomical data query statement, which includes a filtering character, a target table name, an astronomical data center coordinate, and a retrieval function type.

[0034] In this embodiment, the astronomical data query statement can be understood as a statement for querying astronomical data. The filtering character can be understood as a character for specifying the filtered results to be output. The astronomical data center coordinate can be understood as the coordinate of the astronomical data to be queried under the astronomical star catalog. For example, the celestial body information listed in the astronomical star catalog data is based on the second equatorial coordinate system as the reference coordinate system. Since the right ascension and declination in this reference system are invariant, the astronomical data center coordinate can be composed of the right ascension (R.A) and declination (DEC) in the equatorial coordinate system. The retrieval function type can be understood as a method for retrieving astronomical data, such as including conical retrieval and rectangular retrieval. The target table name can be understood as the name corresponding to the astronomical star catalog to be queried.

[0035] Specifically, the query personnel can input an astronomical data query statement according to the set syntax. The processor of the database can receive the astronomical data query statement and analyze it to obtain the filtering characters, target table name, astronomical data center coordinates, and retrieval function type included in the astronomical data query statement.

[0036] Exemplarily, the retrieval function type may include conical retrieval and rectangular retrieval. Since the astronomical data center coordinates required for these two retrievals are different, the astronomical data query statement can be formed by two syntaxes. The syntax example of conical retrieval is: SELECT col1[,col2,...]FROM[schemaname.]tablename WHERE ConeSearch(centerRa,centerDec,radius), where col1[,col2,...] represents the filtering characters, ConeSearch() represents the conical retrieval function, centerRa and centerDec are the right ascension and declination of the astronomical data center coordinates, radius is the retrieval radius, the unit is arcmin, and [schemaname.]tablename represents the target table name. The syntax example of rectangular retrieval is: SELECT col1[,col2,...]FROM[schemaname.]tablename WHERE RectSearch(Ra1,Dec1,Ra2,Dec2). Among them, RectSearch() represents the rectangular retrieval function, and the astronomical data center coordinates are a rectangular area: [Ra1,Ra2]×[Dec1,Dec2].

[0037] Exemplarily, the astronomical data query statement can be: SELECT*FROM TEST_CATALOGUE WHEREConeSearch(100,30,120), where * represents the filtering characters, that is, all characters are filtered out. The retrieval function type is conical retrieval, the astronomical data center coordinates are (100,30,120), where 100 represents the right ascension, 30 represents the declination, 120 represents the retrieval radius, and the target table name is TEST_CATALOGUE.

[0038] S120. Determine the spatial coding ID and the corresponding spatial coding type within the retrieval range of the astronomical data center coordinates in the target astronomical star catalog corresponding to the target table name according to the preset celestial region division protocol.

[0039] It can be understood that the preset celestial region division protocol can be understood as a method of dividing an astronomical catalog as a celestial sphere with a specific geometric shape and division depth into spherical surfaces, dividing the spherical surface into N spaces with equal or unequal areas and numbering and marking them to achieve the mapping from the spherical surface to one dimension. Exemplarily, the preset celestial region division protocol may include the Hierarchical Triangular Mesh (HTM) method, which divides the celestial sphere into N levels. The celestial sphere is divided into 8 * 4^N triangular sub-regions, which are respectively represented by {v 0 , v 1 , v 2}, and the relative midpoints are represented by {w 0 , w 1 , w 2}. The new divided sub-regions are represented by the unique ID of the parent region and appended with one of {0, 1, 2}, which is represented by sharing vertices with the parent region, where the central sub-region has a suffix of 3. According to such rules, we can know that the smaller the sub-region, the longer the encoding and naming. The length of the encoding and name of the sub-region also represents its division level. The points in this division are represented by a leading 1 bit, then by the sub-region number [0, 7] of level 0, and then by the consecutive sub-region numbers [0, 3]. Each sub-region provides a unique 64-bit identifier / number corresponding to the encoding, called the HTMID. The smallest valid HTMID is 8. The maximum division depth of HTM is 25 levels, and at this time, the accuracy of the smallest pixel block / sub-region is 0.02 arcseconds. No matter which position on the given celestial sphere, there are triangular regions represented by HTMIDs of different levels that contain the given position. The Hierarchical Equal Area isoLatitude Pixelisation (HEALPix) uses the division of equal-area quadrilateral regions to replace the triangular division method of HTM. They also have a quadtree-like hierarchical recursion rule. Only the above two methods are taken as examples, and other protocols for implementing celestial region division are within the scope of protection.

[0040] In this embodiment, the target astronomical catalog can be understood as a table recording various data parameters of celestial bodies, such as position information, motion, magnitude, spectral type, etc. parameters, recording all astronomical data information collected through astronomical telescopes. In the astronomical catalog, each row records all the attribute information of a celestial body, and each column corresponds to an attribute. The retrieval range can be understood as the retrieval range formed by the coordinates of the astronomical data center. For example, in the case of conical retrieval, the right ascension and declination are used as the retrieval center, and a circular retrieval range is formed through the retrieval radius. The retrieval range of rectangular retrieval corresponds to a rectangular area range. The spatial coding ID can be understood as the serial number of the spatial coding mark corresponding to the area that falls within the retrieval range after the celestial sphere is divided. The spatial coding type can be understood as indicating the degree to which the area corresponding to the spatial coding ID falls within the retrieval range. For example, all spatial coding IDs can be divided into three types, such as completely falling within, partially falling within, and not falling within. Then, those that completely fall within and partially fall within are the spatial coding IDs within the retrieval range.

[0041] Specifically, the processor first divides the target astronomical catalog corresponding to the target table name based on a preset celestial sphere division protocol, divides the target astronomical catalog into sub-regions of a set shape, determines the retrieval range based on the coordinates of the astronomical data center, determines all sub-regions within the retrieval range and their corresponding spatial coding IDs in the divided target astronomical catalog, and determines the spatial coding type according to the coverage of each sub-region under the retrieval range.

[0042] For example, when the retrieval type is conical retrieval, the retrieval range corresponds to using the right ascension and declination in the coordinates of the astronomical data center as the retrieval center, and a circular range is formed through the retrieval radius. In the divided target astronomical catalog, the sub-regions that fall within this circular retrieval range can be determined based on this retrieval center and the coverage radius. Since it is possible that not all sub-regions completely fall within the circular retrieval range, the spatial coding type can be divided according to the coverage degree. For example, when the retrieval type is rectangular retrieval, the coordinates of the four boundary points that make up the rectangular retrieval range are recorded in the coordinates of the astronomical data center. The sub-regions that fall within this rectangular retrieval range and the spatial coding type are determined in the divided target astronomical catalog through these four boundary point coordinates.

[0043] Exemplarily, the processor can first create a B+ tree index with the space-encoding ID as the key and the right ascension RA, declination Dec in the astronomical data center coordinates, and other fields to be added to the index as values based on the astronomical data query statement according to the set syntax: CREATE INDEX index_name ON [schema.]table(PixelIDLookup(FixedDepth,RA,DEC),RA,DEC); where PixelIDLookup is a function to calculate the space-encoding ID of the sub-region where the specified right ascension and declination are located in the astronomical data center coordinates, and FixedDepth is the depth parameter that needs to be specified in the preset celestial region division protocol, which can be defined according to the actual situation or directly use the default value of 20.

[0044] S130. Filter the space-encoding IDs within the retrieval range according to the space-encoding type of the space-encoding ID and the type of retrieval function to obtain index records that meet the filtering conditions.

[0045] In this embodiment, the filtering condition can be understood as the condition for screening out the astronomical data to be queried. The index record can be understood as the record representing the row information queried in the target astronomical catalog.

[0046] Specifically, the processor can first filter according to the space-encoding type of the space-encoding ID, filter out the space-encoding IDs whose space-encoding types are completely outside the retrieval range, screen out the space-encoding IDs whose space-encoding types are completely within the retrieval range and the space-encoding IDs that are partially within the retrieval range, and then perform a secondary filter on the space-encoding IDs that are partially within the retrieval range based on the screening function corresponding to the retrieval function type to determine whether the space-encoding IDs that are partially within the retrieval range need to be retained, and then use the space-encoding IDs in the secondary filter result and the space-encoding IDs that are completely within the retrieval range as the index records that meet the filtering conditions.

[0047] S140. Perform a projection in the target astronomical catalog according to the index record and the screening character to determine the data query result.

[0048] In this embodiment, the data query result can be understood as the result for returning the queried astronomical data.

[0049] Specifically, the processor can index in the target astronomical catalog according to the space-encoding ID in the index record to determine the complete data, and then project the data to be output from the complete data through the screening condition corresponding to the screening character as the data output result.

[0050] The technical solution of the embodiment of the present invention obtains an astronomical data query statement, which includes a filtering character, a target table name, the coordinates of the astronomical data center, and a retrieval function type; determines the spatial coding ID and the corresponding spatial coding type within the retrieval range of the coordinates of the astronomical data center in the target astronomical star table corresponding to the target table name according to a preset sky area division protocol; filters the spatial coding IDs within the retrieval range according to the spatial coding type of the spatial coding ID and the retrieval function type to obtain index records that meet the filtering conditions; projects in the target astronomical star table according to the index records and the filtering character to determine the data query result. By determining the spatial coding ID according to the preset sky area division protocol and based on the spatial coding type and filtering conditions, filtering is performed during the retrieval process to obtain index records. It realizes the efficient query of astronomical data, simplifies the business operation steps, solves the problem of saving additional intermediate IDs in the prior art, and reduces the computational cost during filtering in the prior art.

[0051] Embodiment 2

[0052] Figure 2 The flowchart of an astronomical data indexing method provided by Embodiment 2 of the present invention is shown in the following figure. This embodiment is a further refinement of the above embodiment. As Figure 2 shown, the method includes:

[0053] S201. Obtain an astronomical data query statement, which includes a filtering character, a target table name, the coordinates of the astronomical data center, and a retrieval function type.

[0054] S202. Based on a preset division depth, perform sky area division and coding on the target astronomical star table corresponding to the target table name through a preset sky area division protocol to obtain a sky area division result.

[0055] In this embodiment, the preset division depth can be understood as the depth for performing sky area division, that is, it determines the accuracy of the divided sub-regions. The sky area division result can be understood as the result of dividing the target astronomical star table into each region.

[0056] Specifically, the processor can perform sky area division and coding on the target astronomical star table corresponding to the target table name through a preset sky area division protocol based on the preset division depth, divide the target astronomical star table into multiple sub-regions according to the sky area and code each sub-region to obtain each sub-region and the corresponding spatial coding ID, that is, obtain the sky area division result.

[0057] Exemplarily, Figure 3 The following figure is an example diagram of the sky area division result in the astronomical data indexing method provided by Embodiment 2 of the present invention. As Figure 3 shown, the preset sky area division protocol can be HEALPix, Figure 3It includes examples of celestial sphere division results at 4 different preset division depths. It can be seen from the figure that the greater the preset division depth, the more sub-regions (i.e., the curvilinear quadrilateral sub-regions in the figure) are divided. The preset division depth can be the default 20 or defined by itself according to the actual situation. The target astronomical catalog is divided into multiple curvilinear quadrilateral sub-regions with equal areas by the HEALPix method, and according to the nested NESTED coding method or the RING coding method, RING numbers the sub-regions in the order from west to east and from north to south; NESTED numbers the sub-regions in a hierarchical recursive manner, and encodes each sub-region to obtain the spatial coding ID corresponding to each sub-region.

[0058] S203. Determine the retrieval range where the astronomical data center coordinates are located in the celestial sphere division result, and obtain the spatial coding IDs of the sub-regions within the retrieval range.

[0059] In this embodiment, a sub-region can be understood as each region after division.

[0060] Specifically, the processor can select according to the retrieval range formed by the astronomical data center coordinates in the celestial sphere division result, and obtain all sub-regions within the retrieval range. These sub-regions include those completely within the retrieval range and those with part of the sub-region within the retrieval range.

[0061] S204. Determine the spatial coding type of the spatial coding ID according to the coverage degree of the sub-region by the retrieval range.

[0062] In this embodiment, the coverage degree can be understood as the degree of the region within the retrieval range accounting for the total sub-regions.

[0063] Specifically, the processor can divide the sub-regions within the retrieval range according to the coverage degree, and divide the spatial coding types corresponding to the spatial coding IDs of the sub-regions into those completely within the retrieval range, those with part within the retrieval range, and those completely outside the retrieval range.

[0064] S205. Filter the spatial coding IDs within the retrieval range according to the spatial coding type, and determine the first sub-index record that meets the first filtering condition and the spatial coding IDs to be filtered that meet the secondary filtering condition.

[0065] In this embodiment, the first filtering condition can be understood as the condition for screening out the spatial coding IDs completely within the retrieval range. The first sub-index record can be understood as the spatial coding IDs of the sub-regions completely within the retrieval range. The secondary filtering condition can be understood as the condition for screening out the spatial coding IDs with part within the retrieval range. The spatial coding IDs to be filtered can be understood as the spatial coding IDs of the sub-regions with part within the retrieval range that need to be secondarily filtered.

[0066] Specifically, the processor can filter the spatial coding IDs within the retrieval range according to the spatial coding type, determine the spatial coding IDs whose spatial coding type is completely within the retrieval range as the first sub-index records that meet the first filtering condition; the processor can determine the spatial coding IDs whose spatial coding type is partially within the retrieval range as the spatial coding IDs to be filtered that meet the secondary filtering condition according to the spatial coding type within the retrieval range.

[0067] Further, on the basis of the above embodiments, the step of filtering the spatial coding IDs within the retrieval range according to the spatial coding type to determine the first sub-index records that meet the first filtering condition and the spatial coding IDs to be filtered that meet the secondary filtering condition can be optimized as:

[0068] Determine the first sub-index records that meet the first filtering condition according to the spatial coding IDs whose spatial coding type is the full spatial type; use the spatial coding IDs whose spatial coding type is the partial spatial type as the spatial coding IDs to be filtered that meet the secondary filtering condition.

[0069] In this embodiment, the full spatial type can be understood as the spatial coding ID used to indicate that the sub-region is completely within the retrieval range. The partial spatial type can be understood as the spatial coding ID used to indicate that the sub-region is partially within the retrieval range.

[0070] Specifically, the processor can determine the spatial coding IDs whose spatial coding type is the full spatial type as the first sub-index records that meet the first filtering condition, and use the spatial coding IDs whose spatial coding type is the partial spatial type as the spatial coding IDs to be filtered that meet the secondary filtering condition and need to be secondarily filtered.

[0071] Exemplarily, the spatial coding type of the spatial coding ID that is completely within the retrieval range is the full spatial type, which can be represented by the symbol FULL; the spatial coding type of the spatial coding ID that is partially within the retrieval range is the partial spatial type, which can be represented by the symbol PARTIAL, and the spatial coding type of the spatial coding ID that is completely outside the retrieval range can be represented by the symbol OUT. Then, the first sub-index records that meet the first filtering condition are the spatial coding IDs whose spatial coding type is FULL, and the spatial coding IDs to be filtered that meet the secondary filtering condition are the spatial coding IDs whose spatial coding type is PARTITAL.

[0072] S206. Secondarily filter the spatial coding IDs to be filtered according to the filtering condition corresponding to the retrieval function type to obtain the second sub-index records that meet the second filtering condition.

[0073] In this embodiment, the filtering condition can be understood as the condition for secondary filtering of the space-encoded ID to be filtered. The second filtering condition can be understood as the condition for screening out the space-encoded ID to be filtered that can be used as the result. The second sub-index record can be understood as the index record selected from the space-encoded ID to be filtered as the retrieval result.

[0074] Specifically, the filtering condition corresponding to each retrieval function type can be preset in advance. The processor can obtain the right ascension and declination corresponding to the space-encoded ID to be filtered, calculate the right ascension and declination through the function corresponding to the filtering condition, and compare them with the coordinates of the astronomical data center to achieve secondary filtering, and then determine the second sub-index record that meets the second filtering condition.

[0075] Further, on the basis of the above embodiment, the step of performing secondary filtering on the space-encoded ID to be filtered according to the filtering condition corresponding to the retrieval function type to obtain the second sub-index record that meets the second filtering condition can be optimized as:

[0076] Determine the astronomical coordinates to be filtered corresponding to the space-encoded ID to be filtered in the target astronomical catalog; when the retrieval function type is conical retrieval, extract the retrieval radius in the astronomical data query statement, and determine the angular distance between the astronomical coordinates to be filtered and the coordinates of the astronomical data center; determine the second sub-index record that meets the second filtering condition according to the astronomical coordinates to be filtered corresponding to the angular distance less than the retrieval radius; when the retrieval function type is rectangular retrieval, determine the second sub-index record according to the astronomical coordinates to be filtered within the rectangle formed by the coordinates of the astronomical data center.

[0077] In this embodiment, the astronomical coordinates to be filtered can be understood as the astronomical coordinates of the sub-region corresponding to the space-encoded ID to be filtered, including the right ascension and declination. The angular distance can be understood as the angular distance between the astronomical angular distance to be filtered and the coordinates of the astronomical data center.

[0078] Specifically, the processor can determine the astronomical coordinates to be filtered in the target astronomical catalog corresponding to the sub-region corresponding to the space encoding ID to be filtered. When the retrieval function type is conical retrieval, the processor can extract the retrieval radius in the astronomical data query statement. The processor can calculate the angular distance between the astronomical coordinates to be filtered and the center coordinates of the astronomical data through a preset great circle formula, compare the angular distance with the retrieval radius, filter out the angular distance less than the retrieval radius, and use the space encoding ID of the astronomical coordinates to be filtered corresponding to the angular distance as the second sub-index record that meets the second filtering condition. When the retrieval function type is rectangular retrieval, the processor can determine whether the right ascension of the astronomical coordinates to be filtered is within the right ascension range of the rectangular range formed by the center coordinates of the astronomical data and whether the declination of the astronomical coordinates to be filtered is within the declination range of the rectangular range. If both the right ascension and declination of the astronomical coordinates to be filtered are within the rectangular range, the corresponding space encoding ID to be filtered is used as the second sub-index record.

[0079] Exemplarily, when it is conical retrieval, the angular distance can be determined through the great circle formula. The astronomical coordinates to be filtered S are (RA, DEC), and the center coordinates of the astronomical data T are (ra, dec). The angular distance d between S and T is:

[0080] d = arccos[sin(DEC)sin(dec) + cos DEC cos dec cos(RA - ra)]

[0081] The retrieval radius is r, and the second sub-index record is the space encoding ID to be filtered where d is less than r.

[0082] Exemplarily, when it is rectangular retrieval, the rectangular retrieval range is from 15° to 16° in right ascension and from 20° to 21° in declination. Then when 15 < RA < 16 and 20 < DEC < 21, the space encoding ID to be filtered is the second sub-index record that meets the second filtering condition.

[0083] S207: Use the first sub-index record and the second sub-index record as the index records that meet the filtering conditions.

[0084] Specifically, the processor can use the first sub-index record that meets the first filtering condition and the second sub-index record that meets the second filtering condition as the final index records that meet the filtering conditions.

[0085] S208: Determine the data column to be screened corresponding to the index record in the target astronomical catalog.

[0086] In this embodiment, the data column to be screened can be understood as the data column corresponding to the index record in the target astronomical catalog.

[0087] Specifically, the processor may query in the target astronomical catalog based on the index record to determine the corresponding data column to be filtered.

[0088] S209. Project the data column to be filtered according to the filtering character to determine the data query result.

[0089] Specifically, the processor may determine the column data to be projected from the data column to be filtered according to the filtering condition corresponding to the filtering character as the data query result.

[0090] Exemplarily, the filtering character may be *, and * represents querying all information of the data column to be filtered during query.

[0091] In the technical solution of the embodiment of the present invention, by obtaining an astronomical data query statement, the astronomical data query statement includes a filtering character, a target table name, an astronomical data center coordinate, and a retrieval function type; according to a preset sky area division protocol, in the target astronomical catalog corresponding to the target table name, determine the spatial coding ID and the corresponding spatial coding type within the retrieval range where the astronomical data center coordinate is located, create a B-tree index based on the spatial coding ID and the target astronomical catalog, based on the spatial coding type of the spatial coding ID, perform a first filtering on the spatial coding IDs of the complete spatial type and the partial spatial type to obtain a first sub-index record that meets the first filtering condition and the spatial coding IDs to be filtered that meet the secondary filtering condition, perform a secondary filtering on the spatial coding IDs to be filtered according to the filtering condition corresponding to the retrieval function type to obtain a second sub-index record that meets the second filtering condition, and then use the first sub-index record and the second sub-index record as index records that meet the filtering condition, and perform different processing according to different spatial coding types, reducing the calculation cost of using transcendental functions to calculate the spherical distance in the original filtering method; project according to the index record and the filtering character in the target astronomical catalog to determine the data query result. By determining the spatial coding ID according to the preset sky area division protocol and performing filtering during the retrieval process based on the spatial coding type and the filtering condition to obtain the index record, the efficient query of astronomical data is realized, the business operation steps are simplified, the problem of saving additional intermediate IDs in the prior art is solved, and the calculation cost during filtering in the prior art is reduced.

[0092] Embodiment III

[0093] Figure 4 It is a schematic structural diagram of an astronomical data indexing device provided in Embodiment III of the present invention.

[0094] As Figure 4 shown, the device includes:

[0095] A statement acquisition module 31, configured to acquire an astronomical data query statement, where the astronomical data query statement includes a filtering character, a target table name, astronomical data center coordinates, and a retrieval function type;

[0096] A type determination module 32, configured to determine a spatial coding ID and a corresponding spatial coding type within a retrieval range where the astronomical data center coordinates are located in a target astronomical star table corresponding to the target table name according to a preset sky area division protocol;

[0097] A record determination module 33, configured to filter the spatial coding IDs within the retrieval range according to the spatial coding type of the spatial coding ID and the retrieval function type to obtain index records that meet the filtering conditions;

[0098] A result determination module 34, configured to perform projection in the target astronomical star table according to the index records and the filtering character to determine a data query result.

[0099] The technical solution of the embodiment of the present invention, by acquiring an astronomical data query statement, where the astronomical data query statement includes a filtering character, a target table name, astronomical data center coordinates, and a retrieval function type; determining a spatial coding ID and a corresponding spatial coding type within a retrieval range where the astronomical data center coordinates are located in a target astronomical star table corresponding to the target table name according to a preset sky area division protocol; filtering the spatial coding IDs within the retrieval range according to the spatial coding type of the spatial coding ID and the retrieval function type to obtain index records that meet the filtering conditions; performing projection in the target astronomical star table according to the index records and the filtering character to determine a data query result. By using the preset sky area division protocol to determine the spatial coding ID and based on the spatial coding type and filtering conditions, filtering is performed during the retrieval process to obtain index records. It realizes efficient query of astronomical data, simplifies the business operation steps, solves the problem of saving additional intermediate IDs in the prior art, and reduces the calculation cost during filtering in the prior art.

[0100] Further, the type determination module 32 is specifically configured to:

[0101] Based on a preset division depth, perform sky area division and coding on the target astronomical star table corresponding to the target table name through a preset sky area division protocol to obtain a sky area division result;

[0102] Determine the retrieval range where the astronomical data center coordinates are located in the sky area division result, and obtain the spatial coding IDs of sub-regions within the retrieval range;

[0103] Determine the spatial coding type of the spatial coding ID according to the coverage degree of the sub-regions by the retrieval range.

[0104] Further, the record determination module 33 includes:

[0105] A first determination unit, configured to filter the spatial coding IDs within the retrieval range according to the spatial coding type, and determine a first sub-index record that meets the first filtering condition and the spatial coding IDs to be filtered that meet the secondary filtering condition;

[0106] A second determination unit, configured to perform secondary filtering on the spatial coding IDs to be filtered according to the filtering condition corresponding to the retrieval function type, and obtain a second sub-index record that meets the second filtering condition;

[0107] A third determination unit, configured to use the first sub-index record and the second sub-index record as the index records that meet the filtering condition.

[0108] Wherein, the first determination unit is specifically configured to:

[0109] Determine a first sub-index record that meets the first filtering condition according to the spatial coding ID whose spatial coding type is a complete spatial type;

[0110] Use the spatial coding IDs whose spatial coding type is a partial spatial type as the spatial coding IDs to be filtered that meet the secondary filtering condition.

[0111] Wherein, the second determination unit is specifically configured to:

[0112] Determine the astronomical coordinates to be filtered corresponding to the spatial coding IDs to be filtered in the target astronomical star catalog;

[0113] When the retrieval function type is a conical retrieval, extract the retrieval radius in the astronomical data query statement, and determine the angular distance between the astronomical coordinates to be filtered and the central coordinates of the astronomical data;

[0114] Determine a second sub-index record that meets the second filtering condition according to the astronomical coordinates to be filtered corresponding to the angular distance less than the retrieval radius;

[0115] When the retrieval function type is a rectangular retrieval, determine the second sub-index record according to the astronomical coordinates to be filtered within the rectangle formed by the central coordinates of the astronomical data.

[0116] Furthermore, the result determination module 34 is specifically configured to:

[0117] Determine the data columns to be screened corresponding to the index records in the target astronomical star catalog;

[0118] Perform projection on the data columns to be screened according to the screening characters, and determine the data query result.

[0119] The astronomical data indexing device provided by the embodiments of the present invention can execute the astronomical data indexing method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.

[0120] Embodiment 4

[0121] Figure 5 FIG. shows a schematic structural diagram of an electronic device 40 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, for example, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described herein and / or claimed.

[0122] As Figure 5 shown, the electronic device 40 includes at least one processor 41, and a memory communicatively connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc. The memory stores a computer program executable by the at least one processor. The processor 41 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 into the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. The input / output (I / O) interface 45 is also connected to the bus 44.

[0123] Multiple components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a magnetic disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0124] The processor 41 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as the astronomical data indexing method.

[0125] In some embodiments, the astronomical data indexing method can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 48. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the astronomical data indexing method described above can be executed. Alternatively, in other embodiments, the processor 41 can be configured to execute the astronomical data indexing method by any other suitable means (e.g., by means of firmware).

[0126] Various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor, and can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0127] The computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0128] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0129] In order to provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0130] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by any form or medium of digital data communication (e.g., a communication network). Examples of the communication network include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0131] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The relationship between the client and the server is created by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0132] It should be understood that various forms of processes shown above can be used, steps can be reordered, added or deleted. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.

[0133] The above specific embodiments do not constitute a limitation to the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for indexing astronomical data, characterized in that: include: Obtaining an astronomical data query statement, wherein the astronomical data query statement includes a screening character, a target table name, an astronomical data center coordinate, and a retrieval function type; According to the preset sky area division protocol, determine the spatial code ID and the corresponding spatial code type within the search range of the astronomical data center coordinates in the target astronomical star catalog corresponding to the target table name; According to the spatial coding type of the spatial coding ID and the search function type, the spatial coding ID within the search range is filtered to obtain index records that meet the filtering conditions; Determine a data query result by projecting the target astronomical star catalog according to the index record and the screening character; According to the spatial coding type of the spatial coding ID and the search function type, the spatial coding ID within the search range is filtered to obtain index records that meet the filtering conditions, including: Filter the spatial code IDs within the search range according to the spatial code type, and determine the first sub-index record that meets the first filtering condition and the spatial code ID to be filtered that meets the secondary filtering condition; Perform secondary filtering on the spatial code ID to be filtered according to the filtering condition corresponding to the search function type to obtain a second sub-index record that meets the second filtering condition; Taking the first sub-index record and the second sub-index record as index records that meet the filtering condition; The second filtering of the spatial code ID to be filtered is performed according to the filtering condition corresponding to the search function type to obtain a second sub-index record that meets the second filtering condition, including: Preset the filter conditions corresponding to each search function type; Obtaining the right ascension and declination corresponding to the spatial code ID to be filtered, calculating the right ascension and declination by the function corresponding to the filtering condition, and comparing them with the coordinates of the astronomical data center to implement secondary filtering, and obtaining a second sub-index record that meets the second filtering condition; The filtering of the spatial coding IDs within the search range according to the spatial coding type to determine the first sub-index record satisfying the first filtering condition and the spatial coding IDs to be filtered satisfying the secondary filtering condition includes: Determining a first sub-index record that satisfies a first filtering condition according to the space encoding ID whose space encoding type is a complete space type; The spatial code ID whose spatial code type is a partial spatial type is used as the spatial code ID to be filtered that meets the secondary filtering condition; The second filtering of the spatial code ID to be filtered according to the filtering condition corresponding to the search function type to obtain the second sub-index record satisfying the second filtering condition includes: Determine the astronomical coordinates to be filtered corresponding to the spatial code ID to be filtered in the target astronomical star catalog; When the search function type is cone search, extracting the search radius in the astronomical data query statement, and determining the angular distance between the astronomical coordinates to be filtered and the astronomical data center coordinates; Determining a second sub-index record that meets a second filtering condition according to the astronomical coordinates to be filtered corresponding to the angular distance that is smaller than the search radius; When the search function type is rectangular search, the second sub-index record is determined according to the astronomical coordinates to be filtered within the rectangular range formed by the astronomical data center coordinates.

2. The method according to claim 1, characterized in that The step of determining the spatial coding ID and the corresponding spatial coding type within the search range of the astronomical data center coordinates in the target astronomical star catalog corresponding to the target catalog name according to the preset sky area division protocol includes: Based on the preset division depth and through the preset sky area division protocol, the target astronomical star catalog corresponding to the target catalog name is divided into sky areas and encoded to obtain a sky area division result; Determine a search range where the coordinates of the astronomical data center are located in the sky area division result, and obtain a spatial coding ID of a sub-area within the search range; The spatial coding type of the spatial coding ID is determined according to the coverage degree of the search range to the sub-area.

3. The method according to claim 1, characterized in that The projecting the target astronomical star catalog according to the index record and the screening character to determine the data query result includes: Determine the data column to be screened corresponding to the index record in the target astronomical star catalog; The to-be-filtered data column is projected according to the filter character to determine a data query result.

4. An astronomical data indexing device, characterized in that: include: A statement acquisition module is used to acquire an astronomical data query statement, wherein the astronomical data query statement includes a screening character, a target table name, an astronomical data center coordinate, and a retrieval function type; A type determination module, for determining the spatial code ID and the corresponding spatial code type within the search range where the coordinates of the astronomical data center are located in the target astronomical star catalog corresponding to the target table name according to a preset sky area division protocol; A record determination module, configured to filter the spatial coding IDs within the search range according to the spatial coding type of the spatial coding ID and the search function type, to obtain index records that meet the filtering conditions; A result determination module, used for projecting the index record and the screening character into the target astronomical star catalog to determine the data query result; The record determination module includes: a first determination unit, a second determination unit and a third determination unit; The first determining unit is used to filter the spatial coding IDs within the search range according to the spatial coding type, and determine the first sub-index records that meet the first filtering condition and the spatial coding IDs to be filtered that meet the secondary filtering condition; The second determining unit is used to perform secondary filtering on the spatial code ID to be filtered according to the filtering condition corresponding to the search function type to obtain a second sub-index record that meets the second filtering condition; The third determining unit is configured to use the first sub-index record and the second sub-index record as index records that meet a filtering condition; The second determination unit is specifically used to: pre-set a filtering condition corresponding to each search function type; obtain the right ascension and declination corresponding to the spatial code ID to be filtered, calculate the right ascension and declination by the function corresponding to the filtering condition, and compare them with the coordinates of the astronomical data center to achieve secondary filtering, and obtain a second sub-index record that meets the second filtering condition; Wherein, the first determining unit is further configured to: Determining a first sub-index record that satisfies a first filtering condition according to the space encoding ID whose space encoding type is a complete space type; The spatial code ID whose spatial code type is a partial spatial type is used as the spatial code ID to be filtered that meets the secondary filtering condition; Wherein, the second determining unit is further configured to: Determine the astronomical coordinates to be filtered corresponding to the spatial code ID to be filtered in the target astronomical star catalog; When the search function type is cone search, extracting the search radius in the astronomical data query statement, and determining the angular distance between the astronomical coordinates to be filtered and the astronomical data center coordinates; Determining a second sub-index record that meets a second filtering condition according to the astronomical coordinates to be filtered corresponding to the angular distance that is smaller than the search radius; When the search function type is rectangular search, the second sub-index record is determined according to the astronomical coordinates to be filtered within the rectangular range formed by the astronomical data center coordinates.

5. The device according to claim 4, characterized in that The type determination module is specifically used for: Based on the preset division depth and through the preset sky area division protocol, the target astronomical star catalog corresponding to the target catalog name is divided into sky areas and encoded to obtain a sky area division result; Determine a search range where the coordinates of the astronomical data center are located in the sky area division result, and obtain a spatial coding ID of a sub-area within the search range; The spatial coding type of the spatial coding ID is determined according to the coverage degree of the search range to the sub-area.

6. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the astronomical data indexing method according to any one of claims 1 to 3.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the astronomical data indexing method according to any one of claims 1 to 3 when executed.