A method and apparatus for determining position

By extracting geographic entities and spatial relationship entities from address text, and using a geographic information database to determine the geospatial location of the address text, the problem of converting address text into geospatial location is solved, improving data utilization and analysis efficiency.

CN115510135BActive Publication Date: 2026-06-23HANGZHOU HIKVISION SYST TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU HIKVISION SYST TECH CO LTD
Filing Date
2022-09-19
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively convert textual information about addresses into geospatial location data, resulting in low efficiency and insufficient accuracy when analyzing patterns in accident occurrences.

Method used

By obtaining address text, geographic entities and spatial relationship entities are extracted. Geographic information databases and preset rules are used to determine the geospatial location corresponding to the address text, including road signs, point of interest (POI) signs, and directional relationships, to perform preliminary location determination and correction.

Benefits of technology

It achieves accurate conversion from address text to geospatial location, improves data utilization and analysis efficiency, and enables faster and more effective identification of the geographical location of target locations such as accident sites.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115510135B_ABST
    Figure CN115510135B_ABST
Patent Text Reader

Abstract

The application provides a position determination method and device, relates to the technical field of data processing, and can realize conversion of address text into position information of a geographic space structure. The specific scheme comprises the following steps: firstly, address text is acquired; geographic entities and spatial relationship entities in the address text are extracted; the geographic entities represent geographic objects occupying spatial positions in a geographic space, and the spatial relationship entities represent spatial relationships between the geographic entities; and the geographic space position corresponding to the address text is determined according to the geographic entities and the spatial relationship entities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a location determination method and apparatus. Background Technology

[0002] With the development of digital cities and smart cities, address information is gradually being incorporated into these information infrastructure initiatives. Accurate address location allows for faster and more effective spatial analysis, supporting government and business decision-making. However, textual information describing address locations mostly uses natural language, which may contain redundant information, typos, abbreviations, and regional differences in idioms. In contrast, spatial geographic coordinates are used to describe various locations in information infrastructure development, making it impossible to directly use textual information describing address locations.

[0003] Taking highway traffic accident data as an example, when analyzing and looking for general patterns in the occurrence of accidents, it is often necessary to mark multiple accident locations on manual maps. This is time-consuming and labor-intensive, and due to limitations in human capabilities, it is generally possible to manually mark only 1% of the data that is of interest. It is impossible to mark the actual geographical locations of a large number of accidents, making it difficult to find general patterns in the occurrence of accidents.

[0004] Therefore, how to convert textual information of address locations into geospatial location data is a problem that the industry urgently needs to solve. Summary of the Invention

[0005] This application provides a location determination method and apparatus that can convert the address text of a target location into location information of a geospatial structure.

[0006] To achieve the above technical objectives, this application adopts the following technical solution:

[0007] In a first aspect, embodiments of this application provide a location determination method, which includes: firstly obtaining address text; extracting geographic entities and spatial relationship entities from the address text; wherein, geographic entities represent geographic objects occupying spatial locations in geographic space, and spatial relationship entities represent spatial relationships between geographic entities; and determining the geographic spatial location corresponding to the address text based on the geographic entities and the spatial relationship entities.

[0008] Based on the aforementioned location determination method, the location determination device can perform semantic recognition on address text to extract geographic entities and spatial relationship entities from the address text, thereby converting address text into location information of a geospatial structure. This facilitates data analysis of the geospatial location of the target site and improves the data utilization rate of address information.

[0009] In one possible implementation, determining the geospatial location corresponding to the address text based on the geographic entity and the spatial relationship entity includes: determining the preliminary geospatial location of the address text based on the geographic entity; correcting the preliminary geospatial location using the spatial relationship entity; and determining the corrected preliminary geospatial location as the geospatial location corresponding to the address text.

[0010] In another possible implementation, the aforementioned geographic entities include road signs and Points of Interest (POI) signs; determining the preliminary spatial location of the address text based on the geographic entities includes: determining a first candidate location point in the uphill direction of the road indicated by the road sign and a second candidate location point in the downhill direction of the road based on the road sign and the POI sign.

[0011] In another possible implementation, the above-mentioned determination of a first candidate location point in the uphill direction and a second candidate location point in the downhill direction of the road indicated by the road sign based on the road sign and the point of interest (POI) sign includes: matching the road sign with reference road data to obtain the reference road corresponding to the address text; matching the POI sign with reference POI data in a first query range to obtain the reference POI information corresponding to the address text; wherein, the first query range is an area range determined based on the road segment location of the reference road, and the location of the POI is within the first query range; determining the candidate location point with the shortest distance to the reference POI on the uphill road segment of the reference road as the first candidate location point, and determining the candidate location point with the shortest distance to the reference POI on the downhill road segment of the reference road as the second candidate location point.

[0012] In another possible implementation, the above-mentioned modification of the preliminary geospatial location using spatial relationship entities includes: determining the target direction using spatial relationship entities; if the target direction is the uphill direction of the road, then determining the first candidate location point as the target candidate location point; the target candidate location point represents the geospatial location point corresponding to the address text to be modified; if the target direction is the downhill direction of the road, then determining the second candidate location point as the target candidate location point.

[0013] In another possible implementation, the aforementioned spatial relationship entity includes a directional relationship entity, which in turn includes a direction-of-origin relationship entity and a destination-of-origin relationship entity. The direction-of-origin relationship entity is used to indicate the originating geographic entity, and the destination-of-origin relationship entity is used to indicate the destination geographic entity. Therefore, determining the target direction using the aforementioned spatial relationship entity includes: using the direction-of-origin relationship entity and the destination-of-origin relationship entity to identify the originating geographic entity and the destination geographic entity corresponding to the address text from the geographic entities; and using the preliminary geospatial location, the originating geographic entity, and the destination geographic entity to determine the target direction.

[0014] In another possible embodiment, the above-described determination of the target direction using preliminary geospatial location, starting point geographic entity, and ending point geographic entity includes: determining a first reachable location point starting from a first candidate location point and traveling a preset distance in an upward direction; determining a second reachable location point starting from a second candidate location point and traveling the preset distance in a downward direction; determining a first distance between the first reachable location point and a first marker POI, and a second distance between the second reachable location point and the first marker POI; when the first marker POI is a marker POI in the area where the ending point is located, if the first distance is less than the second distance, then the upward direction is determined as the target direction; if the first distance is greater than the second distance, then the downward direction is determined as the target direction; the ending point is the location point indicated by the ending point geographic entity; when the first marker POI is a marker POI in the area where the starting point is located, if the first distance is greater than the second distance, then the upward direction is determined as the target direction; if the first distance is less than the second distance, then the downward direction is determined as the target direction; the starting point is the location point indicated by the starting point geographic entity.

[0015] Optionally, the first distance satisfies the following relationship:

[0016]

[0017] The longitude of the first reachable location is mlon1, and the latitude is mlat1; the longitude of the marker POI is mlon2, and the latitude is mlat2; R is the Earth's radius of 6378 km.

[0018] Optionally, determining the first reachable location point includes: acquiring road network data within a first range, the first range including a first candidate location point; the road network data including multiple road data within the first range; determining one or more location points with a preset travel distance from the first candidate location point as the starting point based on the road network data within the first range; and determining the location point with the shortest geographical distance from the first candidate location point among the one or more location points as the first reachable location point.

[0019] Optionally, determining the second reachable location point includes: acquiring road network data within a second range, the second range including second candidate location points; determining one or more location points with a preset driving distance from the second candidate location point as the starting point in the downstream direction based on the road network data within the second range; and determining the location point with the shortest geographical distance from the second candidate location point among the one or more location points as the second reachable location point.

[0020] In another possible implementation, the spatial relationship entity includes an orientation relationship entity, which in turn includes a geographic direction entity, representing the direction of travel from the starting point to the destination. Then, the above-mentioned determination of the target direction using the spatial relationship entity includes: determining the azimuth angle indicated by the geographic direction entity, the azimuth angle of the uphill segment, and the azimuth angle of the downhill segment; determining a first included angle between the azimuth angle indicated by the geographic direction entity and the azimuth angle of the uphill segment, and a second included angle between the azimuth angle indicated by the geographic direction entity and the azimuth angle of the downhill segment; if the first included angle is less than the second included angle, then the uphill direction is determined as the target direction; if the first included angle is greater than the second included angle, then the downhill direction is determined as the target direction.

[0021] In another possible implementation, if the spatial relationship entity also includes a spatial distance relationship entity and a spatial distance auxiliary relationship entity, the above-mentioned modification of the preliminary geospatial location using the spatial relationship entity further includes: offsetting the target candidate location point by the distance indicated by the spatial distance relationship entity along the offset direction represented by the spatial distance auxiliary relationship entity; and determining the offset location point as the modified preliminary geospatial location.

[0022] Secondly, embodiments of this application provide a location determination device, which may include: an acquisition unit for acquiring address text; an extraction unit for extracting geographic entities and spatial relationship entities from the address text; wherein, geographic entities represent geographic objects occupying spatial locations in geographic space, and spatial relationship entities represent spatial relationships between geographic entities; and a processing unit for determining the geographic spatial location corresponding to the address text based on the geographic entities and spatial relationship entities.

