A method and apparatus for acquiring geographic location information

CN116415077BActive Publication Date: 2026-01-13BEIJING GRIDSUM TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111675733.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2026-01-13
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

[0003]目前,如果车辆每秒上报一条坐标点信息,而且对应着每条坐标点信息,都需要去调用地图供应商提供的api接口来获取对应的区域名称,那么随着车辆数量增多、时间越久,统计下来,需要调用api接口的次数量是很大的,以及地图供应商提供的api是收费的,如此过多频繁的调用次数是很可能被地图供应商限制调用api接口操作的,而且也是增加了很大成本的

Benefits of technology

[0058]This invention provides a method and apparatus for acquiring geographic location information. The invention pre-constructs a preset geographic location information database, which stores multiple region names and the corresponding set of coordinate points for each region name. When vehicle coordinate point information is received, the preset geographic location information database can be queried to obtain the set of coordinate points to which the coordinate point information belongs, thereby further determining the region name corresponding to the coordinate point information, and ultimately determining the vehicle's geographic location information. Compared to existing technologies, this invention solves the problems of limited API access and high costs associated with obtaining vehicle geographic location information through map provider APIs. This invention reduces or avoids this method as much as possible, instead prioritizing querying the preset geographic location information database to obtain the vehicle's geographic location, eliminating the need to call map provider APIs, avoiding limitations, reducing acquisition costs, and improving the efficiency of obtaining geographic location information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116415077B_ABST
    Figure CN116415077B_ABST
Patent Text Reader

Abstract

The application discloses a kind of acquisition method and device of geographic position information, it is related to big data analysis technical field, reduce or try to avoid the way of calling the api interface provided by map supplier and obtain the geographic position information corresponding to vehicle coordinate point information, improve the efficiency of obtaining geographic position information, avoid limit and reduce the acquisition cost.The main technical scheme of the present application is: receiving the first coordinate point information corresponding to vehicle;According to the first coordinate point information, query the preset geographic position information library, which at least contains multiple area names and the first coordinate point set corresponding to each area name;By comparing the first coordinate point information with the first coordinate point set, if the first coordinate point set contains the first coordinate point information, the area name corresponding to the first coordinate point set is obtained;The area name corresponding to the first coordinate point set is determined as the geographic position information corresponding to the vehicle.The present application is mainly applied to obtain the geographic position information of vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of big data analytics, and in particular to a method and apparatus for acquiring geographic location information. Background Technology

[0002] In today's era, big data analytics is widely used in various technical fields. Among them, data analysis and research on vehicle geolocation involves calling the API interface provided by the map provider each time the vehicle's location is determined, passing in the vehicle's coordinates (i.e., latitude and longitude coordinates) to obtain the name of the current vehicle's location and saving it as geolocation information for future use.

[0003] Currently, if a vehicle reports one coordinate point per second, and each coordinate point requires a call to the map provider's API to retrieve the corresponding area name, the number of API calls becomes enormous as the number of vehicles and the time frame increase. Since the map provider's API is paid, such excessive and frequent calls could easily lead to restrictions on API operations by the map provider, and also significantly increase costs. Therefore, this not only restricts the acquisition of vehicle geolocation information but also results in excessively high costs. Summary of the Invention

[0004] In view of this, the present invention provides a method and apparatus for obtaining geographic location information. The main purpose is to obtain the geographic location information of a vehicle by querying a preset geographic location information database, thereby reducing or minimizing the need to obtain the geographic location information corresponding to the vehicle coordinate points by calling the API interface provided by the map provider, improving the efficiency of obtaining geographic location information, avoiding limitations and reducing acquisition costs.

[0005] To achieve the above objectives, the present invention mainly provides the following technical solutions:

[0006] The first aspect of this application provides a method for obtaining geographic location information, the method comprising:

[0007] Receive the first coordinate point information corresponding to the vehicle;

[0008] Based on the first coordinate point information, a preset geographic location information database is queried. The preset geographic location information database contains at least multiple region names and a set of first coordinate points corresponding to each region name.

[0009] By comparing the first coordinate point information with the first coordinate point set, if the first coordinate point set contains the first coordinate point information, then the region name corresponding to the first coordinate point set is obtained;

[0010] The region name corresponding to the first set of coordinate points is determined as the geographical location information of the vehicle.

[0011] In some modified embodiments of the first aspect of this application, if the first set of coordinate points does not contain the first coordinate point information, the method further includes:

[0012] From multiple sets of the first coordinate points, obtain coordinate point information that has the same geographical region as the first coordinate point information, and form a second set of coordinate points. The geographical region is divided into four geographical regions based on east longitude, north latitude, west longitude and south latitude.

[0013] From the second set of coordinate points, obtain the target coordinate point with the smallest coordinate distance between the coordinate points corresponding to the first coordinate point information;

[0014] By searching through multiple sets of the first coordinate points contained in the preset geographic location information database, the set of the first coordinate points to which the target coordinate point belongs is determined, and this set is taken as the target coordinate point set.

[0015] Determine whether the coordinate point corresponding to the first coordinate point information exists within the polygon formed by the set of target coordinate points;

[0016] If so, then obtain the region name corresponding to the target coordinate point set, as the region name corresponding to the first coordinate point information and as the geographical location information corresponding to the vehicle.

