Synonym generation method and device, equipment and computer readable storage medium

By segmenting historical text and filtering out core keywords that match preset business tags, a thesaurus is generated, which solves the problem of insufficient accuracy in thesaurus mining in existing technologies and achieves more efficient thesaurus construction.

CN116227473BActive Publication Date: 2026-07-24MASHANG CONSUMER FINANCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
MASHANG CONSUMER FINANCE CO LTD
Filing Date
2023-03-22
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing synonym mining methods mainly rely on similarity calculations, which leads to insufficient accuracy.

Method used

The historical text is segmented according to multiple themes, and the core themes that match the part-of-speech combinations of the preset business tags are selected to generate a thesaurus corresponding to the preset business tags.

Benefits of technology

It improves the accuracy and mining efficiency of the thesaurus and reduces data annotation costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116227473B_ABST
    Figure CN116227473B_ABST
Patent Text Reader

Abstract

The present disclosure provides a synonym generation method, device and equipment and a computer readable storage medium. The method comprises: segmenting historical text according to multiple themes to obtain multiple theme paragraph texts; each theme paragraph text corresponds to a theme; according to a combination of parts of speech in a preset business label word, filtering theme core words matching the combination of parts of speech from the multiple theme paragraph texts, each theme core word being used to represent a text feature of a theme paragraph text; and generating a synonym library corresponding to the preset business label word according to the theme core words corresponding to each theme paragraph text. According to the embodiment of the present disclosure, the accuracy of synonym mining can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus, device and computer-readable storage medium for generating synonyms. Background Technology

[0002] Synonym mining is a common method in the field of natural language processing. Synonyms play an important role in many fields such as intelligent customer service, search applications, chatbot dialogue generation, machine translation, and sentence rewriting. A high-quality thesaurus can provide users with better services.

[0003] Existing synonym mining methods mainly rely on word similarity calculations to obtain synonyms. However, synonyms mined solely based on similarity calculations have significant limitations, affecting the accuracy of synonym mining. Summary of the Invention

[0004] This disclosure provides a method, apparatus, device, and computer-readable storage medium for generating synonyms, according to which the accuracy of synonym mining can be improved.

[0005] In a first aspect, this disclosure provides a method for generating synonyms, which includes: segmenting historical text according to multiple topics to obtain multiple topic paragraph texts; wherein each topic paragraph text corresponds to a topic; selecting topic core words that match the part-of-speech combinations from the multiple topic paragraph texts based on the part-of-speech combinations in preset business tag words, wherein each topic core word is used to characterize the text features of a topic paragraph text; and generating a thesaurus corresponding to the preset business tag words based on the topic core words corresponding to each topic paragraph text.

[0006] Secondly, this disclosure provides a synonym generation device, which includes: a segmentation module for segmenting historical text according to multiple topics to obtain multiple topic paragraph texts; wherein each topic paragraph text corresponds to a topic; a filtering module for filtering topic core words that match the part-of-speech combinations in preset business tag words from the multiple topic paragraph texts, wherein each topic core word is used to characterize the text features of a topic paragraph text; and a construction module for generating a thesaurus corresponding to the preset business tag words based on the topic core words corresponding to each topic paragraph text.

[0007] Thirdly, this disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the above-described synonym generation method.

[0008] Fourthly, this disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor / processor core, implements the above-described synonym generation method.

[0009] The embodiments provided in this disclosure can segment historical text according to multiple themes to obtain thematic paragraph text corresponding to each theme. The core words of each thematic paragraph text are then selected, enabling the selected core words to possess semantic diversity corresponding to multiple themes, thereby improving the accuracy of the thesaurus. In the embodiments of this disclosure, the extracted thematic core words are matched with the part-of-speech combinations of preset business tag words. The part-of-speech combinations of business tag words do not involve data annotation of historical text, thus reducing the cost of mining tag synonyms. Furthermore, the part-of-speech combinations of thematic core words selected according to the business tag word definition improve the extraction efficiency of thematic core words, thereby improving the mining efficiency of tag synonyms.

[0010] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0011] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the embodiments of the present disclosure to explain the disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the detailed description of exemplary embodiments with reference to the accompanying drawings, in which:

[0012] Figure 1 A flowchart illustrating a method for generating synonyms provided in this embodiment of the disclosure;

[0013] Figure 2 A flowchart illustrating a method for generating synonyms provided as an exemplary embodiment of this disclosure;

[0014] Figure 3 A block diagram of a synonym generation apparatus provided in an embodiment of this disclosure;

[0015] Figure 4This is a block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0016] To enable those skilled in the art to better understand the technical solutions of this disclosure, exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments of this disclosure to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0017] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.

[0018] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0019] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, they specify the presence of features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof. Words such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.

[0020] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.

[0021] In related technologies, commonly used synonym mining methods include the following two approaches. Approach one: First, obtain a target text and preset tags for the target text; then, determine multiple string lengths and multiple text tags for each string length from the target text, and determine the similarity between each text tag and the preset tags; finally, select the text tag with the highest similarity from the determined text tags as the synonym of the preset tags. This approach, knowing a target text and preset tags, extracts a segment of text from the target text as a synonym of the preset tags.