[0023] In one possible implementation, the processing unit is specifically used to: determine the preliminary geospatial location of the address text based on the geographic entity; correct the preliminary geospatial location using spatial relationship entities; and determine the corrected preliminary geospatial location as the geospatial location corresponding to the address text.

[0024] In another possible implementation, the geographic entities include road signs and point of interest (POI) signs. The processing unit is specifically used to: determine a first candidate location point in the uphill direction of the road indicated by the road sign and a second candidate location point in the downhill direction of the road, based on the road signs and POI signs.

[0025] In another possible implementation, the processing unit is further specifically configured to: match road identifiers with reference road data to obtain the reference road corresponding to the address text; match the POI identifier with reference POI data in a first query range to obtain the reference POI information corresponding to the address text; wherein, the first query range is an area range determined based on the road segment location of the reference road, and the location of the POI is within the first query range; determine the candidate location point with the shortest distance to the reference POI on the uphill segment of the reference road as the first candidate location point, and determine the candidate location point with the shortest distance to the reference POI on the downhill segment of the reference road as the second candidate location point.

[0026] In another possible implementation, the processing unit is specifically used to: determine the target direction using spatial relationship entities; if the target direction is the uphill direction of the road, then determine the first candidate location point as the target candidate location point; the target candidate location point represents the geospatial location point corresponding to the address text to be corrected; if the target direction is the downhill direction of the road, then determine the second candidate location point as the target candidate location point.

[0027] In another possible implementation, the aforementioned spatial relationship entity includes a location relationship entity, which in turn includes a direction relationship entity and a destination relationship entity; wherein, the direction relationship entity is a location relationship entity used to indicate the starting point geographic entity, and the destination relationship entity is a location relationship entity used to indicate the ending point geographic entity; then the processing unit is specifically used to: use the direction relationship entity and the destination relationship entity to identify the starting point geographic entity and the ending point geographic entity corresponding to the address text from the geographic entities; and use the preliminary geospatial location, the starting point geographic entity, and the ending point geographic entity to determine the target direction.

[0028] In another possible embodiment, the above-mentioned processing unit is further specifically configured to: determine a first reachable location point starting from a first candidate location point and traveling a preset distance in an upward direction; determine a second reachable location point starting from a second candidate location point and traveling the preset distance in a downward direction; determine a first distance between the first reachable location point and a first marker POI, and a second distance between the second reachable location point and the first marker POI; when the first marker POI is a marker POI in the area where the destination is located, if the first distance is less than the second distance, then the upward direction is determined as the target direction, and if the first distance is greater than the second distance, then the downward direction is determined as the target direction, and the destination is the location point indicated by the destination geographic entity; when the first marker POI is a marker POI in the area where the starting point is located, if the first distance is greater than the second distance, then the upward direction is determined as the target direction, and if the first distance is less than the second distance, then the downward direction is determined as the target direction; the starting point is the location point indicated by the starting point geographic entity.

[0029] Optionally, the first distance satisfies the following relationship:

[0030]

[0031] The longitude of the first reachable location is mlon1, and the latitude is mlat1; the longitude of the marker POI is mlon2, and the latitude is mlat2; R is the Earth's radius of 6378 km.

[0032] Optionally, the above processing unit is specifically used for: acquiring road network data within a first range, the first range including first candidate location points; the road network data including multiple road data within the first range; determining one or more location points with the first candidate location point as the starting point and a preset driving distance in the upward direction based on the road network data within the first range; and determining the location point with the shortest geographical distance to the first candidate location point among the one or more location points as the first reachable location point.

[0033] Optionally, the above processing unit is specifically used to: acquire road network data within a second range, the second range including second candidate location points; determine one or more location points with the second candidate location points as the starting point and a preset driving distance in the downstream direction based on the road network data within the second range; and determine the location point with the shortest geographical distance to the second candidate location point among the one or more location points as the second reachable location point.

[0034] In another possible implementation, the processing unit is further configured to: if the orientation relationship entity includes a destination entity, use the marked POI of the area where the destination entity indicates the destination as the first marked POI; or, if the orientation relationship entity includes an incoming entity, use the marked POI of the area where the incoming entity indicates the origin of the target as the first marked POI.

[0035] In another possible implementation, the spatial relationship entity includes an orientation relationship entity, which in turn includes a geographic direction entity, representing the direction of travel from the starting point to the ending point. The aforementioned processing unit is further specifically used to: determine the azimuth angle indicated by the geographic direction entity, the azimuth angle of the uphill segment, and the azimuth angle of the downhill segment; determine a first included angle between the azimuth angle indicated by the geographic direction entity and the azimuth angle of the uphill segment, and a second included angle between the azimuth angle indicated by the geographic direction entity and the azimuth angle of the downhill segment; if the first included angle is less than the second included angle, then the uphill direction is determined as the target direction; if the first included angle is greater than the second included angle, then the downhill direction is determined as the target direction.

[0036] In another possible implementation, if the spatial relationship entity also includes a spatial distance relationship entity and a spatial distance auxiliary relationship entity, the above processing unit is further specifically used to: offset the distance indicated by the spatial distance relationship entity from the target candidate location point along the offset direction represented by the spatial distance auxiliary relationship entity; and determine the offset location point as the corrected preliminary geospatial location.

[0037] Thirdly, this application provides an electronic device including a memory and a processor. The memory and processor are coupled. The memory stores computer program code, including computer instructions. When the processor executes the computer instructions, it causes the electronic device to perform the position determination method as described in the first aspect and any possible design.

[0038] Fourthly, this application provides a chip system applied to a positioning device; the chip system includes one or more interface circuits and one or more processors. The interface circuits and processors are interconnected via lines; the interface circuits are used to receive signals from the memory of the positioning device and send signals to the processors, the signals including computer instructions stored in the memory. When the processor executes the computer instructions, it causes the electronic device to perform the positioning method as described in the first aspect and any possible design of the first aspect.

[0039] Fifthly, this application provides a computer-readable storage medium storing computer instructions that, when executed on an electronic device, cause the electronic device to perform the position determination method as described in the first aspect and any possible design thereof.

[0040] Sixthly, this application provides a computer program product including computer instructions that, when executed on an electronic device, cause the electronic device to perform the position determination method as described in the first aspect and any possible design thereof.

[0041] For a detailed description of aspects two through six and their various implementations in this application, please refer to the detailed description in aspect one and its various implementations; and for a detailed description of the beneficial effects of aspects two through six and their various implementations, please refer to the beneficial effect analysis in aspect one and its various implementations, which will not be repeated here. Attached Figure Description

[0042] Figure 1 This is a schematic diagram of the hardware structure of a position determination device provided in an embodiment of this application;

[0043] Figure 2 A flowchart illustrating a location determination method provided in an embodiment of this application;

[0044] Figure 3 A flowchart illustrating another location determination method provided in this application embodiment;

[0045] Figure 4 A schematic diagram of a candidate location point provided in an embodiment of this application;

[0046] Figure 5 A schematic diagram of another candidate location point provided in an embodiment of this application;

[0047] Figure 6 A logic flowchart for determining a target location is provided in an embodiment of this application;

[0048] Figure 7 A flowchart illustrating another location determination method provided in this application embodiment;

[0049] Figure 8 A flowchart illustrating another location determination method provided in this application embodiment;

[0050] Figure 9 A schematic diagram of an azimuth angle provided for an embodiment of this application;

[0051] Figure 10 This is a schematic diagram of a position determination device provided in an embodiment of this application. Detailed Implementation

[0052] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0053] In the description of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" means one or more, and "multiple" means two or more. The terms "first," "second," etc., do not limit the quantity or order of execution, and "first," "second," etc., do not necessarily imply differences.

[0054] It should be noted that, in this application, the terms "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0055] To facilitate understanding, we will first provide a brief introduction and explanation of some terms or basic concepts of technology involved in the embodiments of the present invention.

[0056] 1. Named Entity Recognition (NER)

[0057] Named Entities (NER) is a technique in Natural Language Processing (NLP) used to solve information extraction problems. NER is also a crucial foundational tool in related fields such as information extraction, question answering systems, syntactic analysis, and machine translation, playing a vital role in the practical application of NLP technology. Named entities refer to objectively existing and distinguishable entities, or entities with specific meaning in text, which can be concrete people, events, or things. Categories of named entities typically include names of people, places, organizations, times, product names, and other proper nouns. Typically, NER includes steps such as named entity boundary identification and entity category determination.

[0058] 2. Natural Language Processing

[0059] Natural Language Processing (NLP) is an important area within computer science and artificial intelligence. It studies the theories and methods for enabling effective communication between humans and computers using natural language. NLP is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language—the language people use in daily life—and thus it has a close relationship with linguistic research. NLP techniques typically include text processing, semantic understanding, machine translation, question answering, and knowledge graphs.

[0060] 3. Conditional Random Field (CRF)

