A social media address information extraction method and system fusing embedded semantics

CN118585645BActive Publication Date: 2026-09-22WUHAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410676749.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2026-09-22
Estimated Expiration
2044-05-29

AI Technical Summary

Technical Problem

[0010]针对当前社交媒体文本中地址信息提取困难的问题,本发明提出一种融合嵌入语义的社交媒体地址信息提取方法及系统

Benefits of technology

[0063]本发明产生的有益效果是:提供了一种融合嵌入语义的社交媒体地址信息提取方法及系统。融合动态向量和静态向量增强对于地址场景语义的表征,实现不同级别的地名提取,进而依据局部最优解自底向上构建地名树,随后基于深度优先思想遍历地名树生成地址。该方法不仅考虑了地址表述中上下文的变化性和常见地名词汇的稳定性,同时考虑了地名语义及不同地名之间的相互关系,在地名识别和地址提取上都取得了较好的效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585645B_ABST
    Figure CN118585645B_ABST
Patent Text Reader

Abstract

The application discloses a kind of address information extraction method and system of fusion embedded semantics of social media.It is in view of the challenge that the arbitrariness of social media expression and the fuzziness of description bring to address information accurate extraction, consider the composition structure of address information and the fine extraction demand, divide the place name category with hierarchical relationship and construct the place name annotation corpus of social media text;In view of the long-term stable semantics revealed by static vector and the context-sensitive change captured by dynamic vector, multi-level place name extraction is realized by fusing static and dynamic vector to enhance address semantics;Further, according to the local optimal solution, a place name tree is constructed from bottom to top, and detailed address information is generated based on depth-first search traversal of the place name tree.The application fully considers the variability and stability of address word semantics and the hierarchical constraints between place names, and can realize fine scale address information extraction based on social media, thereby further supporting applications in emergency management, urban planning, public safety and other fields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of Chinese text information extraction, and in particular relates to a method and system for extracting social media address information by incorporating embedded semantics. Background Technology

[0002] Address information describes the spatial location of geographical phenomena or objects on the Earth's surface. Address information in social media texts not only reflects the spatial locations involved in related events but also associates them with event attributes and environmental characteristics. This is crucial for real-time tracking and understanding of event developments and can provide important support for applications in fields such as emergency management, urban planning, and public safety.

[0003] With the rapid development of information and communication technologies, the internet has become the main platform for information dissemination and instant communication. The public uses social media platforms such as Weibo to publish large amounts of data with high spatiotemporal resolution and wide coverage. Most social media posts do not contain geolocation information, and users on these platforms tend to use unstructured text to express information. This informal and non-standardized expression makes address information descriptions complex and lacking in standardization. Current research methods for address information extraction mainly fall into three categories.

[0004] Address information extraction based on keyword matching. Address information typically consists of place names at various granularities, including different levels of administrative divisions (such as provinces, cities, counties, and townships), roads, and residential areas. Researchers have attempted to construct a relatively comprehensive place name dictionary, including place names from various levels of administrative divisions, main roads, and specific functional areas, to extract addresses through place name keyword matching. However, due to the continuous changes in address information and the constant emergence of new place names, achieving full coverage and real-time updates of the dictionary presents significant challenges.

[0005] Address information extraction based on context understanding. Address information in social media text is treated as a special type of named entity, and its extraction process is structured as a sequence labeling task. To gain a deeper understanding of address information in text, researchers have adopted context-based named entity recognition methods. Advanced named entity recognition methods, such as Long Short-Term Memory (LSTM) networks and Bidirectional Encoder Representation (BERT), can effectively identify relatively simple address information in text, but still struggle with addresses composed of multiple entities or addresses with discontinuous representations.

[0006] Address information extraction based on generative language models. Generative language models have demonstrated outstanding performance in the field of artificial intelligence and can be adapted to specific domain tasks through fine-tuning, few-shot learning, and even zero-shot learning. Researchers have attempted to combine domain knowledge with generative language models to extract address information from social media text. With a limited number of samples, the geographic knowledge-guided GPT model shows a significant improvement in address information extraction compared to existing named entity recognition methods.

[0007] Social media texts contain rich geographic location information, and accurately extracting location information from social media is crucial for disaster situation awareness and disaster relief. Most social media posts do not contain geographic location information, and users on social platforms tend to use unstructured text to express information. This informal and non-standardized expression makes address information descriptions complex and lacks standardization. Address information is usually composed of place names at multiple granularities, including different levels of administrative divisions (such as provinces, cities, counties, and townships), roads, and residential areas. Keyword matching methods and named entity recognition methods such as LSTM and BERT have been used to identify address components, but they cannot identify address elements composed of multiple entities. Given the excellent performance of large language models in the field of artificial intelligence, some scholars have attempted to combine geographic knowledge with GPT models for address information extraction, achieving good results with only a small number of samples. Descriptions of flood locations in social media do not follow standard address formats, involving complex spatial relationships such as topological, directional, and distance relationships. Current address information extraction neglects further exploration of these spatial relationships. Furthermore, current analyses of flood locations mainly focus on the district or township scale; obtaining location information at a finer scale, such as that of residential areas or buildings, still requires further research.

