Enterprise address data processing and predicting method and system
Through geographic semantic fusion models and multi-granularity word segmentation processing, combined with distributed computing clusters, the hierarchical nesting and logical consistency problems of multi-source heterogeneous address data are solved, efficient and real-time enterprise address data processing and prediction are achieved, recognition accuracy and system throughput are improved, and it adapts to the dynamic adjustment of administrative divisions.
Patent Information
- Application Number
- CN202510810791.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-16
AI Technical Summary
Traditional address resolution methods have difficulty effectively handling the hierarchical nesting and logical consistency issues of multi-source heterogeneous address data, especially when administrative divisions are dynamically adjusted. This causes the resolution results to be disconnected from the real geographic space, and the throughput efficiency is low in high-concurrency business scenarios, which cannot meet enterprise-level real-time data processing needs.
A geographic semantic fusion model is adopted in combination with multi-granularity word segmentation processing and hierarchical verification mechanism. Address resolution is accelerated through distributed heterogeneous computing clusters. The knowledge base is dynamically updated to adapt to administrative division adjustments. The Word-Piece algorithm and domain extension dictionary are used for multi-granularity word segmentation. The place name recognition model is combined for hierarchical verification and priority fusion to generate structured addresses.
It improves the accuracy of administrative division recognition, meets the needs of high-concurrency real-time processing, ensures the logical consistency of hierarchical relationships, supports dynamic adjustments, reduces manual review costs, and improves data circulation and business collaboration efficiency.
Smart Images

