Positioning method and device, storage medium and electronic equipment
By obtaining the target digital signature of the to-local point and finding the matching area in the storage space, the problems of poor real-time and low accuracy of traditional positioning methods are solved, and efficient and real-time positioning data processing is achieved.
Patent Information
- Application Number
- CN202510122018.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-06-17
AI Technical Summary
Traditional positioning methods have poor real-time performance, high computational complexity, and are difficult to meet real-time processing requirements when processing large-scale positioning data, and are easily affected by environmental factors, resulting in low positioning accuracy.
By determining the latitude and longitude data of the to-local point, obtaining the target digital signature as index feature information, finding out whether the digital signature exists in the target storage space, if it exists, obtaining the matching area, determining the target area where the to-local point is located and outputting the area information.
The complexity of positioning calculation is reduced, real-time processing of large-scale positioning data is realized, and the accuracy and efficiency of positioning are improved.
Smart Images

Figure CN120162391A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of transportation, and in particular, to a positioning method, a device, a storage medium, and an electronic device. Background Art
[0002] The traditional positioning method directly compares the Global Positioning System (GPS) coordinates of the target location with the map data. This not only has a high computational complexity but also often takes a long time to process large-scale positioning data, failing to meet the requirements of real-time processing. In addition, the positioning method that solely relies on GPS data is easily affected by environmental factors (such as high-rise buildings, tunnels, etc.), resulting in low positioning accuracy. Summary of the Invention
[0003] Embodiments of the present application provide a positioning method, a device, a storage medium, and an electronic device to at least solve the technical problems of poor real-time performance and low positioning accuracy in the related art.
[0004] According to one aspect of the embodiments of the present application, a positioning method is provided, including determining the longitude and latitude data of a point to be located, and obtaining a target digital signature corresponding to the point to be located based on the longitude and latitude data; the target digital signature is index feature information for finding the area where the point to be located is located; determining whether the target digital signature exists in the geographical location information stored in the target storage space; if it exists, obtaining a target matching area corresponding to the target digital signature, and determining the target area where the point to be located is located based on the target matching area; outputting the area information corresponding to the target area.
[0005] According to another aspect of the embodiments of the present application, a positioning device is further provided, including: a first determination unit for determining the longitude and latitude data of a point to be located, and obtaining a target digital signature corresponding to the point to be located based on the longitude and latitude data; the target digital signature is index feature information for finding the area where the point to be located is located; a second determination unit for determining whether the target digital signature exists in the geographical location information stored in the target storage space; an obtaining unit for, if it exists, obtaining a target matching area corresponding to the target digital signature, and determining the target area where the point to be located is located based on the target matching area; an output unit for outputting the area information corresponding to the target area.
[0006] According to still another aspect of the embodiments of the present application, an electronic device is further provided, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to execute the above positioning method through the computer program.
[0007] According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the above-mentioned positioning method when running.
[0008] In the embodiments of the present application, a method is adopted in which the latitude and longitude data of the point to be located are determined, and the target digital signature corresponding to the point to be located is obtained based on the latitude and longitude data. The target digital signature is index feature information for finding the area where the point to be located is located; it is determined whether the target digital signature exists in the geographical location information stored in the target storage space; if it exists, the target matching area corresponding to the target digital signature is obtained, and the target area where the point to be located is located is determined based on the target matching area; the area information corresponding to the target area is output. In the above method, by digitally signing and marking the area corresponding to the positioning point, the dimensionality reduction processing of the spatial data is performed, and at the same time, the key feature information of the geographical location is retained. It can not only reduce the complexity of positioning calculation, but also process a large amount of positioning data in real time, greatly improving the accuracy of positioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The drawings described herein are used to provide a further understanding of the present invention, form a part of the present application, and the schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:
[0010] Figure 1 is a schematic diagram of an application environment of an optional positioning method according to an embodiment of the present application;
[0011] Figure 2 is a schematic diagram of an application environment of another optional positioning method according to an embodiment of the present application;
[0012] Figure 3 is a schematic flowchart of an optional positioning method according to an embodiment of the present application;
[0013] Figure 4 is a schematic flowchart of another optional positioning method according to an embodiment of the present application;
[0014] Figure 5 is a schematic flowchart of another optional positioning method according to an embodiment of the present application;
[0015] Figure 6 is a schematic flowchart of another optional positioning method according to an embodiment of the present application;
[0016] Figure 7 is a schematic structural diagram of another optional positioning device according to an embodiment of the present application;
[0017] Figure 8 It is a schematic structural diagram of an optional electronic device according to an embodiment of the present application. Detailed implementation manners
[0018] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0019] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0020] According to one aspect of the embodiments of the present application, a positioning method is provided. Optionally, as an optional implementation manner, the above positioning method can be but is not limited to being applied to, for example, Figure 1 the application environment shown. The application environment includes: a terminal device 102 for human-computer interaction with a user, a network 104, and a server 106. Human-computer interaction can be carried out between the user 108 and the terminal device 102, and a positioning client is running in the terminal device 102. The above terminal device 102 includes a human-computer interaction screen 1022, a processor 1024, and a memory 1026. The human-computer interaction screen 1022 is used to display the longitude and latitude data of the point to be located; the processor 1024 is used to send the longitude and latitude data of the point to be located to the server 106, and the data monitoring request is used to obtain target data information in multiple dimensions. The memory 1026 is used to store the longitude and latitude data of the point to be located and the area information corresponding to the target area.
[0021] In addition, the server 106 includes a database 1062 and a processing engine 1064. The database 1062 is used to store the longitude and latitude data of the points to be located and the area information corresponding to the target area. The processing engine 1064 is used to determine the longitude and latitude data of the points to be located, obtain the target digital signature corresponding to the points to be located based on the longitude and latitude data to determine the longitude and latitude data of the points to be located. The target digital signature is index feature information for finding the area where the points to be located are located. Determine whether the target digital signature exists in the geographical location information stored in the target storage space. If it exists, obtain the target matching area corresponding to the target digital signature, and determine the target area where the points to be located are located based on the target matching area. Output the area information corresponding to the target area. Send the area information corresponding to the target area to the client of the above terminal device 102.
[0022] In one or more embodiments, the above positioning method of the present application can be applied to Figure 2 the application environment shown. As Figure 2 shown, human-computer interaction can be carried out between the user 202 and the user device 204. The user device 204 includes a memory 206 and a processor 208. In this embodiment, the user device 204 can but is not limited to perform the operations performed by the above terminal device 102, and display the area information corresponding to the target area.
[0023] Optionally, the above terminal device 102 and user device 204 include but are not limited to terminals such as mobile phones, tablets, laptops, PCs, in-vehicle electronic devices, and wearable devices. The above network 104 can include but is not limited to wireless networks or wired networks. Among them, the wireless network includes: WIFI and other networks that implement wireless communication. The above wired network can include but is not limited to: wide area network, metropolitan area network, local area network. The above server 106 can include but is not limited to any hardware device that can perform calculations. The above server can be a single server, or a server cluster composed of multiple servers, or a cloud server. The above is only an example, and no limitation is made in this embodiment.
[0024] The traditional positioning method is to directly compare the Global Positioning System (GPS) coordinates of the target location with the map data. In this way, not only is the computational complexity relatively high, but it often takes a long time to process large-scale positioning data, and it cannot meet the requirements of real-time processing. In addition, the positioning method that simply relies on GPS data is easily affected by environmental factors (such as high-rise buildings, tunnels, etc.), resulting in low positioning accuracy.
[0025] To solve the above technical problems, as an optional implementation manner, as Figure 3As shown in the figure, an embodiment of the present application provides a positioning method, including the following steps:
[0026] S302. Determine the longitude and latitude data of the point to be located, and obtain the target digital signature corresponding to the point to be located based on the longitude and latitude data; the target digital signature is index feature information for finding the area where the point to be located is located.
[0027] S304. Determine whether the target digital signature exists in the geographical location information stored in the target storage space.
[0028] S306. If it exists, obtain the target matching area corresponding to the target digital signature, and determine the target area where the point to be located is located based on the target matching area.
[0029] S308. Output the area information corresponding to the target area.
[0030] Specifically, in the embodiment of the present application, longitude and latitude are usually used to locate a point on the earth. Longitude represents the position in the east-west direction, while latitude represents the position in the north-south direction. For example, the longitude and latitude data of the point to be located, for example, the longitude and latitude of the point to be located can be 114°27′9508″ east longitude and 30°.60′1878″ north latitude. After obtaining the specific longitude and latitude information of the point to be located, based on the longitude and latitude data, obtain the target digital signature corresponding to the longitude and latitude data. This signature is used as index feature information for finding the area where the point to be located is located, and is used for quickly positioning and matching geographical locations. Use the target digital signature as a query index to query in the target storage space (such as a database) whether there is a query index corresponding to the target digital signature. If it exists, based on the target matching area corresponding to the query index, determine the target area where the point to be located is located. Output the area information corresponding to the target area, and this area information includes, for example, area name, description, geographical data, etc.
[0031] In the embodiments of the present application, the method includes: determining the latitude and longitude data of the point to be located, obtaining the target digital signature corresponding to the point to be located based on the latitude and longitude data, where the target digital signature is index feature information for finding the area where the point to be located is located; determining whether the target digital signature exists in the geographical location information stored in the target storage space; if it exists, obtaining the target matching area corresponding to the target digital signature, and determining the target area where the point to be located is located based on the target matching area; and outputting the area information corresponding to the target area. In the above method, by digitally signing and annotating the area corresponding to the positioning point, the spatial data is dimensionally reduced while retaining the key feature information of the geographical location. This not only reduces the complexity of positioning calculations but also enables real-time processing of large-scale positioning data, greatly improving the accuracy of positioning.
[0032] In one or more embodiments, the positioning method further includes:
[0033] Determining the drawing direction of the drawing points of the polygon corresponding to the target administrative region in the map;
[0034] In the case where the drawing direction is counterclockwise, converting the drawing direction to clockwise;
[0035] Based on the polygon drawn in the clockwise direction, dividing the polygon to obtain a set of rectangular regions composed of multiple grids;
[0036] In the case where the polygon drawn in the clockwise direction is completely within the area corresponding to the set of rectangular regions, determining a plurality of matching regions; each of the matching regions corresponds to a grid in the set of rectangular regions; each grid contains a plurality of latitude and longitude coordinate points, and the plurality of latitude and longitude coordinate points correspond to the same digital signature;
[0037] Generating the digital signature corresponding to each of the matching regions.
[0038] Specifically, in the embodiments of the present application, the above-mentioned target administrative region may be, for example, a national map or a regional map of a certain province or city. As Figure 4 shown, when it is necessary to determine whether a point belongs to the interior of a certain polygon, the vertex order (clockwise or counterclockwise) of the polygon determines the definition of "interior" and "exterior" of the polygon. To unify the subsequent polygon processing logic and reduce the computational complexity of the positioning algorithm, the present application may, for example, use Green's formula to determine the drawing direction of the polygon. The formula is as follows:
[0039]
[0040] where Area is the area of the polygon, x i and y iare the x-axis and y-axis coordinates of the i-th vertex; x i+1 and Y i+1 , are the x-axis and y coordinates of the (i + 1)-th vertex; x n and y n are the x-axis and y-axis of the n-th vertex. So if the result is positive, then it is counterclockwise.
[0041] If the Area value is positive, then the polygon is counterclockwise; if Area is negative, then the polygon is drawn clockwise. When the polygon is drawn counterclockwise, the polygon is changed to a clockwise-drawn polygon by reversing the polygon points.
[0042] Combined with Figure 5 as shown, the clockwise-drawn polygon is split into rectangles or the intersection of a polygon and a rectangle, and finally a set of rectangular areas composed of multiple grids can be obtained. In the case where the polygon drawn in the above clockwise direction is completely within the corresponding area composed of multiple rectangular areas of the set of rectangular areas, each of the matching areas is determined, and each of the matching areas corresponds to a grid in the set of rectangular areas;
[0043] After splitting the polygon, digital signatures are generated for the split rectangles. The digital signatures corresponding to each point in each rectangle among all rectangles are the same, that is, each grid contains multiple longitude and latitude coordinate points, and the multiple longitude and latitude coordinate points correspond to the same digital signature. Therefore, the digital signature can be used as the "key" to query the area location information, and the polygon information can be used as the "value" corresponding to the "key".
[0044] In one or more embodiments, the generating the digital signature corresponding to each of the matching areas includes:
[0045] Determine the row number corresponding to the row where each grid is located in the set of rectangular areas, and the column number corresponding to the column where each grid is located in the set of rectangular areas;
[0046] Multiply the row number and column number of each grid respectively to determine the corresponding area identifier, and determine the area identifier as the digital signature corresponding to the matching area.
[0047] Specifically, in the embodiment of the present application, for example, the target administrative region is equally divided into 10 8 equal parts by grid lines, then the set of rectangular areas contains a total of 10 8 grids. Assume that the row number corresponding to the row where the current grid is located in the set of rectangular areas is 32761, and the column number corresponding to the column where it is located is 27060; then the area identifier corresponding to the current grid is: 32761 * 27060 = 886512660. That is, the digital signature corresponding to the matching area corresponding to the current network.
[0048] In one or more embodiments, generating a plurality of rectangular regions based on the polygon drawn in the clockwise direction includes:
[0049] Traverse each grid in the set of rectangular regions:
[0050] If there are eight grids around the current grid, it is determined that the current preprocessed rectangular region is not on the boundary of the polygon;
[0051] If the number of grids around the current grid is less than eight, it is determined that the current preprocessed rectangular region is on the boundary of the polygon, and the intersection of the region corresponding to the current grid and the polygon is calculated according to the ray method.
[0052] Specifically, in the embodiments of the present application, as Figure 5 shown, for example, according to the same rectangular area, the polygon (current administrative region) drawn in the clockwise direction is divided to obtain a set of rectangular regions composed of a plurality of grids. If there are eight grids around the current grid, it is determined that the region corresponding to the current grid is not inside the polygon, that is, the current point to be determined is inside the current administrative region.
[0053] If the number of grids around the current grid is less than 8, it is determined that the region corresponding to the current grid is on the boundary of the polygon, that is, the region corresponding to the current grid spans multiple administrative regions. At this time, the intersection of the region corresponding to the current grid and the polygon can be calculated according to the ray method, and the region corresponding to the current administrative region included in the region corresponding to the current grid can be calculated.
[0054] In one or more embodiments, obtaining the target digital signature corresponding to the point to be located based on the longitude and latitude data includes:
[0055] Convert the longitude and latitude data into data of floating-point type;
[0056] Determine the target matching region corresponding to the data of floating-point type from the set of rectangular regions; the target matching region corresponds to one grid in the set of rectangular regions;
[0057] Determine the region identifier of the target matching region as the target digital signature corresponding to the point to be located. Specifically, in the embodiments of the present application, as Figure 5As shown, for example, convert the longitude and latitude data (114°27′9508″ E, 30°.60′1878″ N) from its original format (degrees, seconds, minutes, etc.) to floating-point type data 117.0911, 31.5217. Since there are multiple coordinate points corresponding to each grid in the set of rectangular regions, determine the target grid where 117.0911, 31.5217 is located, that is, the target matching region, according to the regional range corresponding to each grid; then determine the target digital signature corresponding to the point to be located by the region identifier of the target matching region. The above region identifier is the unique identifier corresponding to the matching region, and this unique identifier can be obtained in the following way: the row number corresponding to the row where each grid is located in the set of rectangular regions, and the column number corresponding to the column where each grid is located in the set of rectangular regions; multiply the row number and column number of each grid to determine the corresponding region identifier for each grid.
[0058] In one or more embodiments, determining whether the target digital signature exists in the geographical location information stored in the target storage space includes:
[0059] Determining whether the target digital signature exists in the geographical location information stored in the geographical location information library; wherein, the geographical location information library is a database obtained based on a balanced tree storage structure, signature information corresponding to the matching region, and geographical location information corresponding to each signature information.
[0060] Specifically, in the embodiments of the present application, there are multiple polygons corresponding to the national administrative regions or the boundaries of each township in a certain province, and the data volume is relatively large. The embodiments of the present application split the polygons into regular rectangles or tiny polygons, generate corresponding digital signatures for the regular rectangles or tiny polygons, apply for space in the data storage (disk) of the service to store the boundary data, and then use a balanced tree. Here, a B-tree structure can be used to store the data signature and the data space address. As a data structure, the B-tree can reduce disk I / O operations and improve the speed of retrieving location data. Due to the balanced nature of the B-tree, even if the amount of location data grows, it can maintain a relatively stable retrieval time complexity. Maintaining the data stored on the disk still has high data access performance. The geographical location information library of the present application can be stored on the disk of the server.
[0061] In one or more embodiments, the positioning method further includes:
[0062] Write the accessed geographical location information and the digital signature corresponding to the accessed geographical location information into the cache in the order of access time of the geographical location information;
[0063] Delete the geographical location information that has not been accessed for the longest time in the cache, and delete the digital signature corresponding to the geographical location information that has not been accessed for the longest time, in the chronological order of writing the geographical location information into the cache;
[0064] Determining whether the target digital signature exists in the geographical location information stored in the target storage space includes: determining whether the target digital signature exists in the geographical location information stored in the cache.
[0065] Specifically, in the embodiments of the present application, in order to quickly respond to subsequent requests for the geographical location information and reduce the query pressure on the main storage system, the present application monitors and records the access time of the geographical location information, and writes the accessed geographical location information and the digital signature corresponding to the accessed geographical location information into the cache; for example, the least recently used algorithm can be used to delete the geographical location information that has not been accessed for the longest time in the cache, and delete the digital signature corresponding to the geographical location information that has not been accessed for the longest time, in the chronological order of writing the geographical location information into the cache;. It should be noted that when it is necessary to determine whether a specific target digital signature exists in the geographical location information stored in the target storage space, first query in the cache. If the target digital signature is found in the cache, directly use the geographical location information in the cache for subsequent processing. If the target digital signature is not found in the cache, turn to the main storage area (the disk of the server) for query.
[0066] In one or more embodiments, determining the target area where the to-be-located point is located based on the target matching area includes:
[0067] When the target matching area includes multiple administrative regions, use the ray method to generate rays with a preset length from the to-be-located point to the surroundings, and calculate the number of intersection points of the rays and the multiple administrative regions;
[0068] When the number of intersection points of the ray and the current administrative region is odd, determine that the to-be-located point is within the current administrative region;
[0069] When the number of intersection points of the ray and the current administrative region is even, determine that the to-be-located point is outside the current administrative region.
[0070] Specifically, for example, when the target matching area of the rectangle spans three administrative regions (such as near the city or regional boundary), each point in the intersection of the three administrative regions corresponding to the target matching area has the same digital signature. At this time, it is necessary to determine which administrative region among the three administrative regions the point to be located is in; in the implementation of this application, the ray method is used to generate rays with a preset length from the point to be located to the surrounding. For example, 8 rays are generated to the surrounding, and the number of intersection points of the 8 rays and the three administrative regions is calculated; when the number of intersection points of the ray and the current administrative region is odd, for example, 1, it is determined that the point to be located is within the current administrative region; when the number of intersection points of the ray and the current administrative region is even, for example, 2 or 4, it is determined that the point to be located is outside the current administrative region. Based on the above solution, this application can handle the situation of multiple administrative region intersections, improving the positioning accuracy and efficiency.
[0071] In one or more embodiments, determining the target area where the point to be located is located based on the target matching area further includes:
[0072] When the target matching area includes one administrative region, the target matching area is determined as the target area.
[0073] Specifically, in the embodiments of this application, when it is confirmed that the target matching area only contains one administrative region, the target matching area is directly determined as the target area of the point to be located. The administrative region attribution of the point to be located can be determined quickly and accurately, and the geographical location information service that can respond in real time can be provided.
[0074] In one or more embodiments, the positioning method further includes:
[0075] If the target digital signature does not exist in the geographical location information database, a prompt message indicating that the geographical location of the current point to be located has not been found is returned. In this way, it is ensured that the location of the point to be located is determined only when there is an exact match in the geographical location information database, enhancing the reliability of the system, and can also effectively handle the situation of query failure, avoiding system non-response or incorrect response.
[0076] Based on the above embodiments, this application has the following beneficial technical effects:
[0077] 1. High - efficient data processing ability: This application significantly reduces the data dimension through spatial data dimensionality reduction technology while retaining key feature information. Combining with the integration of multiple algorithms, it realizes the ability to process millions of vehicle positioning data within seconds, and the processing efficiency is thousands of times higher than that of traditional methods, breaking through and solving the problem of real - time processing of massive data, providing technical support for large - scale vehicle monitoring and dispatching.
[0078] 2. High-precision matching: This application combines the advantages of multiple positioning algorithms, effectively improving the matching accuracy of positioning data. Even when matching urban spatial data across the country, it can maintain high positioning accuracy, solving the problem of insufficient accuracy of traditional single algorithms in complex environments.
[0079] 3. Two-way matching ability: Traditional methods do not support reverse matching. This application, through innovative data structure design, can not only support quickly and reversely matching positioning data to specific spatial positions, but also achieve reverse query of spatial data. This two-way matching ability greatly expands the application scenarios and provides more flexible data support for traffic analysis and urban planning.
[0080] 4. Strong scalability: This application considers the scalability of data volume in its design and can effectively handle the growth of data volume. Whether processing vehicle positioning data in the millions or on a larger scale, it can maintain high efficiency and accuracy. The basic rate can reach three million data matches per second, solving the problem of poor scalability of traditional methods in large-scale data processing.
[0081] 5. Extremely low resource consumption: Traditional methods consume too much server processor and memory resources. Compared with open-source methods, this application, through integrated optimization of the algorithm, consumes extremely low processor and memory resources of the hardware. The resource consumption is reduced by thousands of times, improving the adaptability of the system in various complex scenarios and overcoming the limitations of poor performance of single algorithms in specific environments.
[0082] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0083] According to another aspect of the embodiments of the present application, there is also provided a positioning device for implementing the above positioning method. As Figure 7 shown, the device includes:
[0084] A first determination unit 702, configured to determine the longitude and latitude data of the point to be located, and obtain the target digital signature corresponding to the point to be located based on the longitude and latitude data; the target digital signature is signature information obtained by processing the longitude and latitude information of the matching area, and the matching area includes a rectangular area or a polygon area obtained by splitting the area in the map;
[0085] A second determination unit 704, configured to determine whether the target digital signature exists in the geographical location information stored in the target storage space;
[0086] An acquisition unit 706, configured to, if it exists, acquire a target matching area corresponding to the target digital signature, and determine a target area where the to-be-located point is located based on the target matching area;
[0087] An output unit 708, configured to output area information corresponding to the target area.
[0088] In an embodiment of the present application, the longitude and latitude data of the to-be-located point is determined, and the target digital signature corresponding to the to-be-located point is acquired based on the longitude and latitude data. The target digital signature is index feature information for finding the area where the to-be-located point is located; it is determined whether the target digital signature exists in the geographical location information stored in the target storage space; if it exists, the target matching area corresponding to the target digital signature is acquired, and the target area where the to-be-located point is located is determined based on the target matching area; the area information corresponding to the target area is output. In the above method, by digitally signing and annotating the area corresponding to the positioning point, the spatial data is dimensionally reduced, and at the same time, the key feature information of the geographical location is retained. It can not only reduce the complexity of positioning calculation, but also process a large amount of positioning data in real time, greatly improving the positioning accuracy.
[0089] According to another aspect of the embodiments of the present application, an electronic device for implementing the above positioning method is further provided. The electronic device may be Figure 8 the terminal device or server shown. In this embodiment, the electronic device is taken as an example of a server for illustration. As Figure 8 shown, the electronic device includes a memory 802 and a processor 804. A computer program is stored in the memory 802, and the processor 804 is configured to execute the steps in any one of the above method embodiments through the computer program.
[0090] Optionally, in this embodiment, the above electronic device may be at least one network device among multiple network devices in a computer network.
[0091] Optionally, in this embodiment, the above processor may be configured to execute the following steps through a computer program:
[0092] S1. Determine the longitude and latitude data of the to-be-located point, and acquire the target digital signature corresponding to the to-be-located point based on the longitude and latitude data; the target digital signature is index feature information for finding the area where the to-be-located point is located;
[0093] S2. Determine whether the target digital signature exists in the geographical location information stored in the target storage space;
[0094] S3. If it exists, obtain the target matching area corresponding to the target digital signature, and determine the target area where the to-be-located point is located based on the target matching area;
[0095] S4. Output the area information corresponding to the target area.
[0096] Optionally, those of ordinary skill in the art can understand that Figure 8 the structure shown is only schematic, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, and a mobile Internet device (MID), a PAD and other terminal devices. Figure 8 It does not limit the structure of the above-mentioned electronic device. For example, the electronic device may further include more or fewer components (such as a network interface, etc.) than those shown Figure 8 in the figure, or have a different configuration from that shown Figure 8 in the figure.
[0097] Among them, the memory 802 can be used to store software programs and modules, such as the program instructions / modules corresponding to the positioning method and device in the embodiments of the present application. The processor 804 executes various functional applications and data processing by running the software programs and modules stored in the memory 802, that is, implements the above-mentioned positioning method. The memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 802 may further include a memory remotely disposed relative to the processor 804, and these remote memories may be connected to the terminal through a network. Examples of the above network include but are not limited to the Internet, an enterprise internal network, a local area network, a mobile communication network, and combinations thereof. Among them, the memory 802 may specifically but not limitedly be used to store the positioning result. As an example, as Figure 8 shown, the above-mentioned memory 802 may but not limitedly include the first determination unit 702, the second determination unit 704, the acquisition unit 706, and the output unit 706 in the above-mentioned positioning device. In addition, it may further include but not limited to other module units in the above-mentioned positioning device, which will not be elaborated in this example.
[0098] Optionally, the above-mentioned transmission device 806 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one example, the transmission device 808 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable, so as to communicate with the Internet or a local area network. In one example, the transmission device 806 is a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0099] In addition, the above-mentioned electronic device further includes: a display 808, which is used to display the positioning result; and a connection bus 810, which is used to connect each module component in the above-mentioned electronic device.
[0100] In other embodiments, the above-mentioned terminal device or server may be a node in a distributed system. Among them, the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes in the form of network communication. Among them, the nodes can form a Peer To Peer (P2P) network, and any form of computing device, such as an electronic device such as a server or a terminal, can become a node in the blockchain system by joining the P2P network.
[0101] According to one aspect of the present application, there is provided a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned positioning method, wherein the computer program is set to execute the steps in any one of the above method embodiments when running.
[0102] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may be set to store a computer program for executing the following steps:
[0103] S1, determine the longitude and latitude data of the point to be located, and obtain the target digital signature corresponding to the point to be located based on the longitude and latitude data; the target digital signature is index feature information for finding the area where the point to be located is located;
[0104] S2, determine whether the target digital signature exists in the geographical location information stored in the target storage space;
[0105] S3, if it exists, obtain the target matching area corresponding to the target digital signature, and determine the target area where the point to be located is located based on the target matching area;
[0106] S4, output the area information corresponding to the target area.
[0107] Optionally, in this embodiment, those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the relevant hardware of the terminal device through a program. This program can be stored in a computer-readable storage medium, and the storage medium can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc.
[0108] The serial numbers of the embodiments of the present application above are only for description and do not represent the advantages or disadvantages of the embodiments.
[0109] If the integrated unit in the above embodiments is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in the above computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing one or more computer devices (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention.
[0110] In the above embodiments of the present invention, the descriptions of the various embodiments each have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0111] In the several embodiments provided by the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of units or modules can be electrical or other forms.
[0112] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0113] In addition, in each embodiment of the present invention, each functional unit can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0114] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope of the present invention.
Claims
1. A positioning method, characterized in that: include: Determine the latitude and longitude data of the point to be located, and obtain the target digital signature corresponding to the point to be located based on the latitude and longitude data; The target digital signature is index feature information used to find the area where the point to be located is located; Determining whether the target digital signature exists in the geographic location information stored in the target storage space; If so, obtaining a target matching area corresponding to the target digital signature, and determining the target area where the point to be located is located based on the target matching area; Output the area information corresponding to the target area.
2. The method according to claim 1, characterized in that The method further comprises: Determine the drawing direction of the drawing points of the polygon corresponding to the target administrative area in the map; When the drawing direction is counterclockwise, convert the drawing direction to clockwise; Based on the polygon drawn in the clockwise direction, the polygon is divided to obtain a set of rectangular areas consisting of a plurality of grids; In the case where the polygon drawn in the clockwise direction is completely within the area corresponding to the rectangular area set, a plurality of matching areas are determined, each of which corresponds to a grid in the rectangular area set; each grid includes a plurality of longitude and latitude coordinate points, and the plurality of longitude and latitude coordinate points correspond to the same digital signature; A digital signature corresponding to each matching area is generated.
3. The method according to claim 2, characterized in that Generating a digital signature corresponding to each matching area includes: Determine the row number corresponding to the row where each grid is located in the rectangular area set, and the column number corresponding to the column where each grid is located in the rectangular area set; The product of the row number and the column number of each grid is determined as the corresponding area identifier, and the area identifier is determined as the digital signature corresponding to the matching area.
4. The method according to claim 2 or 3, characterized in that: The method further comprises: Iterate through each grid in the rectangular area collection: If there are eight grids around the current grid, it is determined that the matching area corresponding to the current grid is not at the boundary of the polygon; If the number of grids around the current grid is less than eight, it is determined that the matching area corresponding to the current grid is located at the boundary of the polygon, and the intersection of the area corresponding to the current grid and the polygon is calculated according to the ray method.
5. The method according to claim 2 or 3, characterized in that: The step of obtaining a target digital signature corresponding to the point to be located based on the longitude and latitude data includes: Convert the latitude and longitude data into floating point data; Determine a target matching area corresponding to the floating point data from the rectangular area set; the target matching area corresponds to one of the grids in the rectangular area set; The target digital signature corresponding to the point to be located is determined by using the area identifier of the target matching area.
6. The method according to any one of claims 1 to 3, characterized in that: The determining whether the target digital signature exists in the geographical location information stored in the target storage space includes: Determine whether the target digital signature exists in the geographic location information stored in the geographic location information library; wherein the geographic location information library includes a database obtained based on a balanced tree storage structure, signature information corresponding to the matching area, and geographic location information corresponding to each signature information.
7. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Writing the accessed geographical location information and the digital signature corresponding to the accessed geographical location information into the cache in the order of the access time of the geographical location information; Deleting the geographical location information that has not been accessed for the longest time in the cache according to the time sequence of the geographical location information written into the cache, and deleting the digital signature corresponding to the geographical location information that has not been accessed for the longest time; The determining whether the target digital signature exists in the geographical location information stored in the target storage space includes: determining whether the target digital signature exists in the geographical location information stored in the cache.
8. The method according to claim 1, characterized in that The determining the target area where the point to be located is located based on the target matching area includes: In the case where the target matching area includes multiple administrative divisions, a ray method is used to generate a ray of a preset length from the point to be located to the surrounding area, and the number of intersections between the ray and the multiple administrative divisions is calculated; When the number of intersections between the ray and the current administrative division is an odd number, determining that the point to be located is within the current administrative division; When the number of intersections between the ray and the current administrative division is an even number, it is determined that the point to be located is outside the current administrative division.
9. The method according to claim 8, characterized in that The determining the target area where the point to be located is located based on the target matching area further includes: In the case that the target matching area includes an administrative division, the target matching area is determined as the target area.
10. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: If the target digital signature does not exist in the geographic location information database, a prompt message indicating that the geographic location of the current point to be located is not found is returned.
11. A positioning device, characterized in that: include: A first determining unit, configured to determine the latitude and longitude data of the point to be located, and to obtain a target digital signature corresponding to the point to be located based on the latitude and longitude data; The target digital signature is index feature information used to find the area where the point to be located is located; A second determining unit, configured to determine whether the target digital signature exists in the geographical location information stored in the target storage space; an acquisition unit, configured to acquire a target matching area corresponding to the target digital signature, if any, and determine a target area where the point to be located is located based on the target matching area; An output unit is used to output the area information corresponding to the target area.
12. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 10 through the computer program.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 10 when executed.
Citation Information
Cited By
Method, device and equipment for matching geographic area based on positioning data and medium
CN121681696A
Method, apparatus, device and medium for matching geographical area based on positioning data
CN121681696B