[0008] Overall, address descriptions on social media do not follow standard address formats, involving complex spatial relationships such as topological, directional, and distance relationships. Current address information extraction methods neglect further exploration of these spatial relationships. Furthermore, current address information extraction primarily focuses on the district / county or township scale; obtaining address information at a finer scale, such as that of residential communities or buildings, requires further research.

[0009] Therefore, this invention takes into account the composition structure of address information and the need for refined extraction, and studies a method and system for extracting social media address information by incorporating embedded semantics. Summary of the Invention

[0010] To address the difficulty of extracting address information from current social media texts, this invention proposes a method and system for extracting social media address information by incorporating embedded semantics. Based on the constituent elements and expressive characteristics of address information, it achieves place name extraction and address generation based on a place name tree.

[0011] The technical solution of this method is a social media address information extraction method that integrates embedded semantics, specifically including the following steps:

[0012] Step 1: Considering the composition and structure of address information and the need for refined extraction, the address information is decomposed according to elements such as administrative divisions, roads, and buildings, and divided into place name categories with hierarchical relationships such as provinces, cities, counties, districts, and roads. A character-based annotation system is used to annotate place names at each level in social media, and a place name entity recognition corpus for social media text is constructed.

[0013] Step 2: Train the address descriptive data in POI to obtain an address-related word vector dictionary, which is used to update the general static vector model. The dynamic vector and static vector are fused using the concat operation to obtain the embedding representation of each character in the address recognition context, and the place names at each level in the text are extracted.

[0014] Step 3: Consider the semantics of place names and the relationships between different place names, perform place name ambiguity elimination and noise removal. Based on the idea of ​​greedy algorithm, build a place name tree from the bottom up from the finest place name information. Use depth-first search to traverse the place name tree and generate a complete path from the root node to the leaf node as address information.

[0015] Furthermore, the specific implementation method of step 1 is as follows:

[0016] Step 1.1: Classify place names;

[0017] Place names refer to the elements that make up an address; each address is composed of multiple place names at different levels in an orderly manner.

[0018] Based on relevant national standards, place names are classified into different types, and any given place name category is denoted as:

[0019] L h h∈{1,2,3,…,H}, the larger the level h, the more precise the spatial location represented by the place name.

[0020] Step 1.2: Establish a corpus of place name annotations;

[0021] A single-character-based BIO annotation mechanism is used to annotate place name information in social media text;

[0022] For place names consisting of only one word, use B-LOC for labeling;

[0023] If a place name contains two or more words, start with a B-LOC label, followed by a series of I-LOC labels;

[0024] Here, "LOC" represents a specific type of place name.

[0025] Furthermore, the specific implementation method of place name recognition in step 2 is as follows:

[0026] Step 2.1: Construct static vectors;

[0027] The Skip-gram algorithm is used to train the Dict training vector dictionary based on address descriptive data of Points of Interest (POIs) from Amap (Gaode Maps). A ;

[0028] The vector word list read from the pre-trained Word2Vec model is denoted as Dict. B Combined with Dict A Update Dict B To construct a static vector, the process is as follows:

[0029]

[0030] Where A and B represent the dictionary Dict A and Dict B Given a set of characters in set B, let c represent any character in set B. If c∈A, update Dict. B The vector of c is Dict A The vector c in the middle; if Then retain its value in Dict B Vectors in the array.

[0031] Step 2.2: Dynamic and static vector fusion;

[0032] The `concat` operation is used to merge dynamic and static vectors, forming a vector representation that includes both long-term statistical properties and immediate contextual changes, as shown below:

[0033]

[0034] Among them, e i This represents the fusion vector of the i-th character in the text. It is the dynamic vector representation of the i-th character in the text output by the BERT model, and This is the vector representation of the character in the constructed static vector dictionary.

[0035] Step 2.3: Place name extraction based on fusion embedding;

[0036] The fused embedding representation of the text is input into the composite structure of BiLSTM+CRF for entity recognition task training, with negative log-likelihood loss as the loss function.

[0037] The place name information extracted from the same text is recorded in a list, denoted as:

[0038] loclist=[(loc1,lev1,b1,e1),…,(loc i ,lev i ,b i ,e i ),…,(loc m ,lev m ,b m ,e m )]

[0039] Where, loc i Let lev represent the name of the extracted i-th place name. i loc represents i The place name level, b i and e i loc represents i The start and end positions in the text.

[0040] Building upon place name recognition, step 3 further includes the following:

[0041] Step 3.1: Place name processing;

[0042] Using a four-level place name database (province, city, county, township) as a place name dictionary, the minimum edit distance between the extracted place name and the place name at the same level in the place name dictionary is calculated, and the place name with the minimum edit distance is used for standardization.

[0043] Specifically, for the provincial, municipal, county, and township level place name entities extracted from a certain text, loc i Normalize according to the following formula:

[0044]

[0045] Where, placeDict represents the constructed place name dictionary, place j For place name dictionaries with loc i Any place name at the same level. d(loc) i ,place j The ') represents the edit distance between the two places, and the place name with the smallest edit distance is selected. j to replace loc i The original place name.

[0046] The process of place name processing involves not only the standardization of place names themselves, but also the judgment and screening of complex entity relationships between place names.

[0047] The relationships between place names at the same level are classified into three types: parallel relationship, modifying relationship, and overlapping relationship.

