A word unit separation method and system for address classification based on text classification

By segmenting and clustering address text, filtering and matching word element sequences, and combining vector search and separation completion technology, the problem of insufficient utilization of alignment metrics and physical space features in address text processing in the existing technology is solved, and improved Classification accuracy and processing precision of address text.

CN118227809BActive Publication Date: 2024-09-03GUANGDONG UNIV OF TECH +1
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing technology lacks consideration of alignment metrics and address correction requirements in address text processing, resulting in a decrease in the accuracy of address matching and classification, and traditional methods fail to make full use of vector search and physical space distribution characteristics, affecting the accuracy of address matching.

Method used

By collecting address text data sets, word segmentation and embedding vector acquisition are performed, the clustering and address alignment numbers of word element sequences are calculated, the word element target sequences are screened, vector search is used for matching, and separation and completion are performed based on the cluster alignment number. Generate delimited completion sequences to improve classification accuracy of address text.

Benefits of technology

It improves the processing precision and classification accuracy of address text, reduces the biased influence caused by background semantic probability, and can more effectively classify address text into regional addresses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118227809B
    Figure CN118227809B
Patent Text Reader

Abstract

This invention belongs to the field of data processing and provides a word segmentation method and system for address classification based on text classification. It involves filtering target word sequences in each word sequence cluster, calculating the cluster alignment number of the word sequence cluster based on the number of aligned words in each word sequence, extracting the portion from the first word in the central word sequence to the word corresponding to the cluster alignment number, and calculating the central word index of the word sequence cluster. The input address text to be retrieved is vectorized and matched with the word vector sequences corresponding to the target word sequences in each word sequence cluster to obtain the matched target word sequences. Based on the central word index and cluster alignment number of the word sequence cluster containing the matched target word sequences, the word vector sequence of the address text to be retrieved is segmented and padded to obtain the segmented and padded sequence of the address text to be retrieved, which can more effectively classify the address text to be detected into regional addresses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of data processing, and in particular relates to a word unit separation method and system for address classification based on text classification. Background Art

[0002] Address standardization is a meticulous process that involves the precise extraction, parsing, and validation of raw, differently formatted address data, and ultimately the reconstruction of it into a unified and standardized format. This process not only significantly enhances the availability and consistency of data, but also plays a vital role in the efficient operation of key areas such as logistics, urban planning, and emergency response. Specifically, the address standardization process includes several key steps. First, it requires precise processing of the input address information, which may be in different formats and contain different geographic elements. Next, through a series of precise processing steps, the raw address data is converted into outputs with a unified format that clearly reflects the various geographic elements in the address, such as province, city, district, street, and township / community.

[0003] However, the input data of address text is often vague or inaccurate. The address text filled in on some logistics express orders is an approximate area, and the address text input by some navigation systems is a patchwork of discrete locations. The semantic bias about rivers and lakes in some address texts such as "a certain river lane" and "a certain lake street" will lead the classification results to the irrelevant but real "a certain river" and "a certain lake". In some other cases, especially in vast areas such as suburbs, new development zones, rural areas, and forest farms, the input address text is often a certain distance in a certain direction from a certain address in the surrounding area. Even if this kind of address text data is input into a large-scale language model, the output obtained is just a vague character patchwork prediction, which is only used for algorithm exploration or score testing in the laboratory and is not enough for actual navigation. Another example is address text pre-training models such as GeoBERT, or large-scale pre-trained language models such as GPT. Their data sets are too large. If many embeddings are stored in themselves, the model will run very cumbersome and slow. Now they are usually stored in vector databases for call calculations. Although this approach improves efficiency, it is found that the accuracy of encoding is sacrificed.

[0004] Traditional methods lack alignment metrics and consideration of address correction requirements. When processing address text, they often lack consideration of text alignment and address correction distance, which may lead to a decrease in the accuracy of address matching and classification. Limited by the bias of background semantic probability, previous technologies are easily affected by prior background semantic probability when using pre-trained language models or semantic features, especially when address text contains misleading words, which may lead to a decrease in the accuracy of address information. Due to the neglect of physical space distribution characteristics, the existing methods rarely use the physical space probability distribution characteristics of actual address coordinates. Therefore, when processing address text, they may not be able to effectively combat the semantic probability distribution characteristics of ambiguous words, thereby reducing the accuracy of address matching. However, traditional technologies have limitations in the word segmentation strategy of address text, and may not be able to capture the semantic and structural characteristics of address text well, thereby affecting the subsequent matching and classification effects. Previous methods often do not introduce the concept of cluster alignment number, and lack a mechanism for quantitatively evaluating the alignment of each word sequence in the word sequence cluster, resulting in a decrease in matching and classification accuracy. The address text element extraction method based on the coupling of hidden Markov and classification algorithms mentioned in the patent document with publication number CN113343670B can be used to map non-standard address text data in the spontaneous geographic information field into structured address element information, but it fails to fully utilize vector search. When processing word vector sequences, it may not fully utilize vector search to match address text, which may lead to low matching efficiency or inaccurate results. Summary of the invention

[0005] The purpose of the present invention is to propose a word-unit separation method and system for address classification based on text classification, so as to solve one or more technical problems existing in the prior art and at least provide a beneficial choice or create conditions.

[0006] In order to achieve the above object, according to one aspect of the present invention, a word-element separation method for address classification based on text classification is provided, the method comprising the following steps:

[0007] Collect multiple different address texts to form an address text dataset, obtain the coordinates corresponding to each address text, segment each address text to obtain a word unit sequence, obtain the embedding vector of each word unit, and form a word vector sequence;

[0008] Calculate and obtain word-gram sequence clusters in the address text data set, and obtain the address matching number of each word-gram sequence by comparing each word-gram sequence with the central word-gram sequence;

[0009] Then, in each word-gram sequence cluster, the distance between the coordinates corresponding to each word-gram sequence and the coordinates corresponding to the central word-gram sequence of the word-gram sequence cluster to which it belongs is calculated as the address correction distance corresponding to the word-gram sequence, and the word-gram target sequence in each word-gram sequence cluster is selected according to the address correction distance and the address fit number;