[0017] In some modified embodiments of the first aspect of this application, determining whether the coordinate point corresponding to the first coordinate point information exists within the polygon range formed by the target coordinate point set includes:

[0018] The coordinate point with the largest longitude value is obtained from the set of target coordinate points and used as the first reference coordinate point;

[0019] The latitude value of the reference coordinate point is replaced with the latitude value contained in the information of the first coordinate point to obtain the second reference coordinate point;

[0020] By connecting the second reference coordinate points, a ray is constructed with the coordinate points corresponding to the first coordinate point information as its endpoints;

[0021] If the number of intersections between the ray and the polygon formed by the set of target coordinate points is odd, then the coordinate point corresponding to the first coordinate point information is determined to be within the range of the polygon formed by the set of target coordinate points.

[0022] If the number of intersections between the ray and the polygon formed by the set of target coordinate points is even, then the coordinate point corresponding to the first coordinate point information is determined to be outside the range of the polygon formed by the set of target coordinate points.

[0023] In some modified embodiments of the first aspect of this application, obtaining the target coordinate point with the smallest coordinate distance between the coordinate points corresponding to the first coordinate point information from the second set of coordinate points includes:

[0024] Calculate the coordinate distance between each coordinate point in the second coordinate point set and the coordinate point corresponding to the first coordinate point information to obtain the coordinate distance set;

[0025] Select the minimum coordinate distance from the set of coordinate distances;

[0026] The target coordinate point is determined based on the minimum coordinate distance.

[0027] In some modified embodiments of the first aspect of this application, after obtaining the region name corresponding to the target coordinate point set as the region name corresponding to the first coordinate point information and the geographical location information corresponding to the vehicle, the method further includes:

[0028] The preset geographic location information database is updated based on the first coordinate point information and the area name corresponding to the first coordinate point information.

[0029] A second aspect of this application provides a device for acquiring geographic location information, the device comprising:

[0030] The receiving unit is used to receive the first coordinate point information corresponding to the vehicle.

[0031] The query unit is used to query a preset geographic location information database based on the first coordinate point information. The preset geographic location information database contains at least a plurality of region names and a set of first coordinate points corresponding to each region name.

[0032] The comparison unit is used to compare the information of the first coordinate point with the set of the first coordinate points;

[0033] The acquisition unit is used to acquire the region name corresponding to the first coordinate point set when the first coordinate point set contains the first coordinate point information;

[0034] The determining unit is used to determine the region name corresponding to the first set of coordinate points as the geographical location information corresponding to the vehicle.

[0035] In some modified embodiments of the second aspect of this application, when the first set of coordinate points does not contain the first coordinate point information, the apparatus further includes:

[0036] The component unit is used to obtain coordinate point information that has the same geographical partition as the first coordinate point information from multiple sets of the first coordinate points, and form a second set of coordinate points. The geographical partition is four geographical partitions divided according to east longitude, north latitude, west longitude and south latitude.

[0037] The acquisition unit is further configured to acquire, from the second set of coordinate points, the target coordinate point with the smallest coordinate distance between the coordinate points corresponding to the first coordinate point information;

[0038] The determining unit is further configured to determine the set of first coordinate points to which the target coordinate point belongs by searching multiple sets of first coordinate points contained in the preset geographic location information database, and use this set as the target coordinate point set;

[0039] The judgment unit is used to determine whether the coordinate point corresponding to the first coordinate point information exists within the polygon range formed by the target coordinate point set;

[0040] The determining unit is further configured to, when determining that the coordinate point corresponding to the first coordinate point information exists within the polygon range formed by the target coordinate point set, obtain the region name corresponding to the target coordinate point set as the region name corresponding to the first coordinate point information and as the geographical location information corresponding to the vehicle.

[0041] In some modified embodiments of the second aspect of this application, the determining unit includes:

[0042] The acquisition submodule is used to acquire the coordinate point with the largest longitude value from the target coordinate point set, and use it as the first reference coordinate point;

[0043] The replacement submodule is used to replace the latitude value of the reference coordinate point with the latitude value contained in the first coordinate point information to obtain the second reference coordinate point;

[0044] A submodule is constructed to construct a ray with the coordinate point corresponding to the first coordinate point information as its endpoint by connecting the second reference coordinate point;

[0045] The determination submodule is used to determine the coordinate point corresponding to the first coordinate point information within the range of the polygon formed by the set of target coordinate points when the number of intersections between the ray and the polygon is odd.

[0046] The determining submodule is further configured to determine that the coordinate point corresponding to the first coordinate point information is not within the range of the polygon formed by the set of target coordinate points when the number of intersections between the ray and the polygon formed by the set of target coordinate points is even.

[0047] In some modified embodiments of the second aspect of this application, the obtaining unit includes:

[0048] The calculation submodule is used to calculate the coordinate distance between each coordinate point in the second coordinate point set and the coordinate point corresponding to the first coordinate point information, so as to obtain a coordinate distance set.

[0049] A selection submodule is used to select the minimum coordinate distance from the set of coordinate distances;

[0050] The determination submodule is used to determine the target coordinate point based on the minimum coordinate distance.

[0051] In some modified embodiments of the second aspect of this application, the apparatus further includes:

[0052] The update unit is configured to, after obtaining the region name corresponding to the target coordinate point set, the region name corresponding to the first coordinate point information, and the geographical location information corresponding to the vehicle, update the preset geographical location information database based on the first coordinate point information and the region name corresponding to the first coordinate point information.

[0053] A third aspect of this application provides a storage medium including a stored program, wherein, when the program is executed, it controls the device where the storage medium is located to perform the method for obtaining geographical location information as described above.

[0054] A fourth aspect of this application provides an electronic device, the device including at least one processor, and at least one memory and bus connected to the processor;

[0055] The processor and the memory communicate with each other via the bus.

[0056] The processor is used to call program instructions in the memory to execute the method for obtaining geographical location information as described above.

[0057] By employing the above-described technical solution, the technical solution provided by the present invention has at least the following advantages:

[0058] This invention provides a method and apparatus for acquiring geographic location information. The invention pre-constructs a preset geographic location information database, which stores multiple region names and the corresponding set of coordinate points for each region name. When vehicle coordinate point information is received, the preset geographic location information database can be queried to obtain the set of coordinate points to which the coordinate point information belongs, thereby further determining the region name corresponding to the coordinate point information, and ultimately determining the vehicle's geographic location information. Compared to existing technologies, this invention solves the problems of limited API access and high costs associated with obtaining vehicle geographic location information through map provider APIs. This invention reduces or avoids this method as much as possible, instead prioritizing querying the preset geographic location information database to obtain the vehicle's geographic location, eliminating the need to call map provider APIs, avoiding limitations, reducing acquisition costs, and improving the efficiency of obtaining geographic location information.

[0059] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0060] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0061] Figure 1 A flowchart illustrating a method for obtaining geographic location information provided in an embodiment of the present invention;

[0062] Figure 2 A flowchart illustrating another method for obtaining geographic location information provided in an embodiment of the present invention;

[0063] Figure 3 A simplified diagram illustrating geographical partitioning is provided for embodiments of the present invention;

[0064] Figure 4 A block diagram illustrating the composition of a geographic location information acquisition device provided in an embodiment of the present invention;

[0065] Figure 5 A block diagram illustrating the composition of another geographic location information acquisition device provided in an embodiment of the present invention;

[0066] Figure 6 An electronic device for acquiring geographic location information provided in an embodiment of the present invention. Detailed Implementation

[0067] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

[0068] This invention provides a method for obtaining geographic location information, such as... Figure 1 As shown, this method obtains the vehicle's geographical location information by querying a preset geographical location information database. The specific steps provided in this embodiment of the invention are as follows:

[0069] 101. Receive the first coordinate point information corresponding to the vehicle.

[0070] The coordinates used here are geographically defined coordinates, employing a Geographic Coordinate System (GCSS). This system uses a three-dimensional sphere to define the location on the Earth's surface, allowing reference to points on the Earth's surface via latitude and longitude. Therefore, the coordinate information obtained in this embodiment of the invention includes both longitude and latitude values, and can also be described as map coordinates. For example, the received vehicle coordinate information is (116.397428E, 39.90923N), where 116.397428 is the east longitude and 39.90923 is the north latitude.

[0071] In this embodiment of the invention, the coordinate point information (i.e., longitude and latitude values ​​on the map coordinates) of the vehicle can be collected at a fixed time period (e.g., every 1 second), and this coordinate point information can be stored and sent in the form of a message queue through the Internet of Vehicles. When the processing terminal hears that a message has been sent, it can receive the coordinate point information of the vehicle one after another. The execution subject of the method provided in this embodiment of the invention can be this processing terminal.

[0072] It should be noted that in this embodiment of the invention, the term "first" is used to identify the received vehicle coordinate information, so as to facilitate its differentiation from other coordinate information and to make subsequent explanations easier.

[0073] 102. Based on the first coordinate point information, query the preset geographic location information database. The preset geographic location information database contains at least multiple region names and the set of first coordinate points corresponding to each region name.

[0074] The preset geographic location information database is pre-built according to the actual business needs of different application scenarios. This database stores a preset mapping relationship between region names and sets of coordinate points, allowing the same region name to represent multiple coordinate points, corresponding to a set of coordinate points. It should be noted that the set of coordinate points in the preset geographic location information database is labeled as the "first set of coordinate points" for easy distinction from other coordinate point sets mentioned later, facilitating a clear explanation of the method provided in this embodiment of the invention.

[0075] For example, the region name can be determined according to the administrative division rules, and the smallest region unit can be set. For example, if the smallest region unit is set as a community in Beijing, then the region name "Community A" will correspond to a set of coordinate points B. The specific number of coordinate points contained in the set of coordinate points B can be set according to actual needs.

[0076] In this embodiment of the invention, a preset geographic location information database is used to query the location of the vehicle's coordinates, and then the data information of the vehicle and its location can be stored, thereby replacing the storage of both vehicle and coordinate information.

[0077] This operation, while ensuring that the stored data is valid geographical location information, can replace a large amount of coordinate point information with a region name, avoiding the need to store coordinate point information for each vehicle at different times, and thus avoiding the storage of a large amount of redundant and worthless data. This reduces the amount of data stored and saves a lot of storage space.