[0048] The parallel relationship refers to two or more named entities appearing side by side in the text, but logically remaining independent, and both being treated as separate entities during analysis and processing;

[0049] The aforementioned modification relationship refers to a place name entity acting as an adjective of another place name, but not forming new geographical information independently of the modified entity. In place name processing, place names with such non-independent modification relationships need to be eliminated.

[0050] The aforementioned intersection relationship involves place names that overlap or intersect in spatial location. When processing, these two place names need to be merged to effectively reflect the actual intersection structure of geographic space.

[0051] Step 3.2: Constructing the place name tree;

[0052] Considering the hierarchical relationships between place name entities, a place name tree is constructed by selecting locally optimal solutions based on a greedy algorithm. Starting with the finest-grained place name as the initial node, the highest-scoring parent place name is selected as the parent node based on a bottom-up principle, and this process is repeated until no further upward merging is possible. Parent candidate place names (loc) j relative to the current location name loc i The score is calculated using the following formula:

[0053]

[0054] Among them, f k (loc j ) represents the superior candidate place name loc j The score of the k-th evaluation metric, w k For indicator f k (loc j The weights of the evaluation indicators are given by K, where K represents the total number of evaluation indicators.

[0055] Step 3.3: Address generation based on the geoname tree;

[0056] Based on the depth-first search principle, the constructed place name tree is traversed, starting from the root node and progressively visiting each branch to the leaf node, generating a series of complete paths representing place names from higher to lower levels. These paths take the form of "root node -> intermediate nodes (several) -> leaf node", where each node represents a specific place name in geographic space, and the combination of all nodes constitutes the complete address. The specific path from the root node to any leaf node is generated as follows:

[0057]

[0058] Where Ls represents the set of leaf nodes, and N (node i ) represents the i-th node. i place name, child(node) i ) represents a node i The child nodes.

[0059] This invention also proposes a social media address information extraction system that integrates embedded semantics, comprising:

[0060] The entity recognition corpus construction module takes into account the composition structure of address information and the need for refined extraction. It decomposes address information according to elements such as administrative divisions, roads, and buildings, and divides them into place name categories with hierarchical relationships, such as provinces, cities, counties, districts, and roads. It uses a character-based annotation system to annotate place names at each level in social media and constructs a place name entity recognition corpus for social media texts.

[0061] The place name extraction module at each level in the text is used to train the address descriptive data in POIs to obtain an address-related word vector dictionary, thereby updating the general static vector model. The concat connection operation is used to fuse the dynamic vectors and static vectors to obtain the embedding representation of each character in the address recognition context, and to extract the place names at each level in the text.

[0062] The address information generation module is used to consider the semantics of place names and the relationships between different place names, and to perform place name ambiguity elimination and noise removal. Based on the idea of ​​a greedy algorithm, it gradually builds a place name tree from the bottom up from the finest place name information. It uses a depth-first search to traverse the place name tree and generates a complete path from the root node to the leaf node as address information.

[0063] The beneficial effects of this invention are: it provides a method and system for extracting social media address information by integrating embedded semantics. By fusing dynamic and static vectors to enhance the semantic representation of address scenarios, it achieves different levels of place name extraction. Then, based on local optima, it constructs a place name tree from the bottom up, and subsequently generates addresses by traversing the place name tree using a depth-first search approach. This method not only considers the variability of context in address representation and the stability of common place name vocabulary, but also takes into account the semantics of place names and the relationships between different place names, achieving good results in both place name recognition and address extraction. Attached Figure Description

[0064] Figure 1 : Flowchart of the method according to an embodiment of the present invention. Detailed Implementation

[0065] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0066] The following is in conjunction with the appendix Figure 1 The embodiments of the present invention will be described in further detail below.

[0067] like Figure 1 As shown, an embodiment of the method of the present invention is a method for extracting social media address information by incorporating embedded semantics, specifically including the following steps:

[0068] Step 1: Considering the composition and structure of address information and the need for refined extraction, the address information is decomposed according to elements such as administrative divisions, roads, and buildings, and divided into place name categories with hierarchical relationships such as provinces, cities, counties, districts, and roads. A character-based annotation system is used to annotate place names at each level in social media, and a place name entity recognition corpus for social media text is constructed.

[0069] The specific implementation method of step 1 is as follows:

[0070] Step 1.1: Classify place names;

[0071] Place names refer to the elements that make up an address; each address is composed of multiple place names at different levels in an orderly manner.

[0072] Based on relevant national standards, place names are classified into different types, and any given place name category is denoted as:

[0073] L h h∈{1,2,3,…,H}, the larger the level h, the more precise the spatial location represented by the place name.

[0074] Step 1.2: Establish a corpus of place name annotations;

[0075] A single-character-based BIO annotation mechanism is used to annotate place name information in social media text;

[0076] For place names consisting of only one word, use B-LOC for labeling;

[0077] If a place name contains two or more words, start with a B-LOC label, followed by a series of I-LOC labels;

[0078] Here, "LOC" represents a specific type of place name.

[0079] Step 2: Train the address descriptive data in POI to obtain an address-related word vector dictionary, which is used to update the general static vector model. The dynamic vector and static vector are fused using the concat operation to obtain the embedding representation of each character in the address recognition context, and the place names at each level in the text are extracted.