[0010] The cluster alignment number of the word-gram sequence cluster is calculated according to the number of aligned word-grams of each word-gram sequence in the word-gram sequence cluster, and the portion from the first word-gram in the central word-gram sequence of the word-gram sequence cluster to the word-gram corresponding to the cluster alignment number is cut out, and the central word-gram index of the word-gram sequence cluster is calculated;

[0011] When performing address text retrieval, the input address text to be retrieved is vectorized and matched with the word vector sequence corresponding to the word unit target sequence in each word unit sequence cluster through vector search to obtain a matching word unit target sequence;

[0012] According to the central word unit index quantity and cluster alignment number corresponding to the word unit sequence cluster where the matched word unit target sequence is located, the word vector sequence of the address text to be searched is separated and supplemented to obtain the separated and supplemented sequence of the address text to be searched;

[0013] The delimited and completed sequence of the address text to be retrieved is used as input of the language model.

[0014] Furthermore, the coordinates corresponding to each address text include latitude and longitude coordinates and / or three-dimensional coordinates.

[0015] Furthermore, a sequence of tokens (words) obtained by segmenting each address text is used as a word sequence, and the number of dimensions of the embedded vector of each word obtained is equal.

[0016] Further, clustering each word-unit sequence in the address text data set according to the similarity of the corresponding word vector sequence to obtain a number of word-unit sequence clusters;

[0017] Preferably, clustering is performed based on the semantic similarity of the word vector sequences corresponding to each word-unit sequence, wherein the semantic similarity may be the cosine similarity of the embedding vectors. Each word-unit sequence continues to maintain a consistent relationship with the coordinates corresponding to its address text.

[0018] Furthermore, the word-gram sequence clusters in the address text data set are calculated and the address matching number of each word-gram sequence is obtained by comparing each word-gram sequence with the central word-gram sequence, specifically:

[0019] In each word-gram sequence cluster, the word-gram sequence serving as the cluster center in each word-gram sequence cluster is selected as the central word-gram sequence;

[0020] In each word-gram sequence cluster, each word-gram sequence is compared with the central word-gram sequence: each word-gram sequence is compared with the central word-gram sequence starting from the first word-gram to compare the parts with the same words as the aligned word-gram part, and the number of words in the aligned word-gram part is taken as the number of aligned word-grams of the word-gram sequence.

[0021] Then, the part of the word-gram sequence except the aligned word-gram part is correspondingly compared with the part of the central word-gram sequence except the aligned word-gram part, the character length of the part of the central word-gram sequence except the aligned word-gram part is recorded as the non-aligned remainder of the word-gram sequence, and the text edit distance between the part of the word-gram sequence except the aligned word-gram part and the part of the central word-gram sequence except the aligned word-gram part is calculated, and the text edit distance between them is taken as the non-aligned word number of the word-gram sequence;

[0022] The number of aligned words of each word sequence can better reflect the degree of alignment with its central word sequence in the word sequence cluster to which it belongs. This degree of alignment is compared from the beginning, so it is different from the previous algorithm of comparing the intersection length of word sequences, and can better compare the arrangement characteristics of the characters of the address text from the larger area at the beginning to the smaller area. The number of aligned words of the word sequence compared to the product of the number of unaligned words of the word sequence and its corresponding unaligned remainder helps to highlight the overlapping address text interval compared to the part of the address text that is not aligned between the two word sequences to be compared, so as to help the subsequent address text to be detected in the data features highlighted by the address fitting number, and realize faster classification of the subsequent address text to be detected into the word sequence cluster that best fits the regional address.

[0023] The product of the number of non-aligned words in the word sequence and its corresponding non-aligned remainder is calculated, and then the ratio of the number of aligned words in the word sequence to the product of the number of non-aligned words in the word sequence and its corresponding non-aligned remainder is obtained as the address matching number of the word sequence.

[0024] Furthermore, in each word-gram sequence cluster, the distance between the coordinates corresponding to each word-gram sequence and the coordinates corresponding to the central word-gram sequence of the word-gram sequence cluster to which it belongs is calculated as the address correction distance corresponding to the word-gram sequence, specifically:

[0025] In each word sequence cluster, the distance between the coordinates corresponding to each word sequence and the coordinates corresponding to the central word sequence of the word sequence cluster to which it belongs is calculated as the address correction distance corresponding to the word sequence. In some embodiments, the distance between the coordinates can be calculated using Euclidean distance, while in some embodiments, the distance between the coordinates can be calculated using Manhattan distance.

[0026] In previous address text calculations, especially those with the help of pre-trained semantic features, they are often biased by prior background semantic probabilities. In particular, when some words in some address texts carry other semantic probabilities than expected in the background, the additional background semantic probabilities in the word segmentation of the address text will have a biased effect on the alignment of geographic interval coordinates. By calculating the distance between the coordinates corresponding to each word sequence and the coordinates corresponding to the central word sequence of the word sequence cluster to which it belongs, the address correction distance can better utilize the physical space probability distribution characteristics of the actual address coordinates to effectively counteract the semantic probability distribution characteristics of ambiguous words in the word segmentation of the address text, and more effectively reduce the bias of the parameters of the classification model and the language model.

[0027] In each word-gram sequence cluster, the arithmetic mean of the address-corrected distances of each word-gram sequence therein is calculated as the average address-corrected distance in the word-gram sequence cluster, and the median of the number of address fits of each word-gram sequence therein is calculated as the median of address fits in the word-gram sequence cluster, and word-gram sequences in the word-gram sequence cluster whose address-corrected distance is less than the average address-corrected distance and whose number of address fits is greater than the median of address fits are screened out as word-gram target sequences in the word-gram sequence cluster.

[0028] Preferably, the obtained word-unit target sequence is clustered with the word-unit sequence in which it is located and associated with each other. For example, pointers or jump links can be used for the association.