[0022] Option 2 is as follows: Obtain search behavior logs, which include search terms, search results corresponding to the search terms, and user behavior data on the search results; construct a bipartite graph of search behavior based on the search behavior logs, where search terms are the first nodes, search results are the second nodes, and behavior data are the edges between the first and second nodes; determine the similarity between the second nodes of search terms in the bipartite graph based on an algorithm that calculates the similarity between nodes of the same type; and identify search terms that are synonyms in the bipartite graph based on the similarity between the second nodes of search terms.

[0023] Both of the above methods obtain synonyms based on similarity calculations. The advantage of this approach is that it can uncover a large number of synonyms. However, the disadvantage is that the synonyms discovered solely based on similarity calculations have significant limitations, affecting the accuracy of synonym discovery.

[0024] The synonym generation method according to embodiments of this disclosure can be executed by electronic devices such as terminal devices or servers. Terminal devices can be in-vehicle devices, user equipment (UE), mobile devices, user terminals, terminals, cellular phones, cordless phones, personal digital assistants (PDAs), handheld devices, computing devices, in-vehicle devices, wearable devices, etc. The method can be implemented by a processor calling computer-readable program instructions stored in memory. Servers can include independent physical servers, server clusters consisting of multiple servers, or cloud servers capable of cloud computing.

[0025] Figure 1 A flowchart illustrating a method for generating synonyms according to an embodiment of this disclosure. (Refer to...) Figure 1 The method for generating this synonym may include the following steps.

[0026] S110, the historical text is segmented according to multiple themes to obtain multiple thematic paragraph texts; each thematic paragraph text corresponds to one theme.

[0027] In this step, the historical text may include text from various business areas, such as dialogue text in the field of intelligent customer service or search text in search scenarios, etc. This disclosure does not specifically limit the scope of the text.

[0028] In some embodiments, the historical text contains multiple texts, each of which may reflect at least one topic. A theme refers to the central idea expressed by the text content, also known as the main content. Each text in the historical text may include at least one theme; that is, the historical text includes multiple texts, thus involving multiple themes.

[0029] In this embodiment, multiple themes can reflect the semantic diversity of historical text themes, thereby introducing a diversity-level consideration of the synonyms obtained during the synonym mining process.

[0030] S120: Based on the part-of-speech combinations in the preset business tag words, select the core words of the topic that match the part-of-speech combinations from multiple topic paragraph texts. Each core word of the topic is used to characterize the text features of a topic paragraph text.

[0031] In this step, business tags are at least one pre-defined tag for a business, and multiple tags can form a tag system. To systematically and systematically organize the tags for a business, pre-defined business tags can be used to better understand the content and characteristics of the business, thereby more fully understanding and meeting user needs.

[0032] Part of speech refers to the attributes of a word, which can be understood as a classification of words based on their common essential attributes. For example, words can be divided into content words and function words. Content words include nouns, verbs, adjectives, numerals, measure words, and pronouns; function words include adverbs, prepositions, conjunctions, auxiliary words, onomatopoeic words, and interjections.

[0033] For example, taking the financial sector as an example, the preset business tag words are "processing to stop collection" and "cancelling account". The part-of-speech combination of such tag words is [processing / v, stopping collection / v], [cancelling / v, account / n]. Therefore, the part-of-speech combination includes "v|n" and "v|v". It should be understood that the part-of-speech and the defined part-of-speech combination used in this disclosure can also include more types, and the embodiments of this disclosure do not make specific limitations.

[0034] In business scenarios, among the pre-determined business tags to be extracted, the words contained in important business tags have certain parts-of-speech combinations. Therefore, determining the distribution of these parts-of-speech combinations is crucial, and these combinations are used as filtering criteria for word combinations in subsequent topics. In this embodiment, it is necessary to pre-set the relevant business tag words according to the business scenario, and then determine the parts-of-speech combinations of these business tag words. Business tags are usually defined by some tag information or word information. By obtaining the parts-of-speech combinations of all tags and filtering the word combinations, important word combinations with the same parts of speech as the business tags can be discovered without pre-annotating the words in the historical text with business information. This reduces the cost of mining tag synonyms without any labeled data and improves the extraction efficiency of topic core words by filtering the parts-of-speech combinations of topic core words according to the definition of business tag words.

[0035] S130: Generate a thesaurus corresponding to preset business tag words based on the core keywords of each topic paragraph text.

[0036] According to the synonym generation method of the embodiments of this disclosure, historical text can be segmented according to multiple topics to obtain topic paragraph text corresponding to each topic. The core words of each topic paragraph text are screened, which can make the screened core words have semantic diversity corresponding to multiple topics, thereby improving the accuracy of the thesaurus. In the embodiments of this disclosure, the extracted topic core words are matched with the part-of-speech combinations of preset business tag words, and each topic core word can represent the text features of a topic paragraph text. The part-of-speech combination of business tag words does not involve data annotation of historical text, thereby reducing the mining cost of tag synonyms. Furthermore, the part-of-speech combination of topic core words screened according to the definition of business tag words improves the extraction efficiency of topic core words, thereby improving the mining efficiency of tag synonyms.