[0078] 103. By comparing the information of the first coordinate point with the set of the first coordinate points, if the set of the first coordinate points contains the information of the first coordinate point, then obtain the name of the region corresponding to the set of the first coordinate points.

[0079] 104. Determine the region name corresponding to the first set of coordinate points as the geographical location information of the vehicle.

[0080] In this embodiment of the invention, the specific implementation method of obtaining the geographical location information of a vehicle using a preset geographical location information database is as follows: it is to compare whether the first coordinate point information to be queried is in the preset geographical location information database. If it is, then the corresponding area name is further searched, thereby finally determining the area name corresponding to the first coordinate point information and obtaining the geographical location information of the vehicle.

[0081] The present invention provides a method for obtaining geographic location information. This method involves pre-constructing a preset geographic location information database, which stores multiple region names and the corresponding set of coordinate points for each region. When vehicle coordinate point information is received, the preset geographic location information database can be queried to obtain the set of coordinate points to which the coordinate point information belongs, thereby further determining the region name corresponding to the coordinate point information, and ultimately determining the vehicle's geographic location information. Compared to existing technologies, this method solves the problems of limited API access and high costs associated with obtaining vehicle geographic location information through map provider APIs. The present invention reduces or avoids this method as much as possible, instead prioritizing querying the preset geographic location information database to obtain the vehicle's geographic location, eliminating the need to call map provider APIs, avoiding limitations, reducing acquisition costs, and improving the efficiency of obtaining geographic location information.

[0082] To provide a more detailed explanation of the above embodiments, this invention also provides another method for obtaining geographic location information, such as... Figure 2 As shown, the following specific steps are provided in this embodiment of the invention:

[0083] 201. Receive the first coordinate point information corresponding to the vehicle.

[0084] 202. Based on the first coordinate point information, query the preset geographic location information database. The preset geographic location information database contains at least multiple region names and the set of first coordinate points corresponding to each region name.

[0085] In this embodiment of the invention, for the explanation of steps 201-202, please refer to steps 101-102, which will not be repeated here.

[0086] 203a. By comparing the information of the first coordinate point with the set of the first coordinate points, if the set of the first coordinate points contains the information of the first coordinate point, then obtain the name of the region corresponding to the set of the first coordinate points.

[0087] 204a. Determine the region name corresponding to the first set of coordinate points as the geographical location information of the vehicle.

[0088] In this embodiment of the invention, after receiving the vehicle's first coordinate point information, steps 203a-204a prioritize querying a preset geographic location information database. If the database contains the first coordinate point information, then the geographic location information corresponding to the vehicle can be determined directly through this query method.

[0089] However, if the first coordinate point information cannot be found after first querying the preset geographic location information database, then the geographic location information of the vehicle cannot be determined directly through the query method. Therefore, the following parallel technical solution is adopted, steps 203b-208b, which are described in detail below:

[0090] 203b. If the first coordinate point set does not contain the first coordinate point information, obtain the coordinate point information that has the same geographical partition as the first coordinate point information from multiple first coordinate point sets to form a second coordinate point set.

[0091] The geographical regions are divided into four regions based on east longitude, north latitude, west longitude, and south latitude. For example, the embodiments of the present invention provide a simplified diagram of the geographical regions, such as... Figure 3 As shown, this diagram is based on map coordinates, with the x and y axes divided into four regions, much like the four quadrants of a Cartesian coordinate system: x > 0 and y > 0, which is the region consisting of east longitude and north latitude, and can be labeled as the first region; x > 0 and y < 0, which is the region consisting of east longitude and south latitude, and can be labeled as the second region; x < 0 and y < 0, which is the region consisting of west longitude and south latitude, and can be labeled as the third region; and x < 0 and y > 0, which is the region consisting of west longitude and north latitude, and can be labeled as the fourth region.

[0092] Furthermore, in combination Figure 3 For example, the received first coordinate point information can be converted to facilitate computer processing. For instance, (116.397428E, 39.90923N) belongs to the first partition, so it is (116.397428E, 39.90923N). However, (116.397428, 39.90923) can be converted to (-116.397428, -39.90923) to conform to... Figure 3 The plane rectangular coordinate system has x-axis and y-axis.

[0093] In this embodiment of the invention, when the first coordinate point information of a vehicle is received, the geographical region to which the first coordinate point information belongs can be determined directly based on the positive and negative values ​​on the x-axis and y-axis. Then, based on the positive and negative values ​​of x or y, coordinate points within each set of first coordinate points are searched to find coordinate points belonging to the same geographical region as the first coordinate point information, forming a new set of coordinate points, which is identified as the second set of coordinate points. Renaming the coordinate point set here is also for ease of differentiation from the first set of coordinate points.

[0094] It should be noted that, in this embodiment of the invention, for obtaining coordinate points that have the same geographical partition as the first coordinate point information, each first coordinate point set in the preset geographical location information database is searched one by one, and finally a total set of coordinate points that meets the conditions is obtained, which is used as the second coordinate point set.

[0095] 204b. From the second set of coordinate points, obtain the target coordinate point with the smallest coordinate distance between the coordinate points corresponding to the first coordinate point information.