[0029] Calculate the arithmetic mean of the number of aligned word units of each word unit sequence in the word unit sequence cluster as the cluster alignment number of the word unit sequence cluster.

[0030] The part of the word corresponding to the first word to cluster alignment number in the central word sequence of the word sequence cluster is cut out for calculation, and the embedding vector corresponding to each word in the part cut out from the first word to cluster alignment number is added point-to-point in each dimension and then the average value is taken to obtain the central word index of the word sequence cluster:

[0031] Furthermore, according to the address correction distance and the address matching number, the word unit target sequence in each word unit sequence cluster is screened, specifically:

[0032] When performing address text retrieval, the input address text to be retrieved is vectorized and matched with the word vector sequence corresponding to the word unit target sequence in each word unit sequence cluster through vector search to obtain a matching word unit target sequence.

[0033] Furthermore, according to the central word unit index amount and cluster alignment number corresponding to the word unit sequence cluster where the matched word unit target sequence is located, the word vector sequence of the address text to be searched is separated and supplemented to obtain the separated and supplemented sequence of the address text to be searched, which is specifically:

[0034] Obtain the central word element index corresponding to the word element sequence cluster where the matched word element target sequence is located, obtain the cluster alignment number corresponding to the word element sequence cluster where the matched word element target sequence is located, and separate and complete the word vector sequence of the address text to be searched according to the central word element index and cluster alignment number corresponding to the word element sequence cluster where the matched word element target sequence is located, so as to obtain the separated and completed sequence of the address text to be searched;

[0035] Use the delimited and completed sequence of the address text to be retrieved as the input of the language model:

[0036] The position that needs to be separated and filled is located in the word vector sequence of the address text to be retrieved through the cluster alignment number, and the central word index corresponding to the word sequence cluster where it is located is placed in the position of the dimension corresponding to the cluster alignment number in the word vector sequence of the address text to be retrieved. This is conducive to guiding the word vector sequence of the address text to be retrieved, leading it to the interval where the address text is more appropriate, and more effectively reducing the deviation of the parameters of the classification model and language model of the address text, thereby improving the ability to correctly classify the address into the corresponding community.

[0037] Furthermore, the separation and completion sequence of the address text to be retrieved is used as the input of the pre-trained language model, specifically:

[0038] Preferably, in the large-scale pre-trained language model, in the process of word segmentation, vectorization and serialization of the input text, a vector database is used to store various vectorized inputs. However, in the large-scale pre-trained language model for address text, the word segmentation of the input address text is more inclined to the alignment of geographical interval coordinates rather than the alignment of semantic information, so directly using the tokenizer of the BERT model cannot fully express the alignment inclined to geographical interval coordinates. When using the address text as the input of the large-scale language model, the word vector sequence of the address text to be retrieved is separated and supplemented according to the cluster alignment number, and the central word element index corresponding to the word element sequence cluster in the word vector sequence of the address text to be retrieved is separated and supplemented according to the dimension of the cluster alignment number, which can reduce the biased influence of the additional background semantic probability in the word segmentation of the input address text on the alignment of geographical interval coordinates, prevent the model from being biased, and better improve the classification accuracy of the address text.

[0039] The separated and completed sequence of the address text to be retrieved is used as the input of the classification model, and the classification model (for example, may include LSTM or Transformer, etc.) is made to output the existing address text that is closest to the address text to be retrieved.

[0040] The present invention also provides a word-element separation system for address classification based on text classification, the word-element separation system for address classification based on text classification comprises: a processor, a memory, and a computer program stored in the memory and executable on the processor, the processor implements the steps in the word-element separation method for address classification based on text classification when executing the computer program, the word-element separation system for address classification based on text classification can be run in computing devices such as desktop computers, notebook computers, PDAs, and cloud data centers, and the executable system may include, but is not limited to, a processor, a memory, and a server cluster, and the processor executes the computer program to run in the following system units:

[0041] A data collection unit is used to collect a plurality of different address texts to form an address text data set, obtain the coordinates corresponding to each address text, segment each address text to obtain a word unit sequence, obtain the embedding vector of each word unit therein, and form a word vector sequence;

[0042] An address calculation unit, used for calculating and obtaining word-unit sequence clusters in the address text data set, and obtaining the address matching number of each word-unit sequence by comparing each word-unit sequence with the central word-unit sequence;

[0043] A sequence screening unit is used to calculate, in each word-unit sequence cluster, the distance between the coordinates corresponding to each word-unit sequence and the coordinates corresponding to the central word-unit sequence of the word-unit sequence cluster to which it belongs as the address correction distance corresponding to the word-unit sequence, and screen the word-unit target sequence in each word-unit sequence cluster according to the address correction distance and the address fit number;

[0044] A sequence matching unit, used to calculate the cluster alignment number of the word-gram sequence cluster according to the number of aligned word-grams of each word-gram sequence in the word-gram sequence cluster, extract the portion from the first word-gram in the central word-gram sequence of the word-gram sequence cluster to the word-gram corresponding to the cluster alignment number, and calculate to obtain the central word-gram index of the word-gram sequence cluster;

[0045] A text retrieval unit is used to, when performing address text retrieval, vectorize the input address text to be retrieved and match it with the word vector sequence corresponding to the word unit target sequence in each word unit sequence cluster through vector search to obtain a matching word unit target sequence;

[0046] The separation and completion unit is used to separate and complete the word vector sequence of the address text to be searched according to the central word index amount and cluster alignment number corresponding to the word sequence cluster where the matched word target sequence is located, so as to obtain the separation and completion sequence of the address text to be searched.

[0047] Correspondingly, the present invention also provides an electronic device, a readable storage medium and a computer program product:

[0048] An electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the word-unit separation method for address classification based on text classification and the method of each step therein.

[0049] A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the word-element separation method for address classification based on text classification and the method of each step therein.

[0050] A computer program product comprises a computer program, wherein when the computer program is executed by a processor, the method for separating word elements for address classification based on text classification and the methods for the various steps thereof are implemented.

