City code verification method and device, vehicle and computer program product
By obtaining and verifying the city code in the vehicle positioning method, the problem of easy matching into neighboring cities in vehicle positioning is solved, and the accuracy of positioning and user experience are improved.
Patent Information
- Application Number
- CN202411821791.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-08
AI Technical Summary
The existing vehicle positioning methods are easy to match into nearby cities, resulting in inaccurate matching problems.
By obtaining the first city list corresponding to the target latitude and longitude, we judge whether the city code is the same. If it is not the same, we use the inverse geocoding algorithm to obtain the second city list to determine whether the city code is consistent or whether the target latitude and longitude is within the urban area to determine the correctness of the city code.
It improves the accuracy of urban matching, reduces vehicle positioning errors caused by fuzzy geographical location or inaccurate data, simplifies the processing process of vehicle positioning, reduces the operating cost of computing resources, and enhances the user's driving experience.
Smart Images

Figure CN119782592A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle positioning technology, and in particular to a city code verification method, device, vehicle and computer program product. Background Art
[0002] With the development of Internet technology, the application of positioning systems is becoming more and more popular. Whether it is a car system, a mobile phone system, or a furniture system or a smart wearable system, positioning is needed. Therefore, the demand for obtaining the corresponding city information through the current latitude and longitude is also increasing.
[0003] The current existing technology generates a geoHash value from the target longitude and latitude (for example, lon:116.476665, lat:39.989618) through the GeoHash algorithm, and obtains a rectangular block containing the southeast corner, northeast corner, southwest corner, and northwest corner based on the geoHash value. The manufacturer will match a list of cities associated with the rectangular block based on the rectangular block, and by default take the first one returned as the provided city information. If the rectangular block is located at the border of two cities, the border line may pass through the rectangular block, in which case it is easy to match it with a neighboring city, resulting in inaccurate matching. Summary of the invention
[0004] The present application provides a city code verification method, device, vehicle and computer program product to solve the problem that the current vehicle positioning method is easy to match into adjacent cities, resulting in inaccurate matching.
[0005] The first aspect of the present application provides a method for verifying a city code, comprising the following steps: obtaining a first city list corresponding to a target longitude and latitude; determining whether the city codes in the first city list are the same, and if the city codes in the first city list are not the same, obtaining a second city list using a reverse geocoding algorithm based on the target longitude and latitude; if the city codes in the second city list are the same, determining that the city code is correctly obtained, otherwise, determining whether the target longitude and latitude are within the city area of the second city list; if the target longitude and latitude are within the city area of the second city list, determining that the city code is correctly obtained, otherwise, determining that the city code is incorrectly obtained.
[0006] Through the above technical solution, the city code can be obtained more rigorously, reducing the problem of vehicle positioning errors caused by ambiguous geographical location or inaccurate data.
[0007] Optionally, after determining whether the city codes in the first city list are the same, the method includes: if the city codes in the first city list are the same, determining that the city code is obtained correctly.
[0008] Through the above technical solution, the processing flow of whether the vehicle is correctly positioned can be simplified, the error rate of vehicle positioning can be reduced, the operating cost of computing resources can be reduced, and the user's driving experience can be enhanced.
[0009] Optionally, before determining whether the target longitude and latitude are within the city area of the second city list, it includes: acquiring the city center coordinates and city area boundaries in the second city list to obtain the city area of the second city list based on the city center coordinates and city area boundaries.
[0010] Through the above technical solution, the accuracy of urban area identification can be improved, the precision of geographic location analysis can be improved, and the efficiency of data processing can be improved.
[0011] Optionally, when obtaining the first city list corresponding to the target longitude and latitude, it includes: receiving the target longitude and latitude input by the user; processing the target longitude and latitude using a GeoHash algorithm to obtain a GeoHash value; and obtaining the first city list based on the GeoHash value.
[0012] Through the above technical solution, the accuracy of geographic location recognition can be enhanced and the complexity of computer processing can be reduced.
[0013] Optionally, after determining that the city code is acquired incorrectly, the method includes sending reminder information of the abnormal acquisition of the city code to the target terminal to remind the user of the abnormal acquisition of the city code.
[0014] Through the above technical solution, users can be reminded in time, which can enhance their trust and satisfaction with the system and improve the efficiency of problem solving.
[0015] A second aspect of the present application provides a device for verifying a city code, including: an acquisition module for obtaining a first city list corresponding to a target longitude and latitude; a first judgment module for determining whether the city codes in the first city list are the same, and if the city codes in the first city list are not the same, obtaining a second city list based on the target longitude and latitude using a reverse geocoding algorithm; a second judgment module for determining if the city codes in the second city list are the same, and if not, determining if the target longitude and latitude are within a city area in the second city list; and a verification module for determining if the city code is correctly obtained, and if not, determining if the city code is incorrectly obtained.
[0016] Optionally, after determining whether the city codes in the first city list are the same, the first determination module is further configured to: if the city codes in the first city list are the same, determine that the city code is correctly obtained.
[0017] Optionally, before determining whether the target longitude and latitude are within the city area of the second city list, the second judgment module is further used to: obtain the city center coordinates and city area boundaries in the second city list to obtain the city area of the second city list based on the city center coordinates and city area boundaries.
[0018] Optionally, when obtaining the first city list corresponding to the target longitude and latitude, the acquisition module is further used to: receive the target longitude and latitude input by the user; process the target longitude and latitude using the GeoHash algorithm to obtain a GeoHash value; and obtain the first city list based on the GeoHash value.
[0019] Optionally, after determining that the city code is acquired incorrectly, the verification module is further used to: send a reminder message of the abnormal acquisition of the city code to the target terminal to remind the user of the abnormal acquisition of the city code.
[0020] The third aspect of the present application provides a vehicle, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the city code verification method as described in the above embodiment.
[0021] The fourth aspect of the present application provides a computer program product, which includes a computer program, which is executed by a processor to implement the city code verification method as described in the above embodiment.
[0022] In the above implementation, the first city list corresponding to the target longitude and latitude is obtained, and it is determined whether the city codes in the first city list are the same. If the city codes in the first city list are not the same, the second city list is obtained based on the target longitude and latitude using the reverse geocoding algorithm. If the city codes in the second city list are the same, it is determined that the city codes are correctly obtained. Otherwise, it is determined whether the target longitude and latitude are within the city area of the second city list. If the target longitude and latitude are within the city area of the second city list, it is determined that the city codes are correctly obtained. Otherwise, it is determined that the city codes are incorrectly obtained. Thus, the problem that the current vehicle positioning method is easy to match into adjacent cities and inaccurate matching occurs is solved. The city code is obtained by positioning the longitude and latitude, and the city code is verified, thereby improving the accuracy of city matching.
[0023] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0025] Figure 1 A flowchart of a city code verification method provided according to an embodiment of the present application;
[0026] Figure 2 This is a flow chart of a method for verifying a city code according to an embodiment of the present application;
[0027] Figure 3 A schematic diagram of city information for rectangular block matching according to an embodiment of the present application;
[0028] Figure 4 This is an example diagram of a device for verifying city codes according to an embodiment of the present application;
[0029] Figure 5 It is a schematic diagram of a vehicle structure according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0031] The following describes the city code verification method, device, vehicle and computer program product of the embodiment of the present application with reference to the accompanying drawings. In view of the problem that the current vehicle positioning method mentioned in the above background technology is easy to match into adjacent cities, resulting in inaccurate matching, the present application provides a city code verification method, in which a first city list corresponding to the target longitude and latitude is obtained, and it is determined whether the city codes in the first city list are the same. If the city codes in the first city list are not the same, a second city list is obtained based on the target longitude and latitude using a reverse geocoding algorithm. If the city codes in the second city list are the same, it is determined that the city code is correctly obtained. Otherwise, it is determined whether the target longitude and latitude are within the city area of the second city list. If the target longitude and latitude are within the city area of the second city list, it is determined that the city code is correctly obtained. Otherwise, it is determined that the city code is incorrectly obtained. Thus, the problem that the current vehicle positioning method is easy to match into adjacent cities and resulting in inaccurate matching is solved. The city code is obtained by locating the longitude and latitude, and the city code is verified, thereby improving the accuracy of city matching.
[0032] Specifically, Figure 1 A flowchart of a city code verification method provided in an embodiment of the present application.
[0033] like Figure 1 As shown, the verification method of the city code includes the following steps:
[0034] In step S101, a first city list corresponding to the target longitude and latitude is obtained.
[0035] Optionally, in some embodiments, when obtaining the first city list corresponding to the target longitude and latitude, it includes: receiving the target longitude and latitude input by the user; processing the target longitude and latitude using the GeoHash algorithm to obtain a GeoHash value; and obtaining the first city list based on the GeoHash value.
[0036] In step S102, it is determined whether the city codes in the first city list are the same. If the city codes in the first city list are not the same, a reverse geocoding algorithm is used to obtain a second city list based on the target longitude and latitude.
[0037] Optionally, in some embodiments, after determining whether the city codes in the first city list are the same, the method further includes: if the city codes in the first city list are the same, determining that the city code is correctly acquired.
[0038] In step S103, if the city codes in the second city list are the same, it is determined that the city code is correctly acquired; otherwise, it is determined whether the target longitude and latitude are within the city area in the second city list.
[0039] In step S104, if the target longitude and latitude are within the city area of the second city list, it is determined that the city code is correctly obtained; otherwise, it is determined that the city code is incorrectly obtained.
[0040] Optionally, in some embodiments, before determining whether the target longitude and latitude are within the city area of the second city list, it includes: acquiring the city center coordinates and city area boundaries in the second city list to obtain the city area of the second city list based on the city center coordinates and the city area boundaries.
[0041] Optionally, in some embodiments, after determining that the city code is acquired incorrectly, the method includes sending a reminder message of the abnormal acquisition of the city code to the target terminal to remind the user of the abnormal acquisition of the city code.
[0042] Specifically, Figure 2 As shown, when the vehicle receives the target longitude and latitude input by the user, the target longitude and latitude are processed using the GeoHash algorithm to obtain the GeoHash value, and the first city list is obtained based on the GeoHash value, and it is determined whether all the city codes in the first city list information belong to the same city, that is, whether the city codes in the first city list are the same. If so, it means that the city code is obtained correctly.
[0043] If the city codes in the first city list are not the same, it means that there may be inaccuracies that need further judgment. The reverse geocoding algorithm can be used to perform reverse geocoding calculations on the target longitude and latitude again to obtain POI information and obtain the second city list. If the city code can be obtained normally and the city codes in the second city list are consistent, it means that the acquisition is correct. If the city code cannot be obtained or the city codes are inconsistent, it means that there are inaccuracies that need further judgment.
[0044] The city code obtained from the second city list is used to obtain the central longitude and latitude of the city and the longitude and latitude of the administrative area boundary of the city. By comparing the target longitude and latitude with the obtained longitude and latitude of the administrative area boundary, it is determined whether the target longitude and latitude are within the urban area of each city. If so, it is determined that the city code is obtained correctly, otherwise it is determined that the city code is obtained incorrectly.
[0045] Specifically, if the second city list is a single city, the urban area of the single city is obtained according to the city code of the single city, and it is determined whether the target longitude and latitude are within the urban area of the single city. If the target longitude and latitude are within the urban area of the single city, it is determined that the city code is obtained correctly; otherwise, it is determined that the city code is obtained incorrectly.
[0046] If there are multiple cities in the second city list, if the city codes of the multiple cities are the same, it is determined that the city code is obtained correctly; if the city codes of the multiple cities are different, the urban area of each city is obtained, and it is determined whether the target longitude and latitude are within the urban area of each city; if the target longitude and latitude are within the urban area of each city, it is determined that the city code is obtained correctly; otherwise, it is determined that the city code is obtained incorrectly.
[0047] After determining that the city code is obtained incorrectly, a reminder message is sent to the user's terminal through the application's built-in notification mechanism (such as push notification, in-application pop-up window, etc.).
[0048] According to the time complexity and space complexity of the calculation, the implementation steps of the embodiment of the present application are mainly divided into three steps:
[0049] Step 1. Obtain the GeoHash value through the GeoHash algorithm according to the target longitude and latitude (the higher the accuracy of the GeoHash value, the greater the amount of calculation, but the city coding level is a coarse-grained calculation, so only 4 decimal digits are required), and obtain a rectangular block with 4-digit accuracy containing the southeast corner, northeast corner, southwest corner, and northwest corner, such as Figure 3 As shown, a list of cities matching the rectangular block is returned. By comparing the city information corresponding to each rectangular list, if they belong to the same city, the obtained city code can be quickly verified to be correct. Otherwise, further judgment is required.
[0050] Step 2: Perform reverse geocoding calculation on the target longitude and latitude, and obtain the city information corresponding to the longitude and latitude through reverse geocoding. If a city code exists and is consistent with that obtained in step 1, it can be quickly verified that the obtained city code is correct, otherwise further judgment is required.
[0051] Step 3: Based on the city midpoint coordinates obtained in step 2 and the city boundary coordinate set (according to the number of accurate digits of the GeoHash algorithm, a city boundary coordinate set may have tens of thousands of digits), by calculating the city boundary coordinate set and the target point coordinates, it is determined whether the target longitude and latitude are included in the city area. If the target longitude and latitude are not in the city area, it can be determined that the obtained city code is correct. If the target longitude and latitude are in the city area, it means that the current city code is obtained incorrectly.
[0052] Since the calculation amount of step 3 is relatively large, the calculation speed and accuracy can be improved by using algorithms such as area and discrimination method, angle and discrimination method, and ray method.
[0053] According to the city code verification method proposed in the embodiment of the present application, the first city list corresponding to the target longitude and latitude is obtained, and it is determined whether the city codes in the first city list are the same. If the city codes in the first city list are not the same, the second city list is obtained based on the target longitude and latitude using the reverse geocoding algorithm. If the city codes in the second city list are the same, it is determined that the city code is correctly obtained. Otherwise, it is determined whether the target longitude and latitude are within the city area of the second city list. If the target longitude and latitude are within the city area of the second city list, it is determined that the city code is correctly obtained. Otherwise, it is determined that the city code is incorrectly obtained. In this way, the problem that the current vehicle positioning method is easy to match into adjacent cities and inaccurate matching occurs is solved. The city code is obtained by positioning the longitude and latitude, and the city code is verified, which improves the accuracy of city matching.
[0054] Next, a device for verifying city codes according to an embodiment of the present application will be described with reference to the accompanying drawings.
[0055] Figure 4 It is a block diagram of a device for verifying a city code according to an embodiment of the present application.
[0056] like Figure 4 As shown, the city code verification device 10 includes: an acquisition module 100, a first judgment module 200, a second judgment module 300 and a verification module 400.
[0057] Among them, the acquisition module 100 is used to obtain the first city list corresponding to the target longitude and latitude; the first judgment module 200 is used to judge whether the city codes in the first city list are the same. If the city codes in the first city list are not the same, the second city list is obtained by using the reverse geocoding algorithm based on the target longitude and latitude; the second judgment module 300 is used to determine that the city code is correctly obtained if the city codes in the second city list are the same, otherwise, determine whether the target longitude and latitude are within the city area of the second city list; the verification module 400 is used to determine that the city code is correctly obtained if the target longitude and latitude are within the city area of the second city list, otherwise, determine that the city code is incorrectly obtained.
[0058] Optionally, in some embodiments, after determining whether the city codes in the first city list are the same, the first determination module 100 is further configured to: if the city codes in the first city list are the same, determine that the city code is correctly obtained.
[0059] Optionally, in some embodiments, before determining whether the target longitude and latitude are within the city area of the second city list, the second judgment module 300 is further used to: obtain the city center coordinates and city area boundaries in the second city list to obtain the city area of the second city list based on the city center coordinates and the city area boundaries.
[0060] Optionally, in some embodiments, when obtaining the first city list corresponding to the target longitude and latitude, the acquisition module 100 is further used to: receive the target longitude and latitude input by the user; process the target longitude and latitude using the GeoHash algorithm to obtain a GeoHash value; and obtain the first city list based on the GeoHash value.
[0061] Optionally, in some embodiments, after determining that the city code is acquired incorrectly, the verification module 400 is further used to: send a reminder message of the abnormal acquisition of the city code to the target terminal to remind the user of the abnormal acquisition of the city code.
[0062] It should be noted that the above explanation of the embodiment of the city code verification method is also applicable to the city code verification device of this embodiment, and will not be repeated here.
[0063] According to the city code verification device proposed in the embodiment of the present application, the first city list corresponding to the target longitude and latitude is obtained, and it is determined whether the city codes in the first city list are the same. If the city codes in the first city list are not the same, the second city list is obtained based on the target longitude and latitude using the reverse geocoding algorithm. If the city codes in the second city list are the same, it is determined that the city code is correctly obtained. Otherwise, it is determined whether the target longitude and latitude are within the city area of the second city list. If the target longitude and latitude are within the city area of the second city list, it is determined that the city code is correctly obtained. Otherwise, it is determined that the city code is incorrectly obtained. In this way, the problem that the current vehicle positioning method is easy to match into adjacent cities and inaccurate matching occurs is solved. The city code is obtained by positioning the longitude and latitude, and the city code is verified, thereby improving the accuracy of city matching.
[0064] Figure 5 A schematic diagram of the structure of a vehicle provided in an embodiment of the present application. The vehicle may include:
[0065] A memory 501 , a processor 502 , and a computer program stored in the memory 501 and executable on the processor 502 .
[0066] When the processor 502 executes the program, the city code verification method provided in the above embodiment is implemented.
[0067] Furthermore, the vehicle also includes:
[0068] The communication interface 503 is used for communication between the memory 501 and the processor 502 .
[0069] The memory 501 is used to store computer programs that can be executed on the processor 502 .
[0070] The memory 501 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0071] If the memory 501, the processor 502 and the communication interface 503 are implemented independently, the communication interface 503, the memory 501 and the processor 502 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0072] Optionally, in a specific implementation, if the memory 501, the processor 502 and the communication interface 503 are integrated on a chip, the memory 501, the processor 502 and the communication interface 503 can communicate with each other through an internal interface.
[0073] The processor 502 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0074] An embodiment of the present application also provides a computer program product, which includes a computer program, which implements the above city code verification method when executed by a processor.
[0075] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0076] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0077] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0078] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer program product for use with an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, a "computer program product" can be any device that can contain, store, communicate, propagate or transmit a program for use with an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer program products (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). Furthermore, the computer program product may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example by optically scanning the paper or other medium and then editing, interpreting or, if necessary, processing it in another suitable manner, and then storing it in a computer memory.
[0079] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0080] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer program product, which, when executed, includes one or a combination of the steps of the method embodiment.
[0081] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer program product.
[0082] The computer program product mentioned above may be a read-only memory, a disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A method for verifying a city code, characterized in that: The following steps are involved: Get the first city list corresponding to the target longitude and latitude; Determining whether the city codes in the first city list are the same, and if the city codes in the first city list are not the same, obtaining a second city list by using a reverse geocoding algorithm based on the target longitude and latitude; If the city codes in the second city list are the same, it is determined that the city code is correctly obtained; otherwise, it is determined whether the target latitude and longitude are within the city area of the second city list; If the target longitude and latitude are within the city area of the second city list, it is determined that the city code is obtained correctly; otherwise, it is determined that the city code is obtained incorrectly.
2. The method according to claim 1, characterized in that After determining whether the city codes in the first city list are the same, the method further comprises: If the city codes in the first city list are the same, it is determined that the city code is obtained correctly.
3. The method according to claim 1, characterized in that Before determining whether the target longitude and latitude are within the city area of the second city list, the method includes: The city center coordinates and city area boundaries in the second city list are obtained to obtain the city areas in the second city list based on the city center coordinates and city area boundaries.
4. The method according to claim 1, characterized in that: When obtaining the first city list corresponding to the target latitude and longitude, it includes: Receive the target latitude and longitude input by the user; The target longitude and latitude are processed using the GeoHash algorithm to obtain a GeoHash value; The first city list is obtained based on the GeoHash value.
5. The method according to claim 1, characterized in that After determining that the city code is obtained incorrectly, including: Send a reminder message of abnormal city code acquisition to the target terminal to remind the user of the abnormal city code acquisition.
6. A device for verifying a city code, characterized in that: include: An acquisition module is used to acquire a first city list corresponding to the target longitude and latitude; A first judgment module is used to judge whether the city codes in the first city list are the same, and if the city codes in the first city list are not the same, obtain a second city list by using a reverse geocoding algorithm based on the target longitude and latitude; A second judgment module is used to determine whether the city code is correctly obtained if the city codes in the second city list are the same, otherwise, determine whether the target longitude and latitude are within the city area of the second city list; The verification module is used to determine that the city code is correctly obtained if the target longitude and latitude are within the city area of the second city list, otherwise, determine that the city code is incorrectly obtained.
7. The device according to claim 6, characterized in that After determining whether the city codes in the first city list are the same, the first determination module is further configured to: If the city codes in the first city list are the same, it is determined that the city code is obtained correctly.
8. The device according to claim 6, characterized in that Before determining whether the target longitude and latitude are within the city area of the second city list, the second determination module is further configured to: The city center coordinates and city area boundaries in the second city list are obtained to obtain the city areas in the second city list based on the city center coordinates and city area boundaries.
9. A vehicle, characterized in that: The system comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the city code verification method as described in any one of claims 1 to 5.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the city code verification method as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Offline reverse geocoding method, device thereof and terminal equipment
CN104867402A
Distributed geographic position real-time processing method and system
CN112702387A
Location service method and system, electronic equipment and storage medium
CN114880421A
Reverse geocoding method and device
CN119106662A
Pushing method, electronic device, movable platform, pushing system and computer-readable storage medium
WO2021081832A1