[0096] In this embodiment of the invention, for the first coordinate point information to be queried, the process involves finding the coordinate point with the smallest coordinate distance within the same geographical partition. Step 204b can be explained in more detail as follows:

[0097] First, calculate the coordinate distance between each coordinate point in the second set of coordinate points and the coordinate point corresponding to the information of the first set of coordinate points to obtain the coordinate distance set.

[0098] It should be noted that, in order to avoid overlooking the calculation of a certain coordinate point, all coordinate points in the second coordinate point set can be sorted in ascending order of longitude value to obtain a sequence. Then, according to the sequence, the coordinate distance between each coordinate point and the corresponding coordinate point of the first coordinate point information can be calculated one by one. This will result in multiple coordinate distances, which can be combined into a coordinate distance set.

[0099] Secondly, the minimum coordinate distance is selected from the set of coordinate distances, and the target coordinate point is determined based on the minimum coordinate distance.

[0100] In this embodiment of the invention, a minimum coordinate distance can be obtained by comparing the magnitudes of the coordinate distances. For this minimum coordinate distance, one endpoint is known, which is the coordinate point corresponding to the first coordinate point information, and the other endpoint is the target coordinate point desired in this embodiment of the invention.

[0101] 205b. By searching through multiple sets of first coordinate points contained in the preset geographic location information database, determine the set of first coordinate points to which the target coordinate point belongs, and use it as the target coordinate point set.

[0102] In this embodiment of the invention, the target coordinate point obtained in step 204b still originates from the first coordinate set. Therefore, it is possible to further search the preset geographic location information database to find which first coordinate set the target coordinate point actually belongs to. Here, it can be identified as the target coordinate point set for easy differentiation from other first coordinate sets.

[0103] 206b. Determine whether the coordinate point corresponding to the first coordinate point information exists within the polygon formed by the target coordinate point set.

[0104] In this embodiment of the invention, since the target coordinate point is the closest to the coordinate point corresponding to the first coordinate point information, compared with other sets of first coordinate points in the preset geographic location information database, the polygon formed by the target coordinate point set should have the highest probability of being related to the coordinate point corresponding to the first coordinate point information. This relationship can be an inclusion relationship. The following detailed steps will explain this further:

[0105] First, the coordinate point with the largest longitude value is obtained from the target coordinate point set and used as the first reference coordinate point. The latitude value of the reference coordinate point is then replaced with the latitude value contained in the information of the first coordinate point to obtain the second reference coordinate point.

[0106] For example, if the target set of coordinate points is W0, select the coordinate point with the largest longitude value as A(x0, y0) as the first reference coordinate point. If the information of the first coordinate point is (x1, y1), then after a replacement operation, we obtain coordinate point B(x0, y1), which will be used as the second reference coordinate point.

[0107] Secondly, by connecting the second reference coordinate point, a ray is constructed with the coordinate point corresponding to the information of the first coordinate point as its endpoint.

[0108] For example, connect the coordinate point B(x0, y1) to construct a ray with the coordinate point (x1, y1) as the endpoint.

[0109] If the number of intersections between the ray and the polygon formed by the set of target coordinate points is odd, then the coordinate point corresponding to the first coordinate point information is determined to be within the range of the polygon formed by the set of target coordinate points.

[0110] However, if the number of intersections between the ray and the polygon formed by the set of target coordinate points is even, then the coordinate point corresponding to the first coordinate point information is determined to be outside the range of the polygon formed by the set of target coordinate points.

[0111] In this embodiment of the invention, the principle of rays is actually used to determine the number of intersections between the ray and a selected polygon. If the number of intersections is odd, it means that the endpoint of the ray is within the polygon. However, if the number of intersections is even, it means that the ray passes through the polygon and is not within the polygon.

[0112] 207b. If it is determined that the coordinate point corresponding to the first coordinate point information exists within the polygon range formed by the target coordinate point set, then obtain the region name corresponding to the target coordinate point set as the region name corresponding to the first coordinate point information and as the geographical location information corresponding to the vehicle.

[0113] In this embodiment of the invention, based on the mapping relationship between the region names in the preset geographic location information database and the first coordinate set, it is also possible to further find out which region name corresponds to the target coordinate set. Therefore, when it is determined that the coordinate point corresponding to the first coordinate point information exists within the polygon formed by the target coordinate point set, it means that this coordinate point is also within the region name corresponding to the target coordinate set, and thus the geographic location information of the vehicle can be obtained.

[0114] 208b. Update the preset geographic location information database based on the first coordinate point information and the area name corresponding to the first coordinate point information.

[0115] In this embodiment of the invention, the preset geographic location information database is pre-set according to different application scenarios. However, in conjunction with steps 203b-207b, if the first coordinate point information cannot be found in the preset geographic location information database, it can be further determined which region name the first coordinate point information should also belong to based on the known set of first coordinate points and corresponding region names in the preset geographic location information database. Furthermore, this determination result can be used to update the original preset geographic location information database, thereby increasing the number of entries in the original database, which is equivalent to continuously improving the database. This provides a richer and more comprehensive database for the coordinate point information of other vehicles to be searched, enabling efficient acquisition of vehicle geographic location information through efficient priority database queries.