[0051] The beneficial effects of the present invention are as follows: the present invention provides a word-meta separation method and system for address classification based on text classification, which screens the word-meta target sequence in each word-meta sequence cluster according to the address correction distance and the address fit number, calculates the cluster alignment number of the word-meta sequence cluster according to the aligned word-meta number of each word-meta sequence, extracts the part from the first word in the central word-meta sequence to the word-meta corresponding to the cluster alignment number, and calculates the central word-meta index of the word-meta sequence cluster; vectorizes the input address text to be retrieved and matches it with the word-meta target sequence in each word-meta sequence cluster to obtain a matching word-meta target sequence; separates and fills the word-meta sequence of the address text to be retrieved according to the central word-meta index and cluster alignment number corresponding to the word-meta sequence cluster where the matching word-meta target sequence is located, and obtains the separated and filled sequence of the address text to be retrieved. Among them, the calculation of the number of aligned tokens and the address correction distance can more accurately evaluate the alignment degree and address correction requirements of the address text, thereby improving the processing accuracy of the address text; the generation of separation and completion sequences can help the pre-trained language model better understand the address text to be retrieved, thereby improving the accuracy of text matching and classification; by introducing coordinate information and alignment metrics, the biased influence of background semantic probability is reduced, thereby improving the accuracy of address text processing; by clustering the alignment number and generating separation and completion sequences, the address text to be detected can be more effectively classified as a regional address. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The above and other features of the present invention will become more obvious by describing in detail the embodiments shown in the accompanying drawings. The same reference numerals in the accompanying drawings of the present invention represent the same or similar elements. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work. In the accompanying drawings:

[0053] Figure 1 Shown is a flow chart of a word-unit separation method for address classification based on text classification;

[0054] Figure 2 The figure shows a system structure diagram of a word-unit separation system for address classification based on text classification. DETAILED DESCRIPTION

[0055] The following will be combined with the embodiments and drawings to clearly and completely describe the concept, specific structure and technical effects of the present invention, so as to fully understand the purpose, scheme and effect of the present invention. It should be noted that the embodiments and features in the embodiments of this application can be combined with each other without conflict.

[0056] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0057] like Figure 1 The flowchart of the word unit separation method for address classification based on text classification according to the present invention is shown below. Figure 1 A word-unit separation method, system and device for address classification based on text classification according to an embodiment of the present invention will be described.

[0058] The present invention proposes a word-element separation method for address classification based on text classification, and the method specifically comprises the following steps:

[0059] Collect multiple different address texts to form an address text dataset, obtain the coordinates corresponding to each address text, segment each address text to obtain a word unit sequence, obtain the embedding vector of each word unit, and form a word vector sequence;

[0060] Calculate and obtain word-gram sequence clusters in the address text data set, and obtain the address matching number of each word-gram sequence by comparing each word-gram sequence with the central word-gram sequence;

[0061] Then, in each word-gram sequence cluster, the distance between the coordinates corresponding to each word-gram sequence and the coordinates corresponding to the central word-gram sequence of the word-gram sequence cluster to which it belongs is calculated as the address correction distance corresponding to the word-gram sequence, and the word-gram target sequence in each word-gram sequence cluster is selected according to the address correction distance and the address fit number;

[0062] The cluster alignment number of the word-gram sequence cluster is calculated according to the number of aligned word-grams of each word-gram sequence in the word-gram sequence cluster, and the portion from the first word-gram in the central word-gram sequence of the word-gram sequence cluster to the word-gram corresponding to the cluster alignment number is cut out, and the central word-gram index of the word-gram sequence cluster is calculated;

[0063] When performing address text retrieval, the input address text to be retrieved is vectorized and matched with the word vector sequence corresponding to the word unit target sequence in each word unit sequence cluster through vector search to obtain a matching word unit target sequence;

[0064] According to the central word element index quantity and the cluster alignment number corresponding to the word element sequence cluster where the matched word element target sequence is located, the word vector sequence of the address text to be searched is separated and supplemented to obtain the separated and supplemented sequence of the address text to be searched.

[0065] Furthermore, the coordinates corresponding to each address text include latitude and longitude coordinates and / or three-dimensional coordinates.

[0066] Furthermore, a sequence of tokens (words) obtained by segmenting each address text is used as a word sequence, and the number of dimensions of the embedded vector of each word obtained is equal.

[0067] Further, clustering each word-unit sequence in the address text data set according to the similarity of the corresponding word vector sequence to obtain a number of word-unit sequence clusters;

[0068] In some embodiments, clustering can be performed based on the semantic similarity of the word vector sequences corresponding to each word sequence, wherein the semantic similarity can be the cosine similarity of the embedding vectors. Each word sequence continues to maintain a consistent relationship with the coordinates corresponding to the address text.

[0069] Furthermore, the word-gram sequence clusters in the address text data set are calculated and the address matching number of each word-gram sequence is obtained by comparing each word-gram sequence with the central word-gram sequence, specifically:

[0070] In each word-gram sequence cluster, the word-gram sequence serving as the cluster center in each word-gram sequence cluster is selected as the central word-gram sequence;

[0071] In each word-gram sequence cluster, each word-gram sequence is compared with the central word-gram sequence: each word-gram sequence is compared with the central word-gram sequence starting from the first word-gram to compare the parts with the same words as the aligned word-gram part, and the number of words in the aligned word-gram part is taken as the number of aligned word-grams of the word-gram sequence.