[0061] Conditional random fields (CRFs) are discriminative probabilistic models, a type of random field, commonly used for labeling or analyzing sequence data, such as natural language text and biological sequences. CRFs can serve as a foundational model for natural language processing, used for labeling Chinese word segmentation, named entity recognition, and part-of-speech tagging.

[0062] 4. Point of Interest (POI)

[0063] A Point of Interest (POI) can refer to any non-geographically significant point on a map. Examples include shops, bars, gas stations, hospitals, and train stations. Each POI must include at least four pieces of information: name, category, coordinates, and classification. Comprehensive POI information is essential for rich navigation maps, as it alerts users to road junctions and surrounding buildings, facilitating route planning by selecting the most convenient and efficient route.

[0064] 5. Bidirectional Long Short-Term Memory (BiLSTM) Neural Network

[0065] BiLSTM is a combination of a forward long short-term memory (LSTM) network model and a backward LSTM model, and is often used to model contextual information in natural language processing tasks. LSTM is a type of temporal recurrent neural network. A common LSTM unit consists of a cell, an input gate, an output gate, and a forget gate. The cell remembers values ​​within any time interval, and the three gates control the flow of information into and out of the cell. LSTM networks are suitable for classification, processing, and prediction based on time series data because there may be lags of unknown duration between important events in a time series. LSTM was developed to address the exploding and vanishing gradient problems that can be encountered when training traditional recurrent neural networks (RNNs). The relative insensitivity to gap length is an advantage of LSTM over RNNs, hidden Markov models, and other sequence learning methods in many applications.

[0066] The above is an introduction to the technical terms involved in the embodiments of this application, which will not be repeated below.

[0067] To transform textual information of address locations into structured geospatial location data, this application provides a location determination method, which specifically includes: firstly obtaining address text; extracting geographic entities and spatial relationship entities from the address text; wherein, spatial relationship entities represent the spatial relationships between geographic entities; and determining the geospatial location corresponding to the address text based on the geographic entities and the spatial relationship entities.

[0068] The location determination method provided in this application can be used to convert text information of address locations in various situations. For example, for a large amount of high-speed traffic accident data, this method can be used to identify the address text information of each accident, extract geographic entities and spatial relationship entities from the address text, and then determine the geographic spatial location of the accident site. This allows the accident information to be associated with the geographic spatial location, realizes the dimensional combination of accident data, and improves the comprehensive judgment efficiency of high-speed accident data.

[0069] This application also provides a location determination device, which can be used to perform the above-described location determination method. Optionally, the location determination device may be an electronic device with data processing capabilities, or a functional module within the electronic device; there is no limitation thereto.

[0070] For example, the electronic device can be a server, which can be a single server or a server cluster consisting of multiple servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0071] For example, the electronic device can also be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device, and other terminal devices. This application does not impose any special restrictions on the specific form of the electronic device.

[0072] Optionally, taking the processing of text information of the location of a high-speed traffic accident as an example, the location determination device can pre-store a trained NER recognition model. The location determination device can first use the NER recognition model to recognize the obtained high-speed traffic accident address text, extract the address element set in the address text, and then determine the geographic spatial location of the accident location based on the various types of address elements in the extracted address element set, such as geographic entities and spatial relationship entities.

[0073] The following section uses an electronic device as an example to introduce the device. Figure 1 The hardware structure of an electronic device 100 is shown.

[0074] like Figure 1 As shown, the electronic device 100 includes a processor 110, a communication line 120, and a communication interface 130.

[0075] Optionally, the electronic device 100 may also include a memory 140. The processor 110, memory 140, and communication interface 130 can be connected via a communication line 120.

[0076] The processor 110 can be a central processing unit (CPU), a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 110 can also be any other device with processing capabilities, such as a circuit, device, or software module, without limitation.

[0077] In one example, processor 110 may include one or more CPUs, for example Figure 1 CPU0 and CPU1 in the CPU.

[0078] As an optional implementation, the electronic device 100 may include multiple processors, for example, in addition to processor 110, it may also include processor 170. A communication line 120 is used to transmit information between the components included in the electronic device 100.

[0079] Communication interface 130 is used to communicate with other devices or other communication networks. These other communication networks can be Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc. Communication interface 130 can be a module, circuit, transceiver, or any device capable of enabling communication.

[0080] Memory 140 is used to store instructions. These instructions may be computer programs.

[0081] The memory 140 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and / or instructions; it may also be a random access memory (RAM) or other type of dynamic storage device capable of storing information and / or instructions; it may also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, etc., without limitation.

[0082] It should be noted that the memory 140 can exist independently of the processor 110 or can be integrated with the processor 110. The memory 140 can be used to store instructions, program code, or some data, etc. The memory 140 can be located inside or outside the electronic device 100, without restriction.

[0083] The processor 110 is configured to execute instructions stored in the memory 140 to implement the communication method provided in the following embodiments of this application. For example, when the electronic device 100 is a terminal or a chip in a terminal, the processor 110 can execute instructions stored in the memory 140 to implement the steps performed by the transmitting end in the following embodiments of this application.

[0084] As an optional implementation, the electronic device 100 also includes an output device 150 and an input device 160. The output device 150 can be a display screen, speaker, or other device capable of outputting data from the electronic device 100 to a user. The input device 160 can be a keyboard, mouse, microphone, joystick, or other device capable of inputting data into the electronic device 100.

[0085] It should be pointed out that, Figure 1 The structure shown does not constitute a limitation on the computing device, except Figure 1 In addition to the components shown, the computing device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0086] The embodiments provided in this application will now be described in detail with reference to the accompanying drawings.

[0087] This application provides a location determination method, such as... Figure 2 As shown, this method is applied to having Figure 1The device for determining the location of the hardware structure shown specifically includes the following steps:

[0088] S101, The location determination device obtains the address text.

[0089] The address text mentioned above describes the target location. For example, it could be a description of an accident site. The target location is the place where its spatial location needs to be determined.

[0090] For example, the target location can be the actual location where the highway accident occurred, and the address text is the text information describing the actual location in detail in the relevant information about the highway accident. For example, the address text can be "1 kilometer away from the Second Nanjing Yangtze River Bridge toll station on the Ningluo Expressway from Chuzhou to Nanjing" or "1 kilometer away from the Second Nanjing Yangtze River Bridge toll station on the Ningluo Expressway from south to north", and similar text.

[0091] Optionally, the location determination device can obtain the address text of the target location from pre-stored business data. For example, when it is necessary to determine the spatial geographic location of the target location, the location determination device can find text information describing the actual location of the traffic accident in a database containing highway accident data.

[0092] Alternatively, the location determining device can directly receive the address text of the target location. For example, when it is necessary to determine the spatial geographic location of a target location, a user can send the address text of the target location to the location determining device through an electronic device connected to it. Another example is that a user can input the address text of the target location into the location determining device through its input device.

[0093] In some embodiments, the location determination device may preprocess the address text to improve the accuracy of the address text in describing the target location.

[0094] Optionally, the above preprocessing includes operations such as regional idiom mapping and ambiguity removal.

[0095] It should be noted that the address text may contain local idioms used in the area where the target location is located, which may differ from the common terminology used for that address element. For example, taking "AA Bridge" as an example, due to the influence of local idioms, the address text may read "Three Bridges," but the target location cannot be located on a map based solely on the text "Three Bridges." Therefore, the location determination device can use regional idiom mapping to map the text "Three Bridges" to the text "AA Bridge."

[0096] Optionally, the location determination device includes a regional idiom dataset, which includes local expressions used in the region where the target location is located, as well as the corresponding general expressions.

[0097] Specifically, the location determination device can locate local idioms in address text based on preset regular expressions and regional idiom datasets, and then map the idioms to the corresponding general terms in the regional idiom dataset.

[0098] S102, The location determination device extracts geographic entities and spatial relationship entities from the address text.

[0099] The aforementioned geographic entities represent geographic objects that occupy spatial locations in geographic space.

[0100] For example, the aforementioned geographic entities can be road signs, points of interest (POI) signs, etc.

[0101] Furthermore, the aforementioned roads can include highways, multi-lane roads for separate lanes and direction of vehicular traffic with controlled access, and other Class I, II, III, and IV highways. Road signs are used to uniquely identify a road. These signs can be road names, such as "Heda Expressway" or "Changshen Expressway." Alternatively, they can be road codes, such as "G11" or "G25." There are no restrictions on what other signs can be used to identify a road. Furthermore, the sign for a Point of Interest (POI) can also be the name of the POI.

[0102] The aforementioned spatial relationship entities represent the spatial relationships between geographic entities. Optionally, spatial relationship entities include location relationship entities and geographic direction entities.

[0103] Location relation entities can include origin relation entities and destination relation entities. Origin relation entities can be text indicating the starting point of travel, such as from or by, while destination relation entities can be text indicating the destination of travel, such as towards, to, to, or to.

[0104] Alternatively, location entities can also include geographic direction entities. Geographic direction entities are text indicating geographic directions such as east, south, west, north, and northwest.

[0105] Optionally, spatial relationship entities may also include spatial distance auxiliary relationship entities such as adjacent or nearby, as well as spatial distance relationship entities representing distances in combination with numbers, text, and distance units such as kilometers, meters, and meters, such as 1 kilometer, three kilometers, etc. In some embodiments, the location determining device may extract a set of geographic entities from the address text, the set of geographic entities including one or more geographic entities in the address text, and spatial relationship entities.

