A Smart Address Parsing Method Based on Adversarial Error Correction of Word Segmentation Engine
By constructing an adversarial error correction intelligent address parsing method based on a word segmentation engine, and utilizing adversarial training error correction technology, the method autonomously learns the contextual features and glyph semantic mapping of address elements, thus solving the parsing problem of multi-source heterogeneous address data and achieving high-precision and low-maintenance address parsing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI AOTENG COMPUTER TECHNOLOGY CO LTD
- Filing Date
- 2025-09-17
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies in logistics, government administration, and map navigation suffer from insufficient parsing accuracy, high maintenance costs, difficulty in adapting to the unified parsing requirements of multi-source heterogeneous address data, and limited ability to capture long-distance hierarchical dependencies and complex error patterns of address elements.
By constructing an adversarial error correction intelligent address parsing method based on a word segmentation engine, adversarial interference samples are generated using multi-source heterogeneous address data. Combining a real-time input layer, feature engineering layer, convolutional layer, LSTM core modeling layer, fully connected layer, and evaluation iteration layer, the method autonomously learns the contextual feature linkage mechanism and glyph semantic mapping relationship of address elements, performs error correction training, and finally outputs structured address parsing results.
It significantly improves the robustness and accuracy of address resolution, reduces reliance on manual rule bases, lowers the maintenance cost of dynamic address changes, adapts to the unified resolution needs of multi-source heterogeneous address data, and meets the accuracy requirements of scenarios such as logistics distribution, government administration, and map navigation.
Smart Images