[0072] Then, the part of the word sequence except the aligned word part is compared with the part of the central word sequence except the aligned word part, and the character length of the part of the central word sequence except the aligned word part is recorded as the non-aligned remainder of the word sequence. The text editing distance between the part of the word sequence except the aligned word part and the part of the central word sequence except the aligned word part is calculated, and the text editing distance between them is used as the number of non-aligned words in the word sequence. The number of aligned words of each word sequence can better reflect the degree of alignment with its central word sequence in the word sequence cluster to which it belongs. This degree of alignment is compared from the beginning, so it is different from the previous algorithm of comparing the intersection length of word sequences, and can better compare the arrangement characteristics of the characters of the address text from the larger area at the beginning to the smaller area. The number of aligned words of the word sequence compared to the product of the number of unaligned words of the word sequence and its corresponding unaligned remainder helps to highlight the overlapping address text interval compared to the part of the address text that is not aligned between the two word sequences to be compared, so as to help the subsequent address text to be detected in the data features highlighted by the address fitting number, and realize faster classification of the subsequent address text to be detected into the word sequence cluster that best fits the regional address. Such calculation operation is particularly conducive to obtaining effective positioning in vague address areas such as large-scale suburbs.

[0073] The product of the number of non-aligned words in the word sequence and its corresponding non-aligned remainder is calculated, and then the ratio of the number of aligned words in the word sequence to the product of the number of non-aligned words in the word sequence and its corresponding non-aligned remainder is obtained as the address matching number of the word sequence.