[0080] The specific implementation method of place name recognition in step 2 is as follows:

[0081] Step 2.1: Construct static vectors;

[0082] The Skip-gram algorithm is used to train the Dict training vector dictionary based on address descriptive data of Points of Interest (POIs) from Amap (Gaode Maps). A ;

[0083] The vector word list read from the pre-trained Word2Vec model is denoted as Dict. B Combined with Dict A Update Dict B To construct a static vector, the process is as follows:

[0084]

[0085] Where A and B represent the dictionary Dict A and Dict B Given a set of characters in set B, let c represent any character in set B. If c∈A, update Dict. B The vector of c is Dict A The vector c in the middle; if Then retain its value in Dict B Vectors in the array.

[0086] Step 2.2: Dynamic and static vector fusion;

[0087] The `concat` operation is used to merge dynamic and static vectors, forming a vector representation that includes both long-term statistical properties and immediate contextual changes, as shown below:

[0088]

[0089] Among them, e i This represents the fusion vector of the i-th character in the text. It is the dynamic vector representation of the i-th character in the text output by the BERT model, and This is the vector representation of the character in the constructed static vector dictionary.

[0090] Step 2.3: Place name extraction based on fusion embedding;

[0091] The fused embedding representation of the text is input into the composite structure of BiLSTM+CRF for entity recognition task training, with negative log-likelihood loss as the loss function.

[0092] The place name information extracted from the same text is recorded in a list, denoted as:

[0093] loclist=[(loc1,lev1,b1,e1),…,(loc i ,lev i ,b i ,e i ),…,(loc m ,lev m ,b m ,e m )]

[0094] Where, loc i Let lev represent the name of the extracted i-th place name. i loc represents i The place name level, b i and e i loc represents i The start and end positions in the text.

[0095] Step 3: Consider the semantics of place names and the relationships between different place names, perform place name ambiguity elimination and noise removal. Based on the idea of ​​greedy algorithm, build a place name tree from the bottom up from the finest place name information. Use depth-first search to traverse the place name tree and generate a complete path from the root node to the leaf node as address information.

[0096] Based on place name recognition, step 3 includes the following:

[0097] Step 3.1: Place name processing;

[0098] Using a four-level place name database (province, city, county, township) as a place name dictionary, the minimum edit distance between the extracted place name and the place name at the same level in the place name dictionary is calculated, and the place name with the minimum edit distance is used for standardization.

[0099] Specifically, for the provincial, municipal, county, and township level place name entities extracted from a certain text, loc i Normalize according to the following formula:

[0100]

[0101] Where placeDict represents the constructed place name dictionary, place j For place name dictionaries with loc iAny place name at the same level. d(loc) i ,place j The ') represents the edit distance between the two places, and the place name with the smallest edit distance is selected. j to replace loc i The original place name.

[0102] The process of place name processing involves not only the standardization of place names themselves, but also the judgment and screening of complex entity relationships between place names.

[0103] The relationships between place names at the same level are classified into three types: parallel relationship, modifying relationship, and overlapping relationship.

[0104] The parallel relationship refers to two or more named entities appearing side by side in the text, but logically remaining independent, and both being treated as separate entities during analysis and processing;

[0105] The aforementioned modification relationship refers to a place name entity acting as an adjective of another place name, but not forming new geographical information independently of the modified entity. In place name processing, place names with such non-independent modification relationships need to be eliminated.

[0106] The aforementioned intersection relationship involves place names that overlap or intersect in spatial location. When processing, these two place names need to be merged to effectively reflect the actual intersection structure of geographic space.

[0107] Step 3.2: Constructing the place name tree;

[0108] Considering the hierarchical relationships between place name entities, a place name tree is constructed by selecting locally optimal solutions based on a greedy algorithm. Starting with the finest-grained place name as the initial node, the highest-scoring parent place name is selected as the parent node based on a bottom-up principle, and this process is repeated until no further upward merging is possible. Parent candidate place names (loc) j relative to the current location name loc i The score is calculated using the following formula:

[0109]

[0110] Among them, f k (loc j ) represents the superior candidate place name loc j The score of the k-th evaluation metric, w k For indicator f k (loc j The weights of the evaluation indicators are given by K, where K represents the total number of evaluation indicators.

[0111] Step 3.3: Address generation based on the geoname tree;

[0112] Based on the depth-first search principle, the constructed place name tree is traversed, starting from the root node and progressively visiting each branch to the leaf node, generating a series of complete paths representing place names from higher to lower levels. These paths take the form of "root node -> intermediate nodes (several) -> leaf node", where each node represents a specific place name in geographic space, and the combination of all nodes constitutes the complete address. The specific path from the root node to any leaf node is generated as follows:

[0113]

[0114] Where Ls represents the set of leaf nodes, and N (node i ) represents the i-th node. i place name, child(node) i ) represents a node i The child nodes.

[0115] The embodiments of the present invention further use the collected Weibo data on flood disasters in a certain city in 2021 as a specific implementation scenario to carry out the method steps of the embodiments, such as constructing a place name classification and annotation corpus, extracting place names based on dynamic and static vector fusion embedding, constructing a place name tree considering hierarchical constraints, and generating addresses. The specific steps are as follows:

[0116] Step 1: Construction of a place name classification and annotation corpus