Figure CN120653785A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of knowledge graphs, and specifically to a method and system for processing and predicting enterprise address data. Background Art
[0002] In a company's operations, address data, as core information, permeates business scenarios such as supply chain management, customer service, and risk control. With the exponential growth of enterprise data, address text has become multi-source and heterogeneous: it contains both highly standardized administrative division names and a large number of non-standard expressions (such as abbreviations, aliases, and colloquial descriptions), often intermingled with unstructured information such as house numbers and building names.
[0003] Traditional address resolution methods mostly rely on keyword matching or single-modal semantic models, which make it difficult to effectively handle complex situations such as nested hierarchies, frequent changes in regional aliases, and missing long-tail address elements. Especially when administrative divisions are dynamically adjusted, the lag in updating the static knowledge base can easily lead to a disconnect between the resolution results and the real geographic space. In addition, existing technologies often separate word segmentation, entity recognition, and hierarchical prediction into independent processes, resulting in prominent error transmission problems and a lack of deep integration of geographic spatial features, making it difficult to balance semantic understanding and spatial logic consistency. In high-concurrency business scenarios, the serial processing architecture and the fixed allocation mode of computing resources further restrict the system throughput efficiency and cannot meet the needs of enterprise-level real-time data processing.
[0004] Therefore, the present invention proposes a method and system for processing and predicting enterprise address data to address the deficiencies of the prior art. Summary of the Invention
[0005] In response to the deficiencies of the prior art, the present invention provides a method and system for processing and predicting enterprise address data, which solves the problems of dynamic administrative division adjustment, hierarchical nesting and logical consistency of multi-source heterogeneous address data.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: A method for processing and predicting enterprise address data, comprising the following steps:
[0007] S1. Receive and parse the enterprise address input by the user, obtain and clean and structure the multi-source heterogeneous address data, and generate a labeled data set and knowledge base;
[0008] S2. Based on the geographic semantic fusion model, embedding enhancement training is performed on the annotated dataset to obtain a hierarchical prediction model;
[0009] S3, using the Word-Piece algorithm and the domain extension dictionary to perform multi-granularity word segmentation processing on the multi-source heterogeneous address data;
[0010] S4. Input the result of word segmentation processing into the hierarchical prediction model for model prediction, and output the initial hierarchical label sequence;
[0011] S5. Performing hierarchical verification and completion processing on the initial label sequence using a dedicated place name recognition model to obtain a place name recognition result;
[0012] S6. Prioritize and fuse the prediction results of the hierarchical prediction model, the word segmentation results, and the place name recognition results to generate the final structured address.
[0013] Preferably, the steps of cleaning and structuring include:
[0014] Removing non-administrative division noise fields from multi-source heterogeneous address data using regular expressions, and labeling the province, city, district, and county entity hierarchical labels based on the national administrative division coding standard to generate the labeled dataset, and constructing a knowledge base based on the labeled dataset, wherein the knowledge base includes entity names, geographic coordinates, and hierarchical relationships;
[0015] Calculate the edge weights of the hierarchical relationships between entities in the knowledge base using a hierarchical relationship calculation formula;
[0016] The hierarchical relationship calculation formula is:
[0017]
[0018] Among them, W ij For entity v ! With entity v j The edge weight of the hierarchical relationship between !j For entity v ! With entity v j The co-occurrence frequency of i For entity v ! The total number of occurrences of Entity v ! and entity v j The geographic coordinate embedding vector of ; σ is the Gaussian kernel bandwidth parameter; λ is the balance coefficient.
[0019] Preferably, in step S2, the step of performing embedding enhancement training on the annotated dataset based on the geographic semantic fusion model includes:
[0020] Based on the geographic semantic fusion model, the semantics of multi-source heterogeneous address data are embedded into vectors. Embedded vector with geographic coordinates Input the gated attention network to obtain the fused vector;
[0021] The fused vector is input into the multi-layer perceptron classifier to output the probability distribution of the three levels of province, city, and district / county. The fusion formula is:
[0022]
[0023] in, is the fused feature vector; W g and W t They are the projection matrices of geographic coordinates and multi-source heterogeneous address data respectively; is the Sigmoid function; b is the bias vector.
[0024] Preferably, the loss function of the multi-layer perceptron classifier is a hierarchical cross entropy loss, and the loss function is:
[0025]
[0026] in, is the loss function value; C k is the number of categories of province, city, district and county at the kth level; y k,c is the true label of the kth level; p k,c The probability of the cth class at the kth level predicted by the model.
[0027] Preferably, in step S3, the multi-granularity word segmentation processing step includes:
[0028] Perform subword segmentation on multi-source heterogeneous address data based on the Word-Piece algorithm;
[0029] Combined with the domain extension dictionary to match the complete administrative division entity;
[0030] Calculate the probability distribution of word segmentation fragments through the N-Gram joint probability model and generate a set of word segmentation results Among them, t1, t2, ..., t n is a subword or a complete entity, and n is an integer greater than 1;
[0031] The N-Gram joint probability model is:
[0032]
[0033] Among them, w i is the i-th word segmentation unit in the multi-source heterogeneous address data; m is the total number of word segmentation units; P bigram (w i |w !-1 ) represents the co-occurrence probability of adjacent word units based on the statistics of the training corpus; P unigram (w !) represents the global independent occurrence probability of the word segmentation unit; λ∈[0,1] is the balance coefficient, which is used to adjust the weight ratio of the bigram model and the unary model.
[0034] Preferably, in step S4, the step of inputting the result of word segmentation processing into the hierarchical prediction model for model prediction includes:
[0035] The segmentation results Convert to word vector sequence in is the fused feature vector, n and i are both integers greater than 1;
[0036] Capturing word vector sequences through a bidirectional LSTM model The context dependency of the output hidden state sequence {s1,...,s n};
[0037] The hidden state sequence {s1,...,s n} Input CRF layer decoding, generate the initial level label sequence {l1,...,l n}, wherein the label type includes province, city, district and county.
[0038] Preferably, in step S5, the step of performing hierarchical verification and completion processing on the initial tag sequence by using a dedicated place name recognition model includes:
[0039] A dedicated place name recognition model is used to detect hierarchical conflicts in the initial tag sequence and automatically complete missing entities based on the hierarchical relationships in the knowledge base. The dedicated place name recognition model is:
[0040]
[0041] Among them, v missing Indicates a missing entity; Represents the set of all candidate entities; Sim(v j ) is calculated as: is the fused feature vector of the previous valid entity at the conflict position; For candidate entity v j The fusion feature vector of is the trainable weight matrix; d is the feature vector dimension; T is the vector transpose operation.
[0042] Preferably, in step S6, the priority fusion processing step includes:
[0043] If the place name recognition result completely matches the knowledge base, the place name recognition result will be used first;
[0044] Otherwise, the label with the highest confidence in the hierarchical prediction model is selected as the output;
[0045] If there is a conflict, manual review is triggered and the knowledge base is updated.
[0046] The present invention also provides a system for processing and predicting enterprise address data, the system comprising:
[0047] Data cleaning and knowledge base construction module, used to clean multi-source heterogeneous address data, remove noise fields and build a dynamic knowledge base containing entity names, coordinates and hierarchical relationships;
[0048] Hierarchical prediction model training module, used to train hierarchical classification models that integrate semantic and geographic features based on labeled datasets;
[0049] Multi-granularity word segmentation module, used to perform subword segmentation and entity boundary identification on multi-source heterogeneous address data using the Word-Piece algorithm and domain-expanded dictionary;
[0050] The hierarchical prediction module is used to input the word segmentation results into the hierarchical prediction model to generate the initial hierarchical label sequence;
[0051] Hierarchy verification and fusion module, used to detect hierarchy conflicts and fuse results from multiple sources to output standardized addresses;
[0052] Distributed computing clusters are used to provide heterogeneous computing resources such as CPU, GPU, and TPU to accelerate data processing and model reasoning.
[0053] Preferably, the hierarchical prediction module includes:
[0054] The accelerated decoding unit, deployed on the TPU accelerator card, optimizes CRF decoding latency by pre-compiling the computational graph and supports real-time processing of highly concurrent address resolution requests.
[0055] The parallel computing unit divides multi-source heterogeneous address data into sub-segments and distributes them to multiple computing threads for parallel processing, thereby improving throughput.
[0056] A caching mechanism caches hierarchical prediction results for frequently occurring address fragments to reduce redundant calculations.
[0057] The anomaly monitoring unit detects the model prediction confidence distribution in real time and automatically triggers the manual review process for low-confidence requests.
[0058] The present invention provides a method and system for processing and predicting enterprise address data. It has the following beneficial effects:
[0059] 1. This invention effectively resolves the ambiguity of complex, multi-source, heterogeneous address data by integrating a gated attention network that combines semantic and geographic spatial features, combined with multi-granularity word segmentation and hierarchical validation mechanisms. The entity matching and conflict detection capabilities of the dynamic knowledge base ensure the logical consistency of hierarchical relationships, significantly improving the recognition accuracy of administrative divisions at the provincial, municipal, and district / county levels.
[0060] 2. This invention utilizes a distributed heterogeneous computing cluster and TPU-accelerated decoding units to support real-time processing of highly concurrent address resolution requests. Through parallel computing, caching mechanisms, and pre-compilation optimization techniques, it significantly reduces the processing latency of long texts, meeting enterprise-level large-scale data throughput requirements.
[0061] 3. This invention is based on a dynamic knowledge base design with incremental updates, which can automatically capture administrative division adjustments (such as the addition of new districts and counties, name changes, etc.) and continuously optimize entity relationships through an edge weight feedback mechanism. This mechanism ensures the long-term timeliness of the system and the currency of geographic data.
[0062] 4. This invention uses priority fusion rules and automated conflict detection to limit manual review to a very small number of complex conflict cases, automating the entire process from data cleaning and word segmentation to hierarchical verification. The anomaly monitoring unit provides real-time warnings for low-confidence results, further reducing manual review costs.
[0063] 5. This invention combines multi-source data fusion with hierarchical tag sequence reconstruction to generate structured addresses that comply with national administrative division coding standards. The output can be directly connected to downstream applications such as GIS systems and enterprise risk control platforms, improving data circulation and business collaboration efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 is a flow chart of the method of the present invention;
[0065] Figure 2 This is a system architecture diagram of the present invention. DETAILED DESCRIPTION
[0066] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the present specification. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0067] See also Figure 1 The embodiment of the present invention provides a method and system for processing and predicting enterprise address data, including the following steps:
[0068] S1. Receive and parse the enterprise address input by the user, obtain and clean and structure the multi-source heterogeneous address data, and generate a labeled data set and knowledge base;
[0069] In this embodiment, the technical implementation of receiving and parsing the enterprise address input by the user in step S1, obtaining and cleaning and structuring multi-source heterogeneous address data, and generating a labeled data set and knowledge base is as follows:
[0070] Data collection and cleaning: A distributed data collection system is used to obtain raw address data from enterprise registration databases, logistics order databases, and third-party map service interfaces. This raw address data includes standardized administrative division names, non-standard address descriptions, and composite multi-source heterogeneous address data in both Chinese and English. A pre-compiled regular expression rule engine is used to perform multi-level filtering and cleaning of non-administrative division noise (such as contact numbers, special symbols, and redundant descriptive text) within this multi-source heterogeneous address data.
[0071] The regular expression rule engine contains the following core matching modes:
[0072] Phone number recognition mode: used to match landline phone numbers with or without area codes;
[0073] Special symbol cleaning mode: removes non-text symbols except administrative division connectors (such as "-" and "·");
[0074] Redundant description filtering mode: delete the supplementary explanatory text in brackets (such as "near the subway station" and "south side of XX Building").
[0075] The cleaned multi-source heterogeneous address data is processed by a distributed deduplication module, and hash fingerprint comparison technology is used to eliminate duplicate records. A standardized address data set is generated and stored in a columnar database to provide input for subsequent structured processing.
[0076] Administrative division entity labeling, based on GB / T-2260-2022 "Administrative Division Code of the People's Republic of China" issued by the National Standardization Administration, performs hierarchical entity labeling on the cleaned multi-source heterogeneous address data. The specific processing process includes the following:
[0077] Provincial Entity Recognition: This function matches the full and abbreviated names of provincial administrative divisions (e.g., "Jiangsu Province" and "Su") using a bidirectional maximum matching algorithm to ensure accurate name boundaries. When abbreviation conflicts arise (e.g., "Jilin" could refer to Jilin Province or Jilin City), the context window is used to detect the subsequent entity type for disambiguation.
[0078] City-level entity recognition: Constrained by annotated provincial entities, we load the corresponding provincial city-level administrative division directory and use AC automata for multi-modal rapid matching. For city-level entities with duplicate names (such as Jilin City in Jilin Province), we reverse-verify their provincial jurisdiction using geographic coordinates.
[0079] County-level entity recognition: Combined with the city-level entity context, a conditional random field model is used to identify county names. Model features include:
[0080] N-Gram co-occurrence probability at the character level;
[0081] The spatial relationship between adjacent words (such as suffixes such as "district", "county", and "town");
[0082] Jurisdiction constraints with higher-level municipal entities;
[0083] Extended Entity Labeling: For village-level roads, house numbers, and building information, a hybrid labeling strategy combining rule templates and statistical models is used. For example, for text in the format "XX Road XX Number," the road name and house number are extracted using the regular expression \w+Road\d+Number, and labeled as I-Road and B-House Number.
[0084] The knowledge base is constructed and dynamic weights are calculated to build a dynamic knowledge graph containing administrative division entity attributes, geographic spatial information, and hierarchical relationships. The core processing process is as follows:
[0085] Geographic coordinate embedding represents that for each administrative division entity, its latitude and longitude coordinates are mapped into a high-dimensional semantic vector, solving the problem that discrete coordinates cannot directly quantify spatial similarity. Specifically, entity v i The geographic coordinate embedding vector Generated by Gaussian kernel function:
[0086]
[0087] Among them, x i =(longitude i ,latitude i ) is the entity v i The original geographic coordinates of K regional center points extracted from the national administrative division coordinates through the K-means clustering algorithm; represents a trainable weight vector, which is used to adjust the contribution of different regional centers; σ is the Gaussian kernel bandwidth parameter, which is used to control the decay rate of coordinate similarity; K is the total number of cluster centers, which is preferably determined by silhouette coefficient analysis.
[0088] This embedding representation converts discrete coordinates into a similarity measure in a continuous vector space, so that entities with similar geographical locations are closer in the embedding space, thereby effectively characterizing the spatial correlation characteristics of administrative divisions.
[0089] To calculate the edge weight of hierarchical relationships, in order to quantify the strength of association between administrative division entities, a dynamic edge weight formula is designed to integrate co-occurrence frequency and spatial similarity:
[0090]
[0091] Among them, W ij For entity v i With entity v j The edge weight of the hierarchical relationship between ij For entity v i With entity v j The co-occurrence frequency of i For entity v i The total number of occurrences of Entity v i and entity v j The geographic coordinate embedding vector of ; σ is the Gaussian kernel bandwidth parameter; λ is the balance coefficient.
[0092] The sliding time window T is preferably set to 30 days to accommodate administrative division changes and gradual changes in address writing habits. When an administrative division adjustment announcement is detected (such as a document approved by the State Council to abolish a county and establish a district), an edge weight mandatory update is immediately triggered to ensure that the knowledge base is synchronized with the latest administrative structure.
[0093] The knowledge base online update mechanism establishes a knowledge base update pipeline based on streaming processing to respond to data changes in real time:
[0094] Incremental data monitoring: Capture new address data and administrative division change notifications through message queues (such as Apache-Kafka);
[0095] Dynamic weight recalculation: When the entity co-occurs N times ij Or when the geographical coordinates change, recalculate the edge weights of the affected entities;
[0096] Transactional updates: A two-phase commit protocol is used to ensure the atomicity and consistency of knowledge base update operations and avoid writing dirty data.
[0097] S2. Based on the geographic semantic fusion model, embedding enhancement training is performed on the annotated dataset to obtain a hierarchical prediction model;
[0098] In this embodiment, the embedding enhancement training is performed on the labeled dataset based on the geographic semantic fusion model in step S2 to obtain a hierarchical prediction model, which is specifically implemented as follows:
[0099] Cross-modal feature fusion: The hierarchical prediction model uses a gated attention network to fuse text semantic features with geographic spatial features, addressing the problem of traditional single-modal models' insufficient ability to represent complex addresses. Specifically, the model's input features include:
[0100] Text semantic embedding vector It indicates that the context encoding of multi-source heterogeneous address data is generated by a pre-trained language model to capture the semantic relevance between words. The dimension d of the text semantic embedding vector is preferably 768, which is consistent with the hidden layer dimension of the BERT-base model;
[0101] Geographic coordinate embedding vector It represents the high-dimensional vector extracted from the knowledge base constructed in step S1 and mapped by the Gaussian kernel function, which represents the spatial distribution characteristics of administrative division entities. It is generated as follows:
[0102]
[0103] in, are the entity's latitude and longitude coordinates, is the pre-clustering center point, is the trainable weight, σ is the Gaussian kernel bandwidth parameter, and K is the total number of cluster centers.
[0104] The above two types of features are input into the gated attention network to perform cross-modal feature fusion:
[0105]
[0106] in, is the fused feature vector; W g and W t are the projection matrices for geography and text respectively; is the Sigmoid function; b is the bias vector;
[0107] The gating mechanism addresses the differences in the relative importance of geographic and semantic information in different address scenarios through adaptive weighting. For example, for addresses containing precise coordinates (such as "30.28° North Latitude, 120.15° East Longitude"), the model prioritizes geographic features; while for semantically dependent addresses (such as "West Lake Scenic Area, Hangzhou"), it prioritizes textual semantic analysis.
[0108] Hierarchical classifier design, fused feature vector h fusion Input the multi-layer perceptron classifier (MLP) to predict the labels of the three administrative levels of province, city, and district / county. The hierarchical design of the classifier includes the following processing flow:
[0109] Independent fully connected layer: Each level of administrative division has an independent fully connected layer, and the level-specific features are extracted through nonlinear transformation:
[0110]
[0111] in, Represents the trainable weight matrix of the kth level; ReLU(·) represents the bias vector of the k-th layer; ReLU(·) represents the rectified linear unit activation function, which enhances the nonlinear expression ability of the model.
[0112] Hierarchical probability output: The transformed feature vector is input into the Softmax layer to generate the probability distribution of the corresponding level:
[0113]
[0114] in, represents the classification weight matrix of the kth level; Represents the classification bias vector of the kth level; C l Indicates the total number of categories at the kth level.
[0115] Loss function definition, the training objective of the model is achieved through the hierarchical cross entropy loss function, and its mathematical expression is:
[0116]
[0117] in, is the loss function value; C k is the number of categories of province, city, district and county at the kth level; y k,c is the true label of the kth level; p k,c The probability of the cth class at the kth level predicted by the model.
[0118] The loss function optimizes the model parameters through the back propagation algorithm. The preferred optimizer is AdamW, whose learning rate is dynamically adjusted through the cosine annealing strategy. The initial learning rate is set to 1×10 -4 , the minimum learning rate is reduced to 1×10 -6 , to balance training stability and convergence speed.
[0119] S3, using the Word-Piece algorithm and the domain extension dictionary to perform multi-granularity word segmentation processing on the multi-source heterogeneous address data;
[0120] In this embodiment, the multi-granularity word segmentation processing of the multi-source heterogeneous address data using the Word-Piece algorithm and the domain extension dictionary described in step S3 is specifically implemented as follows:
[0121] Multi-granularity word segmentation framework. The multi-granularity word segmentation process solves the problem of mixed segmentation of administrative division entities and common vocabulary in multi-source heterogeneous address data by synergistically using sub-word segmentation, domain knowledge matching, and statistical probability modeling, and generates word segmentation results that conform to geographical semantic specifications. The specific implementation includes the following core technical modules:
[0122] Word-Piece sub-word segmentation. Based on a pre-trained word segmentation model, perform sub-word segmentation on multi-source heterogeneous address data, splitting out-of-vocabulary words into combinations of high-frequency sub-words to ensure a balance between character-level granularity and semantic integrity. The implementation method of the sub-word segmentation is as follows:
[0123] Vocabulary loading and matching: Load the pre-trained Word-Piece vocabulary (preferably including sub-word units of high-frequency administrative division vocabulary), and iteratively segment the input text through a greedy matching algorithm, preferentially matching the longest valid sub-word;
[0124] Out-of-vocabulary word processing: For character sequences that cannot be completely matched, segment them at the character granularity and add sub-word connectors (such as "##") to generate an atomic word sequence. For example, the multi-source heterogeneous address data "Qiantang New Area" is segmented into ["Qian", "##tang", "##xin", "##qu"].
[0125] The pre-trained vocabulary is optimized and adapted to address data in the following ways:
[0126] Incremental training: Use the labeled data set in step S1 to perform incremental training on the general vocabulary, increasing the weights of administrative division-related sub-words (such as "##qu", "##jiedao");
[0127] Dynamic expansion: Regularly extract newly added administrative division names from the knowledge base, generate candidate sub-words according to character N-Gram frequencies, and merge them into the vocabulary.
[0128] Domain expansion dictionary matching. To solve the problem of incomplete recognition of administrative division entities by the general word segmentation model, construct a multi-level domain dictionary and perform post-processing fusion. The specific implementation includes:
[0129] Dictionary structure design: Based on the administrative division entities in the knowledge base, construct a high-coverage dictionary that includes full names, abbreviations, and aliases. The dictionary entries are organized hierarchically. For example:Maximum Forward Matching: Perform a sliding window scan on the Word-Piece segmentation results and merge consecutive sub-word segments to match the complete entities in the dictionary. The matching rules are as follows:
[0134]
[0135] where len(s) represents the character length of the candidate entity, and longer entities are preferentially matched; denotes the indicator function, which is 1 when the candidate entity is at the same context level as the current one, and 0 otherwise (for example, after a provincial entity has been matched, a municipal entity is preferentially matched rather than a district or county-level entity); α is the hierarchical matching weight coefficient, preferably set to 1.5 to strengthen the hierarchical logical constraint.
[0136] For example, the sub-word sequence ["浙", "##江", "##", "杭", "##州", "##市"] is merged into ["浙江省", "杭州市"] after dictionary matching.
[0137] N-Gram Joint Probability Modeling: To quantify the rationality of different word segmentation schemes, a hybrid probability model is designed to fuse local co-occurrence statistics and global word frequency information, and its mathematical expression is:
[0138]
[0139] where w i is the i-th word segmentation unit in the multi-source heterogeneous address data, which can be a sub-word (such as "##区") or a complete entity (such as "杭州市"); m is the total number of word segmentation units, which is dynamically determined by the segmentation results; P bigram (w i |w i-1 ) represents the co-occurrence probability of adjacent word segmentation units based on the statistics of the training corpus, and the calculation method is:
[0140]
[0141] Count(w i-1 ,w i ) represents the number of times w i-1 and w i appear consecutively in the training corpus; γ is the add-one smoothing factor, preferably set to 1 to avoid the zero-probability problem; is the total number of the word segmentation unit set <0000,460> (including all sub-words and dictionary entities); P unigram (w i ) represents the global independent occurrence probability of the word segmentation unit, and the calculation method is: [[ID=5?]]
[0142]
[0143] Count(w <000006"4>) represents w in the training corpus i The number of occurrences of ; δ is the smoothing factor, preferably set to 0.5 to alleviate the bias of low-frequency words; λ∈[0,1] is the balance coefficient, which is used to adjust the weight ratio of the bigram model and the unary model, preferably determined by cross-validation.
[0144] The training corpus is constructed from the annotated data set generated in step S1, covering standard addresses, non-standard addresses and mixed-format texts, ensuring the adaptability of the probability model to diverse input data.
[0145] Dynamic programming solves the optimal path. Based on the N-Gram joint probability model, the Viterbi algorithm is used to search for the optimal word segmentation path. The recursive formula is:
[0146]
[0147] Among them, δ i (j) is the word segmentation unit w at position i j The maximum cumulative probability of the ending; P(w j |w k ) is the binary transition probability; P(w j ) is the probability of element emission.
[0148] The final generated word segmentation result set It satisfies the global probability maximization and is compatible with subword segmentation and complete entity recognition.
[0149] S4. Input the result of word segmentation processing into the hierarchical prediction model for model prediction, and output the initial hierarchical label sequence;
[0150] In this embodiment, the step S4 of inputting the word segmentation result into the hierarchical prediction model for model prediction and outputting the initial hierarchical label sequence is technically implemented as follows:
[0151] Word vector sequence conversion, the word segmentation result set generated in step S3 Convert to fused embedding vector sequence Both n and i are integers greater than 1. The fused embedding vector is generated by the gated attention network trained in step S2. The specific calculation method refers to step S2:
[0152]
[0153] in, is the fused feature vector; W g and W t are the projection matrices of geography and text respectively; σ is the Sigmoid function; b is the bias vector;
[0154] The gated attention network uses an adaptive weighting mechanism to address the differences in how different word segmentation units rely on geographic or textual information. For example, it prioritizes geographical features for administrative entities (such as "Zhejiang Province") while prioritizing semantic analysis for general terms (such as "building").
[0155] Bidirectional LSTM context modeling inputs the fused embedding vector sequence into a bidirectional long short-term memory network (BiLSTM) to capture the sequence context dependencies of multi-source heterogeneous address data. The forward and backward processing of the BiLSTM is as follows:
[0156]
[0157] in, Represent the hidden states of the forward and backward LSTM at position i, respectively. The hidden layer dimension h is preferably 256; LSTM forward With LSTM backward Indicates sharing the same network structure, including input gate, forget gate, output gate and cell state update mechanism. The specific gate calculation method is:
[0158]
[0159] s t =o t ⊙tanh(C t );
[0160] in, represents a trainable weight matrix; represents the bias vector; ⊙ is the element-by-element multiplication; σ(·) is the Sigmoid activation function.
[0161] The final context-aware representation is obtained by concatenating the bidirectional hidden states:
[0162]
[0163] The CRF layer constrains decoding, and transforms the context-aware representation sequence {s1,s2,...,s n The input is a Conditional Random Field (CRF) layer that decodes the optimal label sequence that conforms to the hierarchical logic rules. The decoding process of the CRF layer includes the following core steps:
[0164] Emission probability calculation: Map the hidden state to the label emission score through a linear transformation:
[0165]
[0166] in, represents the trainable weight matrix that maps the hidden state to the label space; represents the bias vector; Represents a tag set, including the start tag (B), internal tags (I), and non-entity tags (O) of provinces, cities, districts, and counties.
[0167] Transfer matrix modeling, defining the transfer score matrix between labels Explicitly encode hierarchical logical constraints. The transfer score T(y i ,y j ) indicates that the label y i Transfer to y j The specific constraints include:
[0168] "B-province" can be transferred to "l-province" or "B-city", but cannot be transferred to "B-district and county";
[0169] "I-City" can be transferred to "B-District or County" or "O", but cannot be transferred to "B-Province";
[0170] The score of illegal transfers (e.g., "B-District County" → "B-Province") is set to negative infinity.
[0171] Viterbi decoding: Solve the label sequence that maximizes the global score through a dynamic programming algorithm:
[0172]
[0173] in, is the set of all possible legal tag sequences; E i (y i ) is the position i for label y i The emission fraction; T(y i ,y i+1 ) is the label transfer score.
[0174] S5. Performing hierarchical verification and completion processing on the initial label sequence using a dedicated place name recognition model to obtain a place name recognition result;
[0175] In this embodiment, the hierarchical verification and completion processing of the initial tag sequence by the dedicated place name recognition model in step S5 is performed to obtain the place name recognition result. The technical implementation method is as follows:
[0176] Hierarchical conflict detection and location, based on the initial hierarchical label sequence {l1,l2,...,l n}, detect and locate label conflicts that violate administrative division logic through the following steps:
[0177] Illegal transfer path detection, using the transfer matrix predefined by the CRF layer Verify the transfer validity of adjacent labels. If there is a label pair (li ,l i+1 ) satisfies T(l i ,l i+1 )=-∞, it is determined to be an illegal transfer (for example, "B-province" is directly transferred to "B-district and county").
[0178] Knowledge base edge weight verification, based on the hierarchical relationship edge weight W between entities in the knowledge base ij , verify the hierarchical relationship of the tag sequence. Define the validation rules as:
[0179]
[0180] Among them, v parent For the current entity v i The parent entity (such as provincial entity); θ is the edge weight threshold, preferably set to 0.7, determined by the validation set experiment; is the weight of the superior-subordinate edge extracted from the knowledge base.
[0181] Candidate entity generation and similarity calculation: For detected missing or conflicting entities, a candidate entity set is generated based on the knowledge base, and the optimal completion result is selected through feature similarity calculation:
[0182] Candidate entity retrieval: Based on the context level of the conflicting position (e.g. the current label is "B-city" but
[0183] Missing provincial entities), retrieve the candidate entity set that meets the hierarchical constraints from the knowledge base The search rules are:
[0184]
[0185] Among them, Level(v j ) is the entity v j Level (1-province, 2-city, 3-district and county); v current The entity corresponding to the current conflict position.
[0186] Feature similarity calculation: for each candidate entity Calculate its feature similarity with the context entity:
[0187]
[0188] in, is the fusion feature vector of the previous valid entity at the conflict position (such as the provincial entity ); For candidate entity v j The fused feature vector is generated by the gated attention network in step S2; is a trainable weight matrix used to model the feature association pattern between superior and subordinate entities; d is the feature vector dimension, preferably 256; Performs a vector transpose operation.
[0189] Optimal entity selection: Determine the completion entity by maximizing the similarity score:
[0190]
[0191] Among them, v missing Indicates a missing entity; Represents the set of all candidate entities.
[0192] Entity completion and sequence reconstruction: insert the best candidate entity into the initial label sequence and reconstruct a complete label sequence that conforms to the hierarchical logic. The completion rules include:
[0193] Same-level completion: If the missing entity is in a same-level relationship with the context (e.g., “Hangzhou City” is missing in the city-level label sequence), the candidate entity is directly inserted and labeled as “I-City”, and the legality constraints of the CRF transfer matrix are updated at the same time.
[0194] Cross-level completion: If you need to insert a cross-level entity (for example, if the provincial level is missing, complete the provincial entity "Zhejiang Province"), follow the steps below:
[0195] Insert a new tag "B-Province" and associate it with the candidate entity;
[0196] Adjust the subsequent city-level labels to "I-City" to ensure hierarchical continuity;
[0197] Update the knowledge base edge weight W 浙江省,杭州市 ;
[0198] The knowledge base is dynamically weighted and the edge weights in the knowledge base are reversely modified according to the completion results. The update formula is:
[0199]
[0200] Where η is the learning rate, which is preferably set to 0.01; is the gradient of similarity with respect to weight calculated by back propagation algorithm; For the parent entity v parent and the completion entity v missing The edge weights between .
[0201] S6. Prioritize and fuse the model prediction results, word segmentation results, and place name recognition results to generate the final structured address;
[0202] In this embodiment, the model prediction results, word segmentation results, and place name recognition results are prioritized and integrated in step S6 to generate the final structured address. The technical implementation method is as follows:
[0203] Multi-source data priority fusion rules, based on the hierarchical prediction results of step S4, the word segmentation results of step S3, and the place name recognition and completion results of step S5, design a three-level priority fusion strategy to ensure the accuracy and logical consistency of the final structured address. The specific fusion rules are:
[0204] Exact match is preferred. When the entity in the place name recognition result completely matches the administrative division name and attributes in the knowledge base (including full name, abbreviation and alias), the place name recognition result is directly used as the final output. The judgment conditions for the exact match are:
[0205]
[0206] Among them, v recog is the entity in the place name recognition result; KB is the corresponding entity in the knowledge base; is the administrative division dictionary of the knowledge base; ExactMatch(·) is a strict string matching function that requires the name, level, and superior-subordinate relationship to be completely consistent; is an indicator function, which is 1 if the place name recognition result exists in the knowledge base, and 0 otherwise.
[0207] Confidence is selected. If the place name recognition result does not completely match the knowledge base, the label with the highest confidence in the hierarchical prediction model is selected as the output. The confidence calculation method is:
[0208]
[0209] Among them, p k (c) is the probability value of category c at the kth level (province, city, district, or county) output by the hierarchical prediction model in step S4; It is a label set, including "B-province" and "I-city", etc.
[0210] Conflict manual intervention: When there is a logical conflict in the output results of different data sources (for example, the place name recognition result is "Hangzhou City", while the hierarchical prediction model outputs "B-Province"), a manual review process is triggered to record the conflict case and update the knowledge base. The conflict detection conditions are:
[0211]
[0212] Where Level(·) is the administrative level of the entity; is the weight of the associated edge between the two in the knowledge base; θ is the conflict judgment threshold, which is preferably set to 0.5.
[0213] Fusion execution process, input data alignment: align the hierarchical prediction label sequence, word segmentation results, and place name recognition completion results according to text position to build an intermediate data structure Where: t i is a word segmentation unit; i Predict labels for the layers; v i Identify completion entities for place names.
[0214] Position-by-position decision: For each position i, fusion is performed in the following order:
[0215] Step 1: Check v i Whether the complete matching rule is met. If so, output v i ;
[0216] Step 2: If not satisfied, select l i The label with the highest confidence in the word is associated with the corresponding word segmentation unit t i As output;
[0217] Step 3: If v i With l i If there is a conflict, it will be marked as pending review and the conflict context information will be recorded.
[0218] Structured address generation: Assemble the position-by-position fusion results into a structured address object according to the hierarchical relationship. The format is:
[0219] A final ={province:v province , city:v city ,District:v district ,Road:v road ,...};
[0220] Knowledge base dynamic update mechanism
[0221] For conflicting cases that trigger manual review, an incremental update process is designed to continuously optimize the knowledge base:
[0222] Conflict case storage: Conflict data (including input addresses, model prediction results, place name recognition results, and manual annotation results) are stored in a temporary database in the following format:
[0223]
[0224] Manual review and feedback: Conflict cases are displayed through a visual review interface for annotators to confirm the correct results. The results of manual corrections are fed back into the hierarchical prediction model and place name recognition model as training data.
[0225] Knowledge base update: Based on the manual correction results, update the entity association weights in the knowledge base and add new administrative division entries. The update formula is:
[0226]
[0227] Where α is the weight update coefficient, preferably set to 0.1; v new Entities that are manually added or modified.
[0228] See also Figure 2 The present invention also provides a system for processing and predicting enterprise address data, comprising:
[0229] Data cleaning and knowledge base construction module, this module is used to clean multi-source heterogeneous address data, remove noise fields and build a dynamic knowledge base. Regular expressions and rule engines are used to identify and filter invalid characters (such as garbled characters, special symbols, advertising information) in unstructured texts, and valid address elements are extracted at the same time. The cleaned data is associated with geographic coordinates through entity linking technology to construct a knowledge graph containing administrative division names, longitude and latitude coordinates and hierarchical relationships. The knowledge base is stored in a graph database, with nodes representing administrative division entities, edges representing superior and subordinate jurisdictional relationships, and edge weights dynamically calculated through the co-occurrence frequency of historical data. Preferably, an incremental update mechanism is introduced, and when an administrative division change is detected, the entity relationship and coordinate information of the knowledge base are automatically triggered to be updated to ensure data timeliness.
[0230] Hierarchical prediction model training module, this module trains a hierarchical classification model that integrates semantic and geographic features based on annotated datasets. The model uses a gated attention network to fuse text semantic vectors and geographic coordinate vectors, where the text semantic vectors are extracted through a pre-trained language model (such as BERT), and the geographic coordinate vectors are mapped to a high-dimensional space through a Gaussian kernel function. The hierarchical classifier is designed as an independent fully connected layer structure, which outputs three-level probability distributions of provinces, cities, and districts and counties respectively. During the training process, the AdamW optimizer and the cosine annealing learning rate strategy are used, combined with the hierarchical cross entropy loss function to optimize the model parameters. Preferably, an early stopping mechanism and gradient clipping technology are introduced to prevent overfitting and improve training stability.
[0231] Multi-granularity word segmentation module: This module performs multi-granularity segmentation on the input address through the Word-Piece algorithm and the domain extension dictionary. First, basic segmentation is performed on the multi-source heterogeneous address data based on the pre-trained sub-word vocabulary to process unregistered words; secondly, the full names, abbreviations and aliases of the administrative divisions in the knowledge base are loaded to construct a domain dictionary, and the sub-word fragments are merged through the maximum forward matching algorithm to identify the complete entity boundaries. During the word segmentation process, the N-Gram joint probability model is used to evaluate the rationality of different segmentation schemes, and entity combinations that conform to geographical semantics are retained first. Preferably, a conflict resolution strategy is designed. When multiple candidate entities overlap, the optimal segmentation result is selected based on the hierarchical relationship and contextual context in the knowledge base.
[0232] Hierarchical prediction module: This module inputs the word segmentation results into the hierarchical prediction model to generate the initial hierarchical label sequence. It specifically includes the following subunits:
[0233] Accelerated decoding unit: Deployed on the TPU accelerator card, it optimizes the CRF decoding process by pre-compiling the computational graph, reduces decoding latency by leveraging hardware parallel computing capabilities, and supports processing thousands of concurrent requests per second.
[0234] Parallel computing unit: Splits long, multi-source, heterogeneous address data into sub-segments based on punctuation or semantic boundaries, assigns them to multiple computing threads for parallel model reasoning, and aggregates results through a memory sharing mechanism, significantly improving system throughput.
[0235] Cache mechanism: Establish a mapping cache between high-frequency address fragments and hierarchical labels, and use the LRU elimination strategy to manage cache entries to reduce repeated calculations of the same or similar addresses;
[0236] Abnormal monitoring unit: The real-time statistical model predicts the confidence distribution, automatically marks requests with confidence levels below the threshold as abnormal, triggers the manual review process, and records them in the review queue.
[0237] Hierarchical verification and fusion module, this module detects hierarchical conflicts in the initial label sequence, and fuses results from multiple sources to generate standardized addresses. By traversing the edge weights and hierarchical constraint rules in the knowledge base, illegal label jumps are located (such as "province" is directly associated with "district and county"). For missing entities, candidate entities are retrieved from the knowledge base based on contextual semantics and geographic proximity, and the optimal completion result is selected by feature similarity calculation. In the fusion stage, a three-level priority strategy is adopted: entities that fully match the knowledge base are directly output; when there is no match, the label with the highest model confidence is selected; in the event of a conflict, the process is suspended and manual intervention is notified. The final output is a hierarchical address structure that meets national standards, including fields such as province, city, district and county, street, and house number.
[0238] Distributed computing cluster, which provides heterogeneous computing resources to accelerate system operation:
[0239] CPU cluster: responsible for I / O-intensive tasks such as data cleaning, knowledge base construction, and process scheduling;
[0240] GPU cluster: used for model training and batch inference, using CUDA cores to accelerate matrix operations;
[0241] TPU clusters: Dedicated for real-time request processing, they utilize a systolic array architecture to optimize model inference efficiency. These clusters utilize containerized deployment and a resource scheduler to dynamically allocate tasks to the optimal hardware. Ideally, they incorporate an elastic scaling strategy to automatically scale compute nodes based on load, and incorporate a checkpoint mechanism for failure recovery and task resuming.
[0242] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A method for processing and predicting enterprise address data, characterized in that: The method comprises the following steps: S1. Receive and parse the enterprise address input by the user, obtain and clean and structure the multi-source heterogeneous address data, and generate a labeled data set and knowledge base; S2. Based on the geographic semantic fusion model, embedding enhancement training is performed on the annotated dataset to obtain a hierarchical prediction model; S3, using the Word-Piece algorithm and the domain extension dictionary to perform multi-granularity word segmentation processing on the multi-source heterogeneous address data; S4. Input the result of word segmentation processing into the hierarchical prediction model for model prediction, and output the initial hierarchical label sequence; S5. Performing hierarchical verification and completion processing on the initial label sequence using a dedicated place name recognition model to obtain a place name recognition result; S6. Prioritize and fuse the prediction results of the hierarchical prediction model, the word segmentation results, and the place name recognition results to generate the final structured address.
2. The method for processing and predicting enterprise address data according to claim 1, characterized in that: In step S1, the cleaning and structuring steps include: Removing non-administrative division noise fields from multi-source heterogeneous address data using regular expressions, and labeling the province, city, district, and county entity hierarchical labels based on the national administrative division coding standard to generate the labeled dataset, and constructing a knowledge base based on the labeled dataset, wherein the knowledge base includes entity names, geographic coordinates, and hierarchical relationships; Calculate the edge weights of the hierarchical relationships between entities in the knowledge base using a hierarchical relationship calculation formula; The hierarchical relationship calculation formula is: Among them, W !j For entity v ! With entity v j The edge weight of the hierarchical relationship between !j For entity v ! With entity v j The co-occurrence frequency of ! For entity v ! The total number of occurrences of Entity v ! and entity v j The geographic coordinate embedding vector of ; σ is the Gaussian kernel bandwidth parameter; λ is the balance coefficient.
3. The method for processing and predicting enterprise address data according to claim 1, characterized in that: In step S2, the step of performing embedding enhancement training on the annotated dataset based on the geographic semantic fusion model includes: Based on the geographic semantic fusion model, the semantics of multi-source heterogeneous address data are embedded into vectors. Embedded vector with geographic coordinates Input the gated attention network to obtain the fused vector; The fused vector is input into the multi-layer perceptron classifier to output the probability distribution of the three levels of province, city, and district / county. The fusion formula is: in, is the fused feature vector; W g and W t They are the projection matrices of geographic coordinates and multi-source heterogeneous address data respectively; is the Sigmoid function; b is the bias vector.
4. The method for processing and predicting enterprise address data according to claim 3, characterized in that: The loss function of the multi-layer perceptron classifier is the hierarchical cross entropy loss, which is: in, is the loss function value; C k is the number of categories of province, city, district and county at the kth level; y l,c is the true label of the kth level; p k,c The probability of the cth class at the kth level predicted by the model.
5. The method for processing and predicting enterprise address data according to claim 1, characterized in that: In step S3, the multi-granularity word segmentation processing includes: Perform subword segmentation on multi-source heterogeneous address data based on the Word-Piece algorithm; Combined with the domain extension dictionary to match the complete administrative division entity; Calculate the probability distribution of word segmentation fragments through the N-Gram joint probability model and generate a set of word segmentation results Among them, t1, t2, ..., t n is a subword or a complete entity, and n is an integer greater than 1; The N-Gram joint probability model is: Among them, w ! is the i-th word segmentation unit in the multi-source heterogeneous address data; m is the total number of word segmentation units; P bigram (w i |w i-1 ) represents the co-occurrence probability of adjacent word units based on the statistics of the training corpus; P unigram (w ! ) represents the global independent occurrence probability of the word segmentation unit; λ∈[0,1] is the balance coefficient, which is used to adjust the weight ratio of the bigram model and the unary model.
6. The method for processing and predicting enterprise address data according to claim 1, characterized in that: In step S4, the step of inputting the result of word segmentation processing into the hierarchical prediction model for model prediction includes: The segmentation results Convert to word vector sequence in is the fused feature vector, n and i are both integers greater than 1; Capturing word vector sequences through a bidirectional LSTM model The context dependency of the output hidden state sequence {s1,...,s n }; The hidden state sequence {s1,...,s n } Input CRF layer decoding, generate the initial level label sequence {l1,...,l n }, wherein the label type includes province, city, district and county.
7. The method for processing and predicting enterprise address data according to claim 1, characterized in that: In step S5, the step of performing hierarchical verification and completion processing on the initial tag sequence using a dedicated place name recognition model includes: A dedicated place name recognition model is used to detect hierarchical conflicts in the initial tag sequence and automatically complete missing entities based on the hierarchical relationships in the knowledge base. The dedicated place name recognition model is: Among them, v m!ss!ng Indicates a missing entity; Represents the set of all candidate entities; Sim(v j ) is calculated as: is the fused feature vector of the previous valid entity at the conflict position; For candidate entity v j The fusion feature vector of is the trainable weight matrix; d is the feature vector dimension; T is the vector transpose operation.
8. The method for processing and predicting enterprise address data according to claim 1, characterized in that: In step S6, the priority fusion processing step includes: If the place name recognition result completely matches the knowledge base, the place name recognition result will be used first; Otherwise, the label with the highest confidence in the hierarchical prediction model is selected as the output; If there is a conflict, manual review is triggered and the knowledge base is updated.
9. A system for processing and predicting enterprise address data, applied to the method according to any one of claims 1 to 8, characterized in that: The system comprises: Data cleaning and knowledge base construction module, used to clean multi-source heterogeneous address data, remove noise fields and build a dynamic knowledge base containing entity names, coordinates and hierarchical relationships; Hierarchical prediction model training module, used to train hierarchical classification models that integrate semantic and geographic features based on labeled datasets; Multi-granularity word segmentation module, used to perform subword segmentation and entity boundary identification on multi-source heterogeneous address data using the Word-Piece algorithm and domain-expanded dictionary; The hierarchical prediction module is used to input the word segmentation results into the hierarchical prediction model to generate the initial hierarchical label sequence; Hierarchy verification and fusion module, used to detect hierarchy conflicts and fuse results from multiple sources to output standardized addresses; Distributed computing clusters are used to provide heterogeneous computing resources such as CPU, GPU, and TPU to accelerate data processing and model reasoning.
10. The system for processing and predicting enterprise address data according to claim 9, characterized in that: The hierarchical prediction module includes: The accelerated decoding unit, deployed on the TPU accelerator card, optimizes CRF decoding latency by pre-compiling the computational graph and supports real-time processing of highly concurrent address resolution requests. The parallel computing unit divides multi-source heterogeneous address data into sub-segments and distributes them to multiple computing threads for parallel processing, thereby improving throughput. A caching mechanism caches hierarchical prediction results for frequently appearing address fragments to reduce redundant calculations; The anomaly monitoring unit detects the confidence distribution of model predictions in real time and automatically triggers the manual review process for low-confidence requests.
Citation Information
Cited By
Three-layer two-domain space-time affair graph construction method oriented to public safety field
CN121030049A
Intelligent address resolution method based on word segmentation engine antagonism error correction
CN121168443A