[0037] In some embodiments, step S110, which involves segmenting historical text according to multiple topics to obtain multiple topic paragraph texts, may specifically include: inputting historical text into a preset document topic generation model to obtain the distribution probabilities of different types of document topics output by the document topic generation model; wherein, the document topic generation model is used to determine the correspondence between text and topic distribution probabilities; obtaining different types of text topics with distribution probabilities greater than a predetermined probability threshold as multiple types of target topics; clustering historical text according to multiple types of target topics, and using the text under the multiple types of target topics obtained by clustering as multiple topic paragraph texts.

[0038] The predetermined probability threshold can be customized by the user according to actual needs, and this embodiment does not impose specific limitations.

[0039] In this embodiment, the document topic generation model is used to determine the topic information of each text after performing document analysis on the text in the text collection or the text in the corpus. For example, the document topic generation model can be a Latent Dirichlet Allocation (LDA) model. The LDA model is a topic model that uses unsupervised machine learning techniques to give the topic of each text (or each document) in historical text in the form of a probability distribution; after selecting multiple types of target topics according to the probability distribution, each text in the historical text is clustered according to the multiple types of target topics to obtain multiple topic paragraph texts.

[0040] In some embodiments, the multiple topics in step S110 can also be user-defined based on the specific content of the historical text, and then each text in the historical text is classified according to the multiple topic types set in the user-defined settings to obtain multiple topic paragraph texts.

[0041] In the embodiments of this disclosure, other methods may also be used to determine multiple document topics in historical text, and the embodiments of this disclosure do not impose specific limitations.

[0042] In some embodiments, step S120, which involves filtering word combinations that match the part-of-speech combinations from multiple topic paragraph texts based on the part-of-speech combinations in preset business tag words, to obtain the topic core words corresponding to each topic paragraph text, may specifically include: S11, filtering at least one candidate word that matches the part-of-speech combination from each topic paragraph text; S12, calculating the word vector of the corresponding candidate word and the average word vector of the corresponding candidate word for each topic; S13, obtaining the topic core words based on the word vectors of the corresponding candidate words and the average word vector, wherein the topic core words are the candidate words corresponding to the word vector with the highest similarity to the average word vector.

[0043] Specifically, in step S11, for each topic paragraph text, the part-of-speech combination of the preset business tag words is filtered, and all candidate words under each topic can be obtained after filtering; in step S12, according to the deep learning-based pre-trained model, all candidate words under each topic are represented by vectors respectively, and the word vector of each candidate word is obtained.

[0044] Specifically, pre-trained language models based on deep learning, such as Bidirectional Encoder Representations from Transformers (BERT) or Efficiently Learning an Encoder that Classifies Token Replacements Accurately (ELECTRA), can be used to vectorize each candidate word to obtain its word vector.

[0045] For example, the word vectors of n candidate words can be denoted as: {x1, x2, x3, ..., xn}, where n is an integer greater than or equal to 1; the average word vector (e.g., denoted as vector Y) is obtained by averaging the word vectors of all candidate words under each topic.

[0046] In step S13, the similarity value between each candidate word vector under the corresponding topic and the average value Y of the word vectors can be calculated. All the calculated similarity values ​​are sorted in descending order, and the first vector of the sorted result (Top1 vector) is taken as the core word under the corresponding topic, that is, the core word of the topic selected under the corresponding topic.

[0047] In this embodiment, the average word vector of all candidate words under each topic is used to represent the main content that the topic should express semantically. Then, the topic core words are the candidate words that are closest to the average word vector of the corresponding topic. In other words, the selected topic core words under each topic best represent the content that the corresponding topic should express semantically.

[0048] In some embodiments, step S130, the step of generating a thesaurus corresponding to preset business tags based on the core keywords corresponding to each topic paragraph text, may specifically include: S31, clustering multiple core keywords according to multiple categories corresponding to preset business tags to obtain multiple categories of core keywords, the multiple core keywords including the core keywords corresponding to each topic paragraph text; S32, generating a thesaurus corresponding to multiple categories of preset business tags based on the core keywords of multiple categories, the thesaurus including the synonyms of multiple categories of preset business tags.

[0049] Specifically, the multiple categories corresponding to the preset business tags can be tag categories determined in advance based on the preset business tags. For example, for the business tag "loan processing", multiple tag categories could be consultation, business processing, business stage, service type (business or daily), etc. After obtaining the categories of each business tag, multiple topic core words are clustered based on the obtained multiple categories, so that topic core words of similar categories are grouped together. The topic core words under each category constitute a thesaurus of a category of the preset business tag, thus obtaining a thesaurus of multiple categories corresponding to the preset business tag.