[0106] Optionally, the aforementioned geographic entities may also include the names of administrative regions.

[0107] Among them, administrative regions refer to regions that are divided into levels for the convenience of administrative management.

[0108] Optionally, administrative regions may include provincial-level administrative regions, prefecture-level administrative regions, county-level administrative regions, and township-level administrative regions. Provincial-level administrative regions include provinces, autonomous regions, municipalities directly under the central government, and special administrative regions. Prefecture-level administrative regions include prefecture-level cities, regions, autonomous prefectures, and leagues. County-level administrative regions include urban districts, counties, county-level cities, autonomous counties, banners, autonomous banners, special zones, and forest areas. Township-level administrative regions include subdistricts, towns, townships, ethnic townships, sumu, ethnic sumu, and county-level districts.

[0109] Optionally, the location determination device can identify the aforementioned address text based on pre-stored geographic entity data.

[0110] The pre-stored geographic entity data mentioned above can be shown in Table 1, including various types of geographic entities that need to be identified, as well as the tags for each type of geographic entity.

[0111] Table 1

[0112]

[0113]

[0114] Optionally, the location determination device can mark the various types of geographic entities in the address text based on the geographic entity data shown in Table 1, thereby obtaining a set of geographic entities.

[0115] Optionally, the location determination device can use the BIEO marking mode.

[0116] For example, the annotation results of the address text "Ningluo Expressway Second Bridge Toll Station" using the BIEO annotation mode can be shown in Table 2. Among them, the geographic entities of this address text include the road sign "Ningluo Expressway" and the POI sign "Second Bridge Toll Station".

[0117] Table 2

[0118] text mark rather B-expressway Luo I-expressway high I-expressway speed E-expressway two B-poi bridge I-poi receive I-poi fee I-poi stand E-poi

[0119] Furthermore, taking the address text "1 kilometer away from the Erqiao toll station on the Ningluo Expressway from Chuzhou to Nanjing" as an example, the set of geographical entities obtained by the location determination device can be shown in Table 3. In this set of geographical entities, there are outgoing entities or coming entities such as from, towards, and direction, which can be used to indicate the direction from the administrative region "Chuzhou" to "Nanjing".

[0120] Table 3

[0121] text mark Classification Ningluo Expressway expressway Road signs from assist_direction_from From relational entities Chuzhou city Name of administrative region Past assist_direction_to Destination Relationship Entity Nanjing city Name of administrative region direction direction Orientation Relationship Entity distance assist_distances_upper Spatial distance auxiliary relation entities Second Bridge Toll Station poi POI identifier 1 kilometer distance Spatial distance relationship entities place other other

[0122] Alternatively, taking the above example of "1 kilometer past the Erqiao toll station on the Ningluo Expressway from south to north", the set of geographical entities obtained by the location determination device can be shown in Table 4. In this set of geographical entities, there are geographical entities such as south and north.

[0123] Table 4

[0124]

[0125]

[0126] In some embodiments, the location determination device can input the acquired address text into a pre-trained NER recognition model to obtain a set of geographic entities.

[0127] Optionally, the NER recognition model may include a BIEO annotation module, a word vector module, a BiLSTM module, and a CRF module.

[0128] The address text sample input to the NER recognition model is first processed by the BIEO annotation module to obtain multiple annotations for the address text. Then, the word vector module extracts features from these annotations to obtain word vectors for each annotation. Further, the BiLSTM module performs semantic decoding on the input word vectors to obtain the label score probability corresponding to each word vector. Finally, the output of the BiLSTM module is input to the CRF module, which uses the CRF model to calculate the label sequence transition probability, automatically extracts and corrects the rules of the label sequence, and ultimately obtains the globally optimal, accurate, and reasonable label prediction sequence for the address text.

[0129] S103. The location determination device determines the geographic spatial location corresponding to the address text based on the geographic entity and the spatial relationship entity.

[0130] In some embodiments, such as Figure 3 As shown, step S103 can be specifically implemented as steps S1031 to S1033 as follows:

[0131] S1031. The location determination device determines the preliminary geospatial location of the address text based on the geographical entity.

[0132] In some embodiments, the location determination device can perform data correction on the obtained set of geographic entities based on reference geographic information in a geographic information database, and then determine a first candidate location point and a second candidate location point based on the corrected set of geographic entities. The geographic information database includes reference road data and reference POI data, etc.

[0133] Optionally, the geographic information database may also include reference administrative region data. Thus, the location determination device can determine a first candidate location point and a second candidate location point based on the corrected road signs, POI identifiers, and administrative region identifiers. The specific determination process is detailed in steps 1-3 below and will not be repeated here.

[0134] In some embodiments, the location determining device may correct the acquired administrative region identifier.

[0135] Specifically, the location determination device can match the aforementioned administrative region identifier with reference administrative region data to obtain the reference administrative region corresponding to the address text.

[0136] In some embodiments, the location determining device may determine the similarity between the above-mentioned administrative region identifier and the information of multiple reference administrative regions in the reference administrative region data, and determine the reference administrative region whose similarity meets a preset condition (such as the highest similarity) as the reference administrative region corresponding to the address text.

[0137] Optionally, for one of the reference administrative regions in the reference administrative region data, the location determination device can calculate at least one of the following: Chinese character similarity, vector similarity, and pinyin similarity between the administrative region and the reference administrative region, and then determine the similarity between the administrative region and the reference administrative region based on at least one of the following: Chinese character similarity, vector similarity, and pinyin similarity.

[0138] In one example, the location determination device determines the similarity between the calculated Chinese character similarity, vector similarity, or pinyin similarity as the similarity between the administrative region information and the reference administrative region information.

[0139] In another example, the location determination device can further calculate the similarity between the administrative region information and the reference administrative region information based on preset weights of Chinese character similarity, vector similarity, and pinyin similarity.

[0140] For example, the preset weights for Chinese character similarity can be 0.4, vector similarity can be 0.3, and pinyin similarity can be 0.3.

[0141] Optionally, for the aforementioned Chinese character similarity, the location determination device may employ an edit distance algorithm to calculate the similarity between the specific text of the acquired administrative region information and the specific text of the reference administrative region information, thereby obtaining the Chinese character similarity between the administrative region information and the reference administrative region data.

[0142] Optionally, for the above vector similarity, the location determination device can generate a first vector representing the specific text of the administrative region and a second vector representing the specific text of the reference administrative region, and then use a cosine similarity algorithm to calculate the similarity between the first vector and the second vector to determine the vector similarity between the administrative region and the reference administrative region.

[0143] The position determination device generates the first and second vectors mentioned above using the same vector generation rules.

[0144] Optionally, for the aforementioned pinyin similarity, the location determination device can determine the pinyin of the specific text used to represent the administrative region, as well as the pinyin of the specific text of the reference administrative region, and then use the Levenshtein distance algorithm to calculate the similarity of the pinyin to determine the pinyin similarity between the administrative region information and the specific text of the reference administrative region information.

[0145] In some embodiments, the geographic entity includes a road sign and a point of interest (POI) sign. The initial geospatial location includes a first candidate location point in the uphill direction of the road and a second candidate location point in the downhill direction of the road. Thus, the location determination device can determine the first candidate location point in the uphill direction of the road indicated by the road sign and the second candidate location point in the downhill direction of the road based on the road sign and the POI sign.

[0146] Optionally, the above process can be implemented as follows: Steps 1-3:

[0147] The geographic entities include road markers and Points of Interest (POI) markers. The preliminary geospatial location includes a first candidate location point in the uphill direction of the road and a second candidate location point in the downhill direction of the road.

[0148] Step 1: The location determination device matches the road sign with the reference road data to obtain the reference road corresponding to the address text.

[0149] In some embodiments, the location determining device can determine the similarity between the road sign and multiple reference road information in the reference road data, and determine the reference road whose similarity meets a preset condition (such as the highest similarity) as the reference road corresponding to the address text.

[0150] Optionally, for one of the reference roads in the reference road data, the location determination device can calculate the Chinese character similarity, vector similarity, and pinyin similarity between the acquired road information and the information of the reference road, and then determine the similarity between the road information and the reference road information based on the Chinese character similarity, vector similarity, and pinyin similarity.

[0151] The specific process by which the location determination device determines the similarity between road information and reference road information based on Chinese character similarity, vector similarity, and pinyin similarity can be referred to the specific process by which the location determination device determines the similarity between administrative regions and reference administrative regions, and will not be repeated here.

[0152] Step 2: The location determination device matches the POI identifier with the reference POI in the first query range to obtain the reference POI corresponding to the address text.

[0153] The first query range is a region determined based on the location of a reference road segment. The location of the POI is also within this first query range.

[0154] Optionally, the location determining device can determine the location of the reference road segment and the area extending outward from both sides of the road segment at a preset distance as the first query range.

[0155] In some embodiments, the location determining device determines a first query range based on reference administrative region identifiers and reference road identifiers.