[0074] In some embodiments, when there are 15 word-gram sequence clusters, in the second word-gram sequence cluster, there are n word-gram sequences (tokens' sequences), where the sequence number of the word sequence is i, which refers to 1 to n. The number of words in the word sequence Seq(i) with sequence number i is Len(i), the number of words in the central word sequence Seq2 in the second word sequence cluster is Len2, the word sequence Seq(i) with sequence number i and its central word sequence Seq2 have m words in common from the beginning, then the number of aligned words in the word sequence Seq(i) is m, the length of the characters contained in the words in the central word sequence Seq2 except the m words of the aligned word part is recorded as the non-aligned remainder of the word sequence Seq(i), and then the text editing distance between the different parts at the end of Seq2 and Seq(i) except the m words of the aligned word part at the beginning is calculated as the number of non-aligned words in the word sequence Seq(i),

[0075] The product of the number of non-aligned words of the word sequence Seq(i) and its corresponding non-aligned remainder is calculated and recorded as umatch(i,2). Then, the ratio of the number of aligned words m of the word sequence to umatch(i,2) is used as the address fit number of the word sequence Seq(i) in the second word sequence cluster. In this way, the address fit number of each word sequence in each word sequence cluster is calculated respectively.

[0076] Furthermore, in each word-gram sequence cluster, the distance between the coordinates corresponding to each word-gram sequence and the coordinates corresponding to the central word-gram sequence of the word-gram sequence cluster to which it belongs is calculated as the address correction distance corresponding to the word-gram sequence, specifically:

[0077] In each word-gram sequence cluster, the distance between the coordinates corresponding to each word-gram sequence and the coordinates corresponding to the central word-gram sequence of the word-gram sequence cluster to which it belongs is calculated as the address correction distance corresponding to the word-gram sequence. In some embodiments, the distance between the coordinates can be calculated using the Euclidean distance, and in some embodiments, the distance between the coordinates can be calculated using the Manhattan distance. In previous address text calculations, especially with the help of pre-trained semantic features, they are often biased by prior background semantic probabilities. In particular, when some words in some address texts carry other semantic probabilities expected in the background, the additional background semantic probabilities in the word segmentation of the address text will have a biased effect on the alignment of the geographic interval coordinates. By calculating the distance between the coordinates corresponding to each word-gram sequence and the coordinates corresponding to the central word-gram sequence of the word-gram sequence cluster to which it belongs, the address correction distance can better utilize the physical space probability distribution characteristics of the actual address coordinates to effectively counteract the semantic probability distribution characteristics of the ambiguous words in the word segmentation of the address text, and more effectively reduce the bias of the parameters of the classification model and the language model.

[0078] In each word-gram sequence cluster, the arithmetic mean of the address-corrected distances of each word-gram sequence therein is calculated as the average address-corrected distance in the word-gram sequence cluster, and the median of the number of address fits of each word-gram sequence therein is calculated as the median of address fits in the word-gram sequence cluster, and word-gram sequences in the word-gram sequence cluster whose address-corrected distance is less than the average address-corrected distance and whose number of address fits is greater than the median of address fits are screened out as word-gram target sequences in the word-gram sequence cluster.

[0079] Preferably, the obtained word-unit target sequence is clustered with the word-unit sequence in which it is located and associated with it. For example, pointers or jump links can be used for the association.

[0080] Calculate the arithmetic mean of the number of aligned tokens of each token sequence in the token sequence cluster as the cluster alignment number of the token sequence cluster, extract the portion from the first token in the central token sequence of the token sequence cluster to the token corresponding to the cluster alignment number, and calculate the central token index of the token sequence cluster:

[0081] In some embodiments, for example, in the second word-gram sequence cluster, the cluster alignment number obtained by the arithmetic mean of the aligned word-gram numbers of each word-gram sequence is 6, and part of the first to fifth words in the central word-gram sequence Seq2 of the second word-gram sequence cluster is cut out. If in other embodiments, when the length of the central word-gram sequence in the word-gram sequence cluster is less than its cluster alignment number, the words in the range from the first to the cluster alignment number of the central word-gram sequence, that is, all the words therein, are cut out. According to the part of the word corresponding to the first word in the central word sequence to the cluster alignment number, such as the part of the 1st to 5th words in the above-mentioned Seq2, it is preferred that the embedding vector corresponding to each word in the part corresponding to the first word to the cluster alignment number can be added point-to-point on each dimension and then the average value is taken. For example, the embedding vectors of the 1st to 5th words are added according to the dimension and then the average value is taken as the value of the dimension corresponding to the central word index. For example, the embedding vectors of the 1st to 5th words are all 300-dimensional vectors, and the values ​​of the embedding vectors of the 1st to 5th words in each dimension are averaged to obtain the value of the dimension corresponding to the central word index; it is also preferred that the embedding vector corresponding to each word in the part corresponding to the first word to the cluster alignment number can be mapped to one or more vectors through a mapping algorithm, an encoding algorithm, etc. to serve as the central word index of the word sequence cluster.

[0082] Furthermore, according to the address correction distance and the address matching number, the word unit target sequence in each word unit sequence cluster is screened, specifically:

[0083] When performing address text retrieval, the input address text to be retrieved is vectorized and matched with the word vector sequence corresponding to the word unit target sequence in each word unit sequence cluster through vector search to obtain a matching word unit target sequence.

[0084] In some embodiments, the address text to be retrieved should be segmented and vectorized using the same method as the embedding of each word sequence when forming the address text data set. Tools such as VectorDatabase can be used to store and retrieve the word vector sequences in each word sequence cluster, and the input address text to be retrieved is vectorized and matched with the word vector sequences corresponding to the word target sequences in each word sequence cluster in turn, and one of the word target sequences obtained by searching the vector database for matching is used as the matched word target sequence, and the word sequence cluster where this matched word target sequence is located is recorded.

[0085] Furthermore, according to the central word unit index amount and cluster alignment number corresponding to the word unit sequence cluster where the matched word unit target sequence is located, the word vector sequence of the address text to be searched is separated and supplemented to obtain the separated and supplemented sequence of the address text to be searched, which is specifically:

[0086] Obtain the central word element index corresponding to the word element sequence cluster where the matched word element target sequence is located, obtain the cluster alignment number corresponding to the word element sequence cluster where the matched word element target sequence is located, and separate and complete the word vector sequence of the address text to be searched according to the central word element index and cluster alignment number corresponding to the word element sequence cluster where the matched word element target sequence is located, so as to obtain the separated and completed sequence of the address text to be searched;

[0087] The delimited and completed sequence of the address text to be retrieved is used as input of the language model.

[0088] In some embodiments, the process of separating and completing the word vector sequence of the address text to be retrieved specifically includes: wherein, the address text to be retrieved does not belong to the elements in the address text data set, for example, when the cluster alignment number corresponding to the word sequence cluster where the matched word target sequence is located is specifically 6, if there are 12 word vectors in the word vector sequence newSeq of the address text to be retrieved, the central word index corresponding to the word sequence cluster where it is located is added between the 6th and 7th elements of newSeq, so that the 6th element of newSeq is first followed by the central word index addSeq corresponding to the word sequence cluster where it is located, and then followed by the original 7th to the last element of newSeq; if the number of word vectors of the common word elements in the word vector sequence of the address text to be retrieved is less than the cluster alignment number corresponding to the word sequence cluster where the matched word target sequence is located, the central word index addSeq is connected to the end of the word vector sequence of the address text to be retrieved; thereby, the word vector sequence of the address text to be retrieved is separated and completed to obtain the separated and completed sequence of the address text to be retrieved. The delimited and completed sequence of the address text to be retrieved is used to be stored in a vector database to be used as an input embedding of a generative artificial intelligence model based on a large-scale pre-trained language model, or to classify the address. The position that needs to be separated and completed is located in the word vector sequence of the address text to be retrieved by the cluster alignment number, and the central word element index corresponding to the word element sequence cluster where it is located is placed in the position of the dimension corresponding to the cluster alignment number in the word vector sequence of the address text to be retrieved. This is conducive to guiding the word vector sequence of the address text to be retrieved, leading it to the interval where the address text is more appropriate, and more effectively reducing the deviation of the parameters of the classification model and language model of the address text, thereby improving the ability to correctly classify the address into the corresponding community.

[0089] Furthermore, the separation and completion sequence of the address text to be retrieved is used as the input of the pre-trained language model, specifically:

[0090] In some embodiments, a large-scale pre-trained language model (such as ChatGPT, etc.) uses a Vector Database to store various embeddings and other vectorized inputs during the word segmentation, vectorization, and serialization of the input text. However, in the large-scale pre-trained language model for address text, the word segmentation of the input address text is more biased towards the alignment of geographic interval coordinates rather than the alignment of semantic information, so directly using the tokenizer of the BERT model cannot fully express the alignment biased towards geographic interval coordinates. When using address text as the input of a large-scale language model, the word vector sequence of the address text to be retrieved is separated and supplemented according to the cluster alignment number, and the central word element index corresponding to the word element sequence cluster in the word vector sequence of the address text to be retrieved is separated and supplemented according to the dimension of the cluster alignment number, which can reduce the biased influence of the additional background semantic probability in the word segmentation of the input address text on the alignment of geographic interval coordinates, prevent the model from being biased, and better improve the classification accuracy of the address text.

[0091] In some embodiments, the address classification can be performed using the delimited and completed sequence of the address text to be retrieved:

[0092] The delimited and completed sequence of the address text to be retrieved is used as the input of the classification model, and the existing address text closest to the address text to be retrieved is output through the classification model.

[0093] In some embodiments, the separated and completed sequence of the address text to be retrieved can be used as the input of the pre-trained language model, so that the pre-trained language model with the input can predict the locations around the address text to be retrieved, so as to be used for location navigation of the address text to be retrieved.

[0094] The experimental environment of this study is divided into two parts. One part is to fine-tune the BERT model on a public cloud computing GPU platform, and the other part is the system model of the method of the present invention implemented in a local environment. In order to train the model for address classification, a specific address annotation dataset is used in this work. The control group of the experiment monitors the accuracy of classification of geographical areas on the data of the map API provided by Baidu, Deutsche and Xun. The city where the project is applied has a total of 147 villages, that is, 147 geographical areas. The dataset contains 455 manually annotated text data of the address of the district, which is composed of text characters of the window address of the community service station in each community, including a total of 328 addresses. The accuracy calculation formula is (number of correctly classified addresses / total number of addresses) × 100%. This setting is intended to intuitively compare the performance of the classic method based on BERT in address classification: the accuracy of the classic method is 74.9%, and the accuracy of the method of the present invention is 82.3%. The accuracy of the method of the present invention far exceeds that of the classic method, and with the improvement of data quality, higher gains can be obtained.

[0095] The word-unit separation system for address classification based on text classification runs on any computing device such as a desktop computer, a laptop computer, a PDA or a cloud data center. The computing device includes: a processor, a memory and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps in the word-unit separation method for address classification based on text classification are implemented. The executable system may include, but is not limited to, a processor, a memory, and a server cluster.

[0096] The embodiment of the present invention provides a word unit separation system for address classification based on text classification, such as Figure 2 As shown, a word-element separation system for address classification based on text classification in this embodiment includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned word-element separation method for address classification based on text classification are implemented. The processor executes the computer program to run in the following system units:

[0097] A data collection unit is used to collect a plurality of different address texts to form an address text data set, obtain the coordinates corresponding to each address text, segment each address text to obtain a word unit sequence, obtain the embedding vector of each word unit therein, and form a word vector sequence;

[0098] An address calculation unit, used for calculating and obtaining word-unit sequence clusters in the address text data set, and obtaining the address matching number of each word-unit sequence by comparing each word-unit sequence with the central word-unit sequence;

[0099] A sequence screening unit is used to calculate, in each word-unit sequence cluster, the distance between the coordinates corresponding to each word-unit sequence and the coordinates corresponding to the central word-unit sequence of the word-unit sequence cluster to which it belongs as the address correction distance corresponding to the word-unit sequence, and screen the word-unit target sequence in each word-unit sequence cluster according to the address correction distance and the address fit number;

[0100] A sequence matching unit, used to calculate the cluster alignment number of the word-gram sequence cluster according to the number of aligned word-grams of each word-gram sequence in the word-gram sequence cluster, extract the portion from the first word-gram in the central word-gram sequence of the word-gram sequence cluster to the word-gram corresponding to the cluster alignment number, and calculate to obtain the central word-gram index of the word-gram sequence cluster;

[0101] A text retrieval unit is used to, when performing address text retrieval, vectorize the input address text to be retrieved and match it with the word vector sequence corresponding to the word unit target sequence in each word unit sequence cluster through vector search to obtain a matching word unit target sequence;

[0102] The separation and completion unit is used to separate and complete the word vector sequence of the address text to be searched according to the central word index amount and cluster alignment number corresponding to the word sequence cluster where the matched word target sequence is located, so as to obtain the separation and completion sequence of the address text to be searched.

[0103] Among them, in order to better unify the numerical linear relationship and probabilistic connection between physical quantities of different units of measurement, different physical quantities can be dimensionally processed.

[0104] Among them, preferably, all undefined variables in the present invention, if not clearly defined, can be manually set thresholds.

[0105] The word-meta separation system for address classification based on text classification can be run in computing devices such as desktop computers, laptops, PDAs, and cloud data centers. The word-meta separation system for address classification based on text classification includes, but is not limited to, a processor and a memory. Those skilled in the art can understand that the example is merely an example of a word-meta separation method, system, and device for address classification based on text classification, and does not constitute a limitation on a word-meta separation method, system, and device for address classification based on text classification. It may include more or fewer components than the example, or a combination of certain components, or different components. For example, the word-meta separation system for address classification based on text classification may also include input and output devices, network access devices, buses, etc.

[0106] The present invention also provides an electronic device, a readable storage medium and a computer program product:

[0107] An electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the word-unit separation method for address classification based on text classification and the method of each step therein.

[0108] A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the word-element separation method for address classification based on text classification and the method of each step therein.

[0109] A computer program product comprises a computer program, wherein when the computer program is executed by a processor, the method for separating word elements for address classification based on text classification and the methods for the various steps thereof are implemented.

[0110] Wherein, electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0111] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0112] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0113] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0114] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0115] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0116] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0117] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete component gate circuits or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the word-element separation system for address classification based on text classification, and uses various interfaces and lines to connect the various sub-regions of the entire word-element separation system for address classification based on text classification.