[0050] Specifically, clustering algorithms can be used to cluster multiple core keywords based on preset label categories. Clustering algorithms are a statistical analysis method for studying classification problems and also an important algorithm in data mining.

[0051] For example, K-means clustering is a classic partition-based clustering method. Taking the K-MEANS algorithm as an example, the process of clustering multiple core words is described. The clustering process using the K-MEANS algorithm may include the following steps:

[0052] Step A1: Obtain the word vector of each core word from a set of core words, resulting in multiple core word vectors. Step A2: Determine the number of categories for the preset multiple tag categories, denoted as k. Randomly select k core word vectors from the multiple core word vectors as the initial cluster centers (also called cluster centers or centroids) for each of the k clusters. Step A3: Calculate the distances from the other core word vectors (excluding the k core word vectors) to the k cluster centers. Use these distances to measure the similarity between the other core word vectors and the k cluster centers, and then cluster these core word vectors (divide them into groups). Step A4: Based on the clustering results of these elements, recalculate the cluster centers of each of the k clusters. For example, for each cluster, calculate the mean of all core word vectors in the cluster as the new cluster center. Step A5: Re-cluster all core word vectors according to the new cluster centers. Step A6: Iterate through steps A4 and A5 until the execution process converges. The meaning of the execution process convergence is that the output conditions of the clustering results can be reached through a finite number of iterations (e.g., the clustering results no longer change). Step A7: Output the clustering results.

[0053] The execution process of K-means clustering shows that the first step is to initialize k cluster centers. Then, new cluster centers need to be determined based on the results of each clustering, so that the similarity of data in the same cluster is as high as possible, and the similarity between different clusters is as low as possible.

[0054] In the embodiments of this disclosure, various clustering algorithms can be used, such as partitioning methods, hierarchical methods, density-based methods, grid-based methods, model-based methods, K-MEANS algorithm, etc. This disclosure allows the use of any clustering algorithm to cluster the spatiotemporal feature matrix; no specific limitation is made.

[0055] In some embodiments, after obtaining the core words of multiple clustered categories in step S32, the method includes: S41, vectorizing the core words of each category to obtain the core word vector of each category; S42, using the average value of the core word vectors of each category as the cluster center of each tag category, and using the cluster center of each category as the current cluster center; S43, obtaining the word to be classified from the new text, and calculating the similarity value between the word to be classified and the current cluster center; S44, if the maximum value of the similarity value is greater than a predetermined threshold, classifying the word to be classified into the thesaurus of the category to which the cluster center corresponding to the maximum value of the similarity value belongs.

[0056] In steps S41 and S42, in this embodiment, averaging all vectors under each cluster after clustering can yield the cluster center vector under the corresponding cluster, which is the cluster center of each label category.

[0057] In step S43, the new text (newly appearing or newly acquired text corpus) can be segmented to obtain multiple words in the new text, and then each word in the new text can be used as a word to be classified; alternatively, the words to be classified in the new text can be obtained through the following method.

[0058] Specifically, step S43 may include: designating the new text as the first text; performing topic modeling on the first text; specifically, segmenting the first text according to multiple topics to obtain at least one topic paragraph text of the first text; wherein each topic paragraph text corresponds to one topic; selecting word combinations that conform to the part-of-speech combinations of preset business tag words from each topic paragraph text to obtain a first text candidate word set under each topic; calculating the word vector and the corresponding average word vector (denoted as the first text word vector average value) of each first text candidate word in the first text candidate word set; taking the first text candidate word corresponding to the word vector of the first text candidate word with the highest similarity to the first text word vector average value as the topic core word under the corresponding topic of the first text; and taking the topic core word under each topic of the first text as a word to be classified.

[0059] In step S44, the word vector of the word to be classified is denoted as xi. The word vectors of all core words are traversed, and the similarity between the word vector xi of the word to be classified and the word vector of each cluster center is calculated. All the calculated similarity values ​​are sorted in descending order, and the first vector (Top1 vector) of the sorted result is taken. If the similarity value corresponding to the vector is greater than the similarity threshold, the word to be classified is assigned to the thesaurus of the category to which the corresponding cluster center belongs.

[0060] The similarity threshold can be set according to actual needs, and this embodiment does not impose specific limitations.

[0061] In some embodiments, after calculating the similarity value between the word to be classified and each cluster center, the method further includes: if the maximum value of the similarity value is less than or equal to a predetermined threshold, classifying the word to be classified as a noise word; and determining that the noise word will not be classified.

[0062] In the above embodiments, for a new word to be classified (a new core word) in new text, the similarity value calculated with the cluster center is compared with the maximum similarity value and a similarity threshold. If the maximum similarity value is greater than the similarity threshold, it indicates that the new core word is within the labeling system of the preset label words, and the new core word is expanded into the thesaurus of the corresponding category. If the maximum similarity value is less than or equal to the similarity threshold, it indicates that the new core word is not within the labeling system of the preset label words, and it is determined that the word will not be classified into the thesaurus, and it can be removed as a noise word. Through the processing of words to be classified in new text in the above embodiments, the core words of newly appearing text can be expanded by utilizing the thesaurus to which the words to be classified belong during the thesaurus mining process.