[0156] The location determination device can determine the section of the reference road within the reference administrative region based on the reference administrative region sign and the reference road sign.

[0157] Furthermore, the location determining device can determine a first query range based on the road segment. Optionally, the location determining device can define the road segment and the area extending outwards at a preset distance from both sides of the road segment as the first query range.

[0158] The preset distance can be 5 meters, 10 meters or other possible distances.

[0159] It should be noted that the reference administrative region may include a portion of the uphill section and a portion of the downhill section of the reference road. Therefore, the first query range includes the range determined based on the distance between the portion of the uphill section and the aforementioned preset distance, and the range determined based on the distance between the portion of the downhill section and the aforementioned preset distance.

[0160] Then, the location determination device can match the identifier of the POI with the reference POI in the first query range to obtain the reference POI corresponding to the address text.

[0161] In some embodiments, the location determining device can determine the similarity between the information of the above-mentioned POI and a plurality of reference POIs in the reference POI, and determine the reference POI with the highest similarity as the reference POI corresponding to the address text.

[0162] Optionally, for a reference POI, the location determination device can calculate the Chinese character similarity, vector similarity, and pinyin similarity between the POI's identifier and the information of the reference POI, and then determine the similarity between the POI's identifier and the information of the reference POI based on the Chinese character similarity, vector similarity, and pinyin similarity.

[0163] The specific process by which the location determination device determines the similarity between the POI identifier and the information of the reference POI based on Chinese character similarity, vector similarity, and pinyin similarity can be referred to the specific process by which the location determination device determines the similarity between the administrative region identifier and the information of the reference administrative region, and will not be repeated here.

[0164] Step 3: The location determination device determines the candidate location point with the shortest distance to the reference POI on the uphill section of the reference road as the first candidate location point, and determines the candidate location point with the shortest distance to the reference POI on the downhill section of the reference road as the second candidate location point.

[0165] It should be noted that the directions of travel on a road include both uphill and downhill directions. The uphill direction is opposite to the downhill direction; for example, the direction from north to south can be defined as the downhill direction, and the direction from south to north as the uphill direction. Alternatively, the direction from west to east can be defined as the downhill direction, and the direction from east to west as the uphill direction. For instance, the direction of travel on the aforementioned reference road towards the aforementioned reference administrative region can be defined as the uphill direction, and the direction of travel on the aforementioned reference road away from the aforementioned reference administrative region can be defined as the downhill direction. Therefore, the road segment with the uphill direction is the uphill segment of the reference road, and the road segment with the downhill direction is the downhill segment of the reference road. In some embodiments, the location determining device determines the uphill and downhill segments of the reference road that are closest to the reference administrative region based on the reference administrative region and the reference road. The location point on the uphill segment with the shortest distance to the reference POI is determined as the first candidate location point, and the location point on the downhill segment with the shortest distance to the reference POI is determined as the second candidate location point.

[0166] Optionally, the location determination device can determine a first candidate location point on the uphill segment of the reference road and a second candidate location point on the downhill segment.

[0167] Wherein, if the direction of travel toward the reference administrative region is an upward direction, then the aforementioned upward road segment is a road segment at a preset distance from the reference road leading to the reference administrative region, and the aforementioned downward road segment is a road segment at a preset distance from the reference road leading away from the reference administrative region. The preset distance can be 1 kilometer, 10 kilometers, or other reasonable distances.

[0168] like Figure 4As shown, if point A is the reference POI identified by the location determination device, then the uphill segment is approximated as a straight line. A perpendicular line is drawn from point A to this straight line, and the foot of the perpendicular, point B, is the point on the uphill segment with the shortest distance to point A. Point B can be determined as the first candidate point. Similarly, the downhill segment is approximated as a straight line, and a perpendicular line is drawn from point A to this straight line. The foot of the perpendicular, point C, is the point on the downhill segment with the shortest distance to point A. Point C can be determined as the second candidate point.

[0169] S1032. The location determination device uses spatial relationship entities to correct the preliminary geospatial location information.

[0170] As can be seen from the description of spatial relationship entities in step S101 above, spatial relationship entities may include orientation relationship entities and spatial distance relationship entities.

[0171] Optionally, the location determination device can first determine whether the target location is on the uphill or downhill section of the road based on the orientation relationship entity, i.e., determine the target direction. Then, if the target direction is the uphill direction of the road, the location determination device can determine a first candidate location point as the target candidate location point. Alternatively, if the target direction is the downhill direction of the road, the location determination device can determine a second candidate location point as the target candidate location point. Here, the target location point represents the geospatial location point corresponding to the address text to be corrected.

[0172] Furthermore, the location determination device can use spatial relationship entities to correct the determined target candidate location points in order to determine the geospatial location corresponding to the address text.

[0173] Optionally, the process by which the position determining device determines the aforementioned target direction can be referred to the following: Figure 7 and Figure 8 The embodiments shown are not described in detail here.

[0174] In addition, the following are several possible implementations for refining the target candidate location points:

[0175] In one possible implementation, the location determination device can determine the geographical location of the target location based on the location information of the target candidate location points according to the spatial relationship entity.

[0176] Optionally, the location determination device can search for entities with spatial distance relationships in the set of geographic entities. If no entities with spatial distance relationships exist in the set of geographic entities, there is no need to correct the location of the candidate target location point, and the location determination device can determine the location information of the candidate target location point as the geographic location of the target location.

[0177] The geospatial location of the target location includes coordinates, such as latitude and longitude. It may also include the road traffic unit where the location is located, such as the road name, the road segment where the location is located, and the direction of travel (up or down) of the road.

[0178] It should be noted that if the geographic entity set includes spatial distance auxiliary relationship entities such as “next to”, “nearby”, “not yet”, etc., labeled with “assist_distances_upper”, “assist_distances_lower”, or “assit”, indicating location relationships, but does not contain spatial distance relationship entities labeled with “distance” such as “1 km” or “2 KM”, then the location determination device can approximate the geographic location of the target location by determining the location information of the target candidate location point.

[0179] In another possible implementation, the location determination device can perform distance correction on the candidate location points based on spatial relationship entities to obtain the geospatial location of the target location.

[0180] Optionally, the position determining device can first determine the distance offset direction as a first direction or a second direction.

[0181] The first direction is the forward direction along the current road. The second direction is the backward direction along the current road.

[0182] For example, if the location relation entity includes spatial distance auxiliary relation entities labeled "assist_distances_lower" such as "passed" or "already passed," then the target location is a location point located after the target candidate location point along the travel direction of the road where the target candidate location point is located. Therefore, the location determination device can determine the target location based on the target candidate location point and along the travel direction of the road where the target candidate location point is located, that is, determine the offset direction as the forward direction.

[0183] For example, if the location relation entity includes spatial distance auxiliary relation entities labeled "assist_distances_upper" such as "not arrived," "nearby," or "not yet arrived," then the target location is a point located before the target candidate location point along the direction of travel on the road where the target candidate location point is located. Therefore, the location determination device can determine the target location based on the target candidate location point in the opposite direction of travel on the road where the target candidate location point is located; that is, it determines the offset direction as the backward direction.

[0184] Furthermore, if the distance offset direction is the forward direction, the location determination device will use the target candidate location point as the starting point and determine the location information of the actual offset distance along the current road as the geospatial location of the target location.

[0185] Optionally, if the distance offset direction is the forward direction, the location determination device can acquire the road where the target candidate location point is located and acquire road network data at a preset distance along the forward direction. Based on this road network data, the geospatial location of the point with the actual offset distance along the current road is determined. It should be understood that the preset distance is greater than or equal to the actual offset distance.

[0186] For example, such as Figure 5 As shown, if the target candidate location is the first candidate location point B, and the distance offset direction is the forward direction, since the road segment where point B is located is an uphill segment, then the target location is location point D2, which is the actual offset distance along the uphill direction. The location determination device can obtain information such as the latitude and longitude of location point D2 and the road traffic unit it is located in, as the geospatial location of the target location.

[0187] Alternatively, if the distance offset direction is backward, the location determination device will use the target candidate location point as the starting point and determine the location information of the actual offset distance along the current road as the geospatial location of the target location.

[0188] Optionally, if the distance offset direction is backward, the position determination device can acquire the road where the target candidate position point is located, and acquire road network data at a preset distance along the backward direction. Based on this road network data, the geographic spatial location of the position point with the actual offset distance along the current road leg can be determined.

[0189] For example, such as Figure 5 As shown, if the target candidate location is the first candidate location point B, and the distance offset direction is backward, since the road segment where point B is located is an uphill segment, the target location is point D1, which is the location point in the opposite direction of the uphill direction, i.e., the downhill direction, representing the actual offset distance. The location determination device can obtain information such as the latitude and longitude of location point D1 and the road traffic unit it is located in, as the geospatial location of the target location.

[0190] Optionally, the specific process by which the location determining device determines the target location based on candidate target location points can also be described as follows: Figure 6 The logic flowchart shown.

[0191] S11, Obtain spatial relationship entities.

[0192] S12. Determine whether there is a spatial distance relationship.