[0117] 1) Classification of place names

[0118] Referring to national standards such as GB / T 23705-2009, GB / T 38210-2019, GB / T 39609-2020, and GB 17733-2008, place names constituting addresses are classified into categories. Place names are subdivided into nine specific categories, and each category corresponds to a specific level. See Table 1 for details, which also provides labels, descriptions, and specific examples for each category of place names.

[0119] Table 1 Place Name Categories

[0120]

[0121] 2) Construction of a place name annotation corpus

[0122] A character-based BIO annotation system is used to annotate place name information in 201 social media texts with a total of 22,080 characters, and a place name annotated corpus including 9 different place name categories and covering 19 classification labels is constructed. Taking the sentence "August 2018, travel from Nanjing to Wuhan" as an example, the sequence obtained after annotation is {二 / O〇 / O一 / O八 / O年 / O八 / O月 / O从 / O南 / B-city京 / I-city前 / O往 / O武 / B-city汉 / I-city}.

[0123] Step 2, place name extraction based on dynamic and static vector fusion embedding

[0124] 1) Static vector construction

[0125] Based on Zhengzhou POI address description data, the Skip-gram algorithm is used to train word vectors, and a pre-trained vector dictionary Dict based on POI data is constructed A . The training parameters are set as follows: the window size is 5, the vector dimension is 300, the dynamic window is enabled, the subsampling rate is 1e-5, the threshold for low-frequency words is set to 10, the model is iterated 5 times, and 5 negative samplings are adopted. The sgns.weibo.char pre-trained based on Weibo corpus is used as the Word2Vec model, wherein the vector length of all characters and words is 300 dimensions, and the vector vocabulary of the pre-trained Word2Vec model is read and recorded as Dict B Combined with Dict A update Dict B to construct static vectors, the process is shown in formula (1);

[0126]

[0127] Wherein, A and B represent the dictionary Dict respectively A and Dict B the set of characters in, c represents any character in set B. If c∈A, update Dict B the vector of c in is the vector of c in Dict A ; if then retain its vector in Dict B .

[0128] 2) Dynamic and static vector fusion

[0129] The pre-trained Chinese-BERT-wwm-ext is used as the source of dynamic vectors, wherein the vector dimension of each character and word is 768. The dynamic vector and the static vector are fused through the concat connection operation, and each character in the text is represented by a 1068-dimensional synthetic vector, as shown in formula (2);

[0130]

[0131] Among them, e i This represents the fusion vector of the i-th character in the text. It is the dynamic vector representation of the i-th character in the text output by the BERT model; while This is the vector representation of the character in the constructed static vector dictionary. If the character is not in the static vector dictionary, a 300-dimensional zero vector is used as its static vector representation.

[0132] 3) Place name extraction based on fusion embedding

[0133] Considering the short text characteristics of Weibo posts, the maximum length of the input text is set to 256. Text exceeding the maximum length is truncated, and text shorter than the maximum length is padded with zeros to ensure that all input texts have the same length. The batch size is set to 12, and a feature vector of the form [12, 256, 1068] is obtained through the embedding layer, which serves as the input to the BiLSTM layer. The BiLSTM layer has 128 hidden units in each direction. A linear layer maps the output of the BiLSTM to place name categories, and a CRF is used to learn the constraints between labels to optimize this process.

[0134] Step 3: Construction of the place name tree and address generation considering hierarchical constraints

[0135] 1) Place name processing

[0136] Place name descriptions in social media texts often exhibit a degree of arbitrariness, leading to the same place name appearing in multiple forms. Furthermore, the complex spatial relationships between place names present challenges for address extraction. Combining semantic and spatial relationships to systematically process identified place names is a necessary prerequisite for constructing accurate and efficient place name trees. The steps for place name processing are as follows:

[0137] (1) Place name disambiguation

[0138] To address the issue of place name ambiguity in text, this paper introduces a place name database to determine whether there are synonyms or variants of a given place name. Using a four-level (province, city, county, township) place name database as the place name dictionary, the minimum edit distance between the extracted place name and its corresponding place name in the dictionary is calculated, and the place name with the smallest edit distance is used for normalization. Specifically, for a given text, the extracted provincial, city, county, and township level place name entity `loc`... i Normalize according to formula (3);

[0139]

[0140] Where, placeDict represents the constructed place name dictionary, place jFor place name dictionaries with loc i Any place name at the same level. d(loc) i ,place j The ') represents the edit distance between the two places, and the place name with the smallest edit distance is selected. j to replace loc i The original place name.

[0141] (2) Determination and handling of place name relationships

[0142] The process of place name processing involves not only the standardization of place names themselves, but also the judgment and screening of complex entity relationships between place names. This study classifies the relationships between place name entities of the same level into three types: parallel, modifying, and intersecting, and judges the entity relationships through syntactic rules: Parallel relationship refers to two or more place name entities appearing side by side in the text, but remaining logically independent, such as "Yellow River and Yangtze River," which appear together but are independent, and are treated as separate entities during analysis; Modifying relationship refers to a place name entity acting as an adjective of another place name, but not forming new geographical information independently of the modified entity, such as "Guangbutun Subway Station next to Wuhan University," where "Wuhan University" is not considered as an independent geographical entity, and such non-independent modifying place names need to be removed in place name processing; Intersecting relationship involves place name entities with overlapping or intersecting spatial locations, such as "Intersection of Beijing West Road and Shanghai West Road," which describes the specific location where the two streets intersect, and merging the names of these two roads can effectively reflect the actual intersection structure of geographical space.