[0063] In some embodiments, after step S42, which sets the cluster center of each category as the current cluster center, the method further includes: S51, obtaining new business tag words, and incrementally updating multiple categories according to the categories corresponding to the new business tag words to obtain updated multiple categories; S52, when a new part-of-speech combination of business tag words already exists in the part-of-speech combinations of the preset business tag words, determining the core topic words of each first category, wherein the core topic words of each first category are obtained by clustering multiple core topic words according to the updated multiple categories; S53, vectorizing the core topic words of each first category, and using the average value of the core word vectors of each first category as the cluster center of each first category; S54, incrementally updating each current cluster center according to the cluster center of each first category to obtain updated current cluster centers.

[0064] In this embodiment, after incrementally supplementing tag words and newly discovered tag words, for new tag words, if the part-of-speech combination of the new tag word is not a new part-of-speech combination (including the part-of-speech combinations in the preset business tag words), then it is not necessary to update the topic core words (since the topic core words are topic core words that match the part-of-speech combinations selected from multiple topic paragraph texts, since no new part-of-speech combinations have been added, the topic core words also do not need to be added). It is only necessary to incrementally update the type of business tag words, then re-cluster the existing topic core words, calculate the cluster centers based on the re-clustered topic core words, and then incrementally update the existing cluster centers. In this way, the tag words belonging to the updated cluster centers can be grouped together to form a new thesaurus of business tag words of different categories, thereby improving the efficiency and accuracy of tag synonym mining.

[0065] In some embodiments, if no new part-of-speech combination of business tag words exists in the preset part-of-speech combinations, the method may further include: S61, filtering topic core words that match the newly added part-of-speech combination from multiple topic paragraph texts; wherein the newly added part-of-speech combination is a part-of-speech combination of new business tag words; S62, incrementally updating multiple topic core words according to the topic core words that match the newly added part-of-speech combination to obtain multiple updated topic core words; S63, determining topic core words for each second category, wherein the topic core words for each second category are obtained by clustering the updated multiple topic core words according to the updated multiple categories; S64, vectorizing the topic core words for each second category, and using the average value of the core word vectors of each second category as the cluster center of each second category; S65, incrementally updating each current cluster center according to the cluster center of each second category to obtain updated current cluster centers.

[0066] In this embodiment, after incrementally supplementing the tag words and newly discovered tag words, for the new tag word, if the part-of-speech combination of the new tag word is a new part-of-speech combination (not included in the part-of-speech combination of the preset business tag words), then not only should the type of the business tag word be incrementally updated, but also the topic core words should be updated. Then, the updated topic core words are re-clustered according to the updated multiple categories. Next, the cluster center is calculated according to the re-clustered topic core words to incrementally update the existing cluster centers.

[0067] In this embodiment of the disclosure, the number of tag categories for clustering the core keywords of the topic can be increased synchronously with the types of newly discovered tag words, thereby automatically and incrementally updating the thesaurus of tag words according to the method of the above embodiment, improving the efficiency and accuracy of automatic mining of tag synonyms.

[0068] According to the synonym generation method of this disclosure, the part-of-speech combination of tag words can be used as a filtering condition for word combinations based on the part-of-speech combination distribution of business tags. In the tag synonym library construction stage, the text is segmented according to the topic, and candidate word groups that meet the part-of-speech combination conditions are obtained from the segmented texts distributed under different topics. The core words under the paragraph are extracted as the semantic expression of the paragraph by vector matching. After obtaining all core words, clustering is performed according to the number of tag types defined by the business. After clustering, the vector of each cluster center is calculated. For newly emerging text, the same method can be used to obtain diverse core words distributed under different topics. Then, vector matching is used to map them to the synonym library of different cluster center vector categories to realize the mining of tag synonyms. According to this method, after the tag synonym library has accumulated to a certain stage, the synonym library can be re-clustered according to new tag words. The purpose is to update the cluster centers and realize the updating of the tag synonym library.

[0069] The following is combined Figure 2 This describes the specific flow of the synonym generation method according to exemplary embodiments of this disclosure. For example... Figure 2 As shown, in some embodiments, the synonym generation method may include:

[0070] Step S201: Determine the part-of-speech combination of the core words.

[0071] For example, the core word part-of-speech distribution is determined using a consumer finance post-loan scenario. Pre-defined business tags may include: "processing to stop collection," "processing to extend repayment," "early repayment," "account cancellation," "increasing credit limit," and "issuing a settlement certificate." The part-of-speech distribution of these tags is as follows: [processing / v, stopping collection / v], [processing / v, extending repayment / v], [increasing / v, credit limit / n], [cancelling / v, account / n], [issuing / v, settlement / n, certificate / v], where v represents a verb and n represents a noun. Therefore, the part-of-speech combinations of these tags, "v|n", "v|v", "v|n|v", are used as the filtering criteria for candidate words in the text.

[0072] Step S202: Divide the historical text into segments according to themes.

