Ecological environment protection supervision-based large language model address resolution and geographic coding acquisition method and system
By combining a large language model and a dynamic part-of-speech system with a multi-level fault-tolerance mechanism, the problem of parsing non-standard addresses in environmental protection inspections has been solved, achieving efficient and accurate address parsing and positioning, and ensuring data security and response speed.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Filing Date
- 2026-02-26
- Publication Date
- 2026-07-14
AI Technical Summary
Existing address resolution technologies face challenges in environmental protection inspections, including the semantic diversity of non-standardized address descriptions, fragmented lexical segmentation, ambiguity in spatial feature mapping, and resolution efficiency bottlenecks under privacy and security constraints, resulting in low positioning accuracy and efficiency.
Using a large language model for semantic parsing, combined with a dynamic part-of-speech system and a multi-level fault-tolerance mechanism, and through local POI database retrieval and network geographic information services, we can achieve efficient and accurate address parsing and positioning.
It achieves deep understanding and efficient parsing of non-standard addresses, ensuring the privacy and security of environmental protection inspection data, improving the accuracy and response speed of address resolution, and reducing the risk of location errors and data leakage.
Smart Images

Figure CN122389808A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of geographic information technology and natural language processing, specifically involving a method and system for address parsing and geocoding based on a large language model of ecological and environmental protection supervision. Background Technology
[0002] In the environmental protection inspection process, the data of public complaints submitted through channels such as telephone and the internet constitute the core intelligence source for environmental supervision, which contains a large number of key clues such as illegal discharge, illegal dumping of solid waste, air pollution and ecological damage.
[0003] However, existing address processing technologies face significant challenges when converting massive amounts of petition data into geocoding to support on-site law enforcement location for inspectors: 1. Semantic Diversity and Unstructured Barriers in Natural Language Description: Petition data often originates from colloquial expressions used by the public, exhibiting high levels of non-standardization and redundancy. Complainants frequently use address fragments lacking standard administrative divisions (province, city, district, street), such as "the riverbank at the entrance of XX village" or "the chimney of the chemical plant behind the development zone." Traditional geocoding engines based on rule matching or template parsing struggle to bridge the mapping gap between natural language semantics and structured geographic elements when faced with such highly unstructured text, resulting in low extraction rates of core address elements.
[0004] 2. Fragmentation of Lexical Segmentation Leading to Local Database Matching Failures: Existing word segmentation tools (such as the uncustomized HanLP) often exhibit fragmentation when processing addresses containing specific POIs (Points of Interest) due to the lack of a targeted part-of-speech tagging system. For example, incorrectly segmenting "Dongfang Living Community" into "Dongfang / Living / Community" prevents the system from associating the fragmented words with complete POI entries in the local address database, resulting in serious missed matching issues. This can lead to significant locational errors when dealing with environmental responsibility area delineation.
[0005] 3. Ambiguity and Vagueness in Spatial Feature Mapping: Petition texts commonly contain place names with the same name (e.g., multiple "industrial parks" across the country), abbreviations of regions (e.g., "Hexi"), and descriptions of relative locations (e.g., "across the street," "next to the vegetable market"). Traditional techniques are essentially based on symbolic logical reasoning, lacking the semantic understanding capabilities of deep learning. They struggle to disambiguate in complex contexts and cannot accurately determine the spatial consistency of address descriptions.
[0006] 4. Efficiency and Cost Bottlenecks in Parsing Under Privacy and Security Constraints: Ecological and environmental supervision data involves sensitive regulatory information, and directly calling public cloud network map APIs poses a significant risk of data privacy leakage. However, relying on manual verification, with tens of thousands of complaints received annually, requires an average of 5-10 minutes of manual verification per address. This inefficient processing model creates a serious response bottleneck, easily causing inspectors to miss the "first scene" of pollution discharge, weakening the timeliness and deterrent effect of environmental supervision.
[0007] Therefore, how to build an address interpretation system that can deeply understand the semantics of environmental complaints, take into account the protection of local data privacy, and have sub-millisecond high-concurrency processing capabilities has become a key technical issue that urgently needs to be addressed to improve the effectiveness of ecological and environmental supervision and optimize the environmental governance system. Summary of the Invention
[0008] To address the aforementioned technical problems, this invention proposes a method for address parsing and geocoding based on a large language model of ecological and environmental protection supervision, comprising the following steps: Step S1: Obtain the non-standard address text to be parsed Standardize and concatenate the data; construct prompt words. ; Call the Large Language Model (LLM) to process the non-standard address text. Perform semantic parsing to extract structured address information. ; Step S2: Transfer the structured address information Search the local POI database to obtain candidate local POI data. If no exact match is found, the structured address information is processed using a dynamic part-of-speech tagging system. Perform word resegmentation and standardization, and then query the local POI database again based on the standardized address entities; Step S3: If the candidate local POI data was obtained in step S2 Calculate the structured address information With the candidate local POI data The semantic similarity is calculated, and the geographical distance is calculated in combination with the geographic location information; when the semantic similarity and the geographical distance simultaneously meet a preset consistency condition, the local POI data is output. As a result; Step S4: If steps S2 or S3 fail to obtain valid results, call the network geographic information service interface to perform a query; if the query result passes the consistency verification, output it; otherwise, call the semantically simplified large language model. Semantically simplify the original address and use the simplified address. Perform online query and verification again.
[0009] Specifically, in step S1, the invocation of the large language model for semantic parsing includes: employing a three-level fault-tolerant mechanism to determine the structured address information. Specifically, it includes: Level 1 fault tolerance, which verifies the validity of the structured address output by the large language model; Level 2 fault tolerance, which extracts the address by parsing rules based on regular expressions if Level 1 is invalid; and Level 3 fault tolerance, which directly passes the original address text as valid input to subsequent steps if Level 2 is invalid.
[0010] Specifically, in step S1, prompt words are constructed. It includes the task description. Analytical constraints Example and output format The four-part prompt.
[0011] Specifically, in step S2, the specific steps for standardization using the dynamic part-of-speech tagging system include: Define extended part-of-speech tags It is specifically used to identify valid address entities in the local POI database; Initialize the word segmentation dictionary And map the names in the local POI database to the extended part-of-speech tags. ; For the structured address information Perform word segmentation and extract part-of-speech tags. lexical set : ; ; in, It is a smart word segmentation operation function The set of tokens obtained after segmenting the structured address information is provided, and each token in the set is labeled with part-of-speech tagging.
[0012] Extracted lexical set As the core address entity, a precise match is performed again in the local POI database to determine whether the candidate local POI data is obtained. .
[0013] Specifically, the dynamic part-of-speech tagging system method supports real-time hot reloading and updating, including: The local POI database uses a memory-cached approach. To manage in order to achieve Query response time complexity When a new address entry is added to the local POI database At that time, the system automatically completes a triple synchronization operation: writing to persistent storage and updating the memory cache. And trigger the custom dictionary in the HanLP word segmentation engine. Real-time hot reloading.
[0014] Specifically, the overall lookup time for address resolution Based on cache query time Main query time and cache hit rate The following performance model is determined and meets the following criteria: = + .(1- ) in, With sub-millisecond response time, main query time This represents the time required for the system to access the underlying local database storage or call network services when data is not in the memory cache. The dynamic part-of-speech tagging system ensures a high cache hit rate. In higher scenarios, Approaching .
[0015] Specifically, in step S3, the semantic similarity is calculated as follows: Using Chinese semantic model ( Calculate the original address vectors respectively and candidate POI address vector Calculate the cosine similarity between the two: ; in This represents structured address information, and its address vector is... , This represents the candidate addresses matched in the local POI database, and its address vector is... ; The geographical distance is calculated using the Haversine formula: intermediate variables , For the Earth's radius, and These are the differences in latitude and longitude, respectively. Represents the original address vector and candidate POI address vector Angle in a high-dimensional semantic space This refers to the candidate local POI data retrieved from the local POI database. The corresponding local latitude coordinates; This represents the reference latitude coordinates obtained through the network geographic information service interface and used as a verification benchmark.
[0016] Specifically, in step S4, the process of calling the large language model to perform semantic simplification of the original address is as follows: If the original address and the address returned by the network service are determined to be different locations through semantic comparison, input the original address into the large language model. Utilize concise prompts The model is required to retain the minimum core identifier information and generate a simplified address. The simplified address The network geographic information service is invoked again as a new parameter.
[0017] Specifically, in step S4, If the simplified address If no matching results are found in the online geographic information service query, a second simplification is triggered, automatically truncating to the next higher level of administrative division or road name for fuzzy search.
[0018] This invention also discloses a large-scale predictive model address resolution and geographic information query system based on ecological and environmental protection supervision, comprising: The semantic parsing module is used to obtain the non-standard address text to be parsed. Standardize and concatenate the data; construct prompt words. ; Call the Large Language Model (LLM) to process the non-standard address text. Perform semantic parsing to extract structured address information. ; The local POI database query module is used to retrieve the structured address information. Search the local POI database to obtain candidate local POI data. If no exact match is found, the structured address information is processed using a dynamic part-of-speech tagging system. Perform word resegmentation and standardization, and then query the local POI database again based on the standardized address entities; The online supplementary query module is used when the local POI database query module obtains the candidate local POI data. Calculate the structured address information With the candidate local POI data The semantic similarity is calculated, and the geographical distance is calculated in combination with the geographic location information; when the semantic similarity and the geographical distance simultaneously meet a preset consistency condition, the local POI data is output. As a result; The verification decision module is used to call the network geographic information service interface to query if the local POI database query module or the online supplementary query module fails to obtain valid results. If the query result passes the consistency verification, it is output; otherwise, the semantically simplified large language model is invoked. Semantically simplify the original address and use the simplified address. Perform online query and verification again.
[0019] Using the method of the present invention, I. Overcoming the challenge of parsing colloquial descriptions in environmental petitions to achieve accurate extraction of semantic clues. This invention significantly improves the system's ability to parse non-standard, colloquial environmental complaint texts by constructing a four-part prompt format—task description, parsing constraints, a few examples, and output format—tailored to environmental inspection scenarios. Unlike traditional keyword matching, the large language model can deeply understand non-standard expressions in public complaints, such as "sewage outlet behind the chemical plant" or "upstream of the small river at the village entrance," accurately extracting unique and practically applicable structured address information, providing high-precision semantic support for the initial identification of pollution sources.
[0020] II. Establish a multi-level fault-tolerance and safeguard mechanism to ensure the integrity and high availability of inspection and enforcement leads. To address the extreme case of disordered environmental complaint data formats, this invention introduces a three-level fault-tolerant funnel consisting of a large language model, regular expressions, and the original text. This logic, through step-by-step verification and hierarchical filtering, ensures that even when automated parsing encounters anomalies, the system can automatically downgrade and retain the original address information, effectively preventing the loss of crucial pollution discharge clues and ensuring that every environmental pollution complaint clue enters the processing flow, greatly improving the system's stability.
[0021] III. An innovative environmental-specific dynamic part-of-speech system addresses the pain point of accurately anchoring complex pollution source entities. This invention addresses the local matching failures caused by incorrect segmentation of specific entities such as key pollutant discharge units and water source protection areas in traditional tools by introducing environment-specific dynamic part-of-speech tags. By deeply integrating an environmentally specific location dictionary into the word segmentation engine, the system can recognize complex address names as a whole. This mechanism ensures that even with extremely redundant address descriptions, the system can accurately capture core pollution source entities, significantly improving the matching success rate and anti-interference capability of the local database.
[0022] IV. Achieve real-time detection of newly added pollution source locations to support the dynamic updating needs of practical inspections. This invention supports real-time hot-loading updates of the word segmentation dictionary. When new pollution discharge permit holders are added to the environmental protection database or new pollution sources are discovered during on-site inspections, the system can expand its recognition capabilities in real time without restarting the service or retraining the model. This dynamic update strategy enables the system to keep pace with the real-time progress of inspection work, achieving rapid identification of massive amounts of dynamically changing environmental location data.
[0023] V. Balancing rapid response with regulatory data security to ensure privacy compliance in oversight operations. Considering the sensitivity of environmental inspection data, this invention adopts a local-first processing mode, coupled with high-performance memory caching technology, to resolve most high-frequency queries within a controlled internal network. This design enables location query response times to reach sub-millisecond levels, significantly reducing waiting time for inspectors during mobile enforcement operations. Simultaneously, it effectively avoids the risk of leaking sensitive original complaint information to external public platforms, ensuring the security of national regulatory data.
[0024] VI. Introduce a dual semantic and geographical verification mechanism to eliminate blind spots in supervision caused by misallocation of law enforcement resources. To ensure the legal rigor of the location results, this invention introduces a dual verification of semantic similarity and geographical distance. The system only outputs a result when both the semantic description of the address and its geographical coordinates simultaneously meet preset conditions. This mechanism effectively prevents errors caused by overlapping address names, ensuring that inspectors can accurately reach the complaint site and significantly improving the accuracy and reliability of the final location results.
[0025] VII. Establish a semantically concise closed-loop retry strategy to overcome the bottleneck of positioning success rate under fuzzy description. To address the low success rate of online queries due to overly redundant or ambiguous address descriptions, this invention utilizes a large language model to simplify addresses, retaining only the smallest and most essential identifying information before retrying. This closed-loop strategy solves the problem of accurately locating complex and redundant addresses in map services, significantly improving the final location success rate for difficult addresses. Attached Figure Description
[0026] Figure 1 This is a flowchart of the address resolution and geographic information acquisition method proposed in this invention; Figure 2 This is a block diagram of the address resolution and geographic information acquisition system proposed in this invention. Detailed Implementation
[0027] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0028] This invention discloses a method for address parsing and geocoding acquisition based on a large language model of ecological and environmental protection supervision, such as... Figure 1 As shown, it includes the following steps: Step S1: Obtain the non-standard address text to be parsed Standardize and concatenate the data; construct prompt words. ; Call the Large Language Model (LLM) to process the non-standard address text. Perform semantic parsing to extract structured address information. ; S1.1 Text Normalization and Input Preparation This step aims to obtain the non-standard address text to be parsed. It may originate from user complaints, on-site records, or other heterogeneous input fields from multiple sources. To ensure the accuracy of subsequent Large Language Model (LLM) processing, the original information fields are first normalized and concatenated. 1. The input text is semantically parsed and output as a structured address. (1) The input original information fields are standardized and concatenated to form a unified text input, which serves as the basis for subsequent address parsing.
[0029] (2) Call the Large Language Model (LLM) to perform semantic parsing on the concatenated long text and accurately extract the unique, specific and practically locatable problem points. The model output is a structured address.
[0030] In large-scale text processing, address information is characterized by diverse formats, semantic redundancy, and strong noise interference. Traditional rule-based or single-model methods are prone to missed or incorrect extraction in long text scenarios. Large Language Models (LLMs) can achieve high accuracy and efficiency in parsing address elements in long texts through systematic prompt word engineering.
[0031] The prompt words are designed for long text parsing and follow a four-part structure: "task-constraint-example-format". 1. Task Description: The task requires identifying complete and addressable address fragments and elements from a long text.
[0032] 2. Analytical constraints: - The original chain of evidence must be maintained; fabrication is not allowed. - Only extract address objects directly related to the event. -Detailed labeling was performed for multiple levels of geographic elements, including province, city, district, street, community, building, and unit. 3. A limited number of examples: covering common variations (vague, redundant, colloquial expressions).
[0033] 4. Output format: JSON output is mandatory for easier programming and post-processing.
[0034] Input Acquisition: The system receives a series of raw information fields. (For example, main information, event description, address notes, etc.).
[0035] Standardized splicing: through preprocessing logic These fields are cleaned and concatenated to form a unified long text input for semantic parsing. .
[0036] in, The operation aims to eliminate format differences and potentially redundant delimiters, providing... Provide a consistent input environment.
[0037] S1.2 Large Language Model (LLM) Semantic Parsing and Prompt Word Engineering System call right Perform deep semantic analysis to extract unique, specific, and practically locatable geographic elements, and output structured address information. This is the key innovation of this method in addressing the shortcomings of traditional rule-based methods in parsing non-standard text.
[0038] Four-part prompt structure To ensure To achieve high accuracy and structured output, this method constructs a four-part prompt word structure that follows the "task-constraint-example-format" framework. : Task Description ( The requirement is that the model must identify and extract complete and addressable address fragments and elements from long texts.
[0039] Analytical constraints Mandatory implementation of high-standard analytical requirements: Maintaining the chain of evidence: The original chain of evidence must be maintained, and fabricated or speculative address information is not allowed.
[0040] Refined element labeling: Refined labeling of multi-level geographic elements such as province, city, district, street, community, building, and unit.
[0041] Relevance constraint: Only extract address objects that are directly related to the event.
[0042] A few examples ( ): Provides examples that cover colloquial, redundant, or ambiguous addresses to enhance the model’s ability to generalize to complex semantic variations.
[0043] Output format ( ): Forced model output Structured data in a format that facilitates automated processing and data validation in subsequent programs.
[0044] S1.3 Multi-level Fault-Tolerant Decision-Making Mechanism To ensure To ensure the stability and robustness of the parsed results, especially in cases where the model returns invalid or malformed results, this method employs a three-level fault-tolerance mechanism to determine the final structured address. .
[0045] Level 1 ( Priority): If Analysis results Validation If so, then adopt it directly.
[0046] Level 2 (Rule Degradation): If If invalid, it will automatically be downgraded to the regular expression-based rule parsing module. Try to start from Matches predefined address patterns.
[0047] Level 3 (Fallback Mechanism): If neither of the aforementioned two methods can resolve a valid address, then the fallback mechanism is activated, and the original input text is returned to the previous level. Returning the address directly ensures no information is lost and guarantees overall system availability.
[0048] The logical representation of this three-level fault tolerance mechanism is as follows: in, This is a validity verification function used to ensure the integrity and correct format of address information. Only after passing [the verification process] can the information be validated. Verified Only then will it be passed to the subsequent step S2 (local matching) for processing.
[0049] To ensure the stability and robustness of the parsing, a multi-level fault tolerance strategy is adopted: if the large model fails to return a valid structured address, it automatically degrades to the rule-based regular expression parsing module, which attempts to match predefined address patterns from the text to extract the address.
[0050] If neither of the above two methods can resolve a valid address, a fallback mechanism is activated, returning the original input text directly as the address to ensure no information is lost and to guarantee the overall availability of the system.
[0051] Step S2: Transfer the structured address information In step S2, the specific steps for standardization using the dynamic part-of-speech tagging system include: Define extended part-of-speech tags It is specifically used to identify valid address entities in the local POI database; Initialize the word segmentation dictionary And map the names in the local POI database to the extended part-of-speech tags. ; For the structured address information Perform word segmentation and extract part-of-speech tags. lexical set : ; ; in, It is a smart word segmentation operation function The set of tokens obtained after segmenting the structured address information is provided, and each token in the set is labeled with part-of-speech tagging.
[0052] Extract As the core address entity, a precise match is performed again in the local POI database to determine whether the candidate local POI data is obtained. .
[0053] If no complete match is found, the structured address information is processed using a dynamic part-of-speech tagging system. Perform word resegmentation and standardization, and then query the local POI database again based on the standardized address entities; S2.1 Technical Background and Objectives In the initial stage of step S2, the system receives the structured address information output by the Large Language Model (LLM). Then, first try in the local POI database. Perform precise matching retrieval within it.
[0054] If the exact match fails to find a complete match, a dynamic part-of-speech tagging method is initiated for address standardization. Its core objective is to overcome the problem of traditional word segmentation tools missegmenting specific POI entities (e.g., incorrectly segmenting "Dongfang Living Community" into "Dongfang / Life / Community"), thereby accurately extracting core address entities for re-matching.
[0055] S2.2 Construction and definition of dynamic part-of-speech system To achieve precise anchoring, this method introduces custom part-of-speech tags. and deeply integrate it into In the word segmentation engine: Define extended part-of-speech tags: Define extended part-of-speech tags Specifically used to identify "belonging to the local area" "Valid address entity in the library name".
[0056] Initialize the word segmentation dictionary: When the system starts, the local dictionary will be initialized. All address entity names in the database Batch import Custom dictionary and force it to be mapped Part of speech.
[0057] The dictionary Dynamic updates are supported through a real-time hot reloading mechanism; when new features are added... Without needing to restart the word segmentation service, it achieves [the goal of] [the ability to] [restore / ensure] Zero-sample generalization ability of data.
[0058] Core mechanism: ns_poi dynamic part-of-speech tagging system Definition: ns_poi is a custom part-of-speech tag that we extend in the HanLP part-of-speech tagging system, specifically used to identify "valid address entities belonging to the local POI library name".
[0059] Initialization: When the system starts, the local POI library names (such as "Beijing South Railway Station", "Sanlitun Taikoo Li", "Shanghai Tower") are imported into the user-defined dictionary in batches, and the ns_poi annotation is forcibly applied.
[0060] Dynamic updates: When a new address is added to the local POI library, the system can add the new address to the dictionary in real time via API and trigger hot loading of the dictionary, which can expand the recognition capability without restarting the service.
[0061] for example: ①The LLM's resolved address is "Building 8, Dongfang Residential Community, Zhongcang Street, Tongzhou District". ② Using HanLP for word segmentation, the returned segmentation results are: Tongzhou District / ns, Zhong / f, Cang / ng, Street / ns, Dongfang Living Community Building 8 / ns_poi The part-of-speech tagging is as follows: ns: place name, f: locative word, ng: noun morpheme, ns_poi: custom POI word. ③ Extract the word segmentation of "Dongfang Life Community Building 8" using the ns_poi part-of-speech tag, and then query the local POI database again. S2.3 Address Normalization and Core Entity Extraction After the dictionary is ready, the structured address information that did not match successfully is processed. Perform word resegmentation.
[0062] Intelligent word segmentation operation: call Intelligent word segmentation operation function For the structured address information Perform word segmentation to obtain a set of word units. .
[0063] gather Each lexical element in the text is labeled with its part of speech.
[0064] Core entity extraction: The system extracts core entities. The set is filtered, and only parts of speech are extracted and labeled as... The lexical units are used to obtain the core address entity set. .
[0065] This extraction process enables the system to automatically filter redundant words and retain only core address entities, ensuring strong noise resistance.
[0066] Assuming local The database contains the entity "Building 8, Dongfang Residential Community" and has been tagged as .
[0067] enter Building 8, Dongfang Residential Community, Zhongcang Street, Tongzhou District Word segmentation results : extract : Through this process, even if the initial match fails, the system can accurately extract the POI name as a whole word unit, thus solving the word segmentation error problem.
[0068] S2.4 Precise matching based on standardized entities Extract The core address entities in the set (such as "Building 8, Dongfang Living Community" in the example above) are used as standardized addresses and are then localized again. Perform an exact match in the database to determine whether the candidate local database is obtained. data .
[0069] If the match is successful at this time, the system will obtain... and send its results to the step Enter The dual consistency verification of semantic similarity and geographical distance ensures that the corrected address and the original address point to the same physical location.
[0070] Step S3: If the candidate local POI data was obtained in step S2 Calculate the structured address information With the candidate local POI data The semantic similarity is calculated, and the geographical distance is calculated in combination with the geographic location information; when the semantic similarity and the geographical distance simultaneously meet a preset consistency condition, the local POI data is output. As a result; S3.1 Module Objectives and Inputs This step aims to refine the candidate data matched in the local POI database. Perform high-precision consistency verification.
[0071] Input condition: Step S2 successfully obtained the candidate local... data This data includes local addresses. and local latitude and longitude .
[0072] Verification objective: Ensure Semantically, it is the same as the original address. Sufficiently similar, and The coordinates and the reference coordinates obtained through network service They are highly compatible in space.
[0073] S3.2 Semantic Similarity Calculation (Semantic Dimension Confidence) The system uses a Chinese semantic model to calculate the structured address information. With the candidate local data address semantic similarity between .
[0074] Vector generation: Utilizing high-performance Chinese semantic models (For example Encode the two addresses into sentence vectors respectively. and .
[0075] Cosine similarity calculation: Calculate vector similarity and Cosine similarity between This similarity metric measures how semantically close the address descriptions are. Represents the original address vector and candidate POI address vector Angle in a high-dimensional semantic space.
[0076] Using Chinese semantic model ( Calculate the original address vectors respectively and candidate POI address vector Calculate the cosine similarity between the two: ; in This represents structured address information, and its address vector is... , This represents the candidate addresses matched in the local POI database, and its address vector is... ; S3.3 Geographic Distance Calculation (Spatial Dimension Confidence) To perform spatial verification, the system first obtains reference latitude and longitude. (Usually obtained through networked geographic information services, especially when) (excluding internet latitude and longitude). Subsequently, the Haversine formula is used to calculate the local... latitude and longitude With reference latitude and longitude spherical geographical distance between .
[0077] intermediate variables Calculation: Calculate the core intermediate variables This variable is based on the latitude difference between two points. and longitude difference (All must be converted to radians).
[0078] in, This refers to the candidate local POI data retrieved from the local POI database. The corresponding local latitude coordinates; This refers to the reference latitude coordinates obtained through the network geographic information service interface, which serve as the verification benchmark.
[0079] distance Calculation: Calculate the final great circle distance using the main part of the Haversine formula. .in The radius of the Earth (usually taken as an average value of approximately) ).
[0080] S3.4 Double Consistency Determination and Result Output Only when semantic similarity and geographical distance The local matching result is only recognized when both the preset consistency conditions are met. efficient Preset threshold: Set the similarity threshold (For example and distance threshold (For example ).
[0081] Consistency determination logic: if Determined as The system outputs the local data As a final result, including address, Latitude and longitude, administrative region, distance and similarity score .
[0082] The following are the steps. Implementation details: Original address ( "Hongbo Jiayuan Phase 2, A and B" Candidate ( "Hongbo Jiayuan Phase 2" (passed through) (Match obtained after standardization correction) Semantic computation: System computation and The cosine similarity. Assume the calculation result is... .
[0083] Semantic determination: If ,but Established.
[0084] Geographic computing: system acquisition Latitude and longitude of the reservoir Reference latitude and longitude obtained from the Internet Calculate the distance using the Haversine formula. Assuming .
[0085] Geographical determination: If ,but Established.
[0086] Final result: Due to the simultaneous satisfaction of semantic and geographical conditions ( Therefore System output The result includes the POI database address "Hongbo Jiayuan 2nd District", latitude and longitude, and distance. and similarity score .
[0087] Step S4: If steps S2 or S3 fail to obtain valid results, call the network geographic information service interface to perform a query; if the query result passes the consistency verification, output it; otherwise, call the large language model to semantically simplify the original address and use the simplified address. Perform online query and verification again.
[0088] S4.1 Online Supplementary Inquiry If the system fails to obtain a valid result after steps S2 (local exact matching) and S3 (double consistency verification), it indicates that the address entity is missing from the local POI database or its consistency cannot be confirmed. At this point, the system calls a pre-defined external network geographic information service interface (…). Use the query function to perform the query.
[0089] Input parameter: The structured address output in step S1 As an input parameter.
[0090] Web query: Calling the web geographic information service interface .
[0091] Return result: Retrieved Internet geographic information Including Internet addresses and Internet latitude and longitude .
[0092] S4.2 Semantic Comparison Consistency Verification get Afterwards, the system must perform a consistency verification to determine the original input address. Address returned by network service Whether it semantically points to the same geographical location, to prevent [the following] The slight deviation caused the incorrect positioning.
[0093] Similarity calculation: using a Chinese semantic model (e.g.) )Will and Generate sentence vectors separately and calculate the cosine similarity between them. .
[0094] Consistency determination: With preset threshold (For example ) for comparison.
[0095] like Determined as If the query result is valid, the system will integrate the results into a unified structured format. Format and output.
[0096] S4.3 LLM Semantic Simplification and Closed-Loop Retry like Determined as Then, the closed-loop strategy of LLM address simplification and retry is implemented. This strategy solves the problem of low precision when directly querying network services using redundant or ambiguous addresses.
[0097] Semantic simplification: Invoking a large language model Enter the original address and carefully designed concise prompts .
[0098] Concise prompts ( The requirement is to retain the smallest, most essential, and truly existing identifier information in the address and perform a "slimming" operation.
[0099] If the input address is not the same location as the internet address, invoke the semantically simplified large language model. Identify and simplify the original address: in To streamline the prompts, the minimum, most essential, and truly existing identification information must be retained.
[0100] The simplified address then calls the network geographic information service again, repeating the query and verification process.
[0101] Secondary online query and verification: The simplified address Recall as a new parameter Perform online query and verification (repeated) and step).
[0102] Specifically, for example, consider the address entered below: Prerequisite: Both steps S2 and S3 fail.
[0103] enter “Building 3, South District, Touxinyuan”
[0104] Online query: Return to Internet address (For example, "Building 3, South District of Touxinyuan") and latitude and longitude.
[0105] Semantic alignment: computation and The similarity score, assuming to be .
[0106] Judgment: If the preset threshold is met ,but Established, .
[0107] Result: Output Internet geographic information as the final result.
[0108] For example, when a network query fails and triggers an LLM streamlined retry, enter "Building 3, South District, Touxinyuan, next to the vegetable market in the residential area south of Shijingshan Road." Initial online query: Due to excessive address redundancy, Returning to "Shijingshan Road Farmers Market"; semantic comparison (lower than) Initial verification failed.
[0109] LLM Simplification: Call Output simplified address Building 3, South District, Touxinyuan.
[0110] Secondary query: using Call again .
[0111] Two-factor authentication: return address and Highly consistent, similar Secondary verification successful.
[0112] Result: Output the valid latitude and longitude obtained from the second query.
[0113] In step S4, If the simplified address If no matching results are found in the online geographic information service query, a second simplification is triggered, automatically truncating to the next higher level of administrative division or road name for fuzzy search.
[0114] In this solution, the overall lookup time for address resolution is... Based on cache query time Main query time and cache hit rate The following performance model is determined and meets the following criteria: = + .(1- ) in, With sub-millisecond response time, main query time This represents the time required for the system to access the underlying local database storage or call network services when data is not in the memory cache. The dynamic part-of-speech tagging system ensures a high cache hit rate. In higher scenarios, Approaching .
[0115] This invention also discloses a large language model address parsing and geographic information query system based on ecological and environmental protection supervision, such as... Figure 2 As shown, it includes: The semantic parsing module is used to obtain the non-standard address text to be parsed. Standardize and concatenate the data; construct prompt words. ; Call the Large Language Model (LLM) to process the non-standard address text. Perform semantic parsing to extract structured address information. ; The local POI database query module is used to retrieve the structured address information. Search the local POI database to obtain candidate local POI data. If no exact match is found, the structured address information is processed using a dynamic part-of-speech tagging system. Perform word resegmentation and standardization, and then query the local POI database again based on the standardized address entities; The online supplementary query module is used when the local POI database query module obtains the candidate local POI data. Calculate the structured address information With the candidate local POI data The semantic similarity is calculated, and the geographical distance is calculated in combination with the geographic location information; when the semantic similarity and the geographical distance simultaneously meet a preset consistency condition, the local POI data is output. As a result; The verification decision module is used to call the network geographic information service interface to query if the local POI database query module or the online supplementary query module fails to obtain valid results. If the query result passes the consistency verification, it is output; otherwise, the semantically simplified large language model is invoked. Semantically simplify the original address and use the simplified address. Perform online query and verification again.
[0116] It should be understood that the processor in the embodiments of the present invention may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0117] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0118] It should be understood that the above-described memory is exemplary but not restrictive. For example, the memory in the embodiments of this application may also be static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM), etc. That is to say, the memory in the embodiments of this application is intended to include, but is not limited to, these and any other suitable types of memory.
[0119] This application also provides a computer-readable storage medium for storing computer programs.
[0120] Optionally, the computer-readable storage medium can be applied to the terminal device in the embodiments of this application, and the computer program causes the computer to execute the corresponding processes implemented by the mobile terminal / terminal device in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.
[0121] This application also provides a computer program product, including computer program instructions.
[0122] Optionally, the computer program product can be applied to the terminal device in the embodiments of this application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the mobile terminal / terminal device in the various methods of the embodiments of this application. For the sake of brevity, they will not be described in detail here.
[0123] This application also provides a computer program.
[0124] Optionally, the computer program can be applied to the vehicle autonomous driving device in the embodiments of this application. When the computer program is run on a computer, it causes the computer to execute the corresponding processes implemented by the terminal device in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.
[0125] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software 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.
[0126] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0127] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0128] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
Claims
1. A method for address parsing and geocoding acquisition based on a large language model of ecological and environmental protection supervision, characterized in that, Includes the following steps: Step S1: Obtain the non-standard address text to be parsed Standardize and concatenate the data; construct prompt words. ; Calling the Large Language Model (LLM) to process the non-standard address text Perform semantic parsing to extract structured address information. ; Step S2: Transfer the structured address information Search the local POI database to obtain candidate local POI data. If no exact match is found, the structured address information is processed using a dynamic part-of-speech tagging system. Perform word resegmentation and standardization, and then query the local POI database again based on the standardized address entities; Step S3: If the candidate local POI data was obtained in step S2 Calculate the structured address information With the candidate local POI data The semantic similarity is calculated, and the geographical distance is calculated in combination with the geographic location information; when the semantic similarity and the geographical distance simultaneously meet a preset consistency condition, the local POI data is output. As a result; Step S4: If steps S2 or S3 fail to obtain valid results, call the network geographic information service interface to perform a query; if the query result passes the consistency verification, output it; otherwise, call the large language model to semantically simplify the original address and use the simplified address. Perform online query and verification again.
2. The method according to claim 1, characterized in that, In step S1, the step of calling the large language model for semantic parsing includes: using a three-level fault-tolerant mechanism to determine the structured address information. Specifically, it includes: Level 1 fault tolerance, which verifies the validity of the structured address output by the large language model; Level 2 fault tolerance, which, if Level 1 fault tolerance is invalid, uses regular expression-based rule parsing to extract the address; and Level 3 fault tolerance, which, if Level 2 fault tolerance is invalid, directly passes the original address text as valid input to subsequent steps.
3. The method according to claim 2, characterized in that, In step S1, construct the prompt word. It includes the task description. Analytical constraints Example and output format The four-part prompt.
4. The method according to claim 1, characterized in that, In step S2, the specific steps for standardization using the dynamic part-of-speech tagging system include: Define extended part-of-speech tags It is specifically used to identify valid address entities in the local POI database; Initialize the structure of the word segmentation dictionary And map the names in the local POI database to the extended part-of-speech tags. ; For the structured address information Perform word segmentation and extract part-of-speech tags. lexical set : ; ; in, It is a smart word segmentation operation function The set of tokens obtained after segmenting the structured address information, each token in the set is labeled with part-of-speech tagging; The extracted lexical set As the core address entity, a precise match is performed again in the local POI database to determine whether the candidate local POI data is obtained. ;Tag indicates the part of speech of the extracted word.
5. The method according to claim 4, characterized in that, The dynamic part-of-speech tagging system method supports real-time hot reloading and updates, specifically including: The local POI database uses a memory-cached approach. To manage in order to achieve Query response time complexity when a new address entry is added to the local POI database. At that time, the system automatically completes a triple synchronization operation: writing to persistent storage and updating the memory cache. And trigger the custom dictionary in the HanLP word segmentation engine. Real-time hot reloading.
6. The method according to claim 5, characterized in that, The overall query time for address resolution Based on cache query time Main query time and cache hit rate The following performance model is determined and meets the following criteria: = + .(1- ) in, With sub-millisecond response time, main query time This represents the time required for the system to access the underlying local database storage or call network services when data is not in the memory cache. The dynamic part-of-speech tagging system ensures a high cache hit rate. In higher scenarios, Approaching .
7. The method according to claim 1, characterized in that, In step S3, the semantic similarity is calculated as follows: Using Chinese semantic model ( Calculate the original address vectors respectively and candidate POI address vector And calculate the cosine similarity between the two: ; in This represents structured address information, and its address vector is... , This represents the candidate addresses matched in the local POI database, and its address vector is... ; geographical distance The calculation uses the Haversine formula: intermediate variables , For the Earth's radius, and These are the differences in latitude and longitude, respectively. Represents the original address vector and candidate POI address vector The angle between two points in a high-dimensional semantic space; This refers to the candidate local POI data retrieved from the local POI database. The corresponding local latitude coordinates; This refers to the reference latitude coordinates obtained through the network geographic information service interface, which serve as the verification benchmark.
8. The method according to claim 1, characterized in that, In step S4, the specific process of calling the large language model to perform semantic simplification of the original address is as follows: If the original address and the address returned by the network service are determined to be different locations through semantic comparison, input the original address into the semantically simplified large language model. Utilize concise prompts The model is required to retain the minimum core identifier information and generate a simplified address. The simplified address The network geographic information service is invoked again as a new parameter.
9. The method according to claim 8, characterized in that, In step S4, If the simplified address If no matching results are found in the online geographic information service query, a second simplification is triggered, automatically truncating to the next higher level of administrative division or road name for fuzzy search.
10. A system for address resolution and geocoding acquisition based on a large language model of ecological and environmental protection supervision, characterized in that, include: The semantic parsing module is used to obtain the non-standard address text to be parsed. Standardize and concatenate the data; construct prompt words. ; Calling the Large Language Model (LLM) to process the non-standard address text Perform semantic parsing to extract structured address information. ; The local POI database query module is used to retrieve the structured address information. Search the local POI database to obtain candidate local POI data. ; If no complete match is found, the structured address information is processed using a dynamic part-of-speech tagging system. Perform word resegmentation and standardization, and then query the local POI database again based on the standardized address entities; The online supplementary query module is used when the local POI database query module obtains the candidate local POI data. Calculate the structured address information With the candidate local POI data The semantic similarity is calculated, and the geographical distance is calculated in combination with the geographic location information; when the semantic similarity and the geographical distance simultaneously meet a preset consistency condition, the local POI data is output. As a result; The verification decision module is used to call the network geographic information service interface to query if the local POI database query module or the online supplementary query module fails to obtain valid results. If the query result passes the consistency verification, it is output; otherwise, the semantically simplified large language model is invoked. Semantically simplify the original address and use the simplified address. Perform online query and verification again.