[0193] The location determination device can determine whether there are spatial distance auxiliary entities or spatial distances labeled as “assist_distances_lower”, “assist_distances_upper”, “assit”, and “distance”.

[0194] If so, proceed to step S13.

[0195] If not, proceed to step S14.

[0196] S13. Determine the candidate location as the target location.

[0197] S14. Determine whether there are entities with a distance relationship.

[0198] If so, proceed to step S15.

[0199] If not, proceed to step S13.

[0200] S15. Determine whether the distance offset direction is forward or backward.

[0201] If it is the forward direction, then proceed to step S16.

[0202] If the direction is backward, proceed to step S18.

[0203] S16. Obtain road network data for the direction of travel.

[0204] S17. The location point that is actually offset from the current road, starting from the candidate target location point, is determined as the target location.

[0205] S18. Obtain road network data in the reverse direction.

[0206] S19. The location point that is actually offset backward along the current road from the target candidate location point is determined as the target location.

[0207] S1033, The location determination device determines the corrected preliminary geospatial location as the geospatial location corresponding to the address text.

[0208] Based on the aforementioned location determination method, the location determination device can perform semantic recognition on the address text of a target location to extract geographic entities and spatial relationship entities from the address text. This allows for the analysis of the spatial location of the target location based on various types of geographic entities. Furthermore, the location determination device can first determine candidate location points in either the up or down direction based on a subset of geographic entity types in the address element set. Then, based on another subset of geographic entity types in the geographic entity set, the location determination device can perform directional or positional correction on the determined candidate location points to obtain a more accurate geospatial location of the target location. Thus, the address text of a target location can be transformed into geospatial structure location information, facilitating data analysis of the geospatial location of the target location and improving the data utilization rate of address information.

[0209] In one implementation, based on Figure 2 The location determination method shown is as follows: Figure 7 As shown, if the spatial relationship entity includes an orientation relationship entity, and the orientation relationship entity includes a direction-of-arrival relationship entity and a direction-of-departure relationship entity, this application also provides a method for determining the target direction, which further includes the following steps:

[0210] S201, The location determination device uses the incoming and outgoing relation entities to identify the origin and destination geographic entities corresponding to the address text from the geographic entities.

[0211] Among them, the incoming direction relation entity is the directional relation entity used to indicate the originating geographic entity, and the outgoing direction relation entity is the directional relation entity used to indicate the destination geographic entity.

[0212] Optionally, when the location determining device identifies a relational entity, the location determining device may determine the geographic entity indicated by the relational entity as the aforementioned origin geographic entity.

[0213] Specifically, based on the identification order of each geographic entity and spatial relationship entity in the address text, if the next extraction result of the incoming relationship entity is a geographic entity, the location determination device can identify the geographic entity as the geographic entity indicated by the incoming relationship entity, that is, the aforementioned starting point geographic entity.

[0214] For example, taking the address text shown in Table 3 above as an example, if the location determining device continuously extracts the relational entity "from" and the geographical entity "Chuzhou", and "Chuzhou" follows "from", then the location determining device can determine "Chuzhou" as the starting geographical entity.

[0215] Correspondingly, when the location determination device identifies the destination relationship entity, the location determination device may determine the geographical entity indicated by the destination relationship entity as the above-mentioned end geographical entity.

[0216] Specifically, based on the recognition order of each geographical entity and spatial relationship entity in the address text, if the next extraction result of the destination relationship entity is a geographical entity, the location determination device may determine this geographical entity as the geographical entity indicated by the destination relationship entity, that is, the above-mentioned end geographical entity.

[0217] Exemplarily, taking the address text shown in Table 3 above as an example, if the location determination device continuously extracts the destination relationship entity "to" and the geographical entity "Nanjing", and "Nanjing" comes after "to". Thus, the location determination device may determine "Nanjing" as the end geographical entity.

[0218] S202. The location determination device uses the preliminary geospatial location, the starting geographical entity, and the end geographical entity to determine the target direction.

[0219] Optionally, the specific process for the location determination device to determine the target direction may refer to the following S1 - S5:

[0220] S1. The location determination device determines a first reachable location point that travels a preset distance in the upward direction with the first candidate location point as the starting point.

[0221] Optionally, the location determination device may first obtain the road network data within the first range, where the first range includes the first candidate location point, and in the road network data within the first range, determine one or more location points that start from the first candidate location point and travel a preset driving distance in the upward direction.

[0222] It can be understood that in the road network data within the first range, starting from the first candidate location point and traveling a preset driving distance in the upward direction, since there is no restriction on the road traveled, one or more location points can be reached in the road network within the first range.

[0223] Furthermore, the location determination device may determine the location point with the shortest geographical location between one or more location points and the first candidate location point as the first reachable location point.

[0224] S2. The location determination device determines a second reachable location point that travels a preset distance in the downward direction with the second candidate location point as the starting point.

[0225] Optionally, the location determination device may first obtain the road network data within the second range, where the second range includes the second candidate location point, and in the road network data within the second range, determine one or more location points that start from the second candidate location point and travel a preset driving distance in the downward direction.

[0226] It is understandable that, within the road network data within the first range, starting from the second candidate location point, and traveling a preset distance in the downstream direction, one or more location points can be reached within the road network within the second range, since there are no restrictions on the roads.

[0227] Furthermore, the location determination device can determine the location point with the shortest geographical distance from the second candidate location point among one or more location points as the second reachable location point.

[0228] S3. The location determining device determines the first distance between the first reachable location point and the first marker POI, and the second distance between the second reachable location point and the first marker POI.

[0229] The first reachable location point can be a marked POI in the area where the destination is located. Alternatively, the first reachable location point can be a marked POI in the area where the origin is located.

[0230] It should be noted that, since the starting or ending geographic entity is typically an identifier of an administrative region (a geographical area), which is not convenient for subsequent distance calculations, the location determination device can use any point of interest (POI) within that administrative region as the aforementioned marker POI to calculate the distance. For example, the location determination device can determine the center point within the administrative region corresponding to the starting or ending geographic entity as the aforementioned marker POI.

[0231] In some embodiments, taking the first distance as an example, the first distance S can be determined according to the following formula (1).

[0232]

[0233] The longitude of the first reachable location is mlon1, the latitude is mlat1, the longitude of the POI is mlon2, the latitude is mlat2, and R is the Earth's radius of 6378 km.

[0234] It should be understood that the second distance can also be determined according to formula (1), which will not be elaborated further.

[0235] S4. When the first POI is a POI in the area where the destination is located, if the first distance is less than the second distance, the upward direction is determined as the target direction; if the first distance is greater than the second distance, the downward direction is determined as the target direction.

[0236] The endpoint mentioned above refers to the location point indicated by the endpoint geographic entity.

[0237] It should be noted that if the first distance is less than the second distance, it indicates that the direction of travel in the upward direction is closer to the aforementioned endpoint. Therefore, the upward direction should be the correct direction of travel corresponding to the address text. Consequently, the location determination device determines the first candidate location point as the target candidate location point.

[0238] Accordingly, if the first distance is greater than the first distance, it indicates that the journey is proceeding in the downhill direction and is closer to the destination. Therefore, the downhill direction should be the correct direction of travel. Thus, the location determination device identifies the second candidate location point as the target candidate location point. Here, the target candidate location point represents the geospatial location point corresponding to the address text to be corrected.

[0239] Furthermore, if the first distance equals the second distance, the position determining device can determine the upward direction as the aforementioned target direction. Alternatively, the position determining device can also determine the downward direction as the aforementioned target direction.

[0240] S5. When the first marker POI is a marker POI in the area where the starting point is located, if the first distance is greater than the second distance, the upward direction is determined as the target direction; if the first distance is less than the second distance, the downward direction is determined as the target direction.

[0241] It should be noted that if the first distance is greater than the second distance, it indicates that the distance to the starting point of the journey is greater when traveling in the upward direction. Therefore, the upward direction should be the correct direction of travel for this journey. Consequently, the position determination device determines the first candidate position point as the target candidate position point.

[0242] The starting point mentioned above refers to the location indicated by the starting point geographic entity.

[0243] Accordingly, if the first distance is less than the first distance, it indicates that the distance to the starting point is greater when moving in the downward direction. Therefore, the downward direction should be the correct direction of travel corresponding to the address text. Thus, the position determination device determines the second candidate position point as the target candidate position point.

[0244] Furthermore, if the first distance equals the second distance, the position determining device can determine the upward direction as the aforementioned target direction. Alternatively, the position determining device can also determine the downward direction as the aforementioned target direction.

[0245] In another implementation, based on Figure 2 The location determination method shown is as follows: Figure 8 As shown, when the orientation relationship entity includes a geographic direction entity, this application also provides another method for determining the target direction, which further includes the following steps:

[0246] S301, The location determining device determines the azimuth of the geographical direction entity, the azimuth of the uphill section, and the azimuth of the downhill section.