[0143] 2) Construction of place name tree

[0144] Sort loclist in descending order of elevation value and initialize tree T to empty. For each place name tuple in loclist (loc... i ,lev i ,b i ,e i Continue processing using the following steps: If loc i lev i It is the maximum value among all place name levels, creating a new node. i The node attribute contains loc i and lev i , will node i Add tree T as a leaf node; otherwise, find all possible candidate place names in loclist and score them using the scoring function Score, then select the candidate place name with the highest score loc. j as loc i The parent node is added to T. After all place names have been processed, the place name tree T is returned.

[0145] In the process of constructing the place name tree, to ensure that the parent place name with the highest relevance to the current place name is selected as the parent node at each step, it is necessary to quantify the relevance strength between the current place name and the candidate node place names. A scoring function is defined as shown in formula (4) to calculate the loc of the current place name. i and candidate place names loc j The strength of the association between them is used as the reference for each higher-level candidate place name (loc). j The score.

[0146]

[0147] Among them, f k (loc j ) represents the superior candidate place name loc j The score of the k-th evaluation metric, w k For indicator f k (loc j The weights of the evaluation indicators are given by K, where K represents the total number of evaluation indicators.

[0148] This paper mainly considers the following four evaluation indicators:

[0149] (1) Distance between candidate place names and current place name text. The distance score is calculated based on the reciprocal of the shortest distance between place name entities, as shown in formula (5).

[0150] disscore=min(|e j -b i |,|b j -e i |) -1 (5)

[0151] Among them, b i and e i These represent the current location name (loc). i At the beginning and end positions of the text, b j and e j These represent candidate place names (loc). j The beginning and end positions in the text.

[0152] (2) Difference in level between candidate place names and current place names. The levscore for the difference in level between place names is calculated based on the inverse function of the level difference, as shown in formula (6).

[0153]

[0154] Among them, lev i and lev jThese represent the levels of the current place name and the candidate place name, respectively. If the level value of the candidate place name is greater than the level of the current place name, the level difference score is recorded as 0.

[0155] (3) Frequency of candidate place names. The frequency score (freqscore) takes into account the frequency of place names in the list, as shown in formula (7).

[0156]

[0157] Where Q represents the frequency threshold, freq(loc) j ) indicates candidate place name loc j The frequency of occurrence. If the frequency is greater than Q, the frequency score is recorded as 1. In this example, the frequency threshold Q is set to 3.

[0158] (4) Candidate place name length. The length score is quantified based on the character length of the place name, as shown in formula (8).

[0159]

[0160] Where L represents the length threshold, len(loc) j ) indicates candidate place name loc j The length of the place name is L. If the place name length is greater than L, the length score is recorded as 1. In this example, the length threshold L is set to 10.

[0161] Furthermore, the steps for determining the weights of place name indicators are as follows:

[0162] (1) Establish the judgment matrix

[0163] Based on the relative importance of the questions and indicators, construct a judgment matrix A. For n indicators, the judgment matrix A is an n×n matrix, where element a ij This indicates the importance of indicator i relative to indicator j. If indicator i and indicator j are equally important, then a ij =1; if indicator i is more important than indicator j, then a ij >1; If indicator i is less important than indicator j, then 0 ij <1.

[0164] Table 2 Relative Importance of Indicators

[0165] disscore 1 2 5 7 levscore 1 / 2 1 3 5 freqscore 1 / 5 1 / 3 1 3 lenscore 1 / 7 1 / 5 1 / 3 1

[0166] (2) Calculate the index weights

[0167] Calculate the eigenvalues ​​and eigenvectors of matrix A, as shown in formula (9). Find the largest eigenvalue λ. max ​The corresponding eigenvectors are used to normalize the eigenvectors to obtain the weights of each indicator.

[0168] Ax=λx (9)

[0169] Where λ represents the eigenvalue of matrix A, and x is the eigenvector corresponding to the eigenvalue.

[0170] λ was calculated max =4.0685, the corresponding feature vector is x = [-0.8482, -0.4825, -0.1981, -0.0925], which after normalization is [0.5232, 0.2976, 0.1222, 0.0570], corresponding to the weights of each indicator.

[0171] (3) Perform a consistency check

[0172] The consistency ratio CR is calculated based on formula (10). If CR < 0.1, the consistency of the judgment matrix is ​​considered acceptable; if CR ≥ 0.1, the elements of the judgment matrix need to be reconsidered.

[0173]

[0174] Where CI is the consistency index and RI is the random consistency index. max This is the largest eigenvalue calculated earlier, where n is the matrix order. RI is a constant determined by the matrix order; when n = 4, RI = 0.90.

[0175] The calculated CI = 0.0228 and CR = 0.0254. A consistency ratio CR less than 0.1 indicates that the consistency of the judgment matrix is ​​acceptable.

[0176] 3) Address generation