[0116] Furthermore, as a response to the above Figure 1 , Figure 2 To implement the method shown, this embodiment of the invention provides a device for acquiring geographic location information. This device embodiment corresponds to the foregoing method embodiment. For ease of reading, this device embodiment will not repeat the details of the foregoing method embodiment, but it should be understood that the device in this embodiment can implement all the contents of the foregoing method embodiment. This device is used to acquire vehicle geographic location information, specifically as follows... Figure 4 As shown, the device includes:

[0117] The receiving unit 31 is used to receive the first coordinate point information corresponding to the vehicle;

[0118] The query unit 32 is used to query a preset geographic location information database based on the first coordinate point information. The preset geographic location information database contains at least multiple region names and a set of first coordinate points corresponding to each region name.

[0119] The comparison unit 33 is used to compare the first coordinate point information with the first coordinate point set;

[0120] The acquisition unit 34 is used to acquire the region name corresponding to the first coordinate point set when the first coordinate point set contains the first coordinate point information;

[0121] The determining unit 35 is used to determine the region name corresponding to the first set of coordinate points as the geographical location information corresponding to the vehicle.

[0122] Furthermore, such as Figure 5 As shown, when the first set of coordinate points does not contain the information of the first coordinate point, the device further includes:

[0123] The component unit 36 ​​is used to obtain coordinate point information that has the same geographical partition as the first coordinate point information from multiple sets of the first coordinate points, and form a second set of coordinate points. The geographical partition is four geographical partitions divided according to east longitude, north latitude, west longitude and south latitude.

[0124] The acquisition unit 34 is further configured to acquire, from the second set of coordinate points, the target coordinate point with the smallest coordinate distance between the coordinate points corresponding to the first coordinate point information;

[0125] The determining unit 35 is further configured to determine the first set of coordinate points to which the target coordinate point belongs by searching multiple sets of the first coordinate points contained in the preset geographic location information database, and use them as the target coordinate point set.

[0126] The judgment unit 37 is used to determine whether the coordinate point corresponding to the first coordinate point information exists within the polygon range formed by the target coordinate point set;

[0127] The determining unit 35 is further configured to, when determining that the coordinate point corresponding to the first coordinate point information exists within the polygon range formed by the target coordinate point set, obtain the region name corresponding to the target coordinate point set as the region name corresponding to the first coordinate point information and as the geographical location information corresponding to the vehicle.

[0128] Furthermore, such as Figure 5 As shown, the determination unit 37 includes:

[0129] The acquisition submodule 371 is used to acquire the coordinate point with the largest longitude value from the target coordinate point set, and use it as the first reference coordinate point;

[0130] The replacement submodule 372 is used to replace the latitude value of the reference coordinate point with the latitude value contained in the first coordinate point information to obtain the second reference coordinate point;

[0131] The submodule 373 is used to construct a ray with the coordinate point corresponding to the first coordinate point information as the endpoint by connecting the second reference coordinate point;

[0132] The determination submodule 374 is used to determine the coordinate point corresponding to the first coordinate point information within the range of the polygon formed by the set of target coordinate points when the number of intersections between the ray and the polygon is odd.

[0133] The determining submodule 374 is further configured to determine that the coordinate point corresponding to the first coordinate point information is not within the range of the polygon formed by the set of target coordinate points when the number of intersections between the ray and the polygon formed by the set of target coordinate points is even.

[0134] Furthermore, such as Figure 5 As shown, the acquisition unit 34 includes:

[0135] The calculation submodule 341 is used to calculate the coordinate distance between each coordinate point in the second coordinate point set and the coordinate point corresponding to the first coordinate point information, so as to obtain a coordinate distance set.

[0136] Submodule 342 is selected to select the minimum coordinate distance from the set of coordinate distances.

[0137] The determination submodule 343 is used to determine the target coordinate point based on the minimum coordinate distance.

[0138] Furthermore, such as Figure 5 As shown, the device further includes:

[0139] The update unit 38 is used to update the preset geographic location information database based on the first coordinate point information and the area name corresponding to the first coordinate point information after obtaining the area name corresponding to the target coordinate point set, the area name corresponding to the first coordinate point information, and the geographic location information corresponding to the vehicle.

[0140] In summary, this invention provides a method and apparatus for obtaining geographic location information. The invention pre-constructs a preset geographic location information database, which stores multiple region names and the corresponding set of coordinate points for each region name. When vehicle coordinate point information is received, the preset geographic location information database can be queried to obtain the set of coordinate points to which the coordinate point information belongs, thereby further determining the region name corresponding to the coordinate point information, and ultimately determining the vehicle's geographic location information. Compared to existing technologies, this invention solves the problems of limited API access and high costs associated with obtaining vehicle geographic location information through map provider APIs. This invention reduces or avoids this method as much as possible, instead prioritizing querying the preset geographic location information database to obtain the vehicle's geographic location, eliminating the need to call map provider APIs, avoiding limitations, reducing acquisition costs, and improving the efficiency of obtaining geographic location information.

[0141] The device for acquiring geographic location information includes a processor and a memory. The receiving unit, querying unit, comparison unit, acquisition unit, and determination unit are all stored as program units in the memory. The processor executes the program units stored in the memory to achieve the corresponding functions.