[0247] The geographic direction entity includes geographic orientation, which represents the direction of travel from the starting point to the destination. Geographic orientation refers to text describing geographic directions such as "North," "East," and "Northeast." The azimuth angle indicated by the geographic direction entity is the angle between that geographic orientation and true north. For example, if the geographic orientation is "North," the azimuth angle indicated by the geographic direction entity is 0°, or, for example, if the geographic orientation is "Northeast," the azimuth angle indicated by the geographic direction entity is 45°.

[0248] The azimuth of the uphill segment is the angle between the direction of travel of the uphill segment and due north. The azimuth of the downhill segment is the angle between the direction of travel of the downhill segment and due north.

[0249] For example, such as Figure 9 As shown, the angle b between the up direction and the due north direction is the azimuth angle of the up road segment, and the angle a between the down direction and the due north direction is the azimuth angle of the down road segment.

[0250] S302, The location determining device determines the first included angle between the azimuth of the geographic direction entity and the azimuth of the uphill section and the second included angle between the azimuth of the geographic direction entity and the azimuth of the downhill section.

[0251] Optionally, the first included angle X can be determined according to the following formula (2).

[0252] X=180-abs(abs(θ-α)-180) Formula (2)

[0253] Where θ is the azimuth angle indicated by the geographic direction entity, and α is the azimuth angle of the uphill road segment.

[0254] It should be understood that the second included angle can also be determined according to formula (2), which will not be elaborated further.

[0255] S303. If the first included angle is less than the second included angle, the position determining device will determine the upward direction as the target direction.

[0256] It should be noted that if the first included angle is smaller than the second included angle, it means that the upward direction is closer to the reference direction of travel, and the upward direction should be the correct direction of travel for this journey, that is, the target direction.

[0257] Therefore, the location determination device determines the first candidate location point as the target candidate location point.

[0258] S304. If the second included angle is less than the first included angle, the position determining device will determine the downward direction as the target direction.

[0259] It should be noted that if the first included angle is smaller than the second included angle, it means that the downward direction is closer to the reference direction of travel, and the downward direction should be the correct direction of travel for this journey, that is, the target direction.

[0260] Therefore, the location determination device determines the second candidate location point as the target candidate location point.

[0261] The foregoing primarily describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the aforementioned functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0262] like Figure 10 The diagram shown is a structural schematic of a location determination device 200 provided in an embodiment of this application. The device 200 may include: an acquisition unit 201, an extraction unit 202, and a processing unit 203.

[0263] The acquisition unit 201 is used to acquire the address text.

[0264] Extraction unit 202 is used to extract geographic entities and spatial relationship entities from address text; wherein, geographic entities represent geographic objects that occupy spatial locations in geographic space, and spatial relationship entities represent spatial relationships between geographic entities.

[0265] Processing unit 203 is used to determine the geospatial location corresponding to the address text based on the geographic entity and the spatial relationship entity.

[0266] In one possible implementation, the processing unit 203 is specifically used to: determine the preliminary geospatial location of the address text based on the geographic entity; correct the preliminary geospatial location using the spatial relationship entity; and determine the corrected preliminary geospatial location as the geospatial location corresponding to the address text.

[0267] In another possible implementation, the geographic entities include road signs and point of interest (POI) signs. The processing unit 203 is specifically used to: determine a first candidate location point in the uphill direction of the road indicated by the road sign and a second candidate location point in the downhill direction of the road, based on the road signs and POI signs.

[0268] In another possible implementation, the processing unit 203 is further specifically used to: match the road identifier with the reference road data to obtain the reference road corresponding to the address text; match the POI identifier with the reference POI data in the first query range to obtain the reference POI information corresponding to the address text; wherein, the first query range is the area range determined based on the road segment location of the reference road, and the location of the POI is within the first query range; determine the candidate location point with the shortest distance to the reference POI on the uphill segment of the reference road as the first candidate location point, and determine the candidate location point with the shortest distance to the reference POI on the downhill segment of the reference road as the second candidate location point.

[0269] In another possible implementation, the processing unit 203 is specifically used to: determine the target direction using spatial relationship entities; if the target direction is the uphill direction of the road, then determine the first candidate location point as the target candidate location point; the target candidate location point represents the geospatial location point corresponding to the address text to be corrected; if the target direction is the downhill direction of the road, then determine the second candidate location point as the target candidate location point.

[0270] In another possible implementation, the aforementioned spatial relationship entity includes a location relationship entity, which includes a direction relationship entity and a destination relationship entity; wherein, the direction relationship entity is a location relationship entity used to indicate the starting point geographic entity, and the destination relationship entity is a location relationship entity used to indicate the ending point geographic entity; then the processing unit 203 is specifically used to: use the direction relationship entity and the destination relationship entity to identify the starting point geographic entity and the ending point geographic entity corresponding to the address text from the geographic entities; and use the preliminary geospatial location, the starting point geographic entity, and the ending point geographic entity to determine the target direction.

[0271] In another possible embodiment, the processing unit 203 is further specifically configured to: determine a first reachable location point that travels a preset distance in an upward direction, starting from a first candidate location point; determine a second reachable location point that travels the preset distance in a downward direction, starting from a second candidate location point; determine a first distance between the first reachable location point and a first marker POI, and a second distance between the second reachable location point and the first marker POI; when the first marker POI is a marker POI in the area where the destination is located, if the first distance is less than the second distance, then the upward direction is determined as the target direction; if the first distance is greater than the second distance, then the downward direction is determined as the target direction; the destination is the location point indicated by the destination geographic entity; when the first marker POI is a marker POI in the area where the starting point is located, if the first distance is greater than the second distance, then the upward direction is determined as the target direction; if the first distance is less than the second distance, then the downward direction is determined as the target direction; the starting point is the location point indicated by the starting point geographic entity.

[0272] Optionally, the first distance satisfies the following relationship:

[0273]

[0274] The longitude of the first reachable location is mlon1, and the latitude is mlat1; the longitude of the marker POI is mlon2, and the latitude is mlat2; R is the Earth's radius of 6378 km.

[0275] Optionally, the processing unit 203 is specifically used to: acquire road network data within a first range, the first range including a first candidate location point; the road network data including multiple road data within the first range; determine one or more location points with the first candidate location point as the starting point and a preset driving distance in the uphill direction based on the road network data within the first range; and determine the location point with the shortest geographical distance to the first candidate location point among the one or more location points as the first reachable location point.

[0276] Optionally, the processing unit 203 is specifically used to: acquire road network data within a second range, the second range including second candidate location points; determine one or more location points with the second candidate location points as the starting point and a preset driving distance in the downstream direction based on the road network data within the second range; and determine the location point with the shortest geographical distance to the second candidate location point among the one or more location points as the second reachable location point.

[0277] In another possible implementation, the processing unit 203 is further configured to: if the orientation relationship entity includes a destination entity, use the marked POI of the area where the destination entity indicates the destination as the first marked POI; or, if the orientation relationship entity includes an incoming entity, use the marked POI of the area where the incoming entity indicates the origin as the first marked POI.

[0278] In another possible implementation, the spatial relationship entity includes an orientation relationship entity, which in turn includes a geographic direction entity, representing the direction of travel from the starting point to the ending point. The processing unit 203 is then specifically used to: determine the azimuth angle indicated by the geographic direction entity, the azimuth angle of the uphill segment, and the azimuth angle of the downhill segment; determine a first included angle between the azimuth angle indicated by the geographic direction entity and the azimuth angle of the uphill segment, and a second included angle between the azimuth angle indicated by the geographic direction entity and the azimuth angle of the downhill segment; if the first included angle is less than the second included angle, then the uphill direction is determined as the target direction; if the first included angle is greater than the second included angle, then the downhill direction is determined as the target direction.

[0279] In another possible implementation, if the spatial relationship entity also includes a spatial distance relationship entity and a spatial distance auxiliary relationship entity, the above processing unit 203 is further specifically used to: offset the distance indicated by the spatial distance relationship entity from the target candidate location point along the offset direction represented by the spatial distance auxiliary relationship entity; and determine the offset location point as the corrected preliminary geospatial location.

[0280] For a detailed description of the above-mentioned optional methods, please refer to the foregoing method embodiments, which will not be repeated here. Furthermore, the explanation of any of the above-provided position determination devices 200 and the description of its beneficial effects can be found in the corresponding method embodiments described above, and will not be repeated here.

[0281] Those skilled in the art will readily recognize that, based on the units and algorithm steps described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is implemented in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0282] It should be noted that, Figure 10 The module division shown is illustrative and represents only one logical functional division; in actual implementation, other division methods are possible. For example, two or more functions can be integrated into a single processing module. These integrated modules can be implemented either in hardware or as software functional modules.

[0283] This application also provides a computer-readable storage medium including computer-executable instructions that, when run on a computer, cause the computer to perform any of the methods provided in the above embodiments. For example, Figure 2 One or more features in S101 to S103 can be performed by one or more computer-executable instructions stored in the computer-readable storage medium.

[0284] This application also provides a computer program product containing computer execution instructions, which, when run on a computer, causes the computer to perform any of the methods provided in the above embodiments.

[0285] This application also provides a chip, including a processor and an interface. The processor is coupled to a memory through the interface. When the processor executes a computer program in the memory or computer execution instructions, any of the methods provided in the above embodiments are executed.

