Traffic incident address positioning method, device, equipment and storage medium
By performing natural language processing and road name preprocessing on traffic event addresses in the intelligent traffic system, combining road network data to match intersections and POIs, and using similarity algorithms and distance thresholds to determine latitude and longitude information, the accuracy of positioning information in the intelligent traffic system is solved. The problem of low-quality achieves high-precision traffic event address location.
Patent Information
- Application Number
- CN202411118869.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-08-15
AI Technical Summary
In existing intelligent transportation systems, natural language processing technology is difficult to ensure the accuracy of traffic event address positioning, especially in special types of road section positioning, making it difficult to obtain high-precision positioning information.
By obtaining the address description information of traffic events based on text data, performing natural language processing and road name preprocessing, combining road network data to match intersections and POIs, and using similarity algorithms and distance thresholds to determine the latitude and longitude information to achieve accurate positioning.
It improves the accuracy and accuracy of traffic event address positioning, solves the problem of low accuracy in obtaining positioning information in the prior art, and can accurately obtain the latitude and longitude information of traffic events.
Smart Images

Figure CN118643232B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent transportation technology, and in particular to a method, device, equipment and storage medium for locating a traffic event address. Background Art
[0002] In the current intelligent transportation system, Natural Language Processing (NLP) technology is widely used to identify the address description of the location of traffic incidents such as accidents. The application of this technology helps to quickly locate the address where the traffic incident occurred, greatly improving the efficiency of traffic management and emergency response.
[0003] In the related technology, the input address description is first parsed to identify key information such as place names, street names, landmarks, etc., and the parsed address information is matched with the data in the Geographic Information System (GIS). The GIS system stores detailed map data, including location information of roads, buildings, landmarks, etc. By comparing the input address with the data in the GIS system, the system can find the best matching location. However, the accuracy of this positioning information is difficult to guarantee, especially in the positioning of some special types of road sections, it is even more difficult to guarantee the positioning requirements of high-precision information. Therefore, there is a problem of low accuracy in obtaining positioning information.
[0004] With regard to the problem that it is difficult to obtain accurate positioning information in related technologies, no effective solution has been proposed so far. Summary of the invention
[0005] Based on this, it is necessary to provide a traffic event address positioning method, device, equipment and storage medium that can obtain accurate positioning information in response to the above technical problems.
[0006] In a first aspect, a method for locating a traffic event address is provided in this embodiment, including:
[0007] Obtain address description information and corresponding standardized descriptions in traffic events based on text data;
[0008] Performing intersection matching based on the similarity results of the standardized description and the intersections in the road network data, and determining the longitude and latitude information of the corresponding intersection for the address description information matched to the intersection;
[0009] For the address description information that is not matched to an intersection, POI matching is performed based on the address description information and the road network data to determine a POI result corresponding to the address description information;
[0010] By calculating the distance between the POI result and the intersection and road section in the road network data, the longitude and latitude information of the intersection or road section corresponding to the address description information is determined according to a preset distance threshold;
[0011] Based on the longitude and latitude information of the intersection or road section matched with the address description information, the location information of the traffic event address is determined.
[0012] In some embodiments, the step of obtaining address description information and corresponding standardized description in a traffic event based on text data includes:
[0013] Extracting the address description information of the traffic event in the text data based on natural language processing technology;
[0014] The address description information is traversed to perform road name preprocessing to obtain a standardized description of the address description information.
[0015] In some of the embodiments, before performing intersection matching based on the similarity results of the standardized description and the intersections in the road network data, the method further includes:
[0016] Based on a first similarity algorithm and a second similarity algorithm, respectively calculating a first text similarity and a second text similarity of the standardized description and the intersection;
[0017] The similarity result is determined based on the first text similarity and the second text similarity.
[0018] In some of the embodiments, it also includes:
[0019] When the matching between the standardized description and the road network data meets a preset condition, the similarity result is adjusted accordingly to obtain the adjusted similarity result.
[0020] In some embodiments, performing POI matching based on the address description information and the road network data to determine a POI result corresponding to the address description information includes:
[0021] Determine the POI information in the address description information;
[0022] The similarity result of the POI information and the POI candidate set in the road network data is calculated to match and determine the corresponding POI result for the address description information according to the similarity result.
[0023] In some of the embodiments, it also includes:
[0024] The POI data in the road network data is pre-screened based on a hash algorithm to obtain the POI candidate set.
[0025] In some embodiments, calculating the distance between the POI result and the intersection and road section in the road network data to determine the longitude and latitude information of the intersection or road section corresponding to the address description information according to a preset distance threshold includes:
[0026] Dividing the road network data into a plurality of grids in advance; each of the grids is divided into intersections and road sections;
[0027] Determine the target grid where the POI result is located;
[0028] Calculating a first distance between the POI result and an intersection in the target grid, and a second distance between the POI result and a road section in the target grid;
[0029] When the first distance is less than or equal to a first distance threshold, determining the longitude and latitude information matching the address description information according to the longitude and latitude information of the corresponding intersection;
[0030] When the first distance is greater than the first distance threshold and the second distance is less than or equal to the second distance threshold, the longitude and latitude information matching the address description information is determined according to the longitude and latitude information of the corresponding road section.
[0031] In a second aspect, a traffic event address locating device is provided in this embodiment, including:
[0032] An information acquisition module, used to acquire address description information and corresponding standardized description in traffic events based on text data;
[0033] An intersection matching module, used for matching intersections based on the similarity results of the standardized description and the intersections in the road network data, and determining the longitude and latitude information of the corresponding intersection for the address description information matched to the intersection;
[0034] A POI matching module is used to perform POI matching based on the address description information and the road network data for the address description information that is not matched to an intersection, and determine a POI result corresponding to the address description information; by calculating the distance between the POI result and the intersection and road section in the road network data, so as to determine the longitude and latitude information of the intersection or road section corresponding to the address description information according to a preset distance threshold;
[0035] Based on the longitude and latitude information of the intersection or road section matched with the address description information, the location information of the traffic event address is determined.
[0036] In a third aspect, a computer device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the traffic event address location method described in the first aspect when executing the computer program.
[0037] In a fourth aspect, in this embodiment, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method for locating the address of a traffic incident described in the first aspect above is implemented.
[0038] Compared with the related art, the traffic event address positioning method, device, equipment and storage medium provided in this embodiment obtain address description information and corresponding standardized description in the traffic event based on text data; perform intersection matching based on the similarity results of the standardized description and the intersection in the road network data, and determine the longitude and latitude information of the corresponding intersection for the address description information matched to the intersection; for the address description information not matched to the intersection, perform POI matching based on the address description information and the road network data to determine the POI result corresponding to the address description information; calculate the distance between the POI result and the intersection and section in the road network data to determine the longitude and latitude information of the intersection or section corresponding to the address description information according to a preset distance threshold; determine the positioning information of the traffic event address based on the longitude and latitude information of the intersection or section matched by the address description information. Through this embodiment, the acquired address description information is matched with the road network data for intersection matching to determine the longitude and latitude information of the corresponding intersection; for the address description information that is not matched to an intersection, the address description information is matched with the road network data for POI matching to determine the intersection or road section that meets the preset distance threshold based on the matched POI results, thereby determining the longitude and latitude information of the traffic event location, solving the problem of difficulty in obtaining accurate location information.
[0039] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0041] Figure 1 is a block diagram of the hardware structure of a method for locating a traffic event address in an embodiment;
[0042] Figure 2 is a flow chart of a method for locating a traffic incident address in an embodiment;
[0043] Figure 3 is a schematic diagram of a second distance in an embodiment;
[0044] Figure 4 is a flow chart of a method for locating a traffic incident address in another embodiment;
[0045] Figure 5 is a schematic diagram of a method for locating a traffic incident address in an embodiment;
[0046] Figure 6 It is a structural block diagram of a traffic incident address locating device in an embodiment.
[0047] In the figure: 102, processor; 104, memory; 106, transmission device; 108, input and output device; 10, information acquisition module; 20, intersection matching module; 30, POI matching module; 40, address positioning module. DETAILED DESCRIPTION
[0048] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0049] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0050] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 FIG. 1 is a hardware structure diagram of a terminal of the traffic incident address location method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0051] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the traffic incident address location method in the present embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0052] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0053] In the current intelligent transportation system, Natural Language Processing (NLP) technology is widely used to identify the address description of the location of traffic incidents such as accidents. The application of this technology helps to quickly locate the address where the traffic incident occurred, greatly improving the efficiency of traffic management and emergency response.
[0054] In the related technology, the input address description is first parsed to identify key information such as place names, street names, landmarks, etc., and the parsed address information is matched with the data in the Geographic Information System (GIS). The GIS system stores detailed map data, including location information of roads, buildings, landmarks, etc. By comparing the input address with the data in the GIS system, the system can find the best matching location. However, the accuracy of this positioning information is difficult to guarantee, especially in the positioning of some special types of road sections, it is even more difficult to guarantee the positioning requirements of high-precision information. Therefore, there is a problem of low accuracy in obtaining positioning information.
[0055] In this embodiment, a method for locating a traffic incident address is provided. Figure 2 is a flow chart of the method for locating the address of a traffic incident in this embodiment. Figure 2 As shown, the method comprises the following steps:
[0056] Step S210: Acquire address description information and corresponding standardized description in the traffic event based on text data.
[0057] Specifically, road traffic incidents generally occur on roads and around roads. When an accident or other traffic incident occurs, relevant personnel or the public report the traffic incident to the traffic law enforcement agency, and will use natural language to describe the actual situation of the traffic incident and the location where it occurred, and correspondingly generate text data recording the traffic incident. In addition, in some cases, traffic law enforcement personnel will also record the location of the traffic incident, and correspondingly generate text data recording the traffic incident. The text data includes address description information, and natural language recognition is performed based on the text data to extract the address description information for the address where the traffic incident occurred.
[0058] Since the address description information obtained from the text data is usually more colloquial in natural language and does not have a unified and standardized form of description, the address description information is preprocessed with road names to obtain a standardized description in the naming format of a standard two-road intersection, for example, the intersection of Renmin Road and Ren'ai Road.
[0059] In road name preprocessing, corresponding stop words, intersection keywords and connection keywords can be set in advance for different regions, and the address description information can be processed by stop word filtering, word segmentation, reorganization, etc. to obtain a standardized description to better locate the address where the traffic incident occurred.
[0060] Step S220, performing intersection matching based on the similarity results of the standardized description and the intersections in the road network data, and determining the longitude and latitude information of the corresponding intersection for the address description information matched to the intersection.
[0061] Specifically, the intersection data in the road network data is traversed, and the similarity result of each intersection and the standardized description is calculated using the address noun similarity algorithm. According to the similarity result, the address description information is matched with the intersection. If the similarity result meets the preset similarity threshold, it means that the address description information is matched to the corresponding intersection, that is, the most similar intersection. If the similarity result does not meet the preset similarity threshold, it means that the address description information is not matched to the corresponding intersection. For the address description information matched to the corresponding intersection, the longitude and latitude information of the matching intersection is determined to locate the address of the traffic event according to the matching intersection.
[0062] Among them, the intersection data includes intersections, road sections, POI (Point of Interest) data and corresponding latitude and longitude information. POI refers to any meaningful point in the road network data that has no geographical significance, such as shops, bars, gas stations, hospitals, train stations, etc. POI data includes but is not limited to the name, address, coordinates, category, etc. of the point of interest.
[0063] Step S230: For the address description information that is not matched to the intersection, POI matching is performed based on the address description information and the road network data to determine the POI result corresponding to the address description information.
[0064] Specifically, after the above-mentioned intersection matching, for the address description information that is not matched to the corresponding intersection, POI matching is further performed, that is, the similarity result of each POI data and the address description information is calculated using the address and road name similarity algorithm, and the address description information is matched with POI according to the similarity result. If the similarity result meets the preset similarity threshold, it means that the address description information is matched to the corresponding POI result, that is, the most similar POI result. If the similarity result does not meet the preset similarity threshold, it means that the address description information is not matched to the corresponding POI result. For the address description information that matches the corresponding POI result, the longitude and latitude information of the matching POI result is determined.
[0065] Step S240, by calculating the distance between the POI result and the intersection and road section in the road network data, the longitude and latitude information of the intersection or road section corresponding to the address description information is determined according to a preset distance threshold.
[0066] Specifically, based on the latitude and longitude information of the POI results and the latitude and longitude information of intersections and road sections in the road network data, the address distance algorithm is used to calculate the distances between the POI results and the intersections and road sections, respectively, so as to determine the intersection or road section corresponding to the address description information according to a preset distance threshold, that is, the intersection or road section closest to the POI result matching the address description information, and determine the latitude and longitude information of the matching intersection or road section, so as to locate the address of the traffic event according to the matching intersection or road section.
[0067] Step S250, determining the location information of the traffic event address based on the longitude and latitude information of the intersection or road section matched with the address description information.
[0068] Specifically, for the address description information that matches the corresponding intersection, the address of the traffic event is located according to the matching intersection, and the longitude and latitude information of the matching intersection is used as the location information of the address of the traffic event. For the address description information that does not match the corresponding intersection, the corresponding intersection or road section is determined according to the matching POI result, and the longitude and latitude information of the matching intersection or road section is used as the location information of the address of the traffic event.
[0069] Through the above steps, in this embodiment, the address description information of the traffic event is directly extracted from the text data, and a standardized description that can be used for subsequent intersection matching is obtained through road name preprocessing; the obtained address description information is matched with the road network data for intersection matching to determine the longitude and latitude information of the corresponding intersection; for the address description information that is not matched to the intersection, the address description information is matched with the road network data for POI matching to determine the intersection or road section that meets the preset distance threshold based on the matched POI result, thereby determining the longitude and latitude information of the traffic event location based on the matched intersection or road section. Compared with the prior art, it can accurately obtain positioning information with longitude and latitude information, which solves the problem of difficulty in obtaining accurate positioning information.
[0070] Furthermore, based on the location information of the traffic event, the address where the traffic event occurred can be marked on a map for display, or the location information can be used for subsequent analysis, for example, some coordinate-based data analysis functions.
[0071] In some embodiments, the step S210 of acquiring the address description information and the corresponding standardized description in the traffic event based on the text data includes the following steps:
[0072] Step S211: extracting address description information of traffic events from text data based on natural language processing technology.
[0073] Specifically, natural language processing can be performed on the input text data recording traffic events using a BiLSTM (Bidirectional Long Short-Term Memory Network) and CRF (Conditional Random Field) model framework, where the BiLSTM layer captures the contextual information of the text data through the forward and backward LSTM (Long Short-Term Memory Network), respectively, and then concatenates the outputs of the two. The CRF layer is used to receive the output of the BiLSTM layer, learn the transition probability between labels, and output the global optimal label sequence, i.e., the address description information.
[0074] Step S212, traverse the address description information to perform road name preprocessing to obtain a standardized description of the address description information.
[0075] Specifically, corresponding stop words, intersection keywords and connection keywords can be set in advance for different regions, and the address description information can be processed by stop word filtering, word segmentation, reorganization, etc. to obtain a standardized description of the standard two-way intersection naming format.
[0076] The following is a process of traversing address description information to perform road name processing in this embodiment:
[0077] First, filter out stop words in the address description information, for example, stop words for road names such as "road" and "avenue", and stop words for relative position descriptions such as "east side" and "north side"; determine whether the address description information after filtering out stop words contains intersection keywords such as "intersection" and "crossroad", and whether the address description information is not completely consistent with the intersection keywords.
[0078] If the judgment is yes, then further determine whether it contains connection keywords such as "and" and "and", and the connection keywords are not the first word in the address description information after filtering the stop words. If the judgment is yes, then use the connection keywords and intersection keywords to segment the address description information to obtain a standardized description; if the judgment is no, then determine whether there are other stop words in the input text data that are located before the address description information and are different from the address description information. If so, the road name of other stop words and the address description information are combined into a standardized description. The judgment here can be analyzed for the situation in which the traffic event address is divided into two sentences in the text data, and the information described in the two sentences is combined into a standardized description.
[0079] If the judgment is no, then further check whether all address description information contains multiple different address information, and whether more than two address information contain stop words, such as "road", "boulevard", etc. If so, record the names of each road to form a standardized description. The further judgment here can be for traffic incidents occurring at intersections, but the text data only describes one road related to the intersection. Therefore, multiple roads for the same traffic incident can be combined into a standardized description.
[0080] Based on natural language processing technology, this embodiment can extract traffic event address description information from the input text data, and perform road name preprocessing such as stop word filtering, word segmentation, and reorganization to obtain a standardized description with a standard two-way intersection naming format, so as to perform subsequent intersection matching with road network data and better locate the address where the traffic event occurred.
[0081] In some of the embodiments, stop words such as roads and POIs set for different regions can be configured for users to better pre-process road names for address description information recognized by natural language, for example, filtering out words that are specifically used in a region, commonly used to represent addresses, and words that represent relative location descriptions near or around addresses, to avoid interference with actual recognition results.
[0082] In some embodiments, before performing intersection matching based on the similarity results of the standardized description and the intersections in the road network data in step S220, the following steps are also included: using an address noun similarity algorithm to calculate the similarity results of each intersection with the standardized description:
[0083] Based on the first similarity algorithm and the second similarity algorithm, the first text similarity and the second text similarity of the standardized description and the intersection are calculated respectively; based on the first text similarity and the second text similarity, a similarity result is determined.
[0084] Specifically, the address noun similarity algorithm includes two parts: a first similarity algorithm and a second similarity algorithm, which respectively calculate the first text similarity and the second text similarity of intersections in the standardized description and the road network data, and based on the first text similarity and the second text similarity, a weighted average calculation is performed to determine the similarity result.
[0085] The first similarity algorithm and the second similarity algorithm may respectively adopt the Jaccard similarity algorithm and the edit distance similarity algorithm.
[0086] The Jaccard similarity algorithm is an algorithm for calculating the similarity between two strings. The specific calculation method of the Jaccard similarity result S1 (i.e. the first text similarity) is as follows:
[0087]
[0088] Among them, l A is the length of the input string A (standardized description), l B is the length of the input string B (intersection), l AB is the number of identical characters in input strings A and B;
[0089] The edit distance similarity algorithm is also an algorithm for calculating the similarity of two strings. The algorithm idea is to calculate the shortest number of operations required for a string to become another character after one or more of the three operations of adding characters, deleting characters, and replacing characters, and record the shortest number of operations required as the edit distance. In this embodiment, the edit distance algorithm is further improved: compared with the operations of adding characters and deleting characters, the operation of replacing characters is set to cost more, that is, the operation of replacing characters is regarded as a two-step operation.
[0090] The specific calculation method of the edit distance similarity result S2 (i.e., the second text similarity) is as follows:
[0091]
[0092] Among them, lev A,B is the edit distance of converting string A (standardized description) into string B (intersection); MaxLength is the length of the longer string between string A and string B.
[0093] In this embodiment, the address noun similarity algorithm is used to calculate the similarity result between each intersection and the standardized description, wherein the weighted result of the two similarity algorithm results can be used as the final similarity result to obtain a more accurate similarity calculation.
[0094] In some embodiments, the step S230 of performing POI matching based on the address description information and the road network data to determine the POI result corresponding to the address description information includes the following steps:
[0095] Step S231, determining POI information in the address description information.
[0096] Specifically, stop words such as "road" and "avenue" are used to extract road names in the address description information, so as to segment the road names and POI information in the address description information. For example, for "a supermarket on Chang'an Road", the road name "Chang'an Road" and the POI information "a supermarket" are determined respectively.
[0097] Step S232, calculating the similarity result of the POI information and the POI candidate set in the road network data, so as to determine the corresponding POI result for the address description information matching according to the similarity result.
[0098] Specifically, for address description information that is not matched to a corresponding intersection, the first similarity algorithm and the second similarity algorithm in the address and road name similarity algorithm are used to calculate the similarity results of each POI data in the road network data and the address description information, and the address description information is matched to the POI according to the similarity results. If the similarity result meets the preset similarity threshold, it means that the address description information is matched to the corresponding POI result, that is, the most similar POI result. If the similarity result does not meet the preset similarity threshold, it means that the address description information is not matched to the corresponding POI result.
[0099] In some of the embodiments, it also includes:
[0100] Based on the hash algorithm, the POI data in the road network data is pre-screened to obtain a POI candidate set.
[0101] Specifically, since the amount of POI data is larger than that of intersection data, it takes more time to match POIs. In this embodiment, a hash algorithm is used to calculate the similarity to perform an initial screening of the POI data, and a POI candidate set is obtained based on the similarity results. The address description information and the POI candidate set are used to match POIs, so as to effectively reduce the amount of calculation and matching time.
[0102] The hash algorithm includes but is not limited to the SimHash (a locality sensitive hash) algorithm. The SimHash algorithm is one of the algorithms for calculating the similarity between two input texts. The specific steps are as follows:
[0103] The input address description information is segmented using a word segmentation algorithm to obtain segmented word vector data. Considering that the input address description information in this embodiment is relatively short and that address nouns will produce deviations after word segmentation, each character of the input string is used as the word segmentation result in the algorithm.
[0104] Hash the word segmentation results and use the local sensitive hashing algorithm to convert the input vector into a hash value, supporting that the closer the original text is, the closer the hash value is; perform weighted calculation on the hash results and convert the input hash values (0 and 1) into weighted positive and negative numbers; merge the weighted values of the hash results of each input word segmentation result to obtain a list of values with only one string for each input string; perform dimensionality reduction on the above results, taking 1 for results greater than 0 and taking 0 for results less than 0 to obtain the final SimHash value, i.e. the similarity result.
[0105] For the SimHash values of two input strings, calculate the Hamming distance between them (that is, the number of bits with different values between two binary digits) and get the final similarity result S H as follows:
[0106]
[0107] Among them, l HM is the Hamming distance between the SimHash values of two strings; l Hash The number of digits of the SimHash value to be set.
[0108] In this embodiment, the address description information that is not matched to the intersection is further matched with POI, so as to obtain the intersection or road section corresponding to the address description information according to the POI matching result. In addition, the POI data in the road network data is pre-screened to obtain a POI candidate set for POI matching, which effectively reduces the amount of calculation and matching time.
[0109] In some of the embodiments, it also includes:
[0110] When the matching between the standardized description and the road network data meets the preset conditions, the similarity result is adjusted accordingly to obtain an adjusted similarity result.
[0111] Specifically, for the intersection matching of the above standardized description and road network data, as well as the POI matching of address description information and road network data, for some cases with a higher degree of matching, the similarity results can be appropriately improved, and for some low-priority texts matched, the similarity results can be appropriately lowered to obtain adjusted similarity results. In this way, when judging whether the match is successful based on the similarity results and the preset similarity threshold, the effectiveness of the match can be improved.
[0112] The following are several feasible preset conditions in this embodiment:
[0113] 1. Compared with normal description address information, locations such as "bus stops" and "parking spaces" should be less likely to be matched as correct results unless the original text contains corresponding content. Therefore, when the standardized description, address description information and road network data contain low-priority text, the preset conditions are met and the similarity results are reduced accordingly;
[0114] 2. For the address description information obtained by natural language recognition, which contains road information input, if its road information can match the road information of the intersection and POI results in the address description information and meets the preset conditions, the similarity result is improved accordingly;
[0115] 3. If the POI data / POI candidate set to be matched is completely contained in the address description information / standardized description and meets the preset conditions, the similarity result is improved accordingly.
[0116] In this embodiment, by adjusting the similarity result according to the matching situation, when judging whether the match is successful based on the similarity result and the preset similarity threshold, the effectiveness of the match can be improved and the probability of successful matching of low-priority texts can be reduced.
[0117] In some embodiments, the above step S240 calculates the distance between the POI result and the intersection and road section in the road network data to determine the longitude and latitude information of the intersection or road section corresponding to the address description information according to a preset distance threshold, including the following steps:
[0118] Step S241, pre-dividing the road network data into a number of grids; each grid is divided into intersections and road sections.
[0119] Specifically, when the POI data of the road network data is read in, the road network data is automatically divided into a number of grids of a certain size according to the GPS (Global Positioning System) distribution of the POI data.
[0120] Read the intersection and section data in the road network data. For the intersection, directly determine whether its longitude and latitude are in a certain grid; for the section, determine the GPS point sequence of the section. When a section contains at least one GPS point in a certain grid, record the section in the grid, and then obtain a list of intersection and section data corresponding to each grid.
[0121] Step S242, determining the target grid where the POI result is located.
[0122] Specifically, for a newly input GPS point (ie, POI result), it is determined whether the point is in a certain grid, thereby determining the target grid where the POI result is located.
[0123] Step S243, calculating a first distance between the POI result and an intersection in the target grid, and a second distance between the POI result and a road section in the target grid.
[0124] When the first distance is less than or equal to the first distance threshold, the longitude and latitude information that matches the address description information is determined based on the longitude and latitude information of the corresponding intersection; when the first distance is greater than the first distance threshold and the second distance is less than or equal to the second distance threshold, the longitude and latitude information that matches the address description information is determined based on the longitude and latitude information of the corresponding road section.
[0125] Specifically, the address distance algorithm is used to calculate the distance between the POI result and the intersection and road section in the target grid. For the intersection, the first distance between the intersection and the POI result can be obtained by calculating the Euclidean distance. For the road section, the GPS sequence of the road section can be traversed, and the adjacent GPS points can be combined into line segments. The distance between the POI result and each line segment is calculated to obtain the second distance between the road segment and the POI result.
[0126] Figure 3is a schematic diagram of the second distance in this embodiment. Assume that the point of the input POI result is P, and the line segment to be calculated for the second distance is AB. The three points P, A, and B are converted into corresponding coordinates in the plane rectangular coordinate system to calculate ∠PAB. Figure 3 As shown in Figure (a), when ∠PAB is greater than or equal to 90°, the second distance between P and AB is the length of line segment PA; Figure 3 As shown in Figure (b), when ∠PAB is less than 90° and ∠PBA is less than 90°, the second distance between P and AB is the distance from P to the perpendicular line of the AB line segment; Figure 3 As shown in Figure (c), when ∠PBA is greater than or equal to 90°, the second distance between P and AB is the length of line segment PB.
[0127] When the first distance is less than or equal to the first distance threshold, the closest intersection is taken as the coordinate adsorption result, and the longitude and latitude information matching the address description information is determined according to the longitude and latitude information of the corresponding intersection; when the first distance is greater than the first distance threshold, and the second distance is less than or equal to the second distance threshold, the closest road section is taken as the coordinate adsorption result, and the longitude and latitude information matching the address description information is determined according to the longitude and latitude information of the corresponding road section; otherwise, there is no coordinate adsorption result. Optionally, the first distance threshold is 20m, and the second distance threshold is 1000m.
[0128] In this embodiment, the matched POI results are bound to the intersections or sections in the corresponding road network through coordinate adsorption, and the address description information of the intersection that is not matched in the intersection matching can be further searched for the closest intersection or section, so as to determine the longitude and latitude information of the address description information based on the longitude and latitude information of the closest intersection or section.
[0129] The present embodiment is described and illustrated below through preferred embodiments.
[0130] Figure 4 is a flow chart of the method for locating the address of a traffic incident in this embodiment. Figure 4 As shown, the method comprises the following steps:
[0131] Step S410, based on natural language processing technology, extract the address description information of the traffic event in the text data; traverse the address description information to perform road name preprocessing to obtain a standardized description of the address description information.
[0132] Step S420, using an address noun similarity algorithm to calculate similarity results between intersections in the road network data and standardized descriptions, to perform intersection matching based on the similarity results and a preset similarity threshold, and to determine corresponding intersections that match the address description information.
[0133] Step S430: pre-screen the POI data in the road network data based on a hash algorithm to obtain a POI candidate set.
[0134] Step S440, for the address description information that has not been matched to an intersection after the intersection matching, the similarity result between the POI candidate set and the address description information is calculated using the address noun similarity algorithm, and the POI matching is performed according to the similarity result and a preset similarity threshold to obtain a POI result.
[0135] Step S450, pre-dividing the road network data into a number of grids; each grid is divided into intersections and road sections; and determining the target grid where the POI result is located.
[0136] Step S460, using an address distance algorithm to calculate a first distance between the POI result and the intersection, and a second distance between the POI result and the road section, respectively, to determine the longitude and latitude information of the intersection or road section corresponding to the address description information according to a preset distance threshold.
[0137] Step S470, determining the location information of the traffic event address based on the longitude and latitude information of the intersection or road section matched with the address description information.
[0138] It should be noted that the steps shown in the above process or the flowchart in the attached figure can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here. For example, the step of filtering and obtaining the POI candidate set in step S430 can be performed in advance before the POI matching.
[0139] Figure 5 is a schematic diagram of the traffic incident address locating method in this embodiment. Figure 5 As shown, the text data of the traffic event is input, and natural language processing is performed to obtain the address description information. The address description information is traversed to perform road name preprocessing, first removing the road name stop words and relative position stop words, and then judging whether the address description information contains the intersection keyword and is not completely consistent with the intersection keyword.
[0140] If the judgment is yes, further determine whether it contains connection keywords and the connection keywords are not at the beginning of the sentence. If the judgment is yes, process the address description information into a standardized description; if the judgment is no, further determine whether there are other stop words before the address description and they are different. If the judgment is yes, combine the two address description information into a standardized description; if the judgment is no, it means that there is no match, and further perform POI matching.
[0141] If the judgment is no, further judge whether it contains multiple different address information with stop words. If the judgment is yes, the two address description information are combined into a standardized description; if the judgment is no, there is no match.
[0142] The similarity between the standardized description and the intersection in the road network data is calculated using the address noun similarity algorithm, and it is determined whether the similarity result is greater than the preset similarity threshold. If it is determined to be yes, the latitude and longitude information of the matching intersection is output as the location information of the traffic event; if it is determined to be no, it means that there is no match, and further POI matching is performed.
[0143] In POI matching, the POI data in the road network data is first screened to obtain a POI candidate set, the POI candidate set is traversed, and the address noun similarity algorithm is used to calculate the similarity result between the address description information and the POI candidate set, and it is determined whether the similarity result is greater than a preset similarity threshold. In POI matching, the road network data is read in and the road network data is gridded in advance.
[0144] If the judgment is yes, coordinate adsorption is performed based on the matched POI result, the intersection or road section closest to the POI result is determined, and the longitude and latitude information of the intersection or road section is output as the positioning information of the traffic event; if the judgment is no, it means that there is no match.
[0145] In this embodiment, the address description information of the traffic event is directly extracted from the text data, and a standardized description that can be used for subsequent intersection matching is obtained through road name preprocessing; the obtained address description information is matched with the road network data for intersection matching and POI matching, and the longitude and latitude information of the corresponding intersection or road section is determined, thereby determining the longitude and latitude information of the traffic event location based on the matched intersection or road section. Compared with the existing technology, it is possible to accurately obtain positioning information with longitude and latitude information, thereby solving the problem of difficulty in obtaining accurate positioning information.
[0146] Furthermore, based on the location information of the traffic event, the address where the traffic event occurred can be marked on a map for display, or the location information can be used for subsequent analysis, for example, some coordinate-based data analysis functions.
[0147] In this embodiment, a traffic event address location device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated here. The terms "module", "unit", "subunit" and the like used below can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceivable.
[0148] Figure 6 is a structural block diagram of the traffic incident address locating device of this embodiment, such as Figure 6 As shown, the device comprises:
[0149] The information acquisition module 10 is used to acquire address description information and corresponding standardized description in the traffic event based on text data.
[0150] The intersection matching module 20 is used to match intersections based on the similarity results of the standardized description and the intersections in the road network data, and to determine the longitude and latitude information of the corresponding intersection for the address description information matched to the intersection.
[0151] The POI matching module 30 is used to perform POI matching based on the address description information and the road network data for address description information that is not matched to an intersection, and determine the POI result corresponding to the address description information; by calculating the distance between the POI result and the intersection and section in the road network data, the longitude and latitude information of the intersection or section corresponding to the address description information is determined according to a preset distance threshold.
[0152] The address positioning module 40 is used to determine the positioning information of the traffic event address based on the longitude and latitude information of the intersection or road section matched with the address description information.
[0153] Through the device provided in this embodiment, the address description information of the traffic event is directly extracted from the text data, and a standardized description that can be used for subsequent intersection matching is obtained through road name preprocessing; the obtained address description information is matched with the road network data for intersection matching to determine the longitude and latitude information of the corresponding intersection; for the address description information that is not matched to the intersection, the address description information is matched with the road network data for POI matching to determine the intersection or road section that meets the preset distance threshold based on the matched POI result, thereby determining the longitude and latitude information of the traffic event location based on the matched intersection or road section. Compared with the prior art, it is possible to accurately obtain positioning information with longitude and latitude information, thereby solving the problem of difficulty in obtaining accurate positioning information.
[0154] Furthermore, based on the location information of the traffic event, the address where the traffic event occurred can be marked on a map for display, or the location information can be used for subsequent analysis, for example, some coordinate-based data analysis functions.
[0155] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0156] In this embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0157] Optionally, the computer device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0158] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.
[0159] In addition, in combination with the traffic incident address location method provided in the above embodiments, a storage medium can also be provided in this embodiment to implement the method. The storage medium stores a computer program; when the computer program is executed by a processor, any traffic incident address location method in the above embodiments is implemented.
[0160] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by relevant law enforcement agencies.
[0161] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0162] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
[0163] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.
[0164] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A method for locating a traffic incident address, characterized in that: include: Obtain address description information and corresponding standardized descriptions in traffic events based on text data; Performing intersection matching based on the similarity results of the standardized description and the intersections in the road network data, and determining the longitude and latitude information of the corresponding intersection for the address description information matched to the intersection; For the address description information that is not matched to an intersection, POI matching is performed based on the address description information and the road network data to determine a POI result corresponding to the address description information; By calculating the distance between the POI result and the intersection and road section in the road network data, the longitude and latitude information of the intersection or road section corresponding to the address description information is determined according to a preset distance threshold; wherein the following steps are included: Dividing the road network data into a plurality of grids in advance; each of the grids is divided into intersections and road sections; Determine the target grid where the POI result is located; Calculating a first distance between the POI result and an intersection in the target grid, and a second distance between the POI result and a road section in the target grid; When the first distance is less than or equal to a first distance threshold, determining the longitude and latitude information matching the address description information according to the longitude and latitude information of the corresponding intersection; When the first distance is greater than the first distance threshold, and the second distance is less than or equal to the second distance threshold, determining the longitude and latitude information matching the address description information according to the longitude and latitude information of the corresponding road section; Based on the longitude and latitude information of the intersection or road section matched with the address description information, the location information of the traffic event address is determined.
2. The method for locating the address of a traffic incident according to claim 1, characterized in that: The method of acquiring address description information and corresponding standardized description in a traffic event based on text data includes: Extracting the address description information of the traffic event in the text data based on natural language processing technology; The address description information is traversed to perform road name preprocessing to obtain a standardized description of the address description information.
3. The method for locating a traffic incident address according to claim 1, characterized in that: Before performing intersection matching based on the standardized description and the similarity result of the intersection in the road network data, the method further includes: Based on a first similarity algorithm and a second similarity algorithm, respectively calculating a first text similarity and a second text similarity of the standardized description and the intersection; The similarity result is determined based on the first text similarity and the second text similarity.
4. The method for locating the address of a traffic incident according to claim 3, characterized in that: Also includes: When the matching between the standardized description and the road network data meets a preset condition, the similarity result is adjusted accordingly to obtain the adjusted similarity result.
5. The method for locating the address of a traffic incident according to claim 1, characterized in that: The performing POI matching based on the address description information and the road network data to determine a POI result corresponding to the address description information includes: Determine the POI information in the address description information; The similarity result of the POI information and the POI candidate set in the road network data is calculated to match and determine the corresponding POI result for the address description information according to the similarity result.
6. The method for locating the address of a traffic incident according to claim 5, characterized in that: Also includes: The POI data in the road network data is pre-screened based on a hash algorithm to obtain the POI candidate set.
7. A traffic incident address locating device, characterized in that: include: An information acquisition module, used to acquire address description information and corresponding standardized description in traffic events based on text data; An intersection matching module, used for matching intersections based on the similarity results of the standardized description and the intersections in the road network data, and determining the longitude and latitude information of the corresponding intersection for the address description information matched to the intersection; The POI matching module is used for performing POI matching based on the address description information and the road network data for the address description information that is not matched to the intersection, and determining the POI result corresponding to the address description information; by calculating the distance between the POI result and the intersection and road section in the road network data, so as to determine the longitude and latitude information of the intersection or road section corresponding to the address description information according to a preset distance threshold; wherein, the following steps are included: Dividing the road network data into a plurality of grids in advance; each of the grids is divided into intersections and road sections; Determine the target grid where the POI result is located; Calculating a first distance between the POI result and an intersection in the target grid, and a second distance between the POI result and a road section in the target grid; When the first distance is less than or equal to a first distance threshold, determining the longitude and latitude information matching the address description information according to the longitude and latitude information of the corresponding intersection; When the first distance is greater than the first distance threshold, and the second distance is less than or equal to the second distance threshold, determining the longitude and latitude information matching the address description information according to the longitude and latitude information of the corresponding road section; The address positioning module is used to determine the positioning information of the traffic event address based on the longitude and latitude information of the intersection or road section matched with the address description information.
8. A computer device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the traffic event address locating method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for locating the address of a traffic event according to any one of claims 1 to 6 are implemented.