[0142] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured. By adjusting kernel parameters, the vehicle's geographical location information can be obtained by querying a preset geographical location database. This reduces or minimizes the need to obtain the geographical location information by calling APIs provided by map providers, improving the efficiency of obtaining geographical location information, avoiding limitations, and reducing acquisition costs.

[0143] This invention provides a storage medium storing a program that, when executed by a processor, implements a method for obtaining geographic location information.

[0144] This invention provides a processor for running a program, wherein the program executes a method for obtaining geographic location information during runtime.

[0145] This invention provides an electronic device 40, such as... Figure 6 As shown, the device includes at least one processor 401, and at least one memory 402 and bus 403 connected to the processor 401; wherein the processor 401 and the memory 402 communicate with each other through the bus 403; the processor 401 is used to call program instructions in the memory 402 to execute the above-mentioned method for obtaining geographical location information.

[0146] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.

[0147] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps:

[0148] A method for obtaining geographic location information includes: receiving first coordinate point information corresponding to a vehicle; querying a preset geographic location information database based on the first coordinate point information, the preset geographic location information database containing at least multiple region names and a set of first coordinate points corresponding to each region name; comparing the first coordinate point information with the first coordinate point set, and if the first coordinate point set contains the first coordinate point information, obtaining the region name corresponding to the first coordinate point set; and determining the region name corresponding to the first coordinate point set as the geographic location information corresponding to the vehicle.

[0149] Furthermore, if the first coordinate point set does not contain the first coordinate point information, the method further includes: obtaining coordinate point information with the same geographical partition as the first coordinate point information from multiple first coordinate point sets to form a second coordinate point set, wherein the geographical partition is one of four geographical partitions divided according to east longitude, north latitude, west longitude, and south latitude; obtaining the target coordinate point with the smallest coordinate distance between the coordinate points corresponding to the first coordinate point information from the second coordinate point set; determining the first coordinate point set to which the target coordinate point belongs by searching multiple first coordinate point sets contained in the preset geographical location information database, and using it as the target coordinate point set; determining whether the coordinate point corresponding to the first coordinate point information exists within the polygon formed by the target coordinate point set; if so, obtaining the region name corresponding to the target coordinate point set as the region name corresponding to the first coordinate point information and as the geographical location information corresponding to the vehicle.

[0150] Furthermore, determining whether the coordinate point corresponding to the first coordinate point information exists within the polygon formed by the set of target coordinate points includes: obtaining the coordinate point with the largest longitude value from the set of target coordinate points as the first reference coordinate point; replacing the latitude value of the reference coordinate point with the latitude value contained in the first coordinate point information to obtain the second reference coordinate point; constructing a ray with the coordinate point corresponding to the first coordinate point information as its endpoint by connecting the second reference coordinate point; if the number of intersections between the ray and the polygon formed by the set of target coordinate points is odd, then the coordinate point corresponding to the first coordinate point information is determined to be within the polygon formed by the set of target coordinate points; if the number of intersections between the ray and the polygon formed by the set of target coordinate points is even, then the coordinate point corresponding to the first coordinate point information is determined not to be within the polygon formed by the set of target coordinate points.

[0151] Furthermore, obtaining the target coordinate point with the smallest coordinate distance between the coordinate points corresponding to the first coordinate point information from the second coordinate point set includes: calculating the coordinate distance between each coordinate point in the second coordinate point set and the coordinate point corresponding to the first coordinate point information to obtain a coordinate distance set; selecting the minimum coordinate distance from the coordinate distance set; and determining the target coordinate point based on the minimum coordinate distance.

[0152] Furthermore, after obtaining the region name corresponding to the target coordinate point set as the region name corresponding to the first coordinate point information and the geographical location information corresponding to the vehicle, the method further includes: updating the preset geographical location information database according to the first coordinate point information and the region name corresponding to the first coordinate point information.

[0153] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0154] In a typical configuration, the device includes one or more processors (CPUs), memory, and a bus. The device may also include input / output interfaces, network interfaces, etc.

[0155] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM, and memory includes at least one memory chip. Memory is an example of computer-readable media.

[0156] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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 technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0157] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0158] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied 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.

[0159] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method of acquiring geographic position information, characterized by, The method comprises: receiving first coordinate point information corresponding to a vehicle; querying a preset geographical position information database according to the first coordinate point information, the preset geographical position information database comprising at least a plurality of area names and a first coordinate point set corresponding to each of the area names, the area name being used to replace a coordinate point in the first coordinate point set; comparing the first coordinate point information with the first coordinate point set, and if the first coordinate point set contains the first coordinate point information, obtaining an area name corresponding to the first coordinate point set; determining the area name corresponding to the first coordinate point set as the geographical position information corresponding to the vehicle; if the first coordinate point set does not contain the first coordinate point information, the method further comprises: from the plurality of first coordinate point sets, obtaining coordinate point information having the same geographical division as the first coordinate point information to form a second coordinate point set, the geographical division being four geographical divisions divided according to east longitude, north latitude, west longitude and south latitude; from the second coordinate point set, obtaining a target coordinate point having the minimum coordinate distance with the coordinate point corresponding to the first coordinate point information; determining a first coordinate point set to which the target coordinate point belongs as a target coordinate point set by searching the plurality of first coordinate point sets contained in the preset geographical position information database; judging whether the coordinate point corresponding to the first coordinate point information exists in a polygon range formed by the target coordinate point set; if yes, obtaining an area name corresponding to the target coordinate point set as the area name corresponding to the first coordinate point information and as the geographical position information corresponding to the vehicle.

