Address data management method based on deep learning
Through the intelligent reasoning method based on deep learning-based address recognition and address tree model, the problem of inefficiency of existing address governance methods is solved, the high accuracy and standardization of address data are achieved, and the work efficiency is improved.
Patent Information
- Application Number
- CN202411654572.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-21
AI Technical Summary
The existing address governance methods are time-consuming and labor-intensive and inefficient, making it difficult to ensure the accuracy and consistency of address data.
Using an intelligent reasoning method based on deep learning-based address recognition and address tree model, we can realize address name completion, hierarchical association and missing address completion by building a seven-level standard address library, training the BERT+Bi_LSTM+CRF model, and building an address transfer matrix and address tree.
It improves the accuracy and standardization of address governance, improves the quality and work efficiency of customer address data, and reduces the time for manual verification and correction.
Smart Images

Figure CN119669491A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of address data management technology, and in particular, to an address data management method based on deep learning. Background Art
[0002] Place names are the proper names people give to natural or human geographical entities at a specific spatial location, including names of natural geographical entities, names of administrative divisions, names of streets and lanes, names of geographical entities with important geographical orientation, etc. Addresses are extensions of place names, usually indicating more specific positioning points, and are a combination or superposition of place names, with hierarchy and detail.
[0003] In actual applications, due to the untimely update of address information after the government administrative division changes, the inconsistency of address entry specifications or standards in the business system, etc., the user file address information in the marketing business system has problems such as inconsistent administrative divisions, incomplete addresses, and inaccurate locations. For example, the number of customer electricity addresses across the country is huge, the address data structure is complex, the quality of urban and rural address data is inconsistent, and regional habits vary greatly. At this time, address data governance becomes an urgent need. Address data governance is the process of standardizing, cleaning, integrating and managing address data, and its purpose is to ensure the accuracy, consistency and availability of address data.
[0004] The traditional address management method used in the prior art is to manually compile verification scripts, manually mark problems, and manually send them to the grassroots for manual verification and manual correction of errors. This method not only takes up a lot of working time of grassroots station personnel, consumes a lot of manpower, material and financial resources, but also has low efficiency and takes a long time to complete the task. At the same time, data quality is greatly affected by human factors, and verification is difficult, which affects the efficient development of other marketing businesses such as fault repair, business expansion registration, meter rotation, and the improvement of customer service quality. Summary of the invention
[0005] The purpose of the present invention is to solve the problems that the existing address management methods are time-consuming, labor-intensive and inefficient, and to provide an address data management method based on deep learning. The address data management method based on deep learning improves the accuracy and standardization of address management, improves the data quality of customer addresses, and improves work efficiency.
[0006] In order to achieve the above-mentioned object, the present invention provides an address data management method based on deep learning, which includes address recognition based on deep learning and address intelligent reasoning based on an address tree model, wherein:
[0007] Address recognition based on deep learning includes:
[0008] Step 1: Build an address hierarchy system;
[0009] Step 2: Build an address semantic resource library;
[0010] Step 3: Construct address segmentation training samples;
[0011] Step 4: Train the address recognition model;
[0012] Step 5: Use the model to identify the address;
[0013] Address intelligent reasoning based on the address tree model includes:
[0014] Step A, constructing an address transfer matrix;
[0015] Step B: construct a standard address tree;
[0016] Step C: Complete the address name, associate the address level, and complete the missing address.
[0017] Preferably, the seven-level address labeling system constructed in step 1 includes: provincial level, municipal level, district and county level, street level, neighborhood committee level, road level and community level.
[0018] Preferably, the data sources of the address semantic resource library constructed in step 2 include: obtaining complete five-level administrative division information of "province-city-district-street-residents' committee" from the Ministry of Civil Affairs, obtaining national statistical division codes and urban-rural division codes from the Statistics Bureau, and manually supplementing functional zoning data; wherein the functional zoning data includes high-tech development zones and new areas planned in various places.
[0019] Preferably, step 3 comprises:
[0020] Step 3.1, determine the annotation type: use BIO annotation method to identify entities, annotate the first value of a word as B, the rest as I, and the non-entity as O; at the same time, mark the address mark as A;
[0021] Step 3.2, select sample data, including two sources, one is the constructed five-level standard address library, and the other is power data;
[0022] Step 3.3, labeling address data: For the five-level standard address library, use the BIO labeling method to label; for power data, map the first five levels of addresses to the five-level standard address library respectively, and retain up to the seventh level of addresses; among them, the data that cannot be mapped to the standard address is manually checked. If the check is passed, the address labeling data will be retained; if the check fails, the labeling data will not be added to the training sample.
[0023] Preferably, in step 4, a training algorithm is designed, and a BERT+Bi_LSTM+CRF algorithm is used to train the address recognition model, wherein:
[0024] The processing flow of the BERT algorithm includes: pre-training, that is, training the model on a large amount of unlabeled data of various tasks; and fine-tuning, that is, adding an output layer to the BERT model according to a specific downstream task, initializing the BERT model using the model parameters trained in the pre-training phase, and then fine-tuning the model parameters on the labeled dataset of the task;
[0025] Bi-LSTM is a two-layer neural network, in which the first layer takes the starting input of the series from the left, that is, the input starts from the beginning of the sentence when processing text; the second layer takes the starting input of the series from the right, that is, the last word of the sentence is taken as input when processing text, and the same processing as the first layer is performed in reverse; finally, the two results obtained by the two layers are processed;
[0026] In the CRF algorithm, let X and Y be random variables, where X = (X1, X2, ..., X i ,...,X m ), Y=(Y1,Y2,...,Y j ,...,Y n ), the conditional probability of the input sequence X predicting the output sequence Y is:
[0027]
[0028] in, t k ,s l is the characteristic function, specifically, t k is a feature function defined on the edge, called the transfer feature, which depends on the current and previous positions, s l is a characteristic function defined on the node, called the state characteristic, which depends on the current position; k ,u l is the corresponding weight;
[0029] The transfer features, state features and their weights are represented by unified symbols, and the simplified formula is obtained:
[0030]
[0031] Preferably, in step 5, first, the labeled samples are divided into training and test samples, the algorithm in step 4 is used to select appropriate parameters to train the address recognition model, and then the trained address recognition model is used to label the address data to be governed. Finally, the results of the algorithm labeling are manually checked, the labeling errors are corrected, and the materials that were not in the training samples are added back to the samples to retrain the model.
[0032] Preferably, in step A, the one-step transfer probability of the address is used, that is, the probability of transferring from the current address to the next level address, and X=(X1, X2, ..., X i ,...,X m ) is a value in the set S = {a1,...,a i ,...,a N}, S is called the state space; the specific steps include:
[0033] Step A1: Calculate the probability of each state:
[0034] P{X m =a i};
[0035] Step A2: Calculate the state at time m as a i , the state at time m+1 is a j Probability:
[0036] P{X m+1 =a j ,X m =a i};
[0037] Step A3: Calculate the transition probability:
[0038]
[0039] Step A4: Use the first four levels of addresses in the standard address library to construct a transfer probability matrix:
[0040]
[0041] Preferably, the address tree constructed in step B is used to store the address information of the current level and the address information of the previous level of the current level, including a complete tree and a prefix tree, wherein:
[0042] The complete tree stores the full name of the address, the address code, the level of the address, and the address's parent node information. The root node of the complete tree is the node at the top level. Only the path from the root node to the terminal node represents the place name. At the same time, the complete tree describes the city's parent city information by pointing the terminal node's arrow to its parent node. For the first-level address, its parent node is unified as the root node.
[0043] The prefix tree stores information about all prefix words that make up the full name of the address and the corresponding full name address. An association is established between the prefix characters and the complete place name and is represented by an arrow from the terminal node of the prefix character pointing to the complete place name. At the same time, each complete place name in the prefix tree points to the corresponding place name in the complete address tree.
[0044] Preferably, address inference belongs to the decoding problem in the hidden Markov model, that is, given a model λ = (F, Q, G) and an observation sequence X = {x1, x2, ..., x T}, predict the most likely hidden state sequence Y = {y1,y2,...,y T}, the mathematical expression is The Viterbi algorithm is used to solve the problem.
[0045] Preferably, step C comprises:
[0046] Step C1, search the prefix tree:
[0047] For the address word sequence W1W2...W obtained by deep learning i ...W m , traverse the sequence, for each word W i , obtain the corresponding complete place name set U from the prefix tree i =(p i1 ,p i2 ,...,p ij ), then the address segmentation sequence becomes the sequence of place name sets U = (U1, U2, ..., U i ,...,U m ), and the set H = (H1, H2, ..., H i ,...,H m ), where H i Represents the set U i The minimum level of a place name in an address;
[0048] Step C2: Find the complete address tree and match it:
[0049] For a set of place names U i p ij , get the corresponding place name q from the complete address tree ij , then U i =(q i1 ,q i2 ,...,q ij ), where q ij Contains the full name of the place name as well as the hierarchical information of the place name and the upper-level node information;
[0050]
[0051] Step C3: Address tracing:
[0052] For q in the place name set U1 i1 , trace back from the previous level node to the first level node of the address tree, and get a hierarchical address sequence: w 11,w 21 ,...,q i1 , and record the minimum number of levels of the address sequence, denoted as H1;
[0053] For U in the place name collection i q in (i>1) ij , trace back from the previous level node until the Hth node of the address tree i-1 Hierarchical node, get a hierarchical address sequence: w i1 ,w i2 ,...,q ij ;
[0054] Step C4, forming an address matrix:
[0055]
[0056] Step C5, constructing an address path: obtaining all possible address paths by constructing a forward fully connected graph;
[0057] Step C6, calculate the path probability:
[0058] For each path, first obtain the transition probabilities between adjacent words from the transition probability matrix, then sum up all the transition probabilities on the path to get the probability of this path being generated; when calculating the transition probability, a local pruning algorithm is used to reduce the amount of calculation, that is, for two adjacent addresses, if the transition probability is 0, the path is not included in the final complete path;
[0059] Step C7, find the maximum probability:
[0060] By calculating the maximum value of the probability of each path, the desired path can be obtained. The vocabulary on the path is the standardized result of the user address, the level of the address on the path is the level in the address hierarchy system, and the result corresponding to the path is the result of the governance of the user address.
[0061] According to the above technical scheme, the present invention constructs a seven-level standard address library based on the addresses published by the Ministry of Civil Affairs and the Statistics Bureau; adopts the BERT+Bi_LSTM+CRF neural network architecture to train the address recognition model so that the model can accurately recognize the address; at the same time, by constructing an address transfer matrix and an address tree, the joint reasoning of the seven-level address is adopted to realize the completion of the address name, address hierarchical association and missing address completion, thereby improving the accuracy and standardization of address management.
[0062] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:
[0064] Figure 1 is a flow chart of an address data management method based on deep learning provided by the present invention;
[0065] Figure 2 It is a neural network architecture diagram of an address recognition model in an address data management method based on deep learning provided by the present invention;
[0066] Figure 3 It is a schematic diagram of the structure of a recurrent neural network in the address data management method based on deep learning provided by the present invention;
[0067] Figure 4 is a schematic diagram of an address complete tree in the address data management method based on deep learning provided by the present invention;
[0068] Figure 5 is a schematic diagram of an address prefix tree in an address data management method based on deep learning provided by the present invention;
[0069] Figure 6 It is a schematic diagram of the relationship between the complete tree and the prefix tree in the address data management method based on deep learning provided by the present invention;
[0070] Figure 7 This is a schematic diagram of address path construction in the address data management method based on deep learning provided according to the present invention. DETAILED DESCRIPTION
[0071] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.
[0072] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations. In the embodiments of this application, some existing solutions in the industry such as certain software, components, and models may be mentioned, which should be considered as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0073] See also Figure 1 The present invention provides an address data management method based on deep learning, which includes address recognition based on deep learning and address intelligent reasoning based on an address tree model, wherein:
[0074] Address recognition based on deep learning includes:
[0075] Step 1: Build an address hierarchy system;
[0076] Step 2: Build an address semantic resource library;
[0077] Step 3: Construct address segmentation training samples;
[0078] Step 4: Train the address recognition model;
[0079] Step 5: Use the model to identify the address;
[0080] Address intelligent reasoning based on the address tree model includes:
[0081] Step A, constructing an address transfer matrix;
[0082] Step B: construct a standard address tree;
[0083] Step C: Complete the address name, associate the address level, and complete the missing address.
[0084] For address recognition based on deep learning, in this implementation, the seven-level address annotation system constructed in the above step 1 includes: provincial level, municipal level, district and county level, street level, neighborhood committee level, road level and community level. Among them, the provincial level specifically includes provinces, municipalities directly under the central government, autonomous regions and special administrative regions, the district and county level includes counties, districts and development zones, the street level includes townships, towns and street offices, the neighborhood committee level includes neighborhood committees, communities and villages, the road level includes main roads, branch roads and roads, and the community level includes communities.
[0085] In this embodiment, the data sources of the address semantic resource library constructed in step 2 include: obtaining complete five-level administrative division information of "province-city-district-street-residents' committee" from the Ministry of Civil Affairs, obtaining national statistical division codes and urban-rural division codes from the Statistics Bureau, and manually supplementing functional division data. Specifically, the Ministry of Civil Affairs' "Administrative Division Codes for Counties and Above of the People's Republic of China" can be obtained from the Ministry of Civil Affairs' official website, and the next-level administrative division information of counties (districts) can be obtained by using the national administrative division information query platform provided by the Ministry of Civil Affairs. Combined with the data of external cooperation units, complete five-level administrative division information can be obtained. At the same time, the "Annual National Statistical Division Codes and Urban-Rural Division Codes" can also be obtained from the Statistics Bureau. In addition, in order to obtain more complete address database data, we manually supplemented the functional zoning data, which mainly includes the zoning data not listed on the official websites of the Ministry of Civil Affairs and the National Bureau of Statistics, including the high-tech development zones and new districts planned by various places. Although such high-tech development zones and new districts are not independent new administrative units, their regional scope often includes one or more administrative divisions, and these division information often appears in user data, so it is necessary to supplement them into the above address database. In this way, by collecting the address resources of the Ministry of Civil Affairs and the National Bureau of Statistics, and integrating external data and manually supplemented data, a complete five-level address standard database and coding database were constructed.
[0086] In this embodiment, step 3 of constructing a sample includes:
[0087] Step 3.1, determine the annotation type: use BIO annotation method for entity identification, annotate the first value of a word as B, the other parts as I, and the non-entity as O; at the same time, mark the address as A; for example, mark the address "XX province XX city XX district XX township" according to the different levels of the address as: "XX / B_A XX / I_A province / I_A XX / B_A XX / I_A city / I_A XX / B_A XX / I_A district / I_A XX / B_A XX / I_A township / I_A";
[0088] Step 3.2, select sample data, including two sources, one is the constructed five-level standard address library, and the other is power data;
[0089] Step 3.3, labeling address data: For the five-level standard address library, use the BIO labeling method to label; for power data, map the first five levels of addresses to the five-level standard address library respectively, and retain up to the seventh level of addresses; among them, the data that cannot be mapped to the standard address is manually checked. If the check is passed, the address labeling data will be retained; if the check fails, the labeling data will not be added to the training sample.
[0090] See also Figure 2In this embodiment, the BERT+Bi_LSTM+CRF algorithm is used in step 4 to train the address recognition model, where:
[0091] BERT is a natural language processing method released by Google in October 2018, which has set new benchmarks for 11 NLP tasks. The processing flow of the BERT algorithm includes: pre-training, which is to train the model on a large amount of unlabeled data for various tasks; and fine-tuning, which is to add an output layer to the BERT model according to a specific downstream task, initialize the BERT model using the model parameters trained in the pre-training phase, and then fine-tune the model parameters on the labeled dataset of the task.
[0092] The LSTM long short-term memory model is a subtype of the recurrent neural network RNN, developed by Sepp Hochreiter and Jürgen Schmidhuber in 1997. Its structure is as follows Figure 3 As shown, it is mainly used to identify data sequences.
[0093] Bi-LSTM is a two-layer neural network, in which the first layer takes the starting input of the series from the left, that is, the input starts from the beginning of the sentence when processing text; the second layer takes the starting input of the series from the right, that is, the last word of the sentence is used as input when processing text, and the same processing as the first layer is performed in reverse; finally, the two results obtained from the two layers are processed.
[0094] The conditional random field (CRF) was proposed by Lafferty et al. in 2001. It combines the characteristics of the maximum entropy model and the hidden Markov model. It is an undirected graph model that has achieved good results in sequence labeling tasks such as word segmentation, part-of-speech tagging, and named entity recognition. CRF is a conditional probability distribution model that outputs another set of random variables Y when a set of input random variables X is known; its premise is that the output random variables constitute a Markov random field, which belongs to a discriminant model. The CRF model is a directed graph model used to model the conditional probability of sequences. It regards each element in the sequence as a node and uses edges to represent the dependencies between elements. Given an observation sequence, the CRF model can calculate the probability distribution of the target sequence. The CRF model takes into account the information of the entire observation sequence, rather than relying solely on the current state and observation. It pays more attention to learning the characteristic characteristics of the sequence through the feature function, as well as the constraints in the sequence. Therefore, the CRF model has better performance when dealing with tasks such as sequence labeling and named entity recognition.
[0095] Therefore, in the CRF algorithm provided by the present invention, X and Y are assumed to be random variables, where X = (X1, X2, ..., X i ,...,X m), Y=(Y1,Y2,...,Y j ,...,Y n ), the conditional probability of the input sequence X predicting the output sequence Y is:
[0096]
[0097] in, t k ,s l is the characteristic function, specifically, t k is a feature function defined on the edge, called the transfer feature, which depends on the current and previous positions, s l is a characteristic function defined on the node, called the state characteristic, which depends on the current position; k ,u l is the corresponding weight;
[0098] The transfer features, state features and their weights are represented by unified symbols, and the simplified formula is obtained:
[0099]
[0100] In this embodiment, step 5 first divides the labeled samples into training and test samples, adopts the algorithm in step 4, selects appropriate parameters to train the address recognition model, and then uses the trained address recognition model to label the address data to be governed. Finally, the results of the algorithm labeling are manually checked, and the labeling errors are corrected. For the samples that are manually verified to be correctly labeled and the samples that are manually corrected, the materials that are not in the training samples are added back to the samples to retrain the model.
[0101] For address intelligent reasoning based on the address tree model, the Markov chain represents a random process of transition from one state to another in the state space. This process requires the "memoryless" property: the probability distribution of the next state can only be determined by the current state, and the events before it in the time series are irrelevant. This specific type of "memorylessness" is called the Markov property. At each step of the Markov chain, the system can change from one state to another or maintain the current state according to the probability distribution. The change of state is called transition, and the probability associated with different state changes is called transition probability.
[0102] A sequence from high-level addresses to low-level addresses can be regarded as a Markov chain, where each address can be regarded as a state. The address transfer matrix is used to represent the probability of a high-level address transferring to a low-level address.
[0103] The purpose of the address transfer matrix is to eliminate address ambiguity and accurately locate the level of the address name in the address hierarchy system. For example, the address "XXXXXXXXX Street" is represented by the hierarchical address "XXX-XXX-XXX Street". The purpose of address intelligent reasoning is to represent it in a standardized way as "XXX Province-XXX City-XXX District-XXX Street". In the constructed standard address database, there are many addresses related to "XXX City", and thus many ambiguous addresses are generated. The address transfer matrix can help eliminate this ambiguity.
[0104] The method provided by the present invention only uses the one-step transfer probability of the address in step A, that is, the probability of transferring from the current address to the next level address, assuming X = (X1, X2, ..., X i ,...,X m ) is a value in the set S = {a1,...,a i ,...,a N}, S is called the state space; the specific steps include:
[0105] Step A1: Calculate the probability of each state:
[0106] P{X m =a i};
[0107] Step A2: Calculate the state at time m as a i , the state at time m+1 is a j Probability:
[0108] P{X m+1 =a j ,X m =a i};
[0109] Step A3: Calculate the transition probability:
[0110]
[0111] Step A4: Use the first four levels of addresses in the standard address library to construct a transfer probability matrix:
[0112]
[0113] The address tree constructed in step B is used to store the address information of the current level and the address information of the previous level of the current level, including a complete tree and a prefix tree, where:
[0114] The complete tree stores the full name of the address, the address code, the level of the address, and the information of the upper-level address node of the address. The root node of the complete tree is the node at the top layer. Only the path from the root node to the terminal node represents the place name. At the same time, the complete tree describes the information of the upper-level city of the city by the arrow of the terminal node pointing to its parent node. For the addresses at the first level, their upper-level nodes are uniformly the root node; as Figure 4 shown, it is a schematic diagram after building a complete tree for some place names. The vertex is also the root node, and its value represents the place name "China". Starting from the vertex, traverse the tree depth-first along each path until the terminal node, and concatenate the values of the nodes (excluding the vertex) on this path in order, which is a complete place name. For example: "Beijing City" is composed of traversing the nodes "North", "Beijing", and "City" in sequence starting from the vertex, and the terminal node "City" stores other information of the place name "Beijing City", including: unified address code, address level, and parent node information. Obviously, "Beijing City" is an address at the first level, and its parent node is the root node "China", that is, from "Beijing City", a sequence like "China - Beijing City" can be deduced. Similarly, in this figure, the parent node of "Municipal District" is "Beijing City". The address "Chaoyang District" has two parent nodes, namely "Municipal District" and "Changchun City".
[0115] As Figure 5 shown, the address prefix tree is a search tree that stores all character combinations of each complete place name from left to right, and also establishes an association between the prefix characters and the complete place names. This association is represented by the arrow of the terminal node of the prefix character pointing to the complete place name. As shown in the figure, for the place name "Beijing City", all character combinations from left to right are: "Beijing", "Beijing City". The terminal node "Jing" of the string "Beijing" has an arrow pointing to the complete place name "Beijing City". The terminal node "Yang" of the string "Chaoyang" has two arrows pointing to the complete place names "Chaoyang District" and "Chaoyang City" respectively.
[0116] Each complete place name in the prefix tree points to the corresponding place name in the address complete tree. As Figure 6 shown, this figure describes the relationship between the address complete tree and the address prefix tree. It can be seen from the figure that the complete place name "Beijing City" in the address prefix tree points to the place name "Beijing City" in the address complete tree. In this way, the string found from the prefix tree is associated with the complete place name.
[0117] The intelligent address reasoning in step C mainly includes: automatic completion of place names, address hierarchy association and missing address completion; among them, automatic completion of place names refers to completing place names that lack standard addresses with place names in the standard address library. Address hierarchy association refers to associating the address with the address hierarchy system to obtain the address hierarchy to which it belongs. Missing address completion refers to completing the address of the electricity user that lacks one or more levels of addresses with complete addresses from level one to level five.
[0118] Address inference belongs to the decoding problem in hidden Markov models, that is, given a model λ = (F, Q, G) and an observation sequence X = {x1, x2, ..., x T}, predict the most likely hidden state sequence Y = {y1,y2,...,y T}, the mathematical expression is The Viterbi algorithm is used to solve the problem.
[0119] Specifically, step C includes:
[0120] Step C1, search the prefix tree:
[0121] For the address word sequence W1W2...W obtained by deep learning i ...W m , traverse the sequence, for each word W i , obtain the corresponding complete place name set U from the prefix tree i =(p i1 ,p i2 ,...,p ij ), then the address segmentation sequence becomes the sequence of place name sets U = (U1, U2, ..., U i ,...,U m ), and the set H = (H1, H2, ..., H i ,...,H m ), where H i Represents the set U i The minimum level of a place name in an address;
[0122] Step C2: Find the complete address tree and match it:
[0123] For a set of place names U i p ij , get the corresponding place name q from the complete address tree ij , then U i =(q i1 ,q i2 ,...,q ij ), where q ijContains the full name of the place name as well as the hierarchical information of the place name and the upper-level node information;
[0124]
[0125] Step C3: Address tracing:
[0126] For q in the place name set U1 i1 , trace back from the previous level node to the first level node of the address tree, and get a hierarchical address sequence: w 11 ,w 21 ,...,q i1 , and record the minimum number of levels of the address sequence, denoted as H1;
[0127] For U in the place name collection i q in (i>1) ij , trace back from the previous level node until the Hth node of the address tree i-1 Hierarchical node, get a hierarchical address sequence: w i1 ,w i2 ,...,q ij ;
[0128] Step C4, forming an address matrix:
[0129]
[0130] Step C5, construct the address path: Figure 7 As shown, all possible address paths are obtained by constructing a forward fully connected graph;
[0131] Step C6, calculate the path probability:
[0132] For each path, first obtain the transition probabilities between adjacent words from the transition probability matrix, then sum up all the transition probabilities on the path to get the probability of this path being generated; when calculating the transition probability, a local pruning algorithm is used to reduce the amount of calculation, that is, for two adjacent addresses, if the transition probability is 0, the path is not included in the final complete path;
[0133] Step C7, find the maximum probability:
[0134] By calculating the maximum value of the probability of each path, the desired path can be obtained. The vocabulary on the path is the standardized result of the user address, the level of the address on the path is the level in the address hierarchy system, and the result corresponding to the path is the result of the governance of the user address.
[0135] Through the above technical solution, a seven-level standard address database was constructed based on the addresses published by the Ministry of Civil Affairs and the National Bureau of Statistics; the BERT+Bi_LSTM+CRF neural network architecture was used to train the address recognition model so that the model can accurately recognize the address; at the same time, by constructing the address transfer matrix and address tree, and adopting the joint reasoning of the seven-level address, the address name completion, address hierarchy association and missing address completion are realized, thereby improving the accuracy and standardization of address management.
[0136] The following provides a specific implementation method to illustrate the address data management method based on deep learning provided by the present invention:
[0137] Step 1: The system automatically collects user address data;
[0138] Step 2: The system uses a recognition algorithm model to segment the user's address data and identify the address;
[0139] Step 3: For the identified address, standardize the address using the address reasoning model, which specifically includes the following steps:
[0140] Step 3.1: For each address word, find its corresponding address from the prefix tree to obtain one or more corresponding standard address nouns. For example, for the word "Beijing", it corresponds to one standard address name: "Beijing"; for the word "Chaoyang", it corresponds to two standard address names: "Chaoyang City" and "Chaoyang District".
[0141] Step 3.2: For each standard address, start from its parent node and trace back to the parent address. For the standard address corresponding to the first word in the user address data, it is traced back to the first-level address; for the standard addresses corresponding to other words, it is traced back to the address corresponding to the previous word. For example, for the word string "Qianjin Street, Chaoyang City", the word "Chaoyang City" is traced back to the first level "Liaoning Province", and the word "Qianjin Street" is traced back to "Shuangta District-Chaoyang City".
[0142] Step 3.3: After steps 3.1 and 3.2, an address matrix can be obtained;
[0143] Step 3.4, starting from the first column of addresses in the address matrix, forward construct a fully connected graph to form multiple address paths;
[0144] Step 3.5: For the adjacent addresses in the address path, find the transition probability from the transition probability matrix. The sum of all the transition probabilities on the path is the probability of the path being generated.
[0145] Step 3.6: Find the maximum value of all path probabilities. The path with the largest probability value is the required path. The vocabulary on this path is the standard vocabulary of the user address at the corresponding level.
[0146] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0147] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0148] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0149] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0150] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0151] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0152] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0153] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0154] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for address data management based on deep learning, characterized in that: The method includes address recognition based on deep learning and address intelligent reasoning based on an address tree model, wherein: Address recognition based on deep learning includes: Step 1: Build an address hierarchy system; Step 2: Build an address semantic resource library; Step 3: Construct address segmentation training samples; Step 4: Train the address recognition model; Step 5: Use the model to identify the address; Address intelligent reasoning based on the address tree model includes: Step A, constructing an address transfer matrix; Step B: construct a standard address tree; Step C: Complete the address name, associate the address level, and complete the missing address.
2. The address data management method based on deep learning according to claim 1 is characterized in that: The seven-level address annotation system constructed in step 1 includes: provincial level, municipal level, district and county level, street level, neighborhood committee level, road level and community level.
3. The address data management method based on deep learning according to claim 1 is characterized in that: The data sources of the address semantic resource library constructed in step 2 include: obtaining complete five-level administrative division information of "province-city-district-street-residents' committee" from the Ministry of Civil Affairs, obtaining national statistical division codes and urban-rural division codes from the Statistics Bureau, and manually supplementing functional division data; among which, the functional division data includes high-tech development zones and new areas planned by various places.
4. The address data management method based on deep learning according to claim 1 is characterized in that: Step 3 includes: Step 3.1, determine the annotation type: use BIO annotation method to identify entities, annotate the first value of a word as B, the rest as I, and the non-entity as O; at the same time, mark the address mark as A; Step 3.2, select sample data, including two sources, one is the constructed five-level standard address library, and the other is power data; Step 3.3, labeling address data: For the five-level standard address library, use the BIO labeling method to label; for power data, map the first five levels of addresses to the five-level standard address library respectively, and retain up to the seventh level of addresses; among them, the data that cannot be mapped to the standard address is manually checked. If the check is passed, the address labeling data will be retained; if the check fails, the labeling data will not be added to the training sample.
5. The address data management method based on deep learning according to claim 1 is characterized in that: In step 4, a training algorithm is designed, and the BERT+Bi_LSTM+CRF algorithm is used to train the address recognition model, where: The processing flow of the BERT algorithm includes: pre-training, that is, training the model on a large amount of unlabeled data of various tasks; and fine-tuning, that is, adding an output layer to the BERT model according to a specific downstream task, initializing the BERT model using the model parameters trained in the pre-training phase, and then fine-tuning the model parameters on the labeled dataset of the task; Bi-LSTM is a two-layer neural network, in which the first layer takes the starting input of the series from the left, that is, the input starts from the beginning of the sentence when processing text; the second layer takes the starting input of the series from the right, that is, the last word of the sentence is taken as input when processing text, and the same processing as the first layer is performed in reverse; finally, the two results obtained by the two layers are processed; In the CRF algorithm, let X and Y be random variables, where X = (X1, X2, ..., X i ,...,X m ), Y=(Y1,Y2,...,Y j ,...,Y n ), the conditional probability of the input sequence X predicting the output sequence Y is: in, t k ,s l is the characteristic function, specifically, t k is a feature function defined on the edge, called the transfer feature, which depends on the current and previous positions, s l is a characteristic function defined on the node, called state feature, which depends on the current position; k ,u l is the corresponding weight; The transfer features, state features and their weights are represented by unified symbols, and the simplified formula is obtained:
6. The address data management method based on deep learning according to claim 1 is characterized in that: In step 5, first, the labeled samples are divided into training and test samples, and the algorithm in step 4 is used to select appropriate parameters to train the address recognition model. The trained address recognition model is then used to label the address data to be governed. Finally, the results of the algorithm labeling are manually checked, any labeling errors are corrected, and the materials that were not in the training samples are added back into the samples to retrain the model.
7. The address data management method based on deep learning according to claim 1 is characterized in that: In step A, the one-step transfer probability of the address is used, that is, the probability of transferring from the current address to the next level address, and X = (X1, X2, ..., X i ,...,X m ) is a value in the set S = {a1,...,a i ,...,a N }, S is called the state space; the specific steps include: Step A1: Calculate the probability of each state: P{X m =a i }; Step A2: Calculate the state at time m as a i , the state at time m+1 is a j Probability: P{X m+1 =a j ,X m =a i }; Step A3: Calculate the transition probability: Step A4: Use the first four levels of addresses in the standard address library to construct a transfer probability matrix:
8. The address data management method based on deep learning according to claim 1 is characterized in that: The address tree constructed in step B is used to store the address information of the current level and the address information of the previous level of the current level, including a complete tree and a prefix tree, where: The complete tree stores the full name of the address, the address code, the level of the address, and the address's parent node information. The root node of the complete tree is the node at the top level. Only the path from the root node to the terminal node represents the place name. At the same time, the complete tree describes the city's parent city information by pointing the terminal node's arrow to its parent node. For the first-level address, its parent node is unified as the root node. The prefix tree stores information about all prefix words that make up the full name of the address and the corresponding full name address. An association is established between the prefix characters and the complete place name and is represented by an arrow from the terminal node of the prefix character pointing to the complete place name. At the same time, each complete place name in the prefix tree points to the corresponding place name in the complete address tree.
9. The address data management method based on deep learning according to claim 1 is characterized in that: Address inference belongs to the decoding problem in hidden Markov models, that is, given a model λ = (F, Q, G) and an observation sequence X = {x1, x2, ..., x T }, predict the most likely hidden state sequence Y = {y1,y2,...,y T }, the mathematical expression is The Viterbi algorithm is used to solve the problem.
10. The address data management method based on deep learning according to claim 9 is characterized in that: Step C includes: Step C1, search the prefix tree: For the address word sequence W1W2...W obtained by deep learning i ...W m , traverse the sequence, for each word W i , obtain the corresponding complete place name set U from the prefix tree i =(p i1 ,p i2 ,...,p ij ), then the address segmentation sequence becomes the sequence of place name sets U = (U1, U2, ..., U i ,...,U m ), and the set H = (H1, H2, ..., H i ,...,H m ), where H i Represents the set U i The minimum level of a place name in an address; Step C2: Find the complete address tree and match it: For a set of place names U i p ij , get the corresponding place name q from the complete address tree ij , then U i =(q i1 ,q i2 ,...,q ij ), where q ij Contains the full name of the place name as well as the hierarchical information of the place name and the upper-level node information; Step C3: Address tracing: For q in the place name set U1 i1 , trace back from the previous level node to the first level node of the address tree, and get a hierarchical address sequence: w 11 ,w 21 ,...,q i1 , and record the minimum number of levels of the address sequence, denoted as H1; For U in the place name collection i q in (i>1) ij , trace back from the previous level node until the Hth node of the address tree i-1 Hierarchical node, get a hierarchical address sequence: w i1 ,w i2 ,...,q ij ; Step C4, forming an address matrix: Step C5, constructing an address path: obtaining all possible address paths by constructing a forward fully connected graph; Step C6, calculate the path probability: For each path, first obtain the transition probabilities between adjacent words from the transition probability matrix, then sum up all the transition probabilities on the path to get the probability of this path being generated; when calculating the transition probability, a local pruning algorithm is used to reduce the amount of calculation, that is, for two adjacent addresses, if the transition probability is 0, the path is not included in the final complete path; Step C7, find the maximum probability: By calculating the maximum value of the probability of each path, the desired path can be obtained. The vocabulary on the path is the standardized result of the user address, the level of the address on the path is the level in the address hierarchy system, and the result corresponding to the path is the result of the governance of the user address.
Citation Information
Cited By
Sensitive data privacy protection computing method in cloud environment
CN120597315A
Automatic address governance method and device based on intelligent agent and medium
CN120892577A
Power industry seven-level address standard library construction method and system
CN121860692A