[0286] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When these computer instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device containing one or more servers, data centers, etc., that can be integrated with the medium. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks, SSDs).

[0287] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and modifications of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and modifications.

[0288] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for determining a location, characterized in that, The method includes: Get the address text; Extract geographic entities and spatial relationship entities from the address text; wherein, the geographic entity represents a geographic object occupying a spatial location in the geographic space; the spatial relationship entity represents the spatial relationship between geographic entities; the geographic entity includes road signs and point of interest (POI) signs; Based on the geographic entity, determine the preliminary geospatial location of the address text; The initial geospatial location is corrected using the spatial relationship entity. The corrected preliminary geospatial location is determined to be the geospatial location corresponding to the address text; The step of determining the preliminary geospatial location of the address text based on the geographic entity includes: Based on the road sign and the point of interest (POI) sign, determine a first candidate location point in the uphill direction of the road indicated by the road sign and a second candidate location point in the downhill direction of the road; The step of correcting the preliminary geospatial location using the spatial relationship entity includes: The target direction is determined using the aforementioned spatial relationship entities; If the target direction is the uphill direction of the road, then the first candidate location point is determined as the target candidate location point; the target candidate location point represents the geospatial location point corresponding to the address text to be corrected; If the target direction is the downhill direction of the road, then the second candidate location point is determined as the target candidate location point.

2. The method according to claim 1, characterized in that, The step of determining a first candidate location point in the uphill direction and a second candidate location point in the downhill direction of the road indicated by the road sign, based on the road sign and the point of interest (POI) sign, includes: The road identifier is matched with the reference road data to obtain the reference road corresponding to the address text; The identifier of the POI is matched with the reference POI data in the first query range to obtain the reference POI information corresponding to the address text; wherein, the first query range is an area range determined based on the road segment location of the reference road, and the location of the POI is within the first query range; The candidate location point with the shortest distance to the reference POI on the uphill section of the reference road is determined as the first candidate location point, and the candidate location point with the shortest distance to the reference POI on the downhill section of the reference road is determined as the second candidate location point.

3. The method according to claim 1, characterized in that, The spatial relationship entity includes a directional relationship entity, which includes an incoming direction relationship entity and a outgoing direction relationship entity; wherein, the incoming direction relationship entity is a directional relationship entity used to indicate the starting point geographic entity, and the outgoing direction relationship entity is a directional relationship entity used to indicate the ending point geographic entity. Determining the target direction using the spatial relationship entity includes: Using the aforementioned destination and destination relation entities, the originating and ending geographic entities corresponding to the address text are identified from the geographic entities. The target direction is determined using the preliminary geospatial location, the starting point geographic entity, and the ending point geographic entity.

4. The method according to claim 3, characterized in that, The step of determining the target direction using the preliminary geospatial location, the starting point geographic entity, and the ending point geographic entity includes: Determine a first reachable location point, starting from the first candidate location point and traveling a preset distance along the upward direction; Determine a second reachable location point, starting from the second candidate location point, and traveling the preset distance along the downhill direction; Determine a first distance between the first reachable location point and the first marker POI, and a second distance between the second reachable location point and the first marker POI; When the first marker POI is a marker POI in the area where the destination is located, if the first distance is less than the second distance, the up direction is determined as the target direction; if the first distance is greater than the second distance, the down direction is determined as the target direction; and the destination is the location point indicated by the destination geographic entity. When the first marker POI is a marker POI in the area where the starting point is located, if the first distance is greater than the second distance, the upward direction is determined as the target direction; if the first distance is less than the second distance, the downward direction is determined as the target direction; the starting point is the location point indicated by the starting point geographic entity.

5. The method according to claim 1, characterized in that, The spatial relationship entity includes a location relationship entity, which in turn includes a geographic direction entity, which represents the direction of travel from the starting point to the ending point. Determining the target direction using the spatial relationship entity includes: Determine the azimuth angle indicated by the geographic direction entity, the azimuth angle of the uphill segment of the road, and the azimuth angle of the downhill segment of the road; Determine the first included angle between the azimuth indicated by the geographic direction entity and the azimuth of the uphill road segment, and the second included angle between the azimuth indicated by the geographic direction entity and the azimuth of the downhill road segment; If the first included angle is smaller than the second included angle, then the upward direction is determined as the target direction; If the first included angle is greater than the second included angle, then the downward direction is determined as the target direction.

6. The method according to claim 1, characterized in that, The spatial relationship entity further includes a spatial distance relationship entity and a spatial distance auxiliary relationship entity. The step of using the spatial relationship entity to correct the preliminary geospatial location also includes: Starting from the target candidate location point, offset by the distance indicated by the spatial distance relationship entity along the offset direction represented by the spatial distance auxiliary relationship entity; The offset location is determined as the corrected preliminary geospatial location.

7. A position determining device, characterized in that, The device includes: The acquisition unit is used to retrieve the address text; An extraction unit is used to extract geographic entities and spatial relationship entities from the address text; wherein, the geographic entity represents a geographic object occupying a spatial location in geographic space; the spatial relationship entity represents the spatial relationship between geographic entities; the geographic entity includes road signs and point of interest (POI) signs; The processing unit is configured to determine the preliminary geospatial location of the address text based on the geographic entity. The processing unit is also used to correct the preliminary geospatial location using the spatial relationship entity; The processing unit is further configured to determine the corrected preliminary geospatial location as the geospatial location corresponding to the address text; The processing unit is further specifically used for: Based on the road sign and the point of interest (POI) sign, determine a first candidate location point in the uphill direction of the road indicated by the road sign and a second candidate location point in the downhill direction of the road; The processing unit is further specifically used for: The target direction is determined using the aforementioned spatial relationship entities; If the target direction is the uphill direction of the road, then the first candidate location point is determined as the target candidate location point; the target candidate location point represents the geospatial location point corresponding to the address text to be corrected; If the target direction is the downhill direction of the road, then the second candidate location point is determined as the target candidate location point.

8. The apparatus according to claim 7, characterized in that, The processing unit is specifically used for: The processing unit is further specifically used for: The road identifier is matched with the reference road data to obtain the reference road corresponding to the address text; The identifier of the POI is matched with the reference POI data in the first query range to obtain the reference POI information corresponding to the address text; wherein, the first query range is an area range determined based on the road segment location of the reference road, and the location of the POI is within the first query range; The candidate location point with the shortest distance to the reference POI on the uphill section of the reference road is determined as the first candidate location point, and the candidate location point with the shortest distance to the reference POI on the downhill section of the reference road is determined as the second candidate location point. The processing unit is further specifically used for: The spatial relationship entity includes a location relationship entity, which in turn includes an incoming direction relationship entity and a outgoing direction relationship entity; wherein, the incoming direction relationship entity is a location relationship entity used to indicate the starting point geographic entity, and the outgoing direction relationship entity is a location relationship entity used to indicate the ending point geographic entity; the processing unit is further specifically used for: Using the aforementioned destination and destination relation entities, the originating and ending geographic entities corresponding to the address text are identified from the geographic entities. Using the preliminary geospatial location, the starting point geographic entity, and the ending point geographic entity, the target direction is determined; The processing unit is specifically used to: determine a first reachable location point that is a predetermined distance traveled along the upward direction, starting from the first candidate location point; Determine a second reachable location point, starting from the second candidate location point, and traveling the preset distance along the downhill direction; Determine a first distance between the first reachable location point and the first marker POI, and a second distance between the second reachable location point and the first marker POI; When the first marker POI is a marker POI in the area where the destination is located, if the first distance is less than the second distance, the up direction is determined as the target direction; if the first distance is greater than the second distance, the down direction is determined as the target direction; and the destination is the location point indicated by the destination geographic entity. When the first marker POI is a marker POI in the area where the starting point is located, if the first distance is greater than the second distance, the upward direction is determined as the target direction; if the first distance is less than the second distance, the downward direction is determined as the target direction; the starting point is the location point indicated by the starting point geographic entity. The spatial relationship entity includes a location relationship entity, which in turn includes a geographic direction entity, representing the direction of travel from the starting point to the ending point; the processing unit is specifically used for: Determine the azimuth angle indicated by the geographic direction entity, the azimuth angle of the uphill segment, and the azimuth angle of the downhill segment; Determine the first included angle between the azimuth indicated by the geographic direction entity and the azimuth of the uphill road segment, and the second included angle between the azimuth indicated by the geographic direction entity and the azimuth of the downhill road segment; If the first included angle is smaller than the second included angle, then the upward direction is determined as the target direction; If the first included angle is greater than the second included angle, then the downward direction is determined as the target direction; The spatial relationship entity further includes a spatial distance relationship entity and a spatial distance auxiliary relationship entity, and the processing unit is specifically used for: Starting from the target candidate location point, offset by the distance indicated by the spatial distance relationship entity along the offset direction represented by the spatial distance auxiliary relationship entity; The offset location is determined as the corrected preliminary geospatial location.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, the computer program code including computer instructions; Wherein, when the processor executes the computer instructions, the electronic device performs the method as described in any one of claims 1-6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1-6.