Astronomical star catalog data archiving method and device, equipment, storage medium and program product
By dividing and storing data entries of astronomical star catalogs in astronomical research, the problem of low data acquisition and processing speed caused by database storage space limitations is solved, efficient data archiving and storage is achieved, and data integrity and processing speed are ensured.
Patent Information
- Application Number
- CN202411001276.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-07-25
AI Technical Summary
When existing technology acquires and manages large-scale observation data in astronomical research, due to the limitation of database storage space, it is impossible to directly download and store the complete star catalog data at one time. It requires manual downloading in batches and manual integration, which is time-consuming and time-consuming. Inefficient, data omission or duplication is prone to occur, and the acquisition and processing speed is low, which cannot meet the demand for efficient acquisition of complete data.
Determine the data entries related to each initial interval in the astronomical star catalog through structured query statements, divide the target sub-intervals according to the threshold of the interval entries, and store the star attribute data to the target file based on the preset sorting rules to improve the retrieval and storage of the server. efficiency.
It achieves efficient archiving and storage of massive astronomical star catalog data, improves the server's carrying capacity and local hard disk read and write speed, reduces the possibility of human error, and ensures the integrity and processing speed of the data set.
Smart Images

Figure CN118535651B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of database technology, and in particular to a data archiving method and device, equipment, storage medium and program product for an astronomical star catalog. Background Art
[0002] In astronomical research, acquiring and managing large-scale observational data is an important and complex task. Due to the limitation of database storage space, relevant personnel cannot directly download and store complete star catalog data at one time. Existing solutions mainly rely on manual operations, downloading data in batches and then manually integrating the data. Therefore, the existing methods are not only time-consuming and labor-intensive, but also prone to data omissions or duplications. In the case of incomplete data acquisition, all star catalog data needs to be newly downloaded. The data acquisition and processing speed is low, which cannot meet the needs of efficient acquisition of complete data. Summary of the invention
[0003] In view of the above problems, the present invention provides a method and device, equipment, storage medium and program product for archiving data of an astronomical star catalog.
[0004] According to a first aspect of the present invention, there is provided a method for archiving data of an astronomical star catalogue, comprising:
[0005] According to a structured query statement of an astronomical star catalog, data entries related to each initial interval in the astronomical star catalog are determined, wherein the initial interval represents multiple regions of an observed star, the astronomical star catalog stores attribute data related to the star, and the data entries represent the number of rows of the star in the astronomical star catalog corresponding to the initial interval; according to the data entries related to the initial interval and the interval entry threshold, at least one target sub-interval is determined from the initial interval; based on a preset sorting rule, the attribute data of the star in the at least one target sub-interval is stored in a target file, wherein the preset sorting rule is determined based on an average right ascension value of the at least one target sub-interval.
[0006] Optionally, determining at least one target sub-interval from the initial interval according to the data entries of the initial interval and the interval entry threshold includes:
[0007] When the data entry of the initial interval is greater than the interval entry threshold, the interval division value is determined according to the data entry and the interval entry threshold;
[0008] The initial interval is divided according to the interval division value to obtain at least one target sub-interval.
[0009] Optionally, the initial interval is divided according to the interval division value to obtain at least one target sub-interval, including:
[0010] According to the right ascension upper limit value and the right ascension lower limit value of the initial interval, the right ascension range of the initial interval is determined; according to the interval division value and the right ascension range, at least one target right ascension range is determined; according to the at least one target right ascension range, the initial interval is divided to determine at least one target sub-interval.
[0011] Optionally, based on a preset sorting rule, storing the attribute data of the star in at least one target sub-interval into a target file includes:
[0012] Based on a preset sorting rule, a query order between at least one target sub-interval is determined; and an event interface is called to store attribute data of celestial bodies in at least one target sub-interval into a target file according to the query order.
[0013] Optionally, the event interface includes a query interface, a download interface, and a transfer interface; wherein calling the event interface to store the attribute data of the celestial body in at least one target sub-interval into the target file according to the query order includes:
[0014] According to the query order, the target sub-interval to be queried is determined; for the target sub-interval to be queried, the query interface is called to obtain the attribute data of the celestial bodies in the target sub-interval; the download interface is called to download the attribute data of the celestial bodies in the target sub-interval to the memory; the transfer interface is called to store the attribute data of the celestial bodies in the target sub-interval stored in the memory to the target file, wherein the file name of the target file is related to the right ascension value and the declination value of the target sub-interval.
[0015] Optionally, the initial interval includes multiple target sub-intervals, and the data archiving method further includes:
[0016] Obtain sub-data entries from a target file corresponding to a target sub-interval; sum up the sub-data entries corresponding to each of a plurality of target sub-intervals to obtain storage data entries; obtain verification results based on entry comparison results between the storage data entries and data entries of the initial interval; and update the target file based on the verification results.
[0017] A second aspect of the present invention provides a data archiving device for an astronomical star catalog, comprising:
[0018] A first determination module is used to determine data entries related to each initial interval in the astronomical star catalog according to a structured query statement in the astronomical star catalog, wherein the initial interval represents multiple regions of observed celestial bodies, the astronomical star catalog stores attribute data related to celestial bodies, and the data entry represents the number of rows of celestial bodies in the astronomical star catalog corresponding to the initial interval;
[0019] A second determination module, configured to determine at least one target sub-interval from the initial interval according to data entries related to the initial interval and an interval entry threshold;
[0020] The storage module is used to store the attribute data of the celestial body in at least one target sub-interval into a target file based on a preset sorting rule, wherein the preset sorting rule is determined based on the average right ascension value of at least one target sub-interval.
[0021] A third aspect of the present invention provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned data archiving method.
[0022] The fourth aspect of the present invention further provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned data archiving method.
[0023] According to the data archiving method, device, equipment, storage medium and program product of the astronomical star catalog provided by the present invention, the data entries related to each initial interval in the astronomical star catalog are determined according to the structured query statement of the astronomical star catalog; then at least one target sub-interval is determined from the initial interval according to the data entries related to the initial interval and the interval entry threshold; based on the preset sorting rule, the attribute data of the star in the at least one target sub-interval is stored in the target file. Because before storing the attribute data of the star, the target sub-interval that meets the interval entry threshold is first determined according to the data entries of the initial interval and the interval entry threshold, it can be ensured that the server cyclically retrieves the attribute data of the star corresponding to the target sub-interval with high performance; then the attribute data of the star in the at least one target interval is stored in the target file, so that the attribute data of the massive astronomical star catalog is archived and stored in a short period of time, which improves the carrying capacity of the server and the read and write speed of the local hard disk, and greatly reduces the possibility of human error. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0025] Figure 1 An application scenario of the data archiving method of an astronomical star catalog according to an embodiment of the present invention is shown;
[0026] Figure 2 A flow chart showing a method for archiving data of an astronomical star catalog according to an embodiment of the present invention is shown;
[0027] Figure 3 A flow chart of determining a target sub-interval according to an embodiment of the present invention is shown;
[0028] Figure 4 A structural block diagram of a data archiving device for an astronomical star catalogue according to an embodiment of the present invention is shown;
[0029] Figure 5 A block diagram of an electronic device suitable for implementing a data archiving method for an astronomical star catalogue according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0030] Below, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of concepts of the present invention.
[0031] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0032] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0033] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0034] In the process of implementing the present invention, it is found that in astronomical research, acquiring and managing large-scale observation data is an important and complex task. Due to the limitation of database storage space, relevant personnel cannot directly download and store complete star catalog data at one time. The existing scheme mainly relies on manual operation, downloading data in batches and then manually integrating the data. Therefore, the existing method is not only time-consuming and labor-intensive, but also prone to data omission or duplication. In the case of incomplete data acquisition, all star catalog data needs to be newly downloaded. The data acquisition and processing speed is low, which cannot meet the demand for efficient acquisition of complete data.
[0035] In view of this, an embodiment of the present invention provides a data archiving method and device, equipment, storage medium and program product for an astronomical star catalog. The method includes: determining data entries related to each initial interval in the astronomical star catalog according to a structured query statement of the astronomical star catalog, wherein the initial interval represents multiple regions of observed stars, the astronomical star catalog stores attribute data related to stars, and the data entries represent the number of stars in the astronomical star catalog corresponding to the initial interval; determining at least one target subinterval from the initial interval according to the data entries related to the initial interval and the interval entry threshold; based on a preset sorting rule, storing the attribute data of the stars in the at least one target subinterval into a target file, wherein the preset sorting rule is determined based on the average right ascension value of the at least one target subinterval.
[0036] In the technical solution of the present invention, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0037] Figure 1 The application scenario of the data archiving method of an astronomical star catalog according to an embodiment of the present invention is shown.
[0038] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104 and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0039] The user may use at least one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0040] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0041] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0042] It should be noted that the data archiving method provided in the embodiment of the present invention can generally be executed by the server 105. Accordingly, the data archiving device provided in the embodiment of the present invention can generally be set in the server 105. The data archiving method provided in the embodiment of the present invention can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the data archiving device provided in the embodiment of the present invention can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0043] Alternatively, the data archiving method provided in the embodiment of the present invention may also be executed by the first terminal device 101, the second terminal device 102 or the third terminal device 103, or may also be executed by other terminal devices different from the first terminal device 101, the second terminal device 102 or the third terminal device 103. Accordingly, the data archiving apparatus provided in the embodiment of the present invention may also be provided in the first terminal device 101, the second terminal device 102 or the third terminal device 103, or may be provided in other terminal devices different from the first terminal device 101, the second terminal device 102 or the third terminal device 103.
[0044] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0045] It should be noted that the sequence numbers of the operations in the following method are only used as representations of the operations for the purpose of description, and should not be regarded as representing the execution order of the operations. Unless explicitly stated, the method does not need to be executed completely in the order shown.
[0046] Figure 2 A flow chart of a method for archiving data of an astronomical star catalogue according to an embodiment of the present invention is shown.
[0047] like Figure 2 As shown, the method 200 includes operations S210 to S230.
[0048] In operation S210, data entries related to each initial interval in the astronomical star catalog are determined according to a structured query statement of the astronomical star catalog.
[0049] Optionally, before responding to receiving a structured query statement of an astronomical star catalog, the area recording the observed stars in the astronomical star catalog is first divided to obtain multiple initial intervals. For example, the 4π area of the entire celestial sphere is divided along the right ascension (ra) and declination (dec) directions with a step size of 4 degrees, and finally divided into 90*45=4050 initial intervals, each of which has an area of 16 square degrees, and then non-observation areas such as declination>-38 degrees are removed. Each star in the astronomical star catalog is uniquely identified by a coordinate pair of right ascension and declination in the observation area. The astronomical star catalog can be a StackObjectView star catalog.
[0050] Optionally, the initial interval represents multiple regions of the observed star, and each row in the astronomical star catalog records attribute data related to the star. The data entry represents the number of rows of the star corresponding to the initial interval in the astronomical star catalog.
[0051] Optionally, the structured query statement is used to query the data entries related to each initial interval in the astronomical star catalog. The server executes the structured query statement of the astronomical star catalog and returns the data entries related to each initial interval in the astronomical star catalog. For example, for the initial interval (right ascension 0-4 degrees, declination 0-4 degrees), it is determined that the observation areas of 3 million stars in the astronomical star catalog are located in the initial interval, then the data entries related to the initial interval in the astronomical star catalog are 3 million rows of records.
[0052] In operation S220, at least one target sub-interval is determined from the initial interval according to the data entry associated with the initial interval and the interval entry threshold.
[0053] Optionally, the interval entry threshold represents the maximum value of the data entry that can be corresponding. The interval entry threshold is related to the space threshold of the server loop retrieval attribute data. For example, the space threshold of the server loop retrieval attribute data is 500MB. The corresponding relationship between the space threshold and the interval entry threshold is determined based on the performance of the server, the network environment, etc., and each loop retrieval of 1 million rows is optimal, and the interval entry threshold is obtained as 1 million rows.
[0054] Optionally, when the data strips related to the initial interval are less than or equal to the interval entry threshold, the initial interval is used as the target sub-interval.
[0055] Optionally, when the data entries related to the initial interval are far less than the interval entry threshold, the initial interval may be expanded to obtain a target sub-interval.
[0056] Optionally, when the data entries related to the initial interval are greater than the interval entry threshold, the initial interval may be divided to obtain a plurality of target sub-intervals, wherein the data entries of the target sub-intervals meet the requirements of the interval entry threshold.
[0057] In operation S230, based on a preset sorting rule, attribute data of stars in at least one target sub-interval are stored in a target file.
[0058] Optionally, the preset sorting rule is determined based on an average right ascension value of at least one target sub-interval.
[0059] Optionally, the preset sorting rule may sort the target sub-intervals in ascending order based on the average right ascension values of the target sub-intervals. For example, the right ascension range of target sub-interval 1 is 5-8 degrees, and the average right ascension value of target sub-interval 1 is 6.5 degrees; the right ascension range of target sub-interval 2 is 9-12 degrees, and the average right ascension value of target sub-interval 1 is 10.5 degrees, and the preset sorting rule is target sub-interval 1, target sub-interval 2.
[0060] For example, taking the above preset sorting rules as target subinterval 1 and target subinterval 2 as an example, the program is called to query and download the astronomical star catalog, first query, download and store the attribute data of the star corresponding to target subinterval 1; then query, download and store the attribute data of the star corresponding to target subinterval 1 to the target file. The target file represents a local file of the computer system.
[0061] Optionally, the attribute data of a star may include data such as the shape, band, and spectrum of the star.
[0062] Optionally, before storing the attribute data of the celestial body, the target sub-interval that meets the interval entry threshold is determined based on the data entries of the initial interval and the interval entry threshold, thereby ensuring that the server can cyclically retrieve the attribute data of the celestial body corresponding to the target sub-interval with high performance; then the attribute data of the celestial body in at least one target interval is stored in the target file, so that the attribute data of a large amount of astronomical star catalog can be archived and stored in a short period of time, thereby improving the server's carrying capacity and the local hard disk read and write speed, and greatly reducing the possibility of human error.
[0063] Optionally, determining at least one target sub-interval from the initial interval according to the data entries of the initial interval and the interval entry threshold includes:
[0064] When the data entry of the initial interval is greater than the interval entry threshold, the interval partition value is determined according to the data entry and the interval entry threshold; the initial interval is partitioned according to the interval partition value to obtain at least one target sub-interval.
[0065] Optionally, the fact that the data entries in the initial interval are greater than the interval entry threshold indicates that the server cannot retrieve the attribute data of all stars in the astronomical star catalog corresponding to the initial interval.
[0066] Optionally, the interval division value can be determined based on the ratio between the data entry and the interval entry threshold. For example, if the data entry of the initial interval is 3 million rows and the interval entry threshold is 1 million rows, the interval division value is determined to be 3. The initial interval is divided according to the interval division value to obtain 3 target sub-intervals. Each target sub-interval corresponds to 1 million rows of records.
[0067] For example, if the data entry of the initial interval is 3.5 million rows and the interval entry threshold is 1 million rows, the interval division value is determined to be 4. The initial interval is divided according to the interval division value to obtain 4 target sub-intervals. Among them, 3 target sub-intervals correspond to 1 million rows of records, and one target sub-interval corresponds to 500,000 rows of records.
[0068] Figure 3 A flowchart for determining a target subinterval according to an embodiment of the present invention is shown.
[0069] like Figure 3 As shown, dividing the initial interval according to the interval division value to obtain at least one target sub-interval includes steps S310-S330.
[0070] In step S310, the right ascension range of the initial interval is determined according to the right ascension upper limit value and the right ascension lower limit value of the initial interval.
[0071] In step S320, at least one target right ascension range is determined according to the interval division value and the right ascension range.
[0072] In step S330, the initial interval is divided according to at least one target right ascension range to determine at least one target sub-interval.
[0073] Optionally, the right ascension lower limit value represents the minimum right ascension in the initial interval, the right ascension upper limit value represents the maximum right ascension in the initial interval, and the right ascension range is determined according to the right ascension lower limit value and the right ascension upper limit value.
[0074] Optionally, at least one target right ascension range is determined according to the interval division value and the right ascension range. For example, the interval division value is 3, the right ascension range of the initial interval is 0-4 degrees, and the target right ascension range of the target subinterval 1 is 0-4 / 3 degrees, the target right ascension range of the target subinterval 2 is 4 / 3-8 / 3 degrees, and the target right ascension range of the target subinterval 3 is 8 / 3-4 degrees.
[0075] Optionally, the initial interval is divided according to the three target right ascension ranges and the declination range of the initial interval to determine three target sub-intervals, and the area of each target sub-interval becomes 16 / 3 square degrees.
[0076] Optionally, based on a preset sorting rule, storing the attribute data of the star in at least one target sub-interval into a target file includes:
[0077] Determine a query order between at least one target sub-interval based on a preset sorting rule;
[0078] The event interface is called to store the attribute data of the star in at least one target sub-interval into the target file according to the query order.
[0079] Optionally, the query order among the multiple target sub-intervals is determined based on a preset sorting rule. For example, taking the preset sorting rule as target sub-interval 1 and target sub-interval 2 as an example, the query order is determined as target sub-interval 1 and target sub-interval 2.
[0080] For example, taking the above query order of target sub-interval 1 and target sub-interval 2 as an example, the event interface is called, and the event interface can be an application programming interface (Application Programming Interface, API), and the attribute data of the stars corresponding to the target sub-interval 1 and the target sub-interval 2 are queried in the astronomical star catalog in turn and stored in the target file.
[0081] Optionally, the application programming interface simulates manual operation, greatly reducing the complexity and workload of manual downloading and integration of data. Programmed operation not only speeds up the acquisition of attribute data, but also greatly reduces the possibility of human error. Relevant personnel can adjust the application programming interface according to different databases, so it can be applied to different database systems, with strong versatility and easy operation.
[0082] Optionally, the event interface includes a query interface, a download interface, and a transfer interface; wherein calling the event interface to store the attribute data of the celestial body in at least one target sub-interval into the target file according to the query order includes:
[0083] According to the query order, the target sub-interval to be queried is determined; for the target sub-interval to be queried, the query interface is called to obtain the attribute data of the celestial bodies in the target sub-interval; the download interface is called to download the attribute data of the celestial bodies in the target sub-interval to the memory; the transfer interface is called to store the attribute data of the celestial bodies in the target sub-interval stored in the memory to the target file, wherein the file name of the target file is related to the right ascension value and the declination value of the target sub-interval.
[0084] For example, taking the above query order as target sub-interval 1 and target sub-interval 2 as an example, the target sub-intervals to be queried are determined to be target sub-interval 1 and target sub-interval 2. First, for target sub-interval 1, the event interface is called to store the attribute data of the stars in target sub-interval 1 into the target file; then, for target sub-interval 2, the event interface is called to store the attribute data of the stars in target sub-interval 2 into the target file.
[0085] Optionally, the query interface (QUERY) is called to automatically generate a structured query language (SQL) retrieval command to retrieve all attribute data of stars in the astronomical star catalog within the target sub-interval, and the retrieval return results are monitored at 10-second intervals.
[0086] Optionally, after calling the download interface (READING) and obtaining the return result of the attribute data, the attribute data of the star in the target sub-interval is downloaded to the system memory.
[0087] Optionally, the transfer interface (WRITING) is called to store the attribute data of the celestial body in the target sub-interval stored in the memory into the specified target file after the download is completed.
[0088] Optionally, the target file is stored in csv format. The naming method can be adjusted according to your actual situation. The unified naming format is conducive to retrieval, management and checking whether the data is complete.
[0089] For example, the naming rule is raAAA_BBB_decXCC_DD_EinF.csv, where uppercase letters are variable and other characters are fixed. AAA represents the minimum right ascension ra in the target subinterval, and a leading 0 is added if the value is less than 3 digits. BBB represents the maximum right ascension ra in the target subinterval, and a leading 0 is added if the value is less than 3 digits. X is n or p, which respectively represents that the minimum value of declination dec is negative or positive. CC represents the absolute value of the minimum value of declination dec in the target subinterval, and a leading 0 is added if the value is less than 2 digits. DD represents the absolute value of the maximum value of declination dec in the target subinterval, and a leading 0 is added if the value is less than 2 digits. F represents the number of target subintervals divided in the initial interval. E represents that this file is the serial number of the file in the initial interval, starting from 0, and is sorted from small to large according to the right ascension ra in the target subinterval.
[0090] For example, the naming format is ra000_004_decn04_08_2in3.csv, the initial interval is divided into 3 target sub-intervals, and this file corresponds to the third target sub-interval. The minimum value of right ascension ra of the third target sub-interval is 0, the maximum value of right ascension ra is 4, the minimum value of declination is 8, and the maximum value of declination is 4.
[0091] Optionally, call the deletion interface (DROPPING) to delete the attribute data of the star in the target sub-interval in the system memory after the storage is completed.
[0092] Optionally, the stored attribute data can be managed and integrated through the application, avoiding data omission and duplication problems that may occur in manual operations. The unified naming format ensures the order and consistency of data download, facilitates data verification, and ensures the integrity of the final acquired data set.
[0093] Optionally, the initial interval includes multiple target sub-intervals, and the data archiving method further includes:
[0094] Obtain sub-data entries from a target file corresponding to a target sub-interval; sum up the sub-data entries corresponding to each of a plurality of target sub-intervals to obtain storage data entries; obtain verification results based on entry comparison results between the storage data entries and data entries of the initial interval; and update the target file based on the verification results.
[0095] Optionally, the subdata entry represents the number of rows corresponding to the target subinterval downloaded from the astronomical catalog and stored in the target file.
[0096] Optionally, the number of rows of sub-data entries corresponding to each of the plurality of target sub-intervals within the initial interval is accumulated to obtain a stored data entry. The stored data entry represents the number of rows corresponding to the initial interval downloaded from the astronomical star catalog and stored in the target file.
[0097] Optionally, the item comparison result represents a consistent result and an inconsistent result. When the item comparison result represents a consistent result, a verification result representing successful verification is obtained; when the item comparison result represents an inconsistent result, a verification result representing failed verification is obtained.
[0098] Optionally, when a verification result indicating a verification failure is obtained, attribute data downloaded in some target sub-intervals within the initial interval may be incomplete due to network reasons, and therefore, the target file needs to be further updated.
[0099] Optionally, updating the target file may include: sending a structured query command to query the number of stars in each target subinterval in the initial interval in the target file. Summarizing the target subintervals in which the number of stars in the target file is inconsistent with the number of stars in the astronomical star catalog and storing them in a new list, the list and the files corresponding to the downloaded target subintervals are in one-to-one correspondence. For the downloaded missing files, call the event interface to re-download until the number of stars corresponding to the initial interval in the target file is consistent with the number of stars in the astronomical star catalog.
[0100] Optionally, data verification ensures the integrity of the final data set. When the data verification result is a failure, the specific target sub-interval can be accurately located, and the attribute data of the celestial body corresponding to the target sub-interval can be re-queried, downloaded, and stored, thereby improving the processing speed.
[0101] Based on the above-mentioned data archiving method of astronomical star catalog, the present invention also provides a data archiving device for astronomical star catalog. Figure 4 The device is described in detail.
[0102] Figure 4 A structural block diagram of a data archiving device for an astronomical star catalog according to an embodiment of the present invention is shown.
[0103] like Figure 4 As shown, the data archiving device 400 of the astronomical star catalog in this embodiment includes a first determining module 410 , a second determining module 420 and a storage module 430 .
[0104] The first determination module 410 is used to determine the data entry related to each initial interval in the astronomical star catalog according to the structured query statement of the astronomical star catalog, wherein the initial interval represents multiple regions of the observed star, the astronomical star catalog stores attribute data related to the star, and the data entry represents the number of rows of the star in the astronomical star catalog corresponding to the initial interval. In one embodiment, the first determination module 410 can be used to perform the operation S210 described above, which will not be repeated here.
[0105] The second determination module 420 is used to determine at least one target sub-interval from the initial interval according to the data entry related to the initial interval and the interval entry threshold. In one embodiment, the second determination module 420 can be used to perform the operation S220 described above, which will not be described in detail here.
[0106] The storage module 430 is used to store the attribute data of the celestial bodies in the at least one target sub-interval into the target file based on a preset sorting rule, wherein the preset sorting rule is determined based on the average right ascension value of the at least one target sub-interval. In one embodiment, the storage module 430 can be used to perform the operation S230 described above, which will not be described in detail here.
[0107] Optionally, the second determination module 420 includes a first determination submodule and a second determination submodule.
[0108] The first determination submodule is used to determine the interval division value according to the data entry and the interval entry threshold when the data entry of the initial interval is greater than the interval entry threshold.
[0109] The second determination submodule is used to divide the initial interval according to the interval division value to obtain at least one target sub-interval.
[0110] Optionally, the second determining submodule includes a first determining unit, a second determining unit and a third determining unit.
[0111] The first determining unit is used to determine the right ascension range of the initial interval according to the right ascension upper limit value and the right ascension lower limit value of the initial interval.
[0112] The second determining unit is used to determine at least one target right ascension range according to the interval division value and the right ascension range.
[0113] The third determination unit is used to divide the initial interval according to at least one target right ascension range and determine at least one target sub-interval.
[0114] Optionally, the storage module 430 includes a first storage submodule and a second storage submodule.
[0115] The first storage submodule is used to determine a query order among multiple target sub-intervals based on a preset sorting rule.
[0116] The second storage submodule is used to call the event interface and store the attribute data of the celestial bodies in the plurality of target subintervals into the target file according to the query sequence.
[0117] Optionally, the second storage submodule includes a first storage unit, a second storage unit, a third storage unit and a fourth storage unit.
[0118] The first storage unit is used to determine a target sub-interval to be queried according to a query order.
[0119] The second storage unit is used to call the query interface for the target sub-interval to be queried, and obtain the attribute data of the celestial body in the target sub-interval.
[0120] The third storage unit is used to call the download interface to download the attribute data of the star in the target sub-interval into the memory.
[0121] The fourth storage unit is used to call the transfer interface to store the attribute data of the celestial body in the target sub-interval stored in the memory into the target file, wherein the file name of the target file is related to the right ascension value and the declination value of the target sub-interval.
[0122] Optionally, the astronomical star catalog data archiving device 400 further includes an acquisition module, a processing module, a verification module and an update module.
[0123] The acquisition module is used to acquire the sub-data entry from the target file corresponding to the target sub-interval.
[0124] The processing module is used to perform sum calculation on the sub-data entries corresponding to each of the plurality of target sub-intervals to obtain storage data entries.
[0125] The verification module is used to obtain a verification result based on an entry comparison result between the stored data entry and the data entry in the initial interval.
[0126] The update module is used to update the target file according to the verification result.
[0127] Optionally, any multiple modules among the modules, submodules, units, and subunits can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. Optionally, at least one of the modules, submodules, units, and subunits can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, at least one of the modules, submodules, units, and subunits can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0128] Figure 5 A block diagram of an electronic device suitable for implementing a data archiving method according to an embodiment of the present invention is shown.
[0129] Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0130] like Figure 5As shown, the computer electronic device 500 according to an embodiment of the present invention includes a processor 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage part 509 to the random access memory (RAM) 503. The processor 501 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include an on-board memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.
[0131] In RAM 503, various programs and data required for the operation of electronic device 500 are stored. Processor 501, ROM 502 and RAM 503 are connected to each other via bus 504. Processor 501 performs various operations of the method flow according to the embodiment of the present invention by executing the program in ROM 502 and / or RAM 503. It should be noted that the program can also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 can also perform various operations of the method flow according to the embodiment of the present invention by executing the program stored in one or more memories.
[0132] Optionally, the electronic device 500 may further include an input / output (I / O) interface 505, which is also connected to the bus 504. The electronic device 500 may further include one or more of the following components connected to the input / output (I / O) interface 505: an input portion 506 including a keyboard, a mouse, etc.; an output portion 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 508 including a hard disk, etc.; and a communication portion 509 including a network interface card such as a LAN card, a modem, etc. The communication portion 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output (I / O) interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage portion 508 as needed.
[0133] Optionally, the method flow according to the embodiment of the present invention can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the processor 501, the above-mentioned functions defined in the system of the embodiment of the present invention are executed. Optionally, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0134] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the data archiving method according to the embodiment of the present invention is implemented.
[0135] Optionally, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: 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), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.
[0136] For example, optionally, the computer-readable storage medium may include the ROM 502 and / or the RAM 503 described above and / or one or more memories other than the ROM 502 and the RAM 503 .
[0137] An embodiment of the present invention also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method provided by the embodiment of the present invention. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the data archiving method provided by the embodiment of the present invention.
[0138] When the computer program is executed by the processor 501, the above functions defined in the system / device of the embodiment of the present invention are performed. Optionally, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0139] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 509, and / or installed from the removable medium 511. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0140] Optionally, the program code for executing the computer program provided by the embodiment of the present invention can be written in any combination of one or more programming languages, specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, such as Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0141] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. It can be understood by those skilled in the art that the features recorded in the various embodiments and / or claims of the present invention can be combined and / or combined in various ways, even if such a combination or combination is not explicitly recorded in the present invention. In particular, without departing from the spirit and teaching of the present invention, the features described in the various embodiments and / or claims of the present invention may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present invention.
[0142] The embodiments of the present invention are described above. However, these embodiments are only for the purpose of illustration, and are not intended to limit the scope of the present invention. Although each embodiment is described above, it does not mean that the measures in each embodiment cannot be used in combination. The scope of the present invention is defined by the attached claims and their equivalents. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.
Claims
1. A data archiving method for an astronomical star catalog, characterized in that: The method comprises: Determine, according to a structured query statement of an astronomical star catalog, data entries related to each initial interval in the astronomical star catalog, wherein the initial interval represents multiple regions of observed celestial bodies, the astronomical star catalog stores attribute data related to the celestial bodies, and the data entries represent the number of rows of celestial bodies corresponding to the initial interval in the astronomical star catalog; Determining at least one target sub-interval from the initial interval according to data entries and interval entry thresholds associated with the initial interval includes: In the case where the data entry of the initial interval is greater than the interval entry threshold, determining an interval partition value according to the data entry and the interval entry threshold; The initial interval is divided according to the interval division value to obtain at least one target sub-interval, including: Determining the right ascension range of the initial interval according to the right ascension upper limit value and the right ascension lower limit value of the initial interval; Determining at least one target right ascension range according to the interval division value and the right ascension range; Dividing the initial interval according to at least one of the target right ascension ranges to determine at least one of the target sub-intervals; Based on a preset sorting rule, storing the attribute data of the star in at least one of the target sub-intervals into a target file includes: Determining a query order between at least one of the target sub-intervals based on a preset sorting rule; The event interface is called to store the attribute data of the star in at least one of the target subintervals into the target file according to the query order, wherein the preset sorting rule is determined based on the average right ascension value of the at least one target subinterval.
2. The method according to claim 1, characterized in that The event interface includes a query interface, a download interface, and a transfer interface; The process of calling the event interface and storing the attribute data of the star in at least one of the target sub-intervals into the target file according to the query order includes: Determining the target sub-interval to be queried according to the query order; For the target sub-interval to be queried, calling the query interface to obtain the attribute data of the star in the target sub-interval; Calling the download interface to download the attribute data of the star in the target sub-interval into the memory; The transfer interface is called to store the attribute data of the star body in the target sub-interval stored in the memory into a target file, wherein the file name of the target file is related to the right ascension value and the declination value of the target sub-interval.
3. The method according to claim 1, characterized in that The initial interval includes a plurality of target sub-intervals, and the method further includes: Acquire a sub-data entry from the target file corresponding to the target sub-interval; Performing sum calculation on the sub-data entries corresponding to each of the plurality of target sub-intervals to obtain a storage data entry; Obtaining a verification result according to an entry comparison result between the stored data entry and the data entry of the initial interval; and According to the verification result, the target file is updated.
4. A data archiving device for an astronomical star catalog, characterized in that: The device comprises: A first determination module is used to determine, according to a structured query statement of an astronomical star catalog, data entries related to each initial interval in the astronomical star catalog, wherein the initial interval represents multiple regions of observed celestial bodies, the astronomical star catalog stores attribute data related to the celestial bodies, and the data entries represent the number of rows of celestial bodies corresponding to the initial interval in the astronomical star catalog; A second determination module, configured to determine at least one target sub-interval from the initial interval according to data entries and interval entry thresholds associated with the initial interval, the second determination module comprising a first determination sub-module and a second determination sub-module; A first determination submodule, configured to determine an interval partition value according to the data entry and the interval entry threshold when the data entry of the initial interval is greater than the interval entry threshold; A second determining submodule, configured to divide the initial interval according to the interval division value to obtain at least one target subinterval, the second determining submodule comprising a first determining unit, a second determining unit and a third determining unit; A first determining unit, configured to determine a right ascension range of the initial interval according to an upper right ascension limit value and a lower right ascension limit value of the initial interval; A second determining unit, configured to determine at least one target right ascension range according to the interval division value and the right ascension range; A third determining unit, configured to divide the initial interval according to at least one of the target right ascension ranges, and determine at least one of the target sub-intervals; A storage module, used for storing the attribute data of the celestial body in at least one of the target sub-intervals into a target file based on a preset sorting rule, wherein the preset sorting rule is determined based on the average right ascension value of the at least one target sub-interval, and the storage module includes a first storage sub-module and a second storage sub-module; A first storage submodule, configured to determine a query order among a plurality of target subintervals based on a preset sorting rule; The second storage submodule is used to call the event interface and store the attribute data of the celestial bodies in the plurality of target subintervals into the target file according to the query sequence.
5. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.
7. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.