[0073] For example, taking a customer's call text as an example, by performing intent recognition on the call text, at least one intent information can be obtained. Each intent corresponds to a request expressed by the customer. The customer's requests may correspond to multiple requests, such as "apply for extension" or "pay off in advance". The text of different requests is input into the topic model to obtain different types of topics output by the topic model. The call text is segmented according to different topics to obtain paragraph text of different topics.

[0074] S203, extract diverse core words according to thematic distribution.

[0075] For example, after segmenting the historical text according to themes, the resulting paragraph texts ["text1", "text2", ..., textT"] are distributed across different themes, where T is an integer greater than or equal to 1. Candidate words that meet the part-of-speech combination requirements are selected from each paragraph text. For example, multiple candidate words are selected from each paragraph text, and a candidate word dictionary can be generated based on these multiple candidate words: {"text1":["Apply for extension", "Want to extend"], "text2":["Apply for early settlement"]...}, indicating that the candidate words selected from text1 are "Apply for extension" and "Want to extend", and the candidate word selected from text2 is "Apply for early settlement".

[0076] A pre-trained language model is used to vectorize these candidate words, and the word vectors of all candidate words are averaged to obtain the average value of the candidate word vectors. Then, a cosine similarity is calculated between the word vector of each candidate word and the average value of the candidate word vectors to obtain the similarity value between the word vector of each candidate word and the average value of the candidate word vectors. All the calculated similarity values ​​are sorted from largest to smallest. The core word corresponding to the maximum similarity value best represents the semantic representation (the semantic meaning to be expressed) of the paragraph text of the corresponding topic, and is therefore selected as the topic core word of the paragraph text of the corresponding topic. In this way, the core word set of all topics of the entire text is obtained.

[0077] S204, cluster the core words and obtain the cluster center vector.

[0078] Specifically, based on the core keywords of each topic in the paragraph text collected above, all core keywords of the topic are clustered into N categories according to the number of categories of business tag words, to obtain the core keywords of each cluster category. Based on the core keywords of each cluster category, a thesaurus of the corresponding category is generated.

[0079] In this step, after clustering all the core words of the topic, the average value of the word vectors of the core words of the topic under each cluster category can be calculated. The calculated average value of the word vectors is used as the cluster center vector of the corresponding cluster category, denoted as the cluster center vector set Y[y1,y2,y3…yk], where k is an integer greater than or equal to 1.

[0080] S205: The similarity between each core word and the cluster center vector is ranked, and the core words are classified.

[0081] Specifically, the text of the newly occurring call is taken as new text, and at least one topic core word is extracted from the new text. Each topic core word is then used as a word to be classified. The step of extracting at least one topic core word from the new text is the same as the step of extracting topic core words from historical text described in the above embodiment, and will not be repeated here.

[0082] In this step, after vectorizing each word to be classified, a set of word vectors for the word to be classified is obtained, denoted as vector set C{c1, c2, c3, ..., cn}. The similarity between the word vector of any word to be classified in vector set C and each cluster center vector in cluster center vector set Y is calculated. All the calculated similarity values ​​are sorted from largest to smallest. When the similarity of the first vector in the sorted result (maximum similarity) is higher than the preset similarity threshold, the core word corresponding to the vector is mapped to the corresponding label. When the maximum similarity is less than or equal to the preset similarity threshold, the word vector of the word to be classified is removed as noise data.

[0083] S206, Incrementally update the thesaurus based on newly collected business tag words.

[0084] In this step, after incrementally supplementing the tag words and the newly discovered tag words, the cluster center can be incrementally updated according to the above steps S51-S54 and S61-S65. The tag words belonging to the updated cluster center can be grouped together to form a new thesaurus of business tag words of different categories, thereby improving the efficiency and accuracy of tag synonym mining.

[0085] In this embodiment of the disclosure, by expanding the tag lexicon, the quality and effect of synonym mining can be further optimized. The new tag pool synonym lexicon is re-clustered, with the aim of continuously updating the cluster centers, bringing together more synonyms belonging to the tag, and improving clustering efficiency and the accuracy of clustering results.

[0086] According to the synonym generation method of this disclosure, all historical texts can be extracted by topic, and long texts can be divided into fragments (paragraph texts) of multiple topics. Based on multi-topic modeling, the core words of the topics are screened from all topics, so that the extracted core words have diversity. When screening the core words of the topics, the part-of-speech combinations of all business tag words can be obtained, and the part-of-speech combinations can be used as the screening conditions for word combinations in the paragraph text of each topic. The word combinations that meet the part-of-speech combinations are used as candidate words for core words, which helps to reduce the mining cost of tag synonyms and improve tag extraction efficiency.

[0087] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.

[0088] In addition, this disclosure also provides a synonym generation apparatus, an electronic device, and a computer-readable storage medium, all of which can be used to implement any of the synonym generation methods provided in this disclosure. The corresponding technical solutions and descriptions are described in the corresponding section of the method and will not be repeated here.

[0089] Figure 3 This is a block diagram of a synonym generation apparatus provided in an embodiment of this disclosure. (Refer to...) Figure 3 This disclosure provides a synonym generation device 300, which may include the following modules.

[0090] The segmentation module 310 is used to segment historical text according to multiple topics to obtain multiple topic paragraph texts; wherein each topic paragraph text corresponds to one topic.

[0091] The filtering module 320 is used to filter the core words of the topic that match the part-of-speech combination from multiple topic paragraph texts based on the part-of-speech combination in the preset business tag words. Each core word of the topic is used to characterize the text features of a topic paragraph text.

[0092] Module 330 is used to generate a thesaurus corresponding to preset business tag words based on the core words of the topic corresponding to each topic paragraph text.

[0093] In some embodiments, the filtering module 320 is specifically used to: filter at least one candidate word that matches the part-of-speech combination from each topic paragraph text; calculate the word vector of the corresponding candidate word and the average word vector of the corresponding candidate word for each topic; obtain the topic core word based on the word vector of the corresponding candidate word and the average word vector, wherein the topic core word is the candidate word corresponding to the word vector with the highest similarity to the average word vector.

[0094] In some embodiments, the construction module 330 is specifically used to: cluster multiple topic core words according to multiple categories corresponding to preset business tag words to obtain multiple categories of topic core words, the multiple topic core words including topic core words corresponding to each topic paragraph text; and generate a thesaurus corresponding to multiple categories of preset business tag words based on the multiple categories of topic core words, the thesaurus including thesaurus of multiple categories of preset business tag words.

[0095] In some embodiments, the construction module 330 is further configured to: after obtaining the core words of multiple clustered categories, vectorize the core words of each category to obtain the core word vector of each category; use the average value of the core word vector of each category as the cluster center of each category, and use the cluster center of each category as the current cluster center; obtain the word to be classified from the new text, calculate the similarity value between the word to be classified and the current cluster center; and if the maximum value of the similarity value is greater than a predetermined threshold, classify the word to be classified into the thesaurus of the category to which the cluster center corresponding to the maximum value of the similarity value belongs.

[0096] In some embodiments, after specifically calculating the similarity value between the word to be classified and each cluster center, the construction module 330 is further configured to: treat the word to be classified as a noise word if the maximum value of the similarity value is less than or equal to a predetermined threshold; and determine that the noise word will not be classified.

[0097] In some embodiments, after specifically using the cluster center of each category as the current cluster center, the construction module 330 is further configured to: obtain new business tag words; incrementally update multiple categories according to the category corresponding to the new business tag words to obtain updated multiple categories; when a new business tag word part-of-speech combination already exists in the preset business tag word part-of-speech combinations, determine the theme core words of each first category, wherein the theme core words of each first category are obtained by clustering multiple theme core words according to the updated multiple categories; perform vectorization processing on the theme core words of each first category, and use the average value of the core word vectors of each first category as the cluster center of each first category; incrementally update the current cluster center according to the cluster center of each first category to obtain updated current cluster centers.

[0098] In some embodiments, if no new part-of-speech combination of business tag words exists in the preset part-of-speech combinations, the construction module 330 is further configured to: filter topic core words that match the newly added part-of-speech combination from multiple topic paragraph texts; wherein the newly added part-of-speech combination is a part-of-speech combination of new business tag words; incrementally update multiple topic core words according to the topic core words that match the newly added part-of-speech combination to obtain multiple updated topic core words; determine topic core words for each second category, wherein the topic core words for each second category are obtained by clustering the updated multiple topic core words according to the updated multiple categories; vectorize the topic core words for each second category, and use the average value of the core word vectors of each second category as the cluster center of each second category; incrementally update each current cluster center according to the cluster center of each second category to obtain updated current cluster centers.

[0099] According to the synonym generation apparatus of this application embodiment, historical text can be segmented according to multiple topics to obtain topic paragraph text corresponding to each topic. The core words of each topic paragraph text are then filtered to ensure that the filtered core words possess semantic diversity corresponding to multiple topics, thereby improving the accuracy of the thesaurus. In this embodiment, the extracted topic core words are matched with the part-of-speech combinations of preset business tag words. The part-of-speech combinations of business tag words do not involve data annotation of historical text, thus reducing the cost of mining tag synonyms. Furthermore, the part-of-speech combinations of topic core words filtered according to the business tag word definition improve the extraction efficiency of topic core words, thereby improving the mining efficiency of tag synonyms.

[0100] It should be clarified that the present invention is not limited to the specific configurations and processes described in the above embodiments and shown in the figures. For the sake of convenience and brevity, detailed descriptions of known methods are omitted here, and the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

[0101] Figure 4 This is a block diagram of an electronic device provided in an embodiment of the present disclosure.

[0102] Reference Figure 4 This disclosure provides an electronic device comprising: at least one processor 401; at least one memory 402; and one or more I / O interfaces 403 connected between the processor 401 and the memory 402; wherein the memory 402 stores one or more computer programs executable by the at least one processor 401, the one or more computer programs being executed by the at least one processor 401 to enable the at least one processor 401 to perform the above-described synonym generation method.

[0103] This disclosure also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor / processor core, implements the aforementioned synonym generation method. The computer-readable storage medium may be volatile or non-volatile.

[0104] This disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device executes the above-described synonym generation method.

[0105] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).