[0177] Based on the depth-first search approach, the constructed place name tree is traversed, starting from the root node and visiting each branch step by step to the leaf node, generating a series of complete paths representing place names from high-level to low-level. These paths are in the form of "root node -> intermediate nodes (several) -> leaf node", where each node represents a specific place name in the geographic space, and the combination of all nodes constitutes the complete address. The specific path generation from the root node to any leaf node is shown in formula (11).

[0178]

[0179] Where Ls represents the set of leaf nodes, and N (node i ) represents the i-th node. i place name, child(node) i) represents a node i The child nodes.

[0180] Table 3: Examples of Address Extraction Results

[0181]

[0182] In this embodiment, 201 labeled samples were divided into training, validation, and test sets in a 3:1:1 ratio for training. The trained model was used to extract 21,438 address information entries from 25,668 social media posts.

[0183] This invention considers the compositional structure of address information and the need for refined extraction, constructing a corpus for place name classification and annotation. Given the variability of context in address representations and the stability of common place name vocabulary, dynamic and static vectors are integrated to enhance address semantics and achieve multi-level place name extraction. Considering the hierarchical relationships between place names, a place name tree is constructed bottom-up based on local optima, and then addresses are generated by traversing the place name tree using a depth-first search approach. This invention's research on address information extraction methods in fine-scale social media helps to determine the precise spatial location of geographical objects or phenomena, thereby further supporting applications in fields such as emergency management, urban planning, and public safety.

[0184] This invention proposes a social media address information extraction system that integrates embedded semantics, comprising:

[0185] The entity recognition corpus construction module takes into account the composition structure of address information and the need for refined extraction. It decomposes address information according to elements such as administrative divisions, roads, and buildings, and divides them into place name categories with hierarchical relationships, such as provinces, cities, counties, districts, and roads. It uses a character-based annotation system to annotate place names at each level in social media and constructs a place name entity recognition corpus for social media texts.

[0186] The place name extraction module at each level in the text is used to train the address descriptive data in POIs to obtain an address-related word vector dictionary, thereby updating the general static vector model. The concat connection operation is used to fuse the dynamic vectors and static vectors to obtain the embedding representation of each character in the address recognition context, and to extract the place names at each level in the text.

[0187] The address information generation module is used to consider the semantics of place names and the relationships between different place names, and to perform place name ambiguity elimination and noise removal. Based on the idea of ​​a greedy algorithm, it gradually builds a place name tree from the bottom up from the finest place name information. It uses a depth-first search to traverse the place name tree and generates a complete path from the root node to the leaf node as address information.

[0188] The entity recognition corpus construction module, the place name extraction module at each level in the text, and the address information generation module are all deployed on the server.

[0189] The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art to which this invention pertains may make various modifications or additions to the described specific embodiments or use similar methods to substitute them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims.

Claims

1. A method for extracting social media address information by incorporating embedded semantics, characterized in that, Includes the following steps: Step 1: Considering the composition and structure of address information and the need for refined extraction, the address information is decomposed according to administrative divisions, roads, and building elements, and divided into hierarchical categories of province, city, county, district, and road place names. A character-based annotation system is used to annotate place names at each level in social media, and a place name entity recognition corpus for social media text is constructed. Step 2: Train the address descriptive data in POI to obtain an address-related word vector dictionary, which is used to update the general static vector model. The dynamic vector and static vector are fused using the concat operation to obtain the embedding representation of each character in the address recognition context, and the place names at each level in the text are extracted. The specific implementation method of step 2 is as follows: The Skip-gram algorithm is used to train the training vector dictionary based on the address descriptive data of Points of Interest (POIs) from Amap (Gaode Maps). ; Read the vector word list of the pre-trained Word2Vec model and denote it as , combined renew To construct a static vector, the process is as follows: in, and They represent dictionaries and A set of Chinese characters Represents any character in set B; if ,renew middle The vector is middle The vector; if Then retain it in Vectors in; The `concat` operation is used to merge dynamic and static vectors, forming a vector representation that includes both long-term statistical properties and immediate contextual changes, as shown below: in, Indicates the first in the text A fusion vector of characters, It is the first in the text Each character is represented by a dynamic vector output by the BERT model, while This is the vector representation of the character in the constructed static vector dictionary; The fused embedding representation of the text is input into the composite structure of BiLSTM+CRF for entity recognition task training, with negative log-likelihood loss as the loss function. The place name information extracted from the same text is recorded in a list, denoted as: in, Indicates the extracted first The name of a place. express The level of place names, and express The start and end positions in the text; Step 3: Consider the semantics of place names and the relationships between different place names, perform place name ambiguity elimination and noise removal. Based on the idea of ​​greedy algorithm, build a place name tree from the bottom up from the finest place name information. Use depth-first search to traverse the place name tree and generate a complete path from the root node to the leaf node as address information.

2. The method for extracting social media address information by fusing embedded semantics according to claim 1, characterized in that: The specific implementation method of step 1 is as follows: Step 1.1: Classify place names; Step 1.2: Establish a corpus of place name annotations.

3. The method for extracting social media address information by fusing embedded semantics according to claim 2, characterized in that: The classification of place names described in step 1.1 is as follows: Place names refer to the elements that make up an address; each address is composed of multiple place names at different levels in an orderly manner. Based on relevant national standards, place names are classified into different types, and any given place name category is denoted as: ,level The larger the value, the more precise the spatial location indicated by the place name; Step 1.2, which involves establishing a place name annotation corpus, is detailed below: A single-character-based BIO annotation mechanism is used to annotate place name information in social media text; For place names consisting of only one word, use B-LOC for labeling; If a place name contains two or more words, start with a B-LOC label, followed by a series of I-LOC labels; Here, "LOC" represents a specific type of place name.