2. The method of claim 1, wherein, The judgment of whether the coordinate point corresponding to the first coordinate point information exists in the polygon range formed by the target coordinate point set comprises: obtaining a coordinate point having the maximum longitude value in the target coordinate point set as a first reference coordinate point; replacing the latitude value of the reference coordinate point with the latitude value contained in the first coordinate point information to obtain a second reference coordinate point; constructing a ray with the coordinate point corresponding to the first coordinate point information as an end point by connecting the second reference coordinate point; if the intersection of the ray and the polygon formed by the target coordinate point set is odd, it is determined that the coordinate point corresponding to the first coordinate point information is in the polygon range formed by the target coordinate point set; if the intersection of the ray and the polygon formed by the target coordinate point set is even, it is determined that the coordinate point corresponding to the first coordinate point information is not in the polygon range formed by the target coordinate point set.

3. The method of claim 1, wherein, The obtaining of the target coordinate point having the minimum coordinate distance with the coordinate point corresponding to the first coordinate point information from the second coordinate point set comprises: calculating the coordinate distance between each coordinate point in the second coordinate point set and the coordinate point corresponding to the first coordinate point information to obtain a coordinate distance set; selecting the minimum coordinate distance from the coordinate distance set; determining the target coordinate point according to the minimum coordinate distance.

4. The method of claim 1, wherein, After obtaining the region name corresponding to the target coordinate point set as the region name corresponding to the first coordinate point information and as the geographical position information corresponding to the vehicle, the method further comprises: updating the preset geographical position information library according to the first coordinate point information and the region name corresponding to the first coordinate point information.

5. An apparatus for acquiring geographic position information, characterized by comprising: The device comprises: a receiving unit configured to receive first coordinate point information corresponding to a vehicle; a querying unit configured to query a preset geographical position information library according to the first coordinate point information, the preset geographical position information library comprising at least a plurality of region names and a first coordinate point set corresponding to each region name; a comparing unit configured to compare the first coordinate point information with the first coordinate point set; an obtaining unit configured to, when the first coordinate point set contains the first coordinate point information, obtain a region name corresponding to the first coordinate point set, the region name being used to replace a coordinate point in the first coordinate point set; a determining unit configured to determine the region name corresponding to the first coordinate point set as the geographical position information corresponding to the vehicle; when the first coordinate point set does not contain the first coordinate point information, the device further comprises: a forming unit configured to obtain coordinate point information having the same geographical division as the first coordinate point information from a plurality of first coordinate point sets, form a second coordinate point set, and the geographical division is four geographical divisions divided according to east longitude, north latitude, west longitude and south latitude; the obtaining unit is further configured to obtain a target coordinate point having the smallest coordinate distance between the target coordinate point and the coordinate point corresponding to the first coordinate point information from the second coordinate point set; the determining unit is further configured to determine a first coordinate point set to which the target coordinate point belongs as a target coordinate point set by searching the plurality of first coordinate point sets contained in the preset geographical position information library; a judging unit configured to judge whether the coordinate point corresponding to the first coordinate point information exists within a polygon range formed by the target coordinate point set; the determining unit is further configured to, when it is judged that the coordinate point corresponding to the first coordinate point information exists within the polygon range formed by the target coordinate point set, obtain a region name corresponding to the target coordinate point set as the region name corresponding to the first coordinate point information and as the geographical position information corresponding to the vehicle.

6. The apparatus of claim 5, wherein, The judging unit comprises: an obtaining sub-module configured to obtain a coordinate point having the largest longitude value from the target coordinate point set as a first reference coordinate point; a replacing sub-module configured to replace the latitude value of the reference coordinate point with the latitude value contained in the first coordinate point information to obtain a second reference coordinate point; a constructing sub-module configured to construct a ray with the coordinate point corresponding to the first coordinate point information as an end point by connecting the second reference coordinate point; a determining sub-module configured to, when the number of intersection points of the ray and the polygon formed by the target coordinate point set is odd, determine that the coordinate point corresponding to the first coordinate point information is within the polygon range formed by the target coordinate point set. The determining sub-module is further configured to determine that the coordinate point corresponding to the first coordinate point information is not within the polygon range formed by the target coordinate point set when the intersection point of the ray and the polygon formed by the target coordinate point set is even.

7. A storage medium, characterized by The storage medium includes a stored program, wherein the program, when executed, controls a device in which the storage medium is located to perform the method for acquiring geographic position information according to any one of claims 1-4.

8. An electronic device, comprising: The device includes at least one processor and at least one memory connected to the processor; The processor, the memory, and the bus are configured to communicate with each other; The processor is configured to invoke program instructions in the memory to perform the method for acquiring geographic position information according to any one of claims 1-4.

Citation Information

Patent Citations

  • Method, device and system for obtaining geographic position information

    CN103476111A

  • Automobile data recorder positioning method and device, and automobile data recorder

    CN107886536A

  • Geographic locator of a vehicle using GPS and angles between pairs of adjacent boundary coordinate points

    US5550743A