[0106] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0107] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0108] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0109] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0110] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0111] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0112] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0113] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0114] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.

Claims

1. A method for generating synonyms, characterized in that, include: The historical text is divided into segments according to multiple themes, resulting in multiple thematic paragraph texts; each thematic paragraph text corresponds to one theme. Based on the part-of-speech combinations in the preset business tags, the core words of the topic are selected from the multiple topic paragraph texts that match the part-of-speech combinations. This includes: selecting at least one candidate word that matches the part-of-speech combination from each topic paragraph text; for each topic, calculating the word vector of the corresponding candidate word and the average word vector of the corresponding candidate word; obtaining the core words of the topic based on the word vectors of the corresponding candidate words and the average word vector; the core words of the topic are the candidate words corresponding to the word vectors with the highest similarity to the average word vector; each core word of the topic is used to characterize the text features of a topic paragraph text. Based on the core keywords corresponding to each topic paragraph text, a thesaurus corresponding to the preset business tag words is generated.

2. The method according to claim 1, characterized in that, The step of generating a thesaurus corresponding to the preset business tag words based on the core keywords corresponding to each topic paragraph text includes: According to the multiple categories corresponding to the preset business tag words, multiple topic core words are clustered to obtain multiple categories of topic core words. The multiple topic core words include topic core words corresponding to each topic paragraph text. Based on the core keywords of the multiple categories, a thesaurus of multiple categories corresponding to the preset business tag words is generated, and the thesaurus includes the synonyms of the preset business tag words in multiple categories.