Figure CN121168443B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of natural language processing and geographic information science and technology, specifically involving an intelligent address parsing method based on adversarial error correction using a word segmentation engine. Background Technology
[0002] In logistics, government administration, and map navigation, accurate address data parsing is a core component supporting efficient business operations. Traditional address parsing methods largely rely on manually defined rule bases, using keyword matching to break down elements. However, given the diversity, non-standardization, and dynamism of Chinese addresses, the rule base maintenance costs are extremely high, and the parsing accuracy is insufficient. Diversity manifests in different expressions of the same address, non-standardization often involves typos, and dynamism stems from administrative division adjustments and the naming of newly constructed roads. While existing machine learning models can learn some address patterns, their ability to capture long-distance hierarchical dependencies and complex error patterns is limited, making it difficult to adapt to the unified parsing needs of multi-source heterogeneous address data. As business scale continues to expand, the industry places higher demands on the robustness, accuracy, and generalization ability of address parsing, urgently requiring intelligent models that integrate natural language processing and deep learning technologies to overcome the application bottlenecks of traditional methods. Summary of the Invention
[0003] To address the aforementioned problems in existing technologies, this invention provides an intelligent address parsing method based on adversarial error correction using a word segmentation engine.
[0004] The objective of this invention can be achieved through the following technical solutions:
[0005] S1: Collect heterogeneous address data from multiple sources, standardize the format to unify the address representation, obtain standardized addresses, construct an address corpus, and store it in a structured database;
[0006] S2: Generate adversarial interference samples based on the address corpus and structured database; construct an intelligent address parsing model, including a real-time input layer, a feature engineering layer, a convolutional layer, an LSTM core modeling layer, a fully connected layer, an evaluation iteration layer, and an output layer; the real-time input layer receives the multi-source heterogeneous address data, calls the word segmentation engine to perform hierarchical word segmentation on the standardized addresses, and generates a noisy training set; the feature engineering layer splits the preprocessed addresses at the character level, and concatenates the word vectors with basic features to form a fused feature vector sequence; the convolutional layer receives the fused vector from the feature engineering layer, and outputs... The LSTM core modeling layer autonomously learns the contextual feature linkage mechanism and glyph semantic similarity mapping relationship of address elements, and outputs a hidden state sequence containing global semantics; the fully connected layer outputs the probability of each character belonging to various labels; the evaluation iteration layer evaluates the output results based on the feature recognition accuracy and sequence labeling index; the output layer first performs preliminary error correction on the preliminary parsing results through pre-trained language methods, and then performs secondary verification through adversarial training error correction methods, and finally outputs the structured address parsing results, along with the parsing confidence of each address element and error correction records;
[0007] S3: Perform batch verification and error case labeling on the structured address parsing results; reverse-optimize the adversarial interference sample generation strategy and the dictionary feature weights of the word segmentation engine, and adjust the hierarchical attention parameters of the adversarial training error correction method.
[0008] Specifically, the address corpus is used to establish a standardized address benchmark dataset covering multiple scenarios and to collect high-quality training and testing samples. This includes: collecting user-input addresses, addresses on electronic waybills from logistics systems, and publicly available government geocoding data; using regular expressions to filter invalid data containing special symbols or missing fields; and merging duplicate addresses using a locality-sensitive hashing algorithm. The retained data undergoes three levels of standardization, including unified representation at the administrative division level, standardized format for road and house numbers, and extraction of key identifiers at the supplementary information level. The retained data is stored in a relational database, and an incremental update mechanism is constructed, with newly added addresses added daily after manual sampling and inclusion in the address corpus.
[0009] Specifically, the incremental update mechanism is constructed as follows: The source and collection frequency of incremental data are clearly defined, and new multi-channel data is automatically synchronized daily to cover address information generated in real time; a pre-automatic filtering step is set up, reusing the regular expressions and locality-sensitive hashing algorithms used in the initial corpus construction to process invalid new data containing special symbols or severely missing fields, and to identify and merge duplicate new addresses; manual sampling verification is performed, and filtered new addresses are sampled according to a preset ratio, with manual verification of their administrative division descriptions, road address formats, and key identifiers of ancillary information; compliant data is entered into the database and update records are retained. New addresses that pass manual sampling are batch-written into the address corpus corresponding table in the relational database after being unified at the administrative division level, standardized at the road address level, and extracted and processed at the ancillary information level. Simultaneously, an update log table is added to the database to record each batch of incremental data.
[0010] As a preferred embodiment of the present invention, the intelligent address parsing model includes a real-time input layer, a feature engineering layer, a convolutional layer, an LSTM core modeling layer, a fully connected layer, an evaluation iteration layer, and an output layer. The real-time input layer serves as the model's data entry point, receiving the multi-source heterogeneous address data. It processes invalid data containing garbled characters and invalid symbols using regular expressions, merges duplicate addresses using a string similarity algorithm to unify the format, and simultaneously calls a word segmentation engine to perform hierarchical word segmentation on the standardized addresses to extract address elements. It also mixes adversarial interference samples with normal word segmentation results according to a preset ratio to generate a noisy training set. The feature engineering layer splits the preprocessed addresses at the character level, converts the characters into low-dimensional dense vectors through word vector embedding, and simultaneously extracts basic features. It then concatenates the word vectors with the basic features to form a fused feature vector sequence. The convolutional layer receives the fused feature vectors from the feature engineering layer. The combined vector captures local fixed collocation features by scanning the sequence with convolutional kernels, retains key local information through pooling, and outputs local features. The LSTM core modeling layer uses a bidirectional structure to learn long-distance hierarchical dependencies and outputs a hidden state sequence containing global semantics. The fully connected layer maps the fused features of the LSTM and convolutional layers to the address element label space and outputs the probability of each character belonging to each type of label. The evaluation iteration layer evaluates the output results based on the feature recognition accuracy and sequence labeling metrics. The output layer converts the label probabilities of the fully connected layer into a structured dictionary, corrects obvious errors using the address corpus, filters surface errors in the initial parsing results using pre-trained language methods, and performs a second verification using an adversarial training error correction method. Finally, it outputs a structured address parsing result, along with the parsing confidence of each address element and error correction records.
[0011] Specifically, the specific calculation formula for generating adversarial interference samples is as follows:
[0012] ,
[0013] Where x is the original address sequence, For the amplitude of the disturbance, Let L be the gradient of the loss function L with respect to the input x, and sign() be the sign function. This formula can generate glyph / word order interference samples to simulate real error patterns.
[0014] Specifically, the formula for calculating the adversarial training loss function is as follows:
[0015] ,
[0016] in, The cross-entropy loss is for the normal sample (x). The cross-entropy loss is calculated for adversarial examples (x'\), and α is a weighting coefficient (usually taken as 0.7-0.8 to balance the training ratio of normal samples and adversarial examples).
[0017] Specifically, the calculation formula for adjusting hierarchical attention weights is as follows:
[0018] ,
[0019] ,
[0020] Among them, h i Let d be the hidden state of the i-th address element, W be the learnable parameter matrix, and d be the hidden state of the i-th address element. k 'Attn()' represents the attention weights, while 'score()' represents the feature dimension. By increasing the 'score()' of high-frequency error levels, the model focuses more on key level features during error correction.
[0021] Specifically, the hierarchical word segmentation is used to structurally split and locate the boundaries of the address elements. The specific process is as follows: a word segmentation engine that integrates a bidirectional long short-term memory network and a conditional random field is invoked. The engine has a built-in custom dictionary containing multi-level administrative division words, a large number of road and community names, forming a basic library for element recognition; the standardized address is coarsely segmented using the maximum matching method, and candidate hierarchical sequences are generated by combining dictionary matching to initially delineate the element boundaries; the contextual association features of the address string are learned through the bidirectional long short-term memory network, capturing the constraints of prefix elements on subsequent levels and extracting the confirmation of suffix elements on previous levels, dynamically optimizing the segmentation accuracy of the element boundaries; the final sequence text is output based on the hierarchical logical rules constrained by the conditional random field.
[0022] Specifically, the generated adversarial interference samples are used to simulate most address input error patterns in real-world scenarios, injecting anti-interference training signals into the model. The specific generation process is as follows: based on the character shape confusion error paradigm, single-character replacement or addition / deletion of the address elements is performed using a pre-constructed similar-shaped character library to simulate writing errors; based on the phonetic interference error paradigm, homophones are extracted and replaced with homophones to reproduce similar-sound input errors; based on the word order inversion error paradigm, non-terminal elements are swapped without disrupting the core hierarchical inclusion relationship to simulate word order disorder; based on the redundant information interference error paradigm, words are selected from a high-frequency noise lexicon and inserted into the middle of the address to simulate the interference of redundant information on element recognition, and finally, adversarial interference samples are generated.
[0023] Specifically, the adversarial training error correction method is used to identify and correct abnormal errors in the address resolution error paradigm. The adversarial training error correction method takes the noisy training set as input and autonomously learns the context feature linkage mechanism and glyph semantic mapping relationship of the address elements through a generative adversarial architecture.
[0024] Specifically, the generative adversarial architecture learns the generation rules and correction logic of address errors through dynamic adversarial learning between the generator and the discriminator. The specific process is as follows: the architecture includes a generator and a discriminator, which conduct collaborative training based on the noisy training set; the generator focuses on simulating the deformation rules of address errors, and after inputting a normal address word segmentation sequence, it generates interference samples according to the address parsing error paradigm; the discriminator is responsible for distinguishing between real and fake samples, receiving the interference samples generated by the generator and the real samples in the noisy training set, and by learning the differences between the two in terms of element boundary division, hierarchical order arrangement, and semantic association rationality, it outputs a judgment result on whether the sample is a real and valid address; during the training process, the generator continuously improves its forgery ability, and the discriminator iteratively improves its discrimination ability. Finally, the generator will master the error generation mode that fits the actual scenario, and the discriminator will learn the linkage mechanism of the context features of the address elements and the semantic mapping relationship of the character shape.
[0025] Specifically, the context feature linkage mechanism is used to define the hierarchical logic and dependency relationship between different address elements, including the subordinate relationship that a province must include a city, a city must include a district / county, and a street must be attached to a district / county; the character shape semantic similarity mapping is used to establish the correspondence relationship of address elements when the characters are similar or semantically related; the adversarial training error correction method identifies and corrects anomalies based on the context feature linkage mechanism and character shape semantic similarity mapping.
[0026] Specifically, the initial error correction is used to identify and filter high-frequency surface errors in the initial output of the word segmentation engine. Based on the context feature linkage mechanism, the semantic similarity with the standard place name database is calculated word by word through the pre-trained language model to locate abnormal errors such as typographical errors and phonetic confusion. Based on the semantic distribution rules of place names, the correct words are automatically matched and corrected, and a regular address word segmentation sequence is output. The secondary verification is used to handle non-explicit problems not covered by the initial error correction. The sequence after initial error correction is received through the adversarial training error correction method. Based on the address element context feature linkage mechanism learned during training, the membership relationship and sequence relationship are verified, and anomalies are identified and marked. Combined with the typographical semantic similarity mapping, complex typographical confusion is checked and corrected, and finally, a structured address parsing result is output.
[0027] Specifically, the adversarial interference sample generation strategy is used to dynamically optimize the sample distribution. The specific generation process is as follows: based on the address resolution error paradigm annotation results, a clustering algorithm is used to group the error samples according to their features, and the proportion and correction difficulty of each group of errors are statistically analyzed; for the high-frequency error group with a high proportion, its generation ratio in the adversarial interference samples is increased, and the sample generation rules are refined; for the difficult example group with a low correction success rate, a reinforcement learning generation strategy is introduced: the model's error correction failure rate for the sample is used as a reward signal to train the sample generator to actively generate more difficult-to-identify interference samples; the strategy parameters are updated periodically according to the latest error data.
[0028] Specifically, the dictionary feature weights of the word segmentation engine are used to enhance the engine's sensitivity to key elements and reduce the probability of ambiguous word segmentation. Specifically, the initial weight of each word in the dictionary is calculated using a hybrid algorithm of word frequency-inverse document frequency and mutual information. High weights are assigned to administrative division words and high-frequency road names, while low weights are assigned to uncommon community names and affiliated identifier words. Based on word segmentation error feedback, the weight value is dynamically adjusted for words that are continuously erroneously segmented. The weight is gradually increased and a preset upper limit is set. For polysemous words that cause ambiguity, the weight is dynamically assigned in combination with context features. Through a domain adaptation mechanism, the weight of house numbers is added to logistics scenarios, and the weight of administrative divisions is added to government affairs scenarios.
[0029] Specifically, the optimization process for structured address parsing results is as follows: Samples covering scenarios such as logistics, government affairs, and maps are randomly selected. The parsing quality is verified through indicators such as element recognition accuracy, provincial-municipal-district hierarchical logical consistency, and error correction success rate. Then, error results are labeled according to error type and involved hierarchy to construct an error case library. Backward optimization is performed based on the case library: if a certain type of error (such as character confusion) occurs frequently, the proportion of adversarial interference samples for the corresponding pattern is increased; for error-prone words in the word segmentation engine, their dictionary feature weights are increased; when adjusting the hierarchical attention parameters for adversarial training and error correction, for the levels with concentrated errors, the attention weight of that level is increased using the gradient descent algorithm to strengthen the model's feature capture of key levels. The effect is verified using a validation set after each round of adjustments to ensure continuous improvement in the model's parsing accuracy and robustness.
[0030] Specifically, the specific calculation formulas for the gradient descent algorithm include:
[0031] Attention weight gradient calculation:
[0032] ,
[0033] in, Let L be the attention weight for the k-th address level (e.g., house number), and L be the total loss of the model on the validation set (a fusion of classification loss and error correction loss). This indicates the rate and direction of change of the loss with respect to the attention weights at that level;
[0034] Parameter update formula:
[0035] ,
[0036] in, The attention weight for the current iteration round. For learning rate, This refers to the updated attention weights. If the error rate is high at a certain level (such as streets), its... If the absolute value is large, its weight can be increased through this formula, thereby enhancing the model's ability to capture features at that level.
[0037] The beneficial effects of this invention are as follows:
[0038] (1) By setting up adversarial training error correction logic and noisy training set construction mechanism, the model can learn the context feature linkage mechanism of address elements and character semantic similarity mapping. It can not only accurately handle the diverse expressions and non-standard problems of Chinese addresses, but also reduce the dependence on manual rule base, significantly reduce the maintenance cost caused by dynamic address changes, and improve the robustness and accuracy of address parsing.
[0039] (2) By setting up a hierarchical modeling architecture with multi-feature fusion and dynamic optimization link, the convolutional layer can capture the local feature combination features of the address, the bidirectional LSTM can strengthen long-distance hierarchical dependency learning, and with the back optimization of the evaluation iteration layer, the model can adapt to the unified parsing requirements of multi-source heterogeneous address data, while meeting the accuracy requirements of different scenarios such as logistics distribution, government affairs management, and map navigation, and improving the generalization ability and business adaptability of the model. Attached Figure Description
[0040] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings.
[0041] Figure 1 This is a system architecture diagram of the intelligent address resolution model of the present invention;
[0042] Figure 2 This is a control flow graph of an intelligent address parsing method based on adversarial error correction using a word segmentation engine, as described in this invention. Detailed Implementation
[0043] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided.
[0044] Please see Figure 1-2 A Smart Address Parsing Method Based on Adversarial Error Correction of a Word Segmentation Engine
[0045] S1: Collect heterogeneous address data from multiple sources, standardize the format to unify the address representation, obtain standardized addresses, construct an address corpus, and store it in a structured database;
[0046] S2: Generate adversarial interference samples based on the address corpus and structured database; construct an intelligent address parsing model, including a real-time input layer, a feature engineering layer, a convolutional layer, an LSTM core modeling layer, a fully connected layer, an evaluation iteration layer, and an output layer; the real-time input layer receives the multi-source heterogeneous address data, calls the word segmentation engine to perform hierarchical word segmentation on the standardized addresses, and generates a noisy training set; the feature engineering layer splits the preprocessed addresses at the character level, and concatenates the word vectors with basic features to form a fused feature vector sequence; the convolutional layer receives the fused vector from the feature engineering layer, and outputs... The LSTM core modeling layer autonomously learns the contextual feature linkage mechanism and glyph semantic similarity mapping relationship of address elements, and outputs a hidden state sequence containing global semantics; the fully connected layer outputs the probability of each character belonging to various labels; the evaluation iteration layer evaluates the output results based on the feature recognition accuracy and sequence labeling index; the output layer first performs preliminary error correction on the preliminary parsing results through pre-trained language methods, and then performs secondary verification through adversarial training error correction methods, and finally outputs the structured address parsing results, along with the parsing confidence of each address element and error correction records;
[0047] S3: Perform batch verification and error case labeling on the structured address parsing results; reverse-optimize the adversarial interference sample generation strategy and the dictionary feature weights of the word segmentation engine, and adjust the hierarchical attention parameters of the adversarial training error correction method.
[0048] Specifically, the address corpus is used to establish a standardized address benchmark dataset covering multiple scenarios and to collect high-quality training and testing samples. This includes: collecting user-input addresses, addresses on electronic waybills from logistics systems, and publicly available government geocoding data; using regular expressions to filter invalid data containing special symbols or missing fields; and merging duplicate addresses using a locality-sensitive hashing algorithm. The retained data undergoes three levels of standardization, including unified representation at the administrative division level, standardized format for road and house numbers, and extraction of key identifiers at the supplementary information level. The retained data is stored in a relational database, and an incremental update mechanism is constructed, with newly added addresses added daily after manual sampling and inclusion in the address corpus.
[0049] In this embodiment, the scope and channels for collecting multi-source heterogeneous address data are clearly defined as follows: User-input addresses are obtained from order delivery addresses on major domestic e-commerce platforms (Taobao and JD.com) from January to June 2024, totaling 582,000 entries, covering scenarios such as personal residences and corporate offices; addresses on electronic waybills from logistics systems are obtained through the open APIs of SF Express and YTO Express, totaling 427,000 entries, including complete address information for express pickup and delivery; government-disclosed geocoding data is downloaded from the geographic information open platforms of the Beijing and Shenzhen municipal government service websites, obtaining the latest administrative divisions (province-city-district-street), road addresses (including newly built road names), and POIs (such as parks and schools) data for 2024, totaling 191,000 entries. These three sources combined collect 1.2 million original address data entries, providing sufficient samples for subsequent corpus construction.
[0050] Specifically, the incremental update mechanism is constructed as follows: The source and collection frequency of incremental data are clearly defined, and new multi-channel data is automatically synchronized daily to cover address information generated in real time; a pre-automatic filtering step is set up, reusing the regular expressions and locality-sensitive hashing algorithms used in the initial corpus construction to process invalid new data containing special symbols or severely missing fields, and to identify and merge duplicate new addresses; manual sampling verification is performed, and filtered new addresses are sampled according to a preset ratio, with manual verification of their administrative division descriptions, road address formats, and key identifiers of ancillary information; compliant data is entered into the database and update records are retained. New addresses that pass manual sampling are batch-written into the address corpus corresponding table in the relational database after being unified at the administrative division level, standardized at the road address level, and extracted and processed at the ancillary information level. Simultaneously, an update log table is added to the database to record each batch of incremental data.
[0051] In this embodiment, the incremental update mechanism is set to automatically synchronize the new data (e-commerce platform order addresses, logistics waybill addresses) of the previous day at 2:00 AM every day. After synchronization, the new addresses are first automatically filtered using regular expressions, and then manually sampled according to a preset ratio. Engineers with a geographic information background check the description of administrative divisions and the format of road addresses. For example, they confirm that Guangzhou Tianhe District is not mistakenly written as Guangzhou Tianhe District. The qualified addresses are written into the database in batches. At the same time, the source, quantity and update time of each batch of data are recorded in the log table. During the trial operation in July 2024, an average of 12,000 new addresses were added to the database every day, and the timeliness of the corpus was effectively guaranteed.
[0052] As a preferred embodiment of the present invention, the intelligent address parsing model includes a real-time input layer, a feature engineering layer, a convolutional layer, an LSTM core modeling layer, a fully connected layer, an evaluation iteration layer, and an output layer. The real-time input layer serves as the model's data entry point, receiving the multi-source heterogeneous address data. It processes invalid data containing garbled characters and invalid symbols using regular expressions, merges duplicate addresses using a string similarity algorithm to unify the format, and simultaneously calls a word segmentation engine to perform hierarchical word segmentation on the standardized addresses to extract address elements. It also mixes adversarial interference samples with normal word segmentation results according to a preset ratio to generate a noisy training set. The feature engineering layer splits the preprocessed addresses at the character level, converts the characters into low-dimensional dense vectors through word vector embedding, and simultaneously extracts basic features. It then concatenates the word vectors with the basic features to form a fused feature vector sequence. The convolutional layer receives the fused feature vectors from the feature engineering layer. The combined vector captures local fixed collocation features by scanning the sequence with convolutional kernels, retains key local information through pooling, and outputs local features. The LSTM core modeling layer uses a bidirectional structure to learn long-distance hierarchical dependencies and outputs a hidden state sequence containing global semantics. The fully connected layer maps the fused features of the LSTM and convolutional layers to the address element label space and outputs the probability of each character belonging to each type of label. The evaluation iteration layer evaluates the output results based on the feature recognition accuracy and sequence labeling metrics. The output layer converts the label probabilities of the fully connected layer into a structured dictionary, corrects obvious errors using the address corpus, filters surface errors in the initial parsing results using pre-trained language methods, and performs a second verification using an adversarial training error correction method. Finally, it outputs a structured address parsing result, along with the parsing confidence of each address element and error correction records.
[0053] Specifically, the specific calculation formula for generating adversarial interference samples is as follows:
[0054] ,
[0055] Where x is the original address sequence, For the amplitude of the disturbance, Let L be the gradient of the loss function L with respect to the input x, and sign() be the sign function. This formula can generate glyph / word order interference samples to simulate real error patterns.
[0056] Specifically, the formula for calculating the adversarial training loss function is as follows:
[0057] ,
[0058] in, The cross-entropy loss is for the normal sample (x). The cross-entropy loss is calculated for adversarial examples (x'\), and α is a weighting coefficient (usually taken as 0.7-0.8 to balance the training ratio of normal samples and adversarial examples).
[0059] Specifically, the hierarchical word segmentation is used to structurally split and locate the boundaries of the address elements. The specific process is as follows: a word segmentation engine that integrates a bidirectional long short-term memory network and a conditional random field is invoked. The engine has a built-in custom dictionary containing multi-level administrative division words, a large number of road and community names, forming a basic library for element recognition; the standardized address is coarsely segmented using the maximum matching method, and candidate hierarchical sequences are generated by combining dictionary matching to initially delineate the element boundaries; the contextual association features of the address string are learned through the bidirectional long short-term memory network, capturing the constraints of prefix elements on subsequent levels and extracting the confirmation of suffix elements on previous levels, dynamically optimizing the segmentation accuracy of the element boundaries; the final sequence text is output based on the hierarchical logical rules constrained by the conditional random field.
[0060] Specifically, the generated adversarial interference samples are used to simulate most address input error patterns in real-world scenarios, injecting anti-interference training signals into the model. The specific generation process is as follows: based on the character shape confusion error paradigm, single-character replacement or addition / deletion of the address elements is performed using a pre-constructed similar-shaped character library to simulate writing errors; based on the phonetic interference error paradigm, homophones are extracted and replaced with homophones to reproduce similar-sound input errors; based on the word order inversion error paradigm, non-terminal elements are swapped without disrupting the core hierarchical inclusion relationship to simulate word order disorder; based on the redundant information interference error paradigm, words are selected from a high-frequency noise lexicon and inserted into the middle of the address to simulate the interference of redundant information on element recognition, and finally, adversarial interference samples are generated.
[0061] In this embodiment, the generation rules and proportions of adversarial interference samples are set as follows: Based on the character shape confusion error paradigm, a pre-built similar character library (containing 300 groups of common similar characters) is called to replace "Guangzhou City" with "Guangzhou City" and "Haidian District" with "Haidian District", generating 85,000 samples of this type; Based on the phonetic interference error paradigm, the pinyin of address elements is extracted from the pypinyin library to replace "Jianchang Hutong" with "Jianchang Hutong" and "Baiduizi" with "Baiduizi", generating 62,000 samples of this type; Based on the word order inversion error paradigm, while retaining the core level of province-city-district, "No. 1 Zhongguancun Street, Haidian District, Beijing" is adjusted to "No. 1 Zhongguancun Street, Haidian District, Beijing". For example, "No. 1 Zhongguancun Street" generated 48,000 such samples. Based on the redundancy information interference error paradigm, words were randomly selected from a high-frequency noise word library (containing 50 words such as "near the subway", "next to", and "nearby") and inserted into the middle of the address, such as "No. 1 Zhongguancun Street, Haidian District, Beijing (near Subway Line 13)", generating 55,000 such samples. Finally, 250,000 adversarial interference samples were generated and mixed with 750,000 normal word segmentation results at a ratio of 1:3 to construct a noisy training set of 1 million samples.
[0062] Specifically, the adversarial training error correction method is used to identify and correct abnormal errors in the address resolution error paradigm. The adversarial training error correction method takes the noisy training set as input and autonomously learns the context feature linkage mechanism and glyph semantic mapping relationship of the address elements through a generative adversarial architecture.
[0063] Specifically, the generative adversarial architecture learns the generation rules and correction logic of address errors through dynamic adversarial learning between the generator and the discriminator. The specific process is as follows: the architecture includes a generator and a discriminator, which conduct collaborative training based on the noisy training set; the generator focuses on simulating the deformation rules of address errors, and after inputting a normal address word segmentation sequence, it generates interference samples according to the address parsing error paradigm; the discriminator is responsible for distinguishing between real and fake samples, receiving the interference samples generated by the generator and the real samples in the noisy training set, and by learning the differences between the two in terms of element boundary division, hierarchical order arrangement, and semantic association rationality, it outputs a judgment result on whether the sample is a real and valid address; during the training process, the generator continuously improves its forgery ability, and the discriminator iteratively improves its discrimination ability. Finally, the generator will master the error generation mode that fits the actual scenario, and the discriminator will learn the linkage mechanism of the context features of the address elements and the semantic mapping relationship of the character shape.
[0064] Specifically, the context feature linkage mechanism is used to define the hierarchical logic and dependency relationship between different address elements, including the subordinate relationship that a province must include a city, a city must include a district / county, and a street must be attached to a district / county; the character shape semantic similarity mapping is used to establish the correspondence relationship of address elements when the characters are similar or semantically related; the adversarial training error correction method identifies and corrects anomalies based on the context feature linkage mechanism and character shape semantic similarity mapping.
[0065] Specifically, the initial error correction is used to identify and filter high-frequency surface errors in the initial output of the word segmentation engine. Based on the context feature linkage mechanism, the semantic similarity with the standard place name database is calculated word by word through the pre-trained language model to locate abnormal errors such as typographical errors and phonetic confusion. Based on the semantic distribution rules of place names, the correct words are automatically matched and corrected, and a regular address word segmentation sequence is output. The secondary verification is used to handle non-explicit problems not covered by the initial error correction. The sequence after initial error correction is received through the adversarial training error correction method. Based on the address element context feature linkage mechanism learned during training, the membership relationship and sequence relationship are verified, and anomalies are identified and marked. Combined with the typographical semantic similarity mapping, complex typographical confusion is checked and corrected, and finally, a structured address parsing result is output.
[0066] Specifically, the adversarial interference sample generation strategy is used to dynamically optimize the sample distribution. The specific generation process is as follows: based on the address resolution error paradigm annotation results, a clustering algorithm is used to group the error samples according to their features, and the proportion and correction difficulty of each group of errors are statistically analyzed; for the high-frequency error group with a high proportion, its generation ratio in the adversarial interference samples is increased, and the sample generation rules are refined; for the difficult example group with a low correction success rate, a reinforcement learning generation strategy is introduced: the model's error correction failure rate for the sample is used as a reward signal to train the sample generator to actively generate more difficult-to-identify interference samples; the strategy parameters are updated periodically according to the latest error data.
[0067] In this embodiment, the adversarial interference sample generation strategy is optimized as follows: The 1420 erroneous results found during verification are labeled according to error type and level of involvement, including 480 cases of character confusion (33.8%), 350 cases of level misclassification (24.6%), 320 cases of element omission (22.5%), and 270 cases of other errors (19.1%). Based on the labeling results, the sample generation strategy is optimized: the generation ratio of character confusion samples is increased from 34% to 45%, and 20 new sets of easily confused similar-looking character combinations are added. For difficult examples of level misclassification (correction success rate < 80%), a reinforcement learning generation strategy is introduced, using the model's error correction failure rate for samples as a reward signal (the higher the failure rate, the greater the reward value), to train the sample generator to actively generate cross-regional erroneous samples.
[0068] Specifically, the dictionary feature weights of the word segmentation engine are used to enhance the engine's sensitivity to key elements and reduce the probability of ambiguous word segmentation. Specifically, the initial weight of each word in the dictionary is calculated using a hybrid algorithm of word frequency-inverse document frequency and mutual information. High weights are assigned to administrative division words and high-frequency road names, while low weights are assigned to uncommon community names and affiliated identifier words. Based on word segmentation error feedback, the weight value is dynamically adjusted for words that are continuously erroneously segmented. The weight is gradually increased and a preset upper limit is set. For polysemous words that cause ambiguity, the weight is dynamically assigned in combination with context features. Through a domain adaptation mechanism, the weight of house numbers is added to logistics scenarios, and the weight of administrative divisions is added to government affairs scenarios.
[0069] In this embodiment, the dictionary feature weights of the word segmentation engine are adjusted as follows: Initial weights are calculated using a hybrid algorithm of word frequency-inverse document frequency and mutual information. Administrative division terms are assigned a TF-IDF value of 0.85, a mutual information value of 0.92, and a combined weight of 0.88. High-frequency road names such as Zhongguancun Street and Huaqiangbei Road are assigned a combined weight of 0.82. Uncommon supplementary information is assigned a combined weight of 0.55. Dynamic adjustments are made based on word segmentation error feedback: for Wangjing SOHO, which was incorrectly segmented for three consecutive rounds, its weight is gradually increased from 0.65 to 0.83 (maximum 0.9). For the polysemous term West Lake (which can refer to West Lake District or West Lake Scenic Area), weights are dynamically allocated based on context, while also adapting to different scenarios: in logistics scenarios, the weight of house numbers is increased from 0.72 to 0.85, and in government scenarios, the weight of administrative division terms is increased from 0.88 to 0.92, ensuring the engine's sensitivity to key elements.
[0070] Specifically, the optimization process for structured address parsing results is as follows: Samples covering scenarios such as logistics, government affairs, and maps are randomly selected. The parsing quality is verified through indicators such as element recognition accuracy, provincial-municipal-district hierarchical logical consistency, and error correction success rate. Then, error results are labeled according to error type and involved hierarchy to construct an error case library. Backward optimization is performed based on the case library: if a certain type of error (such as character confusion) occurs frequently, the proportion of adversarial interference samples for the corresponding pattern is increased; for error-prone words in the word segmentation engine, their dictionary feature weights are increased; when adjusting the hierarchical attention parameters for adversarial training and error correction, for the levels with concentrated errors, the attention weight of that level is increased using the gradient descent algorithm to strengthen the model's feature capture of key levels. The effect is verified using a validation set after each round of adjustments to ensure continuous improvement in the model's parsing accuracy and robustness.
[0071] Specifically, the specific calculation formulas for the gradient descent algorithm include:
[0072] Attention weight gradient calculation:
[0073] ,
[0074] in, Let L be the attention weight for the k-th address level (e.g., house number), and L be the total loss of the model on the validation set (a fusion of classification loss and error correction loss). This indicates the rate and direction of change of the loss with respect to the attention weights at that level;
[0075] Parameter update formula:
[0076] ,
[0077] in, The attention weight for the current iteration round. For learning rate, This refers to the updated attention weights. If the error rate is high at a certain level (such as streets), its... If the absolute value is large, its weight can be increased through this formula, thereby enhancing the model's ability to capture features at that level.
[0078] In this embodiment, the hierarchical attention parameters are adjusted as follows: A gradient descent algorithm is used, with a learning rate η set to 0.005 and 20 iterations; for the district / county and street levels with error rates of 6.8% and 8.2% respectively, the attention weight gradient is calculated: The attention weight for the district / county level is set... The gradient of the total loss L of the model on the validation set with respect to that weight is 0.18. The value is 0.21 (the negative sign indicates that the weight needs to be increased). According to the parameter update formula, the updated weight is 0.18105. Similarly, the weight of the street level is updated from 0.15 to 0.15125. After each round of updates, the validation set is used for verification. After 20 rounds of iteration, the accuracy of element recognition is improved to 98.1%, the logical consistency of the hierarchy is improved to 99.2%, and the error correction success rate is improved to 97.8%.
[0079] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. An intelligent address resolution method based on a word segmentation engine against error correction, characterized in that, include: S1: Collect heterogeneous address data from multiple sources, standardize the format to unify the address representation, obtain standardized addresses, construct an address corpus, and store it in a structured database; S2: Generate adversarial interference samples based on the address corpus and structured database; construct an intelligent address parsing model, including a real-time input layer, a feature engineering layer, a convolutional layer, an LSTM core modeling layer, a fully connected layer, an evaluation iteration layer, and an output layer; the real-time input layer receives the multi-source heterogeneous address data, calls the word segmentation engine to perform hierarchical word segmentation on the standardized addresses, and generates a noisy training set; the feature engineering layer splits the preprocessed addresses at the character level, and concatenates the word vectors with basic features to form a fused feature vector sequence; the convolutional layer receives the fused vector from the feature engineering layer, and outputs... The LSTM core modeling layer autonomously learns the contextual feature linkage mechanism and glyph semantic similarity mapping relationship of address elements, and outputs a hidden state sequence containing global semantics; the fully connected layer outputs the probability of each character belonging to various labels; the evaluation iteration layer evaluates the output results based on the feature recognition accuracy and sequence labeling index; the output layer first performs preliminary error correction on the preliminary parsing results through pre-trained language methods, and then performs secondary verification through adversarial training error correction methods, and finally outputs the structured address parsing results, along with the parsing confidence of each address element and error correction records; The adversarial training error correction method takes the noisy training set as input and learns the context feature linkage mechanism of address elements and the semantic mapping relationship of glyphs through a generative adversarial architecture. The specific process of the context feature linkage mechanism of the self-learning address elements and the semantic mapping relationship between the glyphs is as follows: Collaborative training is conducted based on the aforementioned noisy training set; After the generator takes the address segmentation sequence as input, it generates interference samples based on the address resolution error paradigm. The discriminator receives the interference samples generated by the generator and the real samples in the noisy training set. By learning the differences between the interference samples and the real samples in terms of element boundary division, hierarchical order arrangement, and semantic association rationality, it outputs the judgment result. The context feature linkage mechanism specifically includes: Provinces must include cities, cities must include districts / counties, and subdistricts must be subordinate to districts / counties. The character shape semantic similarity mapping establishes the correspondence between address elements when their character shapes are similar or their semantics are related; The adversarial training error correction method identifies and corrects anomalies based on the context feature linkage mechanism and glyph semantic similarity mapping. S3: Perform batch verification and error case labeling on the structured address parsing results; reverse-optimize the adversarial interference sample generation strategy and the dictionary feature weights of the word segmentation engine, and adjust the hierarchical attention parameters of the adversarial training error correction method.
2. The method according to claim 1, characterized in that, The specific process of constructing the address corpus is as follows: Collect user-input addresses, addresses on electronic waybills from logistics systems, and geocoded data from government information disclosure. Use regular expressions to filter invalid data containing special symbols or missing fields, and combine locality-sensitive hashing algorithms to merge duplicate addresses. The retained data is standardized at three levels, including unified descriptions at the administrative division level, standardized formats at the road and address level, and extraction of key identifiers at the supplementary information level. The reserved data is stored in a relational database, and an incremental update mechanism is constructed so that newly added addresses are included in the address corpus after manual sampling.
3. The method according to claim 2, characterized in that, The specific process for constructing the incremental update mechanism is as follows: Clearly define the sources and collection frequency of incremental data, and automatically synchronize newly added multi-channel data daily to cover address information generated in real time; An automated filtering step is set up beforehand, reusing the regular expressions and locality-sensitive hashing algorithm used in the initial construction of the corpus to process invalid new data and identify and merge duplicate new addresses; Manual random checks are conducted, and newly added addresses after filtering are randomly selected according to a preset ratio to verify the description of administrative divisions, the format of road addresses, and key signs of ancillary information. The compliance data entry and update record retention will be carried out by sampling new addresses, which will be unified at the administrative division level, standardized at the road and house number level, and extracted and processed at the ancillary information level, and then written in batches into the address corpus corresponding table of the relational database. At the same time, an update log table will be added to the database to record each batch of incremental data.
4. The method according to claim 1, characterized in that, The real-time input layer serves as the data entry point for the intelligent address parsing model. It receives the multi-source heterogeneous address data, processes invalid data using regular expressions, merges duplicate addresses and unifies the format using a string similarity algorithm, performs hierarchical word segmentation on the standardized addresses, and mixes adversarial interference samples with normal word segmentation results according to a preset ratio to generate a noisy training set. The feature engineering layer splits the preprocessed addresses at the character level, converts characters into low-dimensional dense vectors through word vector embedding, extracts basic features, and concatenates the word vectors and basic features into a fused feature vector sequence. The convolutional layer receives the fused feature vector sequence, captures local fixed collocation features, and outputs local features after pooling. The LSTM core modeling layer outputs a hidden state sequence containing global semantics. The fully connected layer maps the fused features of the LSTM core modeling layer and the convolutional layer to the address element label space and outputs the probability of each character belonging to various labels. The evaluation iteration layer evaluates the output results based on the element recognition accuracy and sequence labeling metrics. The output layer converts the label probabilities of the fully connected layer into a structured dictionary, corrects errors using the address corpus, filters surface errors in the initial parsing results using a pre-trained language method, performs a second verification using an adversarial training error correction method, and finally outputs the structured address parsing results.
5. The method according to claim 1, characterized in that, The specific process of hierarchical word segmentation of standardized addresses is as follows: a word segmentation engine that integrates bidirectional long short-term memory network and conditional random field is invoked. The engine has a built-in custom dictionary containing administrative division words, road and community names to form a basic library for element recognition; the standardized addresses are segmented to generate candidate hierarchical sequences and initially delineate element boundaries; the contextual features of the address strings are learned, the constraints of prefix elements on subsequent levels are captured forward, and the suffix elements are extracted backward to confirm the previous levels.
6. The method according to claim 1, characterized in that, The specific process for generating adversarial interference samples is as follows: based on the glyph confusion error paradigm, the address elements are replaced or added / deleted using a pre-constructed glyph similar character library; based on the phonetic interference error paradigm, homophones are extracted and replaced with the original words using pinyin features. Based on the word order reversal error paradigm, the positions of non-terminal elements are swapped without breaking the core hierarchical inclusion relationship. Based on the error paradigm of redundant information interference, words are selected from the noisy vocabulary and inserted into the middle of the address, and finally aggregated to generate adversarial interference samples.
7. The method according to claim 1, characterized in that, The specific process of the initial error correction is as follows: The semantic similarity with the standard place name database is calculated word by word using the pre-trained language method to locate abnormal errors such as typographical errors and pronunciation confusion. Based on the semantic distribution rules of place names, the correct words are automatically matched and corrected, and a regular address word segmentation sequence is output. The secondary verification receives the sequence after preliminary error correction through the adversarial training error correction method, and verifies the membership relationship and sequence relationship based on the address element context feature linkage mechanism learned during training, and identifies and marks anomalies. By combining the aforementioned glyph semantic similarity mapping, complex glyph confusion is checked and corrected, and finally, a structured address parsing result is output.
8. The method according to claim 1, characterized in that, The specific process of the reverse optimization adversarial interference sample generation strategy is as follows: Based on the error paradigm labeling results of the address resolution, the error samples are grouped by features, and the proportion of errors and the difficulty of correction for each group are statistically analyzed. For high-frequency error groups exceeding a preset threshold, increase the generation ratio of high-frequency error groups in adversarial interference samples and refine the sample generation rules. A reinforcement learning generation strategy is introduced for difficult example groups whose correction success rate is lower than a preset threshold. Using the error correction failure rate of the intelligent address resolution model for samples as a reward signal, the training sample generator actively generates interference samples.
9. The method according to claim 1, characterized in that, The specific reverse optimization process of the dictionary feature weights of the word segmentation engine is as follows: The initial weight of each term in the dictionary is calculated using a hybrid algorithm of term frequency-inverse document frequency and mutual information. Based on the dynamic adjustment of word segmentation error feedback, the weight value of words that are continuously erroneously segmented is increased, gradually adjusted and preset with an upper limit. For polysemous words that cause ambiguity, weights are dynamically assigned based on contextual features; Increase the weight of house number in logistics scenarios and increase the weight of administrative division in government scenarios.
Citation Information
Patent Citations
CN119337865A
CN120633651A