A Chinese address matching method based on multi-semantic feature collaboration
Through the method of multi-semantic feature collaboration, deep learning technology is used to extract text and hierarchical semantic features of Chinese addresses, and local reasoning and inference combination are solved, which is the problem of difficulty in effectively capturing semantic information and manual rule setting in the existing technology, and efficient and accurate Chinese address matching is achieved.
Patent Information
- Application Number
- CN202411400842.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-10-09
AI Technical Summary
The existing Chinese address matching method cannot effectively capture the key semantic information of the text, and the manual matching rules are costly and difficult to set.
Using a multi-semantic feature collaboration method, word embedding vectors are generated through the Word2vec model, text recurrent convolutional neural network and graph attention network are used to extract text semantic features and hierarchical semantic features of addresses, and local inference and inference combination are performed by enhancing the sequence inference model to complete address matching.
Effectively capture the multi-semantic features of Chinese addresses, improve the accuracy and efficiency of matching, and reduce the cost and difficulty of setting manual matching rules.
Smart Images

Figure CN118897899B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Chinese address matching, and in particular to, but not limited to, a Chinese address matching method with coordinated multi-semantic features. Background Art
[0002] With the continuous advancement of urbanization and digitalization, the accumulation and application of urban data have become the core elements of modern smart city governance and planning. As an important part of urban data, geospatial data is the link between physical cities and digital systems, and is widely used in smart city construction, geographic navigation, location services, emergency management and other fields. At present, the location information in most geospatial data is stored and expressed in the form of unstructured text, lacking precise association with geographic coordinates, which limits the efficient management and application of geographic information data by urban digital systems. In order to solve this problem, geocoding technology is used to establish the association between text location information and geographic coordinates, thereby converting the location information described in unstructured text into coordinate points that can be accurately located on the map.
[0003] Address matching is one of the key steps in geocoding. It compares the similarity of the input Chinese address with the existing standard address library to find the best matching address so as to convert the input address into geographic coordinates. However, due to the complexity, diversity and non-standardization of Chinese address expressions, the Chinese address matching process has become more challenging. Although there are some matching methods, unfortunately, these methods rely more on the common substrings of Chinese addresses for similarity measurement, which cannot effectively capture the key semantic information of the text, and the manual matching rules are costly and difficult to set. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a Chinese address matching method with multi-semantic features collaboration, which at least solves the problem that the existing matching method cannot effectively capture the key semantic information of the text and the setting of manual matching rules is costly and difficult.
[0005] The technical solutions of the embodiments of the present invention are as follows:
[0006] An embodiment of the present invention provides a Chinese address matching method based on multi-semantic feature collaboration, the method comprising:
[0007] The Chinese address to be matched is parsed for address elements to obtain multiple address elements; the word embedding vector sub-matrix corresponding to the multiple address elements is generated using the Word2vec model; based on the word embedding vector sub-matrix, the text recurrent convolutional neural network is used to extract the text semantic features of the multiple address elements; based on the word embedding vector sub-matrix, the graph attention network is used to extract the hierarchical semantic features of the multiple address elements; based on the enhanced sequential reasoning model, the semantic text features and hierarchical semantic features of all address elements are locally reasoned and reasoned together to complete the matching of the Chinese address to be matched.
[0008] Furthermore, the address element parsing of the Chinese address to be matched to obtain multiple address elements includes: using the Jieba Chinese word segmentation tool to pre-segment the Chinese address, and generating word embedding vector representations of the segmented words based on the BERT model; generating label features of the segmented words based on a bidirectional gated recurrent unit; and using the Viterbi algorithm to perform label sequence inference to obtain the multiple address elements.
[0009] Furthermore, the method of using the Word2vec model to generate a word embedding vector sub-matrix corresponding to multiple address elements includes: using a large number of address elements obtained by parsing Chinese addresses as a training corpus, and constructing an index lookup table containing all address elements; using the Word2vec model to generate a word embedding vector matrix for all address elements; retrieving the word embedding vector representation corresponding to each address element in the Chinese address to be matched in the word embedding vector matrix through the index lookup table, and forming the word embedding vector sub-matrix.
[0010] Furthermore, based on the word embedding vector sub-matrix, a text recurrent convolutional neural network is used to extract text semantic features of the multiple address elements, including: inputting the word embedding vector sub-matrix into a bidirectional long short-term memory network for processing to obtain global context features of the multiple address elements; using a convolutional neural network to perform convolution, maximum pooling, full connection and dimension expansion operations on the global context features to generate local feature vectors of the multiple address elements; superimposing the word embedding vector matrix, the global context features and the local feature vectors to generate text semantic features of the multiple address elements.
[0011] Furthermore, based on the word embedding vector sub-matrix, a graph attention network is used to extract hierarchical semantic features of the multiple address elements, including: taking all address elements in the training corpus as independent nodes in the graph attention network, determining the edges of the graph attention network according to the order of each address element in each address expression, and completing the graph structure construction; using the word embedding vector of each graph node corresponding to the address element to initialize the graph node feature itself; and realizing the hierarchical semantic feature extraction of the multiple address elements by updating the graph node features.
[0012] Furthermore, the node feature update steps for each graph node are as follows: Calculate any node n i Its first-order neighbor node n j The attention coefficient e ij ; Wherein, the attention coefficient e ij Represents node n j For node n i The importance of the attention coefficient e ij Normalize it and get the attention weight a ij ; Use the attention weight a ij For the first-order neighboring node n j The characteristics and the node n i The features are weighted summed to update the node n i The node characteristics itself.
[0013] Furthermore, the method also includes: using a multi-head attention mechanism, each head independently calculates the attention coefficient and node feature update; splicing the update results of all heads, and the spliced node features are used as the hierarchical semantic features of the multiple address elements.
[0014] Furthermore, the enhanced sequential reasoning model includes an input encoding layer, a local reasoning layer, a reasoning combination layer and a result prediction layer, wherein: the input encoding layer is used to splice the text semantic features and hierarchical semantic features of the two input Chinese addresses to be matched, construct a multi-semantic feature vector, and encode the multi-semantic feature vector through a bidirectional long short-term memory network to generate a context-dependent representation of each Chinese address to be matched; the local reasoning layer is used to calculate the local reasoning relationship between the two addresses to be matched through an attention mechanism; the reasoning combination layer is used to combine local reasoning information to generate a global reasoning representation; the result prediction layer is used to use the output of the reasoning combination layer to predict the final Chinese address matching result through a multi-layer perceptron.
[0015] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0016] (1) The Chinese address matching method proposed in the embodiment of the present invention comprehensively considers the text semantic features and hierarchical semantic features of the Chinese address, wherein the text semantic features are used to understand the keywords and context information expressed in the address, and the hierarchical semantic features are used to understand the hierarchical nested information between address elements.
[0017] (2) The embodiment of the present invention proposes a Chinese address matching method based on an enhanced sequential reasoning model. The method matches according to the address expression patterns and multi-semantic features in the training data set, and converts the matching problem into a binary classification problem, thereby solving the problem of difficulty in setting manual matching rules.
[0018] (3) Experimental verification shows that this method has achieved excellent results in matching precision, recall rate and F1 value, which is of great significance for applications such as geocoding. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work, among which:
[0020] Figure 1 A schematic diagram of a flow chart of a Chinese address matching method with multi-semantic feature collaboration provided by an embodiment of the present invention;
[0021] Figure 2 A schematic diagram of the logical architecture of a Chinese address matching method with multi-semantic feature collaboration provided by an embodiment of the present invention;
[0022] Figure 3 A schematic diagram of a process for generating a word embedding vector for an address element provided in an embodiment of the present invention;
[0023] Figure 4 A schematic diagram of a flow chart of address text semantic feature extraction based on a text recurrent convolutional neural network provided in an embodiment of the present invention;
[0024] Figure 5 A schematic diagram of an address matching process based on an enhanced sequence reasoning model provided in an embodiment of the present invention;
[0025] Figure 6 An exemplary schematic diagram of a multi-semantic feature vector of a Chinese address provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. The following embodiments are used to illustrate the present invention, but are not used to limit the scope of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0027] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0028] It should be pointed out that the terms "first\second\third" involved in the embodiments of the present invention are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present invention described here can be implemented in an order other than that illustrated or described here.
[0029] Those skilled in the art will appreciate that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art in the field to which the embodiments of the present invention belong. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0030] Chinese address matching mainly includes the following three steps: address element parsing, address semantic feature extraction and matching algorithm design. Address element parsing is to segment Chinese addresses according to geographical entities such as administrative divisions, roads, house numbers, etc.; address semantic feature extraction is the process of extracting features related to geographical location, geographical features or other semantic information from address text; matching algorithm design is to select appropriate matching algorithms based on address semantic features to match text addresses.
[0031] Address semantic feature extraction is a part of text semantic feature extraction and is also a key basic step in address matching. Address semantic feature extraction improves the accuracy and efficiency of address matching by eliminating text ambiguity, processing synonyms, and understanding context. Existing address semantic feature extraction methods are mainly divided into the following categories.
[0032] Statistical methods mainly rely on word frequency statistics in text or documents to extract semantic features of words or phrases. The main methods include: Term Frequency-Inverse Document Frequency (TF-IDF), N-Gram, Bag of Words Model, etc. This type of method is simple and efficient, and can process large-scale text data, but they ignore word order and context information and cannot fully capture complex semantic relationships and context features.
[0033] The word embedding-based method maps the words in the text to a continuous vector space, so that semantically similar words have a closer spatial distance in the vector space, thereby capturing the semantic relationship between words. For example, Word2Vec uses the Continuous Bag of Word (CBOW) or Skip-Gram Model to train and generate word embedding vectors for the target words and their context in the input text training corpus. GloVe captures the semantic relationship between words by constructing a co-occurrence matrix of words and generates word embedding vectors with rich semantic features. The FastText model regards each word as a set of word sequences consisting of a series of N-Gram subwords, and constructs word embedding vectors by learning these subword vectors. The word embedding-based method can capture rich semantic relationships, but requires a large amount of training data, and the static model cannot handle the situation where a word has multiple meanings.
[0034] Based on the context embedding method, by learning the representation of each word in different contexts to capture the different semantic expressions of the word, the limitation of the traditional word embedding method that it cannot handle the polysemy of a word is overcome. For example, ELMo learns the word embedding vectors of words in different contexts through the bidirectional long short-term memory network (Bi-directional Long Short-Term Memory, Bi-LSTM). BERT adopts a bidirectional Transformer architecture and generates dynamic and context-sensitive word embedding vectors through two pre-training tasks: Masked Language Model (MLM) and Next Sentence Prediction (NSP). Generative Pre-trained Transformer (GPT), as an autoregressive model, generates context-related word embedding vectors by pre-training a unidirectional Transformer architecture. In addition, there are RoBERTa, XLNet, T5, etc. These models further expand and optimize the context embedding method based on Transformer, and improve the processing capability of long-distance dependencies and the generalization ability of the model.
[0035] As a key step in realizing geocoding, address matching algorithm combines natural language processing, geographic information system and other technologies, enabling it to effectively handle the complexity, diversity and irregularity of Chinese address expressions, and improve the accuracy and efficiency of geocoding. Existing address matching algorithms are mainly divided into the following categories.
[0036] Matching algorithms based on string similarity use string similarity measurement methods to quantify the similarity between two addresses, and determine whether they match based on a pre-set similarity threshold. At present, the main string similarity measurement methods include: Levenshtein distance, cosine similarity, Jaccard similarity coefficient, N-Gram similarity, etc. This type of method is simple to implement and efficient, suitable for large-scale data processing, but has limited understanding of address structure and semantics, and has low matching accuracy. Rule-based matching algorithms mainly target specific address data sets, predefine rules that conform to their structural characteristics and semantic relationships, and use these rules to parse and match addresses. For example, dictionary tree matching uses the tree data structure to efficiently store and retrieve, and quickly locate and traverse address element nodes to accurately extract and match standard addresses. Regular expression matching uses regular expressions to combine Chinese characters, English letters, numbers and specific words to define address expression and matching rules. Rule-based matching algorithms have high matching accuracy and efficiency for address data with specific structures, but the rule definition is complex, the maintenance cost is high and the flexibility is limited.
[0037] Matching algorithms based on machine learning and deep learning require a large number of annotated data sets for model training to capture the structural features and semantic information of address data. Among them, machine learning matching algorithms usually rely on feature engineering to manually extract address data features, and then use these features to train classifiers or regression models for matching. For example, matching models are built using algorithms such as random forests, support vector machines, and conditional random fields. Deep learning matching algorithms automatically extract and learn address data features by training multi-layer neural networks to achieve efficient and accurate address matching. For example, convolutional neural networks are used to extract local features of address texts, long short-term memory networks are used to capture the contextual relationships of address sequences, and BERT models are used to understand the deep semantics and global dependencies of address texts. In addition, there are also address matching methods based on multi-task joint learning. These models can handle the diversity, ambiguity, and complexity of addresses and improve the accuracy and efficiency of address matching. However, they require a large number of sample annotated data sets and computing resources, and the training and optimization process of the model is relatively complex.
[0038] Figure 1 A flowchart of a Chinese address matching method based on multi-semantic feature collaboration provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method comprises at least the following steps:
[0039] Step S110, performing address element parsing on the Chinese address to be matched to obtain multiple address elements.
[0040] It should be noted that Chinese address expressions are highly complex, diverse, and non-standard due to their natural language characteristics. Specifically, there are many elements that make up a Chinese address, including province, city, district, community, house number, etc. These elements lack obvious separators in the address expression and are prone to ambiguity. In addition, Chinese address expressions are affected by many factors such as regional culture, idioms, and historical changes, and the degree of standardization and standardization of addresses is low. Therefore, in order to accurately understand and use Chinese addresses, it is first necessary to parse the address elements. For example Figure 2 As shown, after the Chinese address 1 is resolved, n address elements a are obtained. 1 、a 2 、a 3 , ..., a n , Chinese address 2 obtains m address elements b after address resolution 1 、b 2 、b 3 , ..., b m .
[0041] The purpose of address element parsing is to decompose complex Chinese address strings into address elements with clear meanings. These address elements can describe a certain area or a specific geographical entity. For example, the input address can be decomposed into basic elements such as streets, house numbers, and administrative divisions. This step can ensure that each address element can be correctly identified and compared in the subsequent matching algorithm, thereby improving the accuracy of matching.
[0042] Step S120, using the Word2vec model to generate word embedding vector sub-matrices corresponding to the multiple address elements.
[0043] Here, the embodiment of the present invention uses the CBOW training method of the Word2vec model to generate a word embedding vector for each address element, thereby combining to obtain a word embedding vector matrix corresponding to the Chinese address to be matched.
[0044] Word2vec is a technique for generating word vectors. It learns the vector representation of words by training a neural network so that semantically similar words are also close in the vector space. The goal of the CBOW model is to predict the target word based on the context words. It assumes that the surrounding words (context) of a word are useful for predicting the word. The CBOW model accepts multiple context words as input and outputs a probability distribution of the target word.
[0045] Step S130: Based on the word embedding vector sub-matrix, a text recurrent convolutional neural network is used to extract text semantic features of the multiple address elements.
[0046] Here, Text-RCNN is a text classification model based on Convolutional Neural Network (CNN), which uses convolutional layers to extract local features in text and uses Recurrent Neural Network (RNN) to process the sequence characteristics of text.
[0047] In address matching, Text-RCNN can help identify and extract keywords and phrases in address text and capture local semantic information. When dealing with addresses with mixed long and short sentences, redundant information, and word order changes, Text-RCNN can use its ability to capture contextual information to identify subtle changes in expression and maintain semantic consistency.
[0048] Step S140: Based on the word embedding vector matrix, use a graph attention network to extract the hierarchical semantic features of the multiple address elements.
[0049] Here, Chinese addresses not only contain rich textual semantic features, but also have specific hierarchical semantic features between address elements. These hierarchical semantic features reflect the spatial topological relationship of address elements, such as the inclusion and adjacency relationships between administrative divisions, the inclusion, intersection or adjacency relationships between administrative divisions and roads, and the inclusion and adjacency relationships between roads and landmarks. Therefore, the present invention will use a graph attention network to extract the hierarchical semantic features of the address.
[0050] Graph Attention Networks (GAT) construct a graph structure of address elements and use the attention mechanism to capture the spatial topological relationship between elements, so as to accurately extract and represent the hierarchical semantic features of the address, such as distinguishing address components at different levels such as streets, districts, and cities.
[0051] By combining Text-RCNN and GAT, the embodiment of the present invention can extract multi-semantic features of the Chinese address to be matched from different angles, including local text features and hierarchical structural features.
[0052] Step S150, based on the enhanced sequence reasoning model, local reasoning and reasoning combination are performed on the text semantic features and hierarchical semantic features of all address elements to complete the matching of the Chinese address to be matched.
[0053] Here, the Enhanced Sequential Inference Model (ESIM) optimizes the sequence reasoning process through reinforcement learning. The ESIM module usually contains a bidirectional long short-term memory network, which can encode the multi-semantic features of the address. In address matching, ESIM can be used to integrate the features extracted by Text-RCNN and GAT for deeper semantic reasoning and matching. When dealing with diverse and non-standardized address expressions, the ESIM module maintains a high matching accuracy through its semantic integration and reasoning capabilities, improving the matching effect of the Chinese address matching method.
[0054] The matching method based on the enhanced sequential reasoning model learns how to match addresses based on context and hierarchical relationships by analyzing patterns in the training data. Defining the matching problem as a binary classification problem (match or mismatch) simplifies the output requirements of the model, allowing the model to focus more on learning how to match accurately. Traditional rule-based systems may require a lot of manual intervention to set and adjust matching rules, which is time-consuming and may be subjective. The embodiments of the present invention use the enhanced sequential reasoning model to automate the learning process, reduce the reliance on manually set rules, and improve the adaptability and flexibility of the system.
[0055] In an embodiment of the present invention, an effective solution is provided for Chinese address matching by comprehensively utilizing a variety of advanced deep learning technologies. The key advantages of this multi-model collaborative approach are: Comprehensiveness: It can extract and integrate address information from different angles and levels, including local features, global context, hierarchical relationships, and complex semantic dependencies. Adaptability: It can adapt to the complexity and irregularity of Chinese addresses, and maintain high accuracy regardless of the mixture of long and short sentences, redundant information, or changes in word order. Robustness: Through the combination of multiple models, it can show better robustness when facing address descriptions in different situations.
[0056] In some possible embodiments, the above-mentioned step S110 "parsing the address elements of the Chinese address to be matched to obtain multiple address elements" is further implemented through the following process: using the Jieba Chinese word segmentation tool to pre-segment the Chinese address, and generating a word embedding vector representation of the segmented words based on the BERT model; generating label features of the segmented words based on a bidirectional gated recurrent unit; and using the Viterbi algorithm to perform label sequence inference to obtain the multiple address elements.
[0057] In the implementation, we first use the Jieba Chinese word segmentation tool to pre-segment the Chinese address, and generate word embedding vector representations of the segmented words based on the BERT model; then generate label features of the segmented words based on the bidirectional gated recurrent unit; finally, use the Viterbi algorithm to perform label sequence inference to implement Chinese address element parsing. Table 1 lists several examples of Chinese address element parsing, where " / " represents the Chinese separator.
[0058] Table 1 Example of parsing Chinese address elements
[0059] ;
[0060] In some possible embodiments, the above-mentioned step S120 "using the Word2vec model to generate a word embedding vector sub-matrix corresponding to multiple address elements" includes the following steps: using a large number of address elements obtained by parsing Chinese addresses as a training corpus, and constructing an index lookup table containing all address elements; using the Word2vec model to generate a word embedding vector matrix for all the address elements; retrieving the word embedding vector representation corresponding to each of the address elements in the Chinese address to be matched in the word embedding vector matrix through the index lookup table, and forming the word embedding vector sub-matrix.
[0061] Here, the Word2vec model is used to generate a word embedding vector matrix for all address elements in the input training corpus. (|D| represents the number of address elements in the training corpus, and d represents the word embedding vector dimension); Finally, for any given Chinese address that has been parsed by address elements, its corresponding word embedding vector sub-matrix can be retrieved in the word embedding vector matrix M through the index lookup table (|L| represents the number of address elements in the Chinese address), such as Figure 3 As shown in the figure, there are 20942 address elements in the training corpus, and the index lookup table is numbered from 0 to 20941. Assuming that the Chinese address to be matched is "No. 74, Zhongsheng Road, Shuangliu District, Chengdu City, Sichuan Province", the five address elements "Sichuan Province", "Chengdu City", "Shuangliu District", "Zhongsheng Road", and "No. 74" are obtained through parsing. The corresponding word embedding vectors are expressed as "V 四川省 "V 成都市 "V 双流区 "V 中胜路 "V 74号 ", combined to get the word embedding vector sub-matrix , where |L| is 5.
[0062] In some possible embodiments, the above-mentioned step S130 "using a text recurrent convolutional neural network to extract text semantic features of the multiple address elements" is implemented through the following process: inputting the word embedding vector sub-matrix into a bidirectional long short-term memory network for processing to obtain global context features of the multiple address elements; using a convolutional neural network to perform convolution, maximum pooling, full connection and dimension expansion operations on the global context features to generate local feature vectors of the multiple address elements; superimposing the word embedding vector matrix, the global context features and the local feature vectors to generate text semantic features of the multiple address elements.
[0063] Here, the semantic feature extraction process of address text based on Text-RCNN is as follows: Figure 4 As shown, it includes the following three stages:
[0064] S1, Address global context feature extraction: Text-RCNN inputs the word embedding vector matrix of the address element into the bidirectional long short-term memory network, which consists of two independent long short-term memory networks (LSTM) in the forward (left to right) and backward (right to left) directions. First, for each input The forward LSTM network starts from the first address element and calculates the forward hidden state at the current moment through gating mechanisms such as input gate, forget gate and output gate. The calculation process of the backward LSTM network is opposite to that of the forward LSTM. It starts from the last address element and calculates each The backward hidden state at time Then, Bi-LSTM forwards the hidden state and the backward hidden state Concatenate to generate a bidirectional hidden state Finally, the bidirectional hidden states at each moment are stacked to generate the global context feature S2, Address local feature extraction: Text-RCNN uses convolutional neural networks to extract global context features Convolution, maximum pooling, full connection, and dimension expansion are performed to extract local features of the input address elements. In the convolution operation, Text-RCNN uses multiple convolution kernels with different window sizes to generate their corresponding feature maps. . Figure 4 Convolution kernels with heights of 2, 3, and 4 and widths of d are used respectively. Since the width of the convolution kernel is the same as the dimension of the global context feature, the convolution operation is only performed in its height direction. Then, for the multiple feature maps generated by the convolution operation, Text-RCNN uses maximum pooling to extract the maximum value in each feature map, thereby capturing the most significant features and generating a fixed-size feature vector. Finally, the pooling results are combined and expanded through full connection and dimensionality expansion operations to generate local features. .
[0065] S3, address text semantic feature generation: Text-RCNN embeds words into vector sub-matrices , global context features and local features The text semantic features of the address are generated by superposition. This step makes full use of each feature information to improve the model's understanding of the address text semantics. The specific calculation formula is as follows:
[0066] ;
[0067] In the formula, The textual semantic features representing the address, represents the word embedding vector matrix, represents the global context feature, Represents local features.
[0068] In some possible embodiments, the use of a graph attention network to extract hierarchical semantic features of the multiple address elements includes: treating all address elements in the training corpus as independent nodes in the graph attention network, determining the edges of the graph attention network according to the order of each address element in each address expression, and completing graph structure construction; using the word embedding vector of each graph node corresponding to the address element to initialize the graph node features itself; and realizing the address hierarchical semantic feature extraction of the multiple address elements by updating the graph node features.
[0069] Here, first, all address elements in the training corpus are used as nodes of the Graph Attention Networks (GAT), where each address element is regarded as an independent node. Then, the edges of the Graph Attention Network are constructed according to the order of the address elements in each address expression. For example, in the address expression of "No. 74, Zhongsheng Road, Shuangliu District, Chengdu City, Sichuan Province", the graph structure can be represented by the following edges: "Sichuan Province → Chengdu City", "Chengdu City → Shuangliu District", "Shuangliu District → Zhongsheng Road", "Zhongsheng Road → No. 74". Then, the word embedding vector of each address element is used to initialize the features of each graph node. After completing the construction of the graph structure and the initialization of the graph node features, the address-level semantic feature extraction is realized by updating the graph node features.
[0070] In some possible embodiments, the node feature update steps for each graph node are as follows: Calculate any node n i Its first-order neighbor node n j The attention coefficient e ij ; Wherein, the attention coefficient e ij Represents node n j For node n i The importance of the attention coefficient e ij Normalize it and get the attention weight a ij ; Use the attention weight a ij For the first-order neighboring node n j The characteristics and the node n i The features are weighted summed to update the node n i The node characteristics itself.
[0071] Here, the specific calculation formula is as follows:
[0072] ;
[0073] ;
[0074] ;
[0075] In the formula, f i and f j Represents node n i and node n j The node characteristics of Represents node n i Updated node features, e ij Represents node n i and node n j The attention coefficient, a ij Represents node n i and node n j The attention weight, a T represents a trainable attention vector, || represents vector concatenation, exp() represents a natural exponential function, W represents a trainable weight matrix, LeakyRelu and represents the activation function, N i Represents node n i The number of nodes in the set of its first-order neighboring nodes and its own node.
[0076] In some possible embodiments, the method further includes: using a multi-head attention mechanism, each head independently calculating the attention coefficient and node feature update; splicing the update results of all heads, and using the spliced node features as the hierarchical semantic features of the multiple address elements.
[0077] Here, the specific calculation formula is as follows:
[0078] ;
[0079] In the formula, Represents node n i Updated node features, f j Represents node n j , h represents the number of attention heads, and Represent the attention weight and weight matrix of the kth attention head, N i Represents node n i The number of nodes in the set of the first-order neighboring nodes and the node itself, || represents vector concatenation, Represents the activation function.
[0080] like Figure 2 As shown, for any address element e i , and its corresponding node feature is , the node features corresponding to the address elements adjacent to the address element are expressed as , , and , and the attention weights between these adjacent address elements are expressed as , , and , and its own attention weight is expressed as , the address element e obtained after training the graph attention network i The updated node features are In this way, the multi-head attention mechanism is used to enhance the model's ability to extract hierarchical semantic features, thereby improving the accuracy of address matching.
[0081] In some possible embodiments, the enhanced sequential reasoning model includes an input encoding layer, a local reasoning layer, a reasoning combination layer and a result prediction layer, wherein: the input encoding layer is used to splice the text semantic features and hierarchical semantic features of the two input Chinese addresses to be matched, construct a multi-semantic feature vector, and encode the multi-semantic feature vector through a bidirectional long short-term memory network to generate a context-dependent representation of each Chinese address to be matched; the local reasoning layer is used to calculate the local reasoning relationship between the two addresses to be matched through an attention mechanism; the reasoning combination layer is used to combine local reasoning information to generate a global reasoning representation; the result prediction layer is used to use the output of the reasoning combination layer to predict the final Chinese address matching result through a multi-layer perceptron.
[0082] Here, if Figure 5 The figure shows a schematic diagram of the address matching process based on ESIM provided by an embodiment of the present invention. For two given Chinese addresses A and B to be matched, the input coding layer first concatenates the text semantic features and hierarchical semantic features of each Chinese address to construct a multi-semantic feature vector S A and S B ,like Figure 6 The figure shows an example of a multi-semantic feature vector. Then, the multi-semantic feature vector is encoded by Bi-LSTM to generate the context-dependent representation of each Chinese address to be matched, which are denoted as H A and H B .
[0083] The local reasoning layer calculates the local reasoning relationship between the addresses to be matched through the attention mechanism. First, based on the context dependency expression H A and H B , calculate the attention matrix e between each address element in the address to be matched A and the address to be matched B. Then, the attention matrix e is used to soft-align addresses A and B, so as to better capture the fuzzy and many-to-many relationship between address elements and generate an aligned representation and Finally, the context dependency representation and the alignment representation are subtracted and dot-producted, and then concatenated to generate the enhanced representation M A and M B The reasoning combination layer combines local reasoning information to generate a global reasoning representation. First, we use Bi-LSTM again to enhance the representation M A and M B Encode to capture the reasoning relationship at the sentence level. Then, the encoded results are processed through pooling operations (average pooling and maximum pooling) to obtain a fixed-length vector. Finally, all pooling results are concatenated to generate the final matching vector v match .
[0084] The result prediction layer will use the multilayer perceptron (MLP) to predict the final Chinese address matching result based on the output of the global reasoning layer. MLP outputs the final matching score based on the matching vector, which is used to determine whether the two Chinese addresses to be matched match. The specific calculation formula is as follows:
[0085] ;
[0086] In the formula, y represents the matching result, represents the activation function, v match represents the final matching vector, w and b represent the parameters that need to be trained.
[0087] In the above embodiments, the Chinese address matching method based on the ESIM model has the following characteristics and advantages: Multi-semantic feature fusion: combines text and hierarchical semantic features to more comprehensively understand address information. Context-dependent learning: The bidirectional long short-term memory network can capture the long-distance dependencies of address elements. Attention mechanism: Through the attention mechanism of the local reasoning layer, the model can focus on more important address elements. Soft alignment: Better handle the complex correspondence between address elements. Global reasoning: Through pooling and re-encoding of the bidirectional long short-term memory network, the model can perform higher-level reasoning. Result prediction: Use a multi-layer perceptron for the final classification prediction, which is simple and efficient. Through this multi-level and multi-stage processing, the ESIM model can accurately match Chinese addresses, and is particularly suitable for processing complex and non-standard address expressions.
[0088] The above-mentioned Chinese address matching method with multi-semantic features collaboration is described below in conjunction with a specific embodiment. However, it should be noted that this specific embodiment is only for better illustrating the present invention and does not constitute an improper limitation to the present invention.
[0089] This specific embodiment designs a series of experiments and analyzes the results. The experimental part includes experimental environment and data, evaluation indicators, hyperparameter settings, experimental results and analysis. First, the main parameters of the experimental environment are as follows: the deep learning framework is PyTorch 2.1.0, the development language is Python 3.10, the CPU is 13th Gen Intel(R) Core(TM) i9-13900K, the memory is 128GB, and the GPU is NVIDIA GeForce RTX 4090.
[0090] This specific embodiment uses the sample data set created by Li et al. as the experimental data set. The data set has 439,780 POI (Point of Interest) address pairs and their corresponding labels, and the positive and negative sample ratio of the data is 1:1. These POI address pairs include 190,231 POI address data from Baidu Maps, 246,317 POI address data from Tencent Maps, and 160,823 POI address data from Amap within the Chengdu area. Table 2 lists some examples in the data set.
[0091] Table 2 Examples of Chinese address matching sample data set
[0092] ;
[0093] In order to comprehensively evaluate the performance of the Chinese address matching method with multi-semantic feature collaboration proposed in the embodiment of the present invention, three evaluation indicators, precision, recall and F1-Score, are used. The confusion matrix used to calculate these evaluation indicators is shown in Table 3. Precision measures the proportion of actual matching addresses among the addresses predicted by the model to be matched, which reflects the ability of the model to avoid false matches. Recall measures the proportion of actual matching addresses that are correctly predicted by the model to be matching addresses, which reflects the model's ability to recognize all actual matching addresses. The F1 value is the harmonic mean of precision and recall, reflecting the overall performance of the model in balancing accuracy and recognition ability in the address matching task. The specific calculation formula is as follows:
[0094] ;
[0095] In the formula, P is the precision, R is the recall, and F1-Score is the F1 value.
[0096] Table 3 Confusion matrix
[0097] ;
[0098] Among them, TP (True Positive) means that the actual class is positive and the predicted class is also positive, TN (True Negative) means that the actual class is negative and the predicted class is also negative, FP (False Positive) means that the actual class is negative and the predicted class is positive, and FN (True Negative) means that the actual class is positive and the predicted class is negative.
[0099] In order to improve the performance of the address matching model, this specific embodiment conducts tuning experiments on the key hyperparameters of the model. By optimizing these hyperparameters, the best performance of the model is achieved. Specifically, four hyperparameters, including hidden size, attention heads, dropout rate, and batch size, are mainly tuned, and the optimal parameter combination is selected, as shown in Table 4.
[0100] Table 4 Hyperparameter settings of the address matching model
[0101] ;
[0102] In order to verify the effectiveness of the Chinese address matching method proposed in the present invention, a comparative experiment and an ablation experiment were designed in the specific embodiment. In the comparative experiment, we selected a variety of baseline methods for comparison, covering string similarity calculation methods, machine learning methods, and deep learning methods. In the ablation experiment, the Text-RCNN and GAT modules were removed respectively, and the performance changes of the overall combined model (that is, the model of the combination of Text-RCNN, GAT, and ESIM provided in the embodiment of the present invention, abbreviated as Text-RCNN+GAT+ESIM in Table 5) corresponding to the Chinese address matching method proposed in the present invention were observed in the Chinese address matching task. Through this experimental setting, the contribution of each module in the Chinese address matching method proposed in the present invention can be better explained. The results of the comparative experiment and the ablation experiment are shown in Table 5.
[0103] Table 5 Results of comparative experiments and ablation experiments
[0104] ;
[0105] Among the string similarity calculation methods, the accuracy of Levenshtein Distance, Jaccard Similarity, and Cosine Similarity all reached 100%. This is because these methods rely on strict character-level or vocabulary-level similarity measurements, and only when the two addresses are completely identical or highly similar in characters will they be judged as matches. Therefore, when these methods output positive matching results, it can almost ensure that the match is accurate, avoiding the occurrence of false matches, thereby maintaining the accuracy at 100%. However, such strict matching conditions lead to obvious deficiencies in processing subtle changes in address expression (such as character order adjustment, word replacement, etc.). For example, when the input addresses are "No. 6, Shenghua Road, Wuhou District, Chengdu City, Sichuan Province" and "CPECC Building, No. 6, Shenghua Road, Wuhou District, Chengdu City", even if the two addresses have high similarity in actual semantics, they will be judged as mismatches due to the difference in characters. As a result, a large number of correct matching addresses are missed, which greatly reduces the recall rate (all below 19%), and further affects the performance of the F1 value. In general, although these methods perform well in avoiding false matches, they cannot effectively capture deep semantic information when dealing with the diversity and complexity of Chinese addresses, resulting in a large number of correct matches being missed.
[0106] Among machine learning methods, random forest and support vector machine (SVM) effectively capture address features and classification boundaries by introducing feature engineering and classification strategies, significantly improving the matching effect. Specifically, the precision of random forest is 89.24%, the recall rate is 85.81%, and the F1 value is 87.49%. Compared with the string similarity calculation method, all evaluation indicators have been significantly improved. This is mainly due to the fact that random forest integrates multiple decision trees and learns on different feature dimensions, thereby making full use of the diversity of data to capture the relationship between complex address features. At the same time, combined with the word embedding features generated by Word2vec, random forest can understand the semantic information of Chinese addresses in a higher dimension, thereby reducing mismatches and missed detections. The precision of SVM is 89.52%, the recall rate is 86.58%, and the F1 value is 88.02%. All evaluation indicators are slightly higher than those of random forest. This is mainly due to the fact that SVM can more accurately capture the boundaries of address features by maximizing the classification interval, especially when dealing with addresses with high similarity, it shows better classification effects. At the same time, SVM combines the word2vec word embedding features to construct a more sophisticated classification hyperplane in the feature space, enabling it to effectively deal with complex address expressions. Overall, compared with the string similarity calculation method, the machine learning method performs well in dealing with the diversity and complexity of Chinese addresses, with significant improvements in precision, recall, and F1 value.
[0107] Among the deep learning methods, the Siamese LSTM, MatchPyramid, and BERT models further improved the Chinese address matching effect. Specifically, the Siamese LSTM achieved a precision of 93.61%, a recall of 93.54%, and an F1 value of 93.58%. The model captures contextual information in the address sequence through a weight-sharing Bi-LSTM network and performs well in dealing with changes in address word order and inconsistencies in local expressions. The MatchPyramid achieved a precision of 95.27%, a recall of 92.02%, and an F1 value of 93.62%. The model gradually extracts multi-level semantic features in the address through hierarchical convolution and pooling operations. This multi-level semantic feature enables the model to perform well in capturing local features and global matching patterns of addresses, especially when dealing with complex, redundant, or additionally described addresses. BERT achieved a precision of 94.70%, a recall of 93.83%, and an F1 value of 94.26%. The model is based on the bidirectional attention mechanism of Transformer, which captures deep semantic relationships in the global context, enabling it to better understand complex address expressions and contextual dependencies. Overall, deep learning methods show significant advantages in Chinese address matching tasks. Compared with the first two methods, the deep learning method model shows better performance in dealing with word order changes, redundant information, and capturing deep semantic relationships. The Chinese address matching method proposed in this invention (combined with Text-RCNN, GAT, and ESIM models) achieved the best matching effect, with an accuracy of 95.85%, a recall rate of 95.83%, and an F1 value of 95.84%, which is significantly better than all other comparison methods. This is mainly due to the following points:
[0108] First, Text-RCNN combines the advantages of RNN and CNN, and can effectively capture global contextual features and local features in addresses. This combination enables the model to perform well when dealing with mixed long and short sentences, redundant information, and word order changes, ensuring the accuracy of matching. For example, when dealing with addresses containing different word orders or redundant descriptions, Text-RCNN can identify subtle changes in expression and maintain semantic consistency by capturing contextual information. This was verified in the ablation experiment. The performance of the model (GAT+ESIM) after removing the Text-RCNN module dropped significantly, with precision, recall, and F1 values dropping by 2.24%, 2.00%, and 2.12%, respectively. This shows that Text-RCNN plays a key role in extracting rich semantic information from addresses and dealing with complex expressions.
[0109] Secondly, GAT accurately extracts hierarchical semantic features in addresses by constructing a graph structure between address elements and dynamically assigning weights in combination with the attention mechanism. This enables the model to effectively capture the hierarchical relationship between address elements and perform well when processing multi-level address descriptions. For example, in addresses with complex hierarchical relationships, GAT can capture fine-grained semantic relationships between address elements, such as the dependencies between administrative divisions, streets, and house numbers. After removing the GAT module in the ablation experiment (represented as Text-RCNN+ESIM in Table 5), the model's precision, recall, and F1 value decreased by 1.05%, 1.72%, and 1.39%, respectively, which also shows the importance of GAT in extracting hierarchical semantic features.
[0110] Finally, the ESIM module plays a role in semantic integration and reasoning in the Chinese address matching method proposed in the present invention. By encoding the multi-semantic features of the address through Bi-LSTM and combining local reasoning with global semantic integration, ESIM can better capture complex semantic dependencies. This enables ESIM to maintain a high matching accuracy when processing diversified and non-standardized address expressions, thereby improving the matching effect of the Chinese address matching method proposed in the present invention.
[0111] In summary, the method proposed in the present invention realizes the effective extraction and modeling of text semantic features, hierarchical semantic features and multi-semantic relations of the address through the organic combination of Text-RCNN, GAT and ESIM modules. The ablation experiment results show that each module complements each other in the Chinese address matching method proposed in the present invention, and the lack of any module will lead to a significant decrease in matching performance. Combining the comparative experiment and the ablation experiment results, it can be seen that the method of the present invention shows significant advantages in the Chinese address matching task and achieves the best matching effect.
[0112] The embodiment of the present invention proposes a Chinese address matching method based on the collaboration of multiple semantic features. The method combines Text-RCNN, GAT and ESIM models, which are respectively used to extract the text semantic features of the address, the hierarchical semantic features and the reasoning and integration of multiple semantic features. By organically combining the modules, the model can effectively cope with the complex expressions, diverse structures and non-standard descriptions in Chinese addresses, and improve the accuracy and robustness of matching. The experimental results show that the method proposed in this paper is superior to the existing string similarity calculation method, machine learning method and deep learning method in terms of precision, recall and F1 value. Specifically, the precision rate of the method of the present invention is 95.85%, the recall rate is 95.83%, and the F1 value is 95.84%, achieving the best matching effect. At the same time, the ablation experiment verifies the key role of Text-RCNN, GAT and ESIM modules in the overall model, and the lack of any module will lead to a significant decrease in matching performance.
[0113] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present invention. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present invention, the size of the serial number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention. The serial numbers of the above-mentioned embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.
[0114] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0115] In the several embodiments provided by the present invention, it should be understood that the disclosed methods can be implemented in other ways. The methods disclosed in the several method embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments. The features disclosed in the several method embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments.
[0116] The above is only an embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A Chinese address matching method based on multi-semantic feature collaboration, characterized in that: include: Parse the address elements of the Chinese address to be matched to obtain multiple address elements; Generate word embedding vector sub-matrices corresponding to the multiple address elements using the Word2vec model ; Embed the word into a vector matrix Input into the bidirectional long short-term memory network for processing to obtain the global context features of the multiple address elements ; The global context features are trained using a convolutional neural network Convolution, maximum pooling, full connection and dimension expansion operations are performed in sequence to generate local feature vectors of the multiple address elements. ; Among them, | L | is the number of address elements, d is the word embedding vector dimension, and the convolution operation uses heights of 2, 3, and 4 and widths of d The convolution kernel only performs convolution in the height direction; Embed the word into a vector matrix , the global context feature and the local eigenvector Overlay to generate text semantic features of the multiple address elements ; Based on the word embedding vector matrix , extracting hierarchical semantic features of the multiple address elements using a graph attention network; Based on the enhanced sequence reasoning model, local reasoning and reasoning combination are performed on the text semantic features and hierarchical semantic features of all address elements to complete the matching of the Chinese address to be matched.
2. The method according to claim 1, characterized in that The address elements of the Chinese address to be matched are parsed to obtain multiple address elements, including: Use the Jieba Chinese word segmentation tool to pre-segment the Chinese address, and generate word embedding vector representations of the segmented words based on the BERT model; Generate a label feature of the segmented word based on a bidirectional gated recurrent unit; The Viterbi algorithm is used to perform label sequence inference to obtain the multiple address elements.
3. The method according to claim 1, characterized in that The method of using the Word2vec model to generate a word embedding vector sub-matrix corresponding to a plurality of address elements includes: The address elements obtained by parsing a large number of Chinese addresses are used as training corpus, and an index lookup table containing all address elements is constructed; Generate a word embedding vector matrix of all the address elements using the Word2vec model; The word embedding vector representation corresponding to each address element in the Chinese address to be matched is retrieved in the word embedding vector matrix through the index lookup table, and the word embedding vector sub-matrix is formed.
4. The method according to claim 3, characterized in that The step of extracting hierarchical semantic features of the plurality of address elements using a graph attention network based on the word embedding vector sub-matrix includes: All address elements in the training corpus are used as independent nodes in the graph attention network, and the edges of the graph attention network are determined according to the order of each address element in each address expression to complete the construction of the graph structure; Use the word embedding vector representation of the address element corresponding to each graph node to initialize the features of the graph node itself; The hierarchical semantic feature extraction of the multiple address elements is achieved by updating the graph node features.
5. The method according to claim 4, characterized in that The node feature update steps for each graph node are as follows: Calculate any node n i Its first-order neighboring nodes n j The attention coefficient between e ij ; Wherein, the attention coefficient e ij Representation Node n j For nodes n i the importance of The attention coefficient e ij Normalize and get the attention weight a ij ; Using the attention weights a ij For the first-order neighboring nodes n j The characteristics and nodes n i The features are weighted summed to update the node n i The node characteristics itself.
6. The method according to claim 5, characterized in that The method further comprises: Using a multi-head attention mechanism, each head independently calculates the attention coefficient and node feature update; the update results of all heads are spliced, and the spliced node features are used as the hierarchical semantic features of the multiple address elements.
7. The method according to any one of claims 1 to 6, characterized in that: The enhanced sequence reasoning model includes an input encoding layer, a local reasoning layer, a reasoning combination layer and a result prediction layer, wherein: The input encoding layer is used to concatenate the text semantic features and hierarchical semantic features of the two input Chinese addresses to be matched, construct a multi-semantic feature vector, and encode the multi-semantic feature vector through a bidirectional long short-term memory network to generate a context-dependent representation of each Chinese address to be matched; The local reasoning layer is used to calculate the local reasoning relationship between the two Chinese addresses to be matched through an attention mechanism; The reasoning combination layer is used to combine local reasoning information to generate a global reasoning representation; The result prediction layer is used to predict the final Chinese address matching result based on the output of the reasoning combination layer through a multi-layer perceptron.
Citation Information
Patent Citations
Multi-source POI semantic matching method and device based on deep learning and storage medium thereof
CN114461943A