[0118] The memory can be used to store the computer program and / or module, and the processor realizes the various functions of the word-element separation method, system and device for address classification based on text classification by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart MediaCard, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0119] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in the present disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and this document is not limited here.

[0120] The present invention provides a word-meta separation method and system for address classification based on text classification. According to the address correction distance and the address fitting number, the word-meta target sequence in each word-meta sequence cluster is screened, the cluster alignment number of the word-meta sequence cluster is calculated according to the aligned word-meta number of each word-meta sequence, the part from the first word in the central word-meta sequence to the word-meta corresponding to the cluster alignment number is cut out, and the central word-meta index of the word-meta sequence cluster is calculated; the input address text to be searched is vectorized and matched with the word vector sequence corresponding to the word-meta target sequence in each word-meta sequence cluster to obtain the matched word-meta target sequence; according to the central word-meta index and the cluster alignment number corresponding to the word-meta sequence cluster where the matched word-meta target sequence is located, the word vector sequence of the address text to be searched is separated and supplemented to obtain the separated and supplemented sequence of the address text to be searched, which can more effectively classify the address text to be detected into the regional address.

[0121] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A word-unit separation method for address classification based on text classification, It is characterized in that The method comprises: Collect multiple different address texts to form an address text dataset, obtain the coordinates corresponding to each address text, segment each address text to obtain a word unit sequence, obtain the embedding vector of each word unit, and form a word vector sequence; Calculate and obtain word-gram sequence clusters in the address text data set, and obtain the address matching number of each word-gram sequence by comparing each word-gram sequence with the central word-gram sequence; Then, in each word-gram sequence cluster, the distance between the coordinates corresponding to each word-gram sequence and the coordinates corresponding to the central word-gram sequence of the word-gram sequence cluster to which it belongs is calculated as the address correction distance corresponding to the word-gram sequence, and the word-gram target sequence in each word-gram sequence cluster is selected according to the address correction distance and the address fit number; The cluster alignment number of the word-gram sequence cluster is calculated according to the number of aligned word-grams of each word-gram sequence in the word-gram sequence cluster, and the portion from the first word-gram in the central word-gram sequence of the word-gram sequence cluster to the word-gram corresponding to the cluster alignment number is cut out, and the central word-gram index of the word-gram sequence cluster is calculated; When performing address text retrieval, the input address text to be retrieved is vectorized and matched with the word vector sequence corresponding to the word unit target sequence in each word unit sequence cluster through vector search to obtain a matching word unit target sequence; According to the central word element index quantity and the cluster alignment number corresponding to the word element sequence cluster where the matched word element target sequence is located, the word vector sequence of the address text to be searched is separated and supplemented to obtain the separated and supplemented sequence of the address text to be searched.