4. The method for extracting social media address information by fusing embedded semantics according to claim 1, characterized in that: Step 3 is described in detail below: Step 3.1: Place name processing; Step 3.2: Constructing the place name tree; Step 3.3: Address generation based on the place name tree.

5. The method for extracting social media address information by fusing embedded semantics according to claim 4, characterized in that: The place name processing described in step 3.1 is as follows: Using a four-level place name database (province, city, county, township) as a place name dictionary, the minimum edit distance between the extracted place name and the place name at the same level in the place name dictionary is calculated, and the place name with the minimum edit distance is used for standardization. Specifically, for the provincial, municipal, county, and township-level place name entities extracted from a certain text Normalize according to the following formula: in, This indicates the construction of a toponymic dictionary. For place name dictionary Any place name of the same level; This indicates the edit distance between the two locations; the location with the smallest edit distance is selected. to replace The original place name; The process of place name processing involves not only the standardization of place names themselves, but also the judgment and screening of complex entity relationships between place names; The relationships between place names at the same level are classified into three types: parallel relationship, modifying relationship, and overlapping relationship. The parallel relationship refers to two or more named entities appearing side by side in the text, but logically remaining independent, and both being treated as separate entities during analysis and processing; The aforementioned modification relationship refers to a place name entity acting as an adjective of another place name, but not forming new geographical information independently of the modified entity. In place name processing, place names with such non-independent modification relationships need to be eliminated. The intersection relationship involves place name entities that overlap or intersect in spatial location. When processing, these two place names need to be merged to effectively reflect the actual intersection structure of geographic space. The construction of the place name tree in step 3.2 is as follows: Considering the hierarchical relationship between place name entities, a place name tree is constructed by selecting a locally optimal solution based on a greedy algorithm. Starting with the finest-grained place name as the initial node, the highest-scoring parent place name is selected as the parent node based on a bottom-up principle, and this process is repeated until no further upward merging is possible. Parent candidate place names... Relative to the current place name The score is calculated using the following formula: in, Representative of candidate place names from higher authorities No. The scores of each evaluation indicator, As an indicator The weight, Indicates the total number of evaluation indicators; Step 3.3, address generation based on the place name tree, is as follows: Based on the idea of ​​depth-first search, the constructed place name tree is traversed, starting from the root node and visiting each branch step by step to the leaf node, generating a series of complete paths representing place names from high-level to low-level; these paths are in the form of "root node -> intermediate node -> leaf node", where each node represents a specific place name in geographic space, and the combination of all nodes constitutes the complete address; the specific path from the root node to any leaf node is generated as follows: in, Represents the set of leaf nodes. Indicates the first Nodes Place names, Represents a node The child nodes.

6. A social media address information extraction system integrating embedded semantics, characterized in that, include: The entity recognition corpus construction module takes into account the composition structure of address information and the need for refined extraction. It decomposes address information according to administrative divisions, roads, and building elements, and divides them into hierarchical categories of province, city, county, district, and road place names. It uses a character-based annotation system to annotate place names at each level in social media and constructs a place name entity recognition corpus for social media texts. The place name extraction module at each level in the text is used to train the address descriptive data in POIs to obtain an address-related word vector dictionary, thereby updating the general static vector model. The concat connection operation is used to fuse the dynamic vectors and static vectors to obtain the embedding representation of each character in the address recognition context, and to extract the place names at each level in the text. The specific implementation method is as follows: The Skip-gram algorithm is used to train the training vector dictionary based on the address descriptive data of Points of Interest (POIs) from Amap (Gaode Maps). ; Read the vector word list of the pre-trained Word2Vec model and denote it as , combined renew To construct a static vector, the process is as follows: in, and They represent dictionaries and A set of Chinese characters Represents any character in set B; if ,renew middle The vector is middle The vector; if Then retain it in Vectors in; The `concat` operation is used to merge dynamic and static vectors, forming a vector representation that includes both long-term statistical properties and immediate contextual changes, as shown below: in, Indicates the first in the text A fusion vector of characters, It is the first in the text Each character is represented by a dynamic vector output by the BERT model, while This is the vector representation of the character in the constructed static vector dictionary; The fused embedding representation of the text is input into the composite structure of BiLSTM+CRF for entity recognition task training, with negative log-likelihood loss as the loss function. The place name information extracted from the same text is recorded in a list, denoted as: in, Indicates the extracted first The name of a place. express The level of place names, and express The start and end positions in the text; The address information generation module is used to consider the semantics of place names and the relationships between different place names, and to perform place name ambiguity elimination and noise removal. Based on the idea of ​​a greedy algorithm, it gradually builds a place name tree from the bottom up from the finest place name information. It uses a depth-first search to traverse the place name tree and generates a complete path from the root node to the leaf node as address information.

Citation Information

Patent Citations

  • Internet-oriented place name extraction and standardization method

    CN105224622A

  • Address information feature extraction method based on deep neural network model

    CN110377686A