A method, device, storage medium and electronic device for constructing celestial body data index
By constructing a celestial body data index and storing celestial body position information using preset center points and index positions, the problem of time complexity of large-scale celestial body data query is solved and the effect of rapid query is achieved.
Patent Information
- Application Number
- CN202411742057.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2044-11-29
AI Technical Summary
When processing large-scale celestial data, the query time complexity is difficult to meet the needs of fast search, especially under PB-level data, and the process of finding data is very slow.
By obtaining the position information of the celestial body, determining its index position relative to the preset center point, sorting according to the specified rules, establishing the correspondence between the index position and the celestial body, and obtaining the relationship function between the index position and the order through modeling, and constructing a fast-queried celestial body data index.
It realizes the rapid mapping of celestial position information to a two-dimensional plane, and stores it by presetting the center point and index position, which reduces the query time and improves the search speed of data indexes.
Smart Images

Figure CN119226296B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of astronomy technology, and in particular to a method, device, storage medium and electronic device for constructing a celestial body data index. Background Art
[0002] As one of the basic technical means in the process of data use, data indexing is of irreplaceable importance in any application scenario. However, as the amount of data continues to increase, the time required to search for data is also increasing.
[0003] At present, in the existing index structure, even in the most ideal case, it can only guarantee a search time complexity of O(log n), which is very common in relational database management systems. However, with the reduction of data storage costs and the increase in the types of data generated, the increase in search time has gradually become unacceptable. Take the astronomical data needed in astronomical observation as an example. The PB-level data makes the process of searching data very slow.
[0004] Therefore, how to effectively reduce the time required for large-scale data queries is an urgent problem to be solved. Summary of the invention
[0005] The present specification provides a method, device, storage medium and electronic device for constructing a celestial body data index to at least partially solve the above-mentioned problems existing in the prior art.
[0006] This manual adopts the following technical solutions:
[0007] This specification provides a method for constructing a celestial body data index, including:
[0008] Obtain position information of observed celestial bodies;
[0009] Determine, according to the position information, a relative position of the celestial body based on a preset center point as an index position of the celestial body;
[0010] Sorting the index positions of the celestial bodies according to a specified rule to obtain a target sequence, and establishing a corresponding relationship between the order of the index position of each celestial body in the target sequence and the celestial body;
[0011] Modeling is performed using the index positions contained in the target sequence and the order of the index positions in the target sequence as variables to obtain a relationship function between the order and the index positions;
[0012] A celestial body data index is constructed according to the corresponding relationship and the relationship function.
[0013] Optionally, obtaining the position information of the observed celestial body includes:
[0014] The right ascension and declination of the observed celestial body are obtained as position information of the celestial body.
[0015] Optionally, determining, according to the position information, a relative position of the celestial body based on a preset center point as the index position of the celestial body specifically includes:
[0016] The distance and angle between the celestial body and a preset center point are determined according to the position information as the index distance and index angle of the celestial body.
[0017] Optionally, the index positions of the celestial bodies are sorted according to a specified rule to obtain a target sequence, and a corresponding relationship between the index position of each celestial body and the celestial body is established, specifically including:
[0018] Sort the index distances of each celestial body in ascending order to obtain a distance sequence, and sort the index angles of each celestial body in ascending order to obtain an angle sequence;
[0019] For each celestial body, a correspondence is established between the first order of the index distance of the celestial body in the distance sequence and the celestial body, and a correspondence is established between the second order of the index angle of the celestial body in the angle sequence and the celestial body.
[0020] Optionally, modeling is performed using the index positions contained in the target sequence and the order of the index positions in the target sequence as variables to obtain a relationship function between the order and the index positions, specifically including:
[0021] Modeling is performed using each index distance included in the distance sequence and the first order of the index distance in the distance sequence as variables to obtain a first relationship function between the first order and the index position;
[0022] Modeling is performed using the index angles included in the angle sequence and the second order of the index angles in the angle sequence as variables to obtain a second relationship function between the second order and the index angles.
[0023] Optionally, the method further comprises:
[0024] Receive the target location information to be queried input by the user;
[0025] Inputting the target position information into the celestial body data index;
[0026] Determine the relative position between the target position information and the position of the preset center point as the query position;
[0027] Determining, according to the query position and the relationship function, an order of index positions corresponding to the query position in the relationship function in the target sequence;
[0028] According to the sequence and the corresponding relationship, a celestial body corresponding to the target position information is determined.
[0029] Optionally, the method further comprises:
[0030] Receiving a search range input by a user, wherein the search range includes a search position and a search radius;
[0031] inputting the search position and the search radius into the celestial body data index;
[0032] Determine a search distance and a search angle according to the search position and the search radius;
[0033] All celestial bodies included in the search range are determined according to the search distance, the search angle and the relationship function.
[0034] This specification provides a device for constructing a celestial body data index, the device comprising:
[0035] An acquisition module is used to obtain the position information of the observed celestial body;
[0036] A determination module, configured to determine, according to the position information, a relative position of the celestial body based on a preset center point as an index position of the celestial body;
[0037] A sorting module is used to sort the index positions of each celestial body according to a specified rule to obtain a target sequence, and establish a corresponding relationship between the order of the index position of each celestial body in the target sequence and the celestial body;
[0038] A modeling module, used to perform modeling using the index positions contained in the target sequence and the order of the index positions in the target sequence as variables to obtain a relationship function between the order and the index positions;
[0039] A construction module is used to construct a celestial body data index according to the corresponding relationship and the relationship function.
[0040] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned celestial body data index construction method is implemented.
[0041] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned celestial body data index construction method when executing the program.
[0042] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:
[0043] In the method for constructing a celestial body data index provided in the present specification, position information of an observed celestial body is obtained; the relative position of the celestial body based on a preset center point is determined according to the position information as the index position of the celestial body; the index position of each celestial body is sorted according to a specified rule to obtain a target sequence, and a corresponding relationship between the order of the index position of each celestial body in the target sequence and the celestial body is established; modeling is performed using the index positions contained in the target sequence and the order of the index positions in the target sequence as variables to obtain a relationship function between the order and the index positions; and a celestial body data index is constructed according to the corresponding relationship and the relationship function.
[0044] When constructing a celestial body data index using the celestial body data index construction method provided in this specification, the position information of the celestial body can be mapped to a two-dimensional plane through reasonable data division, and the position of the celestial body in the index can be stored in the form of an index position by presetting a center point. The target sequence is constructed by sorting the index positions, and the order in the target sequence and the corresponding index position are modeled to obtain a relationship function between the index position and the order, and the corresponding relationship between the order in the target sequence and the celestial body to which the corresponding index position belongs is saved. Finally, the construction of a celestial body data index that can be quickly searched can be completed based on the established relationship function and corresponding relationship. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:
[0046] Figure 1 A schematic diagram of a process for constructing a celestial body data index in this specification;
[0047] Figure 2 A schematic diagram of a process from observing the position of a celestial body to completing the modeling of a first relationship function provided in this specification;
[0048] Figure 3 A schematic diagram of a process of range search using celestial body data index provided in this specification;
[0049] Figure 4 A schematic diagram of a celestial body data index construction device provided in this specification;
[0050] Figure 5 The corresponding Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0052] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0053] Figure 1 The following is a flow chart of a method for constructing a celestial body data index in this specification, which specifically includes the following steps:
[0054] S100: Acquire the position information of the observed celestial body.
[0055] All steps in the method for constructing a celestial body data index provided in this specification can be implemented by any electronic device with computing capabilities, such as a terminal, a server, and other devices.
[0056] This method is mainly used to construct an index for a large number of celestial body data, so as to obtain a celestial body data index with fast query capability. Based on this, the position information of all celestial bodies can be first obtained in this step. Generally, the position information of celestial bodies is determined by astronomical observation and other means.
[0057] At the same time, those skilled in the art understand that in astronomical research, right ascension and declination are generally used to record the position information of the observed celestial bodies. Corresponding to the present method, the right ascension and declination of the observed celestial body can be specifically obtained as the position information of the celestial body. Among them, right ascension (RA) is one of the coordinate values used in the celestial equatorial coordinate system in astronomy, which refers to the arc segment on the celestial equator between the right ascension circle passing through the vernal equinox and the right ascension circle passing through the celestial body; Declination (Declination, Dec) is another coordinate data in the equatorial coordinate system in astronomy, which refers to the angle from the celestial equator along the time circle of the celestial body to the celestial body.
[0058] S102: Determine, according to the position information, a relative position of the celestial body based on a preset center point as an index position of the celestial body.
[0059] After the relative position of the celestial body based on the preset center point is determined in step S100, the relative position of each celestial body based on the preset center point can be further determined in the present method and determined as the index position of the celestial body. Different from the traditional celestial body data index structure, the present method does not directly use the absolute position of the celestial body as the data recorded and searched in the index, but records the relative position obtained by converting the absolute position of the celestial body based on the preset center point in the index and uses it as the object to be searched during application.
[0060] Among them, the preset center point is a predetermined coordinate located in the universe. The position and number of the preset center points can be determined according to the way the celestial data is divided. The celestial data in a certain area are divided together, so there is a preset center point in this area accordingly. In general, when there are multiple preset center points, the distance between any two preset center points will not be too close. In this method, feasible data division methods may include, for example, Hierarchical Equal Area isoLatitude Pixelation of a sphere (HealPix), local sensitive hashing, KD tree, etc. In this manual, the HealPix division method is mainly used as an example for explanation.
[0061] When determining the relative position of a celestial body based on a preset center point based on the position information of a celestial body, if there are multiple preset center points, the preset center point closest to the celestial body is used as the preset center point to which the celestial body belongs, and the relative position of the celestial body based on the preset center point is determined as the index position of the celestial body.
[0062] Furthermore, in order to make the constructed celestial body data index have a faster query speed, in this method, the index position can be represented by distance and angle. Specifically, the distance and angle between the celestial body and the preset center point can be determined according to the position information as the index distance and index angle of the celestial body.
[0063] When using data partitioning methods such as HealPix, the distribution of celestial bodies in the sky can be projected into two-dimensional spatial coordinates. Therefore, the position of the preset center point can be used as the origin to construct a plane coordinate system. According to the position of the celestial body in the spatial coordinate system, the distance and angle from the celestial body to the preset center point are determined as the index distance and index angle to be recorded.
[0064] S104: sorting the index positions of the celestial bodies according to a specified rule to obtain a target sequence, and establishing a corresponding relationship between the order of the index position of each celestial body in the target sequence and the celestial body.
[0065] After the index position of each celestial body is determined in step S102, the index position of each celestial body may be further sorted in this step, and a corresponding relationship between the order of the index position of each celestial body in the target sequence and each celestial body is established.
[0066] Among them, there are many ways to sort the index positions of each celestial body according to different ways of recording the index positions, and this specification provides a specific embodiment for reference. The index positions of each celestial body are still sorted in the way of recording the index positions in the form of index distance and index angle proposed in the previous embodiment. Specifically, the index distances of each celestial body can be sorted in order from small to large to obtain a distance sequence, and the index angles of each celestial body can be sorted in order from small to large to obtain an angle sequence; for each celestial body, a corresponding relationship between the first order of the index distance of the celestial body in the distance sequence and the celestial body is established, and a corresponding relationship between the second order of the index angle of the celestial body in the angle sequence and the celestial body is established.
[0067] When the index distances and index angles of celestial bodies are recorded, the index distances and index angles can be sorted from small to large to construct distance sequences and angle sequences. It should be noted that a set of distance sequences and angle sequences corresponds to a preset center point, and the number of preset center points should be the same as the number of sets of distance sequences and angle sequences finally constructed. In other words, the index distances of all celestial bodies covered under each preset center point constitute a distance sequence, and the index angles constitute an angle sequence.
[0068] Taking the construction of a distance sequence under a preset center point as an example, when constructing the distance sequence, the smaller the index distance, the higher the order. The order is recorded in the sequence as a positive integer sequence starting from 1, that is, 1, 2, 3..., until the index distances of all celestial bodies under this preset center point are sorted. When multiple identical index distances appear in each index distance, these index distances can be randomly sorted in the correct position of the sequence from small to large, and the order of these index distances is adjacent; or these index distances can be given the same order in the correct position of the sequence from small to large, and the corresponding position order is vacated in the subsequent sorting. For example, assuming that there are three celestial bodies with the same index distance and five celestial bodies with smaller index distances, the index distances of these three celestial bodies can be arbitrarily arranged as 6, 7, and 8 in the distance sequence; or the order of these three celestial bodies in the distance sequence can be recorded as 6, at which time the order 7 and 8 need to be skipped, and the order of the next celestial body will be 9. The method of constructing the angle sequence in order from small to large can be exactly the same as the method of constructing the distance sequence, and this manual will not repeat it here.
[0069] When constructing the distance sequence and angle sequence, it is also necessary to establish the correspondence between the order in the sequence and the celestial body, so that the subsequent application stage can achieve fast search. For the sake of easy understanding and distinction, this manual refers to the order of each index distance in the distance sequence as the first order, and the order of each index angle in the angle sequence as the second order. Each celestial body needs to establish a correspondence with both the first order and the second order.
[0070] For example, assuming that the index distance of a celestial body is ranked 3 in the distance sequence, and the index angle is ranked 5 in the angle sequence, then there is a corresponding relationship between the celestial body and the first order 3 in the distance sequence, and a corresponding relationship between the celestial body and the second order 5 in the angle sequence.
[0071] S106: Modeling is performed using the index positions contained in the target sequence and the order of the index positions in the target sequence as variables to obtain a relationship function between the order and the index positions.
[0072] After completing the construction of the target sequence in step S104, the modeling between the index position and the order can be further performed in this step to obtain the relationship function between the order and the index position. Similarly, when performing data division, the number of preset center points is the number of groups of relationship functions that need to be constructed. At the same time, the modeling method is still related to the recording form of the index position, and this specification still uses the above embodiment to provide a specific embodiment for reference. Specifically, each index distance contained in the distance sequence and the first order of the index distance in the distance sequence can be used as variables for modeling to obtain a first relationship function between the first order and the index position; each index angle contained in the angle sequence and the second order of the index angle in the angle sequence can be used as variables for modeling to obtain a second relationship function between the second order and the index angle. The first relationship function and the second relationship function are a set of relationship functions.
[0073] In the case where the data used to record the index position is the index distance and the index angle, it is necessary to perform modeling twice according to the distance sequence and the angle sequence respectively. When modeling the relationship between the index distance and the first order, the index distance in the distance sequence is used as a variable, and the order of the index distance in the distance sequence is used as another variable for modeling, and finally a first relationship function is obtained for characterizing the association relationship between the index distance and the first order. Similarly, the index angle in the angle sequence is used as a variable, and the order of the index angle in the angle sequence is used as another variable for modeling, and a second relationship function for characterizing the association relationship between the index angle and the second order can be obtained.
[0074] The above modeling process can be completed by a computer to obtain the final relationship function. The first relationship function and the second relationship function are both binary functions, that is, there are two variables. When any variable is assigned and input into the relationship function, the output value of the other variable can be obtained.
[0075] Let's take the index distance as an example. With the two variables in the first relationship function, i.e., the first order of the index distance as two coordinate axes, a rectangular coordinate system can be established. At this time, each pair of corresponding index distances and first orders can be visualized as points in the rectangular coordinate system, which can be expressed as (first order, index distance). Ideally, the image (usually a curve) of the constructed first relationship function in the coordinate system can perfectly cover all the points formed by the first order and index distance in the coordinate system.
[0076] However, in many cases, it is impossible to obtain a perfect function that can cover all points. Therefore, in this method, the first relationship function finally obtained can be limited by setting an allowable preset error. When modeling the first relationship function, the position covered by the first relationship function can be adjusted by using the preset error based on the index distance.
[0077] Specifically, when modeling, each pair of points formed by the first order and index distance, that is, (first order, index distance), can be adjusted to the range of (first order, index distance ± preset error) using a preset error. At this time, if it is not possible to perfectly cover the point (first order, index distance), it can be changed to cover any point in (first order, index distance ± preset error) to complete the final modeling.
[0078] Figure 2 The following is a flow chart of the process from observing the position of a celestial body to completing the modeling of the first relationship function provided in this specification. Figure 2 As shown, after observing and obtaining the position information of the celestial body in the calculation method of right ascension and declination, the preset center point to which it belongs in the HealPix data division method can be determined. Among them, Q is the celestial body, and C is the preset center point. Dist (C, Q) represents the distance from the celestial body to the preset center point, that is, the index distance. After sorting the index distances of all celestial bodies covered by the preset center point, modeling is performed under the preset error, and finally the first relationship function can be obtained. The construction of the second relationship function can also be carried out in the same way, and this manual will not go into details here.
[0079] S108: Constructing a celestial body data index according to the corresponding relationship and the relationship function.
[0080] Finally, a celestial body data index may be constructed according to the index positions and the order of the index positions in the target sequence determined in step S106, and the correspondence between the order in the target sequence determined in step S104 and the celestial bodies.
[0081] The celestial body data index constructed by this method records the order of each celestial body in the target sequence, and also records the index position corresponding to each order. Therefore, when searching for a celestial body corresponding to a target position using the celestial body data index constructed by this method, the target position can be directly input, and the target celestial body can be found by directly jumping from target position → index position → order → celestial body.
[0082] Specifically, the method can receive target position information to be queried input by a user; input the target position information into the celestial body data index; determine the relative position between the target position information and the position of a preset center point as a query position; determine the order of the index positions corresponding to the query position in the relationship function in the target sequence according to the query position; and determine the celestial body corresponding to the target position information according to the order and the corresponding relationship.
[0083] Still taking the example of recording the index position as index distance and index angle. When the user inputs the target position information, the target position information input by the user can be input into the celestial data index constructed by this method. The celestial data index will select the corresponding preset center point according to the data division method during construction, and convert the target position information into the distance and angle between the preset center point, that is, the index distance and index angle. At this time, the index distance can be input into the first relationship function under the corresponding preset center point to obtain the first order of output; at the same time, the index angle can be input into the second relationship function under the corresponding preset center point to obtain the second order of output.
[0084] It can be imagined that there may be only one or more of the first and second orders of the output. When there is only one of the first and second orders, the celestial body corresponding to it is the celestial body corresponding to the target position information, and the index output can be directly performed; and when there are more than one first and second orders of the output, the celestial bodies corresponding to the first orders and the celestial bodies corresponding to the second orders can be listed respectively, and the overlapping celestial bodies can be found in the two groups of celestial bodies as the index output. It is not difficult to imagine that when the distance and angle are determined, there is only one overlapping celestial body, and there will be no situation where multiple celestial bodies are output.
[0085] Of course, the above process is an ideal indexing process. Considering the possible errors in modeling and the fact that the position input by the user may not completely accurately hit the celestial body, the search error can also be considered in the application stage of the celestial body data index to enhance the robustness of the celestial body data index structure. Taking the index distance as an example, after the user inputs a target position information, if the converted index distance cannot output a valid sequence after being input into the first relationship function, for example, the output data is non-integer, then the celestial body corresponding to the integer sequence closest to the output data can be output to the user, or the celestial bodies corresponding to several integer sequences near the output data can be output to the user together, so that the user can judge the celestial body he needs.
[0086] In addition to a single-point search for a specific location, the celestial body data index constructed by this method can also realize a range search for all celestial bodies in an area. Specifically, a search range input by a user can be received, and the search range includes a search position and a search radius; the search position and the search radius are input into the celestial body data index; a search distance and a search angle are determined according to the search position and the search radius; and all celestial bodies contained in the search range are determined according to the search distance, the search angle and the relationship function.
[0087] When the user gives the search position and search radius, the celestial data index can automatically determine the search range consisting of the search distance and search angle. Figure 3 This is a schematic diagram of a process of using celestial body data index to perform range search. Figure 3 As shown, the dot in the center of the figure represents the preset center point, and the dot above represents the search position given by the user. The small circle formed with the search position as the center is the search range formed by the search radius given by the user. When the search position and the search radius are determined, the search distance can be further determined as (search position-search radius, search position+search radius), which is the annular area between the two concentric circles formed around the preset center point in the figure. At the same time, the angle range covered by the circle with the search position as the dot and the search radius as the radius is the search angle.
[0088] When the search distance and search angle are determined, the continuous search distance and the continuous search angle can be input into the first relationship function and the second relationship function respectively, and the celestial bodies corresponding to the several sequences output by the first relationship function and the celestial bodies corresponding to the several sequences output by the second function can be obtained. All the celestial bodies that overlap in the two groups are taken as the final output of this range search.
[0089] When constructing a celestial body data index using the celestial body data index construction method provided in this specification, the position information of the celestial body can be mapped to a two-dimensional plane through reasonable data division, and the position of the celestial body in the index can be stored in the form of an index position by presetting a center point. The target sequence is constructed by sorting the index positions, and the order in the target sequence and the corresponding index position are modeled to obtain a relationship function between the index position and the order, and the corresponding relationship between the order in the target sequence and the celestial body to which the corresponding index position belongs is saved. Finally, the construction of a celestial body data index that can be quickly searched can be completed based on the established relationship function and corresponding relationship.
[0090] Traditional relational database management systems use a tree-like index structure, the most popular of which is the B-tree algorithm, which has a time complexity of O(log n). This structure is not designed to handle data volumes exceeding 10 billion records. Therefore, if the old technology continues to be used, especially the cross-matching technology, when the number of directory records reaches billions, it will put tremendous pressure on the underlying computing resources. In addition, the B-tree can only use a single column to build an index structure, and astronomers need to consider both right ascension and declination when processing celestial data. Through the celestial data index constructed by this application, right ascension and declination can be directly mapped to the index representation, so that the prediction model can work under a function of a given radius specification, and the index of each data record is returned in one-step calculation, which greatly improves the search speed of the index structure.
[0091] The above is the method for constructing a celestial body data index provided in this specification. Based on the same idea, this specification also provides a corresponding celestial body data index construction device, such as Figure 4 shown.
[0092] Figure 4 A schematic diagram of a celestial body data index construction device provided in this specification, specifically comprising:
[0093] An acquisition module 200 is used to acquire position information of an observed celestial body;
[0094] A determination module 202, configured to determine, according to the position information, a relative position of the celestial body based on a preset center point as an index position of the celestial body;
[0095] A sorting module 204 is used to sort the index positions of the celestial bodies according to a specified rule to obtain a target sequence, and establish a corresponding relationship between the order of the index position of each celestial body in the target sequence and the celestial body;
[0096] A modeling module 206, configured to perform modeling using the index positions contained in the target sequence and the order of the index positions in the target sequence as variables to obtain a relationship function between the order and the index positions;
[0097] The construction module 208 is used to construct a celestial body data index according to the corresponding relationship and the relationship function.
[0098] Optionally, the acquisition module 200 is specifically used to acquire the right ascension and declination of an observed celestial body as the position information of the celestial body.
[0099] Optionally, the determination module 202 is specifically configured to determine a distance and an angle between the celestial body and a preset center point according to the position information as an index distance and an index angle of the celestial body.
[0100] Optionally, the sorting module 204 is specifically used to sort the index distances of each celestial body in ascending order to obtain a distance sequence, and sort the index angles of each celestial body in ascending order to obtain an angle sequence; for each celestial body, a correspondence is established between the first order of the index distance of the celestial body in the distance sequence and the celestial body, and a correspondence is established between the second order of the index angle of the celestial body in the angle sequence and the celestial body.
[0101] Optionally, the modeling module 206 is specifically used to perform modeling using each index distance contained in the distance sequence and the first order of the index distance in the distance sequence as variables to obtain a first relationship function between the first order and the index position; and to perform modeling using each index angle contained in the angle sequence and the second order of the index angle in the angle sequence as variables to obtain a second relationship function between the second order and the index angle.
[0102] Optionally, the device also includes a single-point search module 210, which is specifically used to receive target position information to be queried input by a user; input the target position information into the celestial body data index; determine the relative position between the target position information and the position of a preset center point as a query position; determine, based on the query position and the relationship function, the order of the index positions corresponding to the query position in the relationship function in the target sequence; and determine the celestial body corresponding to the target position information based on the order and the corresponding relationship.
[0103] Optionally, the device also includes a range search module 212, which is specifically used to receive a search range input by a user, wherein the search range includes a search position and a search radius; input the search position and the search radius into the celestial body data index; determine a search distance and a search angle based on the search position and the search radius; and determine all celestial bodies contained in the search range based on the search distance, the search angle and the relationship function.
[0104] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 Provides a method for building an index of celestial data.
[0105] This manual also provides Figure 5 The schematic structure diagram of the electronic device shown in FIG. Figure 5 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0106] For the improvement of a technology, it can be clearly distinguished whether it is a hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or a software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0107] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0108] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0109] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0110] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0111] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0112] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0113] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0114] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0115] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0116] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0117] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0118] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0119] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0120] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0121] The above description is only an embodiment of this specification and is not intended to limit this specification. For those skilled in the art, this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification should be included in the scope of the claims of this application.
Claims
1. A method for constructing a celestial body data index, characterized in that: include: Obtain position information of observed celestial bodies; Determine, according to the position information, a relative position of the celestial body based on a preset center point as an index position of the celestial body; Sorting the index positions of the celestial bodies according to a specified rule to obtain a target sequence, and establishing a corresponding relationship between the order of the index position of each celestial body in the target sequence and the celestial body; Modeling is performed using the index positions contained in the target sequence and the order of the index positions in the target sequence as variables to obtain a relationship function between the order and the index positions; Constructing a celestial body data index according to the corresponding relationship and the relationship function; Receive the target location information to be queried input by the user; Inputting the target position information into the celestial body data index; Determine the relative position between the target position information and the position of the preset center point as the query position; Determining, according to the query position and the relationship function, an order of index positions corresponding to the query position in the relationship function in the target sequence; According to the sequence and the corresponding relationship, a celestial body corresponding to the target position information is determined.
2. The method according to claim 1, characterized in that Get the position information of the observed celestial bodies, including: The right ascension and declination of the observed celestial body are obtained as position information of the celestial body.
3. The method according to claim 1, characterized in that Determining, according to the position information, the relative position of the celestial body based on a preset center point as the index position of the celestial body specifically includes: The distance and angle between the celestial body and a preset center point are determined according to the position information as the index distance and index angle of the celestial body.
4. The method according to claim 3, characterized in that The index positions of each celestial body are sorted according to the specified rules to obtain the target sequence, and the corresponding relationship between the index position of each celestial body and the celestial body is established, including: Sort the index distances of each celestial body in ascending order to obtain a distance sequence, and sort the index angles of each celestial body in ascending order to obtain an angle sequence; For each celestial body, a correspondence is established between the first order of the index distance of the celestial body in the distance sequence and the celestial body, and a correspondence is established between the second order of the index angle of the celestial body in the angle sequence and the celestial body.
5. The method according to claim 4, characterized in that Modeling is performed using the index positions contained in the target sequence and the order of the index positions in the target sequence as variables to obtain a relationship function between the order and the index positions, specifically including: Modeling is performed using each index distance included in the distance sequence and the first order of the index distance in the distance sequence as variables to obtain a first relationship function between the first order and the index position; Modeling is performed using the index angles included in the angle sequence and the second order of the index angles in the angle sequence as variables to obtain a second relationship function between the second order and the index angles.
6. The method according to claim 1, characterized in that The method further comprises: Receiving a search range input by a user, wherein the search range includes a search position and a search radius; inputting the search position and the search radius into the celestial body data index; Determine a search distance and a search angle according to the search position and the search radius; All celestial bodies included in the search range are determined according to the search distance, the search angle and the relationship function.
7. A device for constructing a celestial body data index, characterized in that: include: An acquisition module is used to obtain the position information of the observed celestial body; A determination module, configured to determine, according to the position information, a relative position of the celestial body based on a preset center point as an index position of the celestial body; A sorting module is used to sort the index positions of each celestial body according to a specified rule to obtain a target sequence, and establish a corresponding relationship between the order of the index position of each celestial body in the target sequence and the celestial body; A modeling module, used to perform modeling using the index positions contained in the target sequence and the order of the index positions in the target sequence as variables to obtain a relationship function between the order and the index positions; A construction module, used for constructing a celestial body data index according to the corresponding relationship and the relationship function; A single-point search module is used to construct a celestial body data index according to the corresponding relationship and the relationship function; receive the target position information to be queried input by the user; Inputting the target position information into the celestial body data index; Determine the relative position between the target position information and the position of a preset center point as a query position; determine the order of index positions corresponding to the query position in the relationship function in the target sequence according to the query position and the relationship function; and determine the celestial body corresponding to the target position information according to the order and the corresponding relationship.
8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Interest point query method and apparatus
CN107092623A