2. According to the method for word segmentation of address classification based on text classification according to claim 1, It is characterized in that in, The coordinates corresponding to each address text include latitude and longitude coordinates and / or three-dimensional coordinates.

3. According to the method for word segmentation of address classification based on text classification as described in claim 1, It is characterized in that in, The sequence of tokens obtained by segmenting each address text is taken as the word unit sequence, and the number of dimensions of the embedded vector of each word unit obtained is equal.

4. The word-element separation method for address classification based on text classification according to claim 3, It is characterized in that Each word unit sequence in the address text data set is clustered according to the similarity of the corresponding word vector sequence to obtain a plurality of word unit sequence clusters.

5. The word-element separation method for address classification based on text classification according to claim 1, It is characterized in that in, The word-unit sequence clusters in the address text data set are calculated and obtained, and the address matching number of each word-unit sequence is obtained by comparing each word-unit sequence with the central word-unit sequence, specifically: In each word-gram sequence cluster, the word-gram sequence serving as the cluster center in each word-gram sequence cluster is selected as the central word-gram sequence; In each word-gram sequence cluster, each word-gram sequence is compared with the central word-gram sequence respectively: each word-gram sequence is compared with the central word-gram sequence starting from the first word-gram to compare the parts with the same word-gram as the aligned word-gram part, and the number of word-grams in the aligned word-gram part is taken as the number of aligned word-grams of the word-gram sequence; Then, the part of the word-gram sequence except the aligned word-gram part is correspondingly compared with the part of the central word-gram sequence except the aligned word-gram part, the character length of the part of the central word-gram sequence except the aligned word-gram part is recorded as the non-aligned remainder of the word-gram sequence, and the text edit distance between the part of the word-gram sequence except the aligned word-gram part and the part of the central word-gram sequence except the aligned word-gram part is calculated, and the text edit distance between them is taken as the non-aligned word number of the word-gram sequence; The product of the number of non-aligned words in the word sequence and its corresponding non-aligned remainder is calculated, and then the ratio of the number of aligned words in the word sequence to the product of the number of non-aligned words in the word sequence and its corresponding non-aligned remainder is obtained as the address matching number of the word sequence.

6. The word-element separation method for address classification based on text classification according to claim 5, It is characterized in that in, Then, in each word-gram sequence cluster, the distance between the coordinates corresponding to each word-gram sequence and the coordinates corresponding to the central word-gram sequence of the word-gram sequence cluster to which it belongs is calculated as the address correction distance corresponding to the word-gram sequence, specifically: In each word-gram sequence cluster, the distance between the coordinates corresponding to each word-gram sequence and the coordinates corresponding to the central word-gram sequence of the word-gram sequence cluster in which it is located is calculated as the address correction distance corresponding to the word-gram sequence; In each word-gram sequence cluster, the arithmetic mean of the address-corrected distances of each word-gram sequence is calculated as the average address-corrected distance in the word-gram sequence cluster, and the median of the number of address fits of each word-gram sequence is calculated as the median of address fits in the word-gram sequence cluster, and the word-gram sequences in the word-gram sequence cluster whose address-corrected distance is less than the average address-corrected distance and whose number of address fits is greater than the median of address fits are selected as word-gram target sequences in the word-gram sequence cluster; The arithmetic mean of the number of aligned words of each word sequence in the word sequence cluster is calculated as the cluster alignment number of the word sequence cluster, and the part from the first word in the central word sequence of the word sequence cluster to the word corresponding to the cluster alignment number is cut out, and the central word index of the word sequence cluster is calculated.

7. The word-element separation method for address classification based on text classification according to claim 6, It is characterized in that in, According to the address correction distance and the number of address fits, the word target sequence in each word sequence cluster is selected, specifically: When performing address text retrieval, the input address text to be retrieved is vectorized and matched with the word vector sequence corresponding to the word unit target sequence in each word unit sequence cluster through vector search to obtain a matching word unit target sequence.

8. The word-element separation method for address classification based on text classification according to claim 6, It is characterized in that in, According to the central word unit index and cluster alignment number corresponding to the word unit sequence cluster where the matched word unit target sequence is located, the word vector sequence of the address text to be searched is separated and supplemented to obtain the separated and supplemented sequence of the address text to be searched, which is specifically: Obtain the central word element index corresponding to the word element sequence cluster where the matched word element target sequence is located, obtain the cluster alignment number corresponding to the word element sequence cluster where the matched word element target sequence is located, and separate and complete the word vector sequence of the address text to be searched according to the central word element index and cluster alignment number corresponding to the word element sequence cluster where the matched word element target sequence is located, so as to obtain the separated and completed sequence of the address text to be searched; The delimited and completed sequence of the address text to be retrieved is used as input of the language model.

9. The word-element separation method for address classification based on text classification according to claim 6, It is characterized in that in, The separated and completed sequence of the address text to be retrieved is used as an input of the pre-trained language model.

10. A word-unit separation system for address classification based on text classification, It is characterized in that The word-unit separation system for address classification based on text classification runs in any computing device of a desktop computer, a laptop computer or a cloud data center, and the computing device includes: a processor, a memory and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, it implements the steps in the word-unit separation method for address classification based on text classification as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Address text feature extraction method based on the coupling of Hidden Markov Model and classification algorithm

    CN113343670B

  • Text retrieval sorting method

    CN111680149A

  • Data processing method, terminal and storage medium

    CN117195875A

  • Instruction recognition method and device, training method, and computer readable storage medium

    WO2023231676A1