3. The method according to claim 2, characterized in that, After obtaining the core keywords of multiple clustered categories, the method further includes: The core words of each category are vectorized to obtain the core word vectors of each category; The average value of the core word vectors of each category is used as the cluster center of each category, and the cluster center of each category is used as the current cluster center. Obtain the words to be classified from the new text, and calculate the similarity value between the words to be classified and each current cluster center; If the maximum value of the similarity value is greater than a predetermined threshold, the word to be classified is assigned to the thesaurus of the category to which the cluster center corresponding to the maximum value of the similarity value belongs.

4. The method according to claim 3, further comprising, after calculating the similarity value between the word to be classified and each cluster center: If the maximum value of the similarity is less than or equal to a predetermined threshold, the word to be classified is treated as a noise word. It was determined that the noise words would not be categorized.

5. The method according to claim 3, characterized in that, After setting the cluster center of each category as the current cluster center, the method further includes: Obtain new business tags, and incrementally update the multiple categories according to the categories corresponding to the new business tags to obtain the updated multiple categories; If the new business tag word combination already exists in the part-of-speech combinations of the preset business tag words, determine the core topic words of each first category, wherein the core topic words of each first category are obtained by clustering the multiple core topic words according to the updated multiple categories; The core words of each first category are vectorized, and the average value of the core word vectors of each first category is used as the cluster center of each first category. Based on the cluster centers of each first category, incremental updates are performed on each current cluster center to obtain the updated current cluster centers.

6. The method according to claim 5, characterized in that, If the new business tag combination does not exist in the preset business tag combination, the method further includes: From the multiple thematic paragraph texts, core themes that match the newly added part-of-speech combinations are selected; wherein, the newly added part-of-speech combinations are combinations of the part-of-speech of new business tag words; Based on the topic core words that match the newly added part-of-speech combinations, the multiple topic core words are incrementally updated to obtain the updated multiple topic core words. Determine the core keywords for each second category, wherein the core keywords for each second category are obtained by clustering the updated multiple core keywords according to the updated multiple categories; The core words of each second category are vectorized, and the average value of the core word vectors of each second category is used as the cluster center of each second category. Based on the cluster centers of each second category, incremental updates are performed on each current cluster center to obtain the updated current cluster centers.

7. A synonym generation device, characterized in that, include: The segmentation module is used to divide historical text into segments according to multiple topics, resulting in multiple topic paragraph texts; each topic paragraph text corresponds to one topic. The filtering module is used to filter core words for a topic from multiple topic paragraph texts based on the part-of-speech combinations in preset business tag words. This includes: filtering at least one candidate word from each topic paragraph text that matches the part-of-speech combination; calculating the word vector of the corresponding candidate word and the average word vector of the corresponding candidate word for each topic; obtaining the core word for the topic based on the word vector of the corresponding candidate word and the average word vector; the core word for the topic is the candidate word corresponding to the word vector with the highest similarity to the average word vector; each core word for the topic is used to characterize the text features of a topic paragraph text. The module is used to generate a thesaurus corresponding to the preset business tag words based on the core words of the topic corresponding to each topic paragraph text.

8. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the synonym generation method as described in any one of claims 1-7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the synonym generation method as described in any one of claims 1-7.