Synonym mining, question answering method, device, computer equipment and storage medium

By calculating the editing distance and fusion characteristics of the words to be mined and the candidate basic synonyms, and determining the synonym set, the problem of low accuracy in synonyms mining in the prior art is solved, and more efficient synonym recognition and query statement replies are achieved.

CN113761151BActive Publication Date: 2024-12-03TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110496948.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-07
Publication Date
2024-12-03
Estimated Expiration
2041-05-07

AI Technical Summary

Technical Problem

The simple similarity algorithm used in synonym mining in the prior art leads to low accuracy and the inability to effectively identify synonyms in fields such as medical symptoms.

Method used

By calculating the edit distance between the word to be mined and the candidate basic synonyms, and integrating the word distance characteristics, vector characteristics and knowledge characteristics, calculating the degree of synonyms, determining the target synonyms set, and improving the accuracy of synonyms mining.

Benefits of technology

It significantly improves the accuracy of synonym mining, enables more accurate identification of medical symptoms and synonyms in other fields, and enhances the accuracy of replying to inquiry statements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113761151B_ABST
    Figure CN113761151B_ABST
Patent Text Reader

Abstract

The present application relates to a synonym mining method, device, computer equipment and storage medium. The method includes: obtaining a word to be mined and a candidate basic synonym set; calculating the edit distance between the word to be mined and the basic synonym, and calculating the edit distance between the basic synonyms to obtain each word distance feature; vectorizing the word to be mined and the basic synonym respectively to obtain each word vector feature, extracting the knowledge representation of the word to be mined and the basic synonym to obtain each word knowledge feature; fusing the word distance feature, word vector feature and word knowledge feature corresponding to the word to be mined and the basic synonym to obtain the word target feature; calculating the synonymy degree between the word to be mined and the candidate basic synonym set based on the word target feature corresponding to the word to be mined and the word target feature corresponding to the basic synonym; determining the target basic synonym set based on the synonymy degree, and adding the word to be mined to the target basic synonym set. The use of this method can improve the accuracy of synonym mining.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a synonym mining, question-answering method, apparatus, computer device and storage medium. Background Art

[0002] With the development of big data and artificial intelligence technology, data mining technology has emerged. Data mining refers to the process of searching for information hidden in a large amount of data through algorithms. Data mining is usually related to computer science, and it achieves the above goals through many methods such as statistics, online analytical processing, information retrieval, machine learning, expert systems (relying on past empirical rules) and pattern recognition. At present, when mining synonyms, usually only a simple similarity algorithm is used for mining. For example, when mining synonyms of medical symptoms in the medical field, synonyms are mined by calculating the similarity between medical symptom words and medical symptom words. However, the accuracy of synonyms mined using a simple similarity algorithm is low. Summary of the invention

[0003] Based on this, it is necessary to provide a synonym mining, question-answering method, device, computer equipment and storage medium that can improve accuracy in response to the above technical problems.

[0004] A synonym mining method, the method comprising:

[0005] Obtain the words to be mined and the candidate basic synonym sets;

[0006] Calculate the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculate the edit distance between the basic synonyms in the basic synonym set to obtain the distance features of each word;

[0007] Vectorize the words to be mined and basic synonyms respectively to obtain the vector features of each word, extract the knowledge representation of the words to be mined and basic synonyms respectively, and obtain the knowledge features of each word;

[0008] The word distance features, word vector features and word knowledge features corresponding to the words to be mined are integrated to obtain the word target features corresponding to the words to be mined; the word distance features, word vector features and word knowledge features corresponding to the basic synonyms are integrated to obtain the word target features corresponding to the basic synonyms;

[0009] Calculate the synonymy degree between the word to be mined and the candidate basic synonym set based on the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms;

[0010] The target basic synonym set is determined based on the degree of synonymy between the word to be mined and the candidate basic synonym set, and the word to be mined is added to the target basic synonym set.

[0011] In one embodiment, the word distance feature, word vector feature and word knowledge feature corresponding to the word to be mined are fused to obtain the word target feature corresponding to the word to be mined, and the word distance feature, word vector feature and word knowledge feature corresponding to the basic synonym are fused to obtain the word target feature corresponding to the basic synonym, including:

[0012] The word distance feature, word vector feature and word knowledge feature corresponding to the word to be mined are concatenated to obtain the word target feature corresponding to the word to be mined;

[0013] The word distance features, word vector features and word knowledge features corresponding to the basic synonyms are concatenated to obtain the word target features corresponding to the basic synonyms.

[0014] In one embodiment, the calculating of average feature similarity based on the word target features corresponding to the basic synonyms to obtain the similarity corresponding to the candidate basic synonym set includes:

[0015] Calculating the synonym cosine similarity between the word target features corresponding to the basic synonyms;

[0016] And the average value of the cosine similarities of the synonyms is calculated to obtain the similarity corresponding to the candidate basic synonym set.

[0017] In one embodiment, the calculating of average feature similarity based on the word target feature corresponding to the word to be mined and the word target feature corresponding to the basic synonym to obtain the similarity corresponding to the word to be mined includes:

[0018] Calculate the cosine similarity of the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms;

[0019] And the average value of the cosine similarity of the word to be mined and the cosine similarity of the synonym is calculated to obtain the similarity corresponding to the word to be mined.

[0020] In one embodiment, after obtaining the synonymy recognition model, the method further includes:

[0021] The target basic synonym set is obtained, and the target basic synonym set is used as a training synonym set. The step of obtaining each training synonym set is returned to be iteratively executed again until a preset target training condition is reached, thereby obtaining a target synonym degree recognition model.

[0022] In one embodiment, determining a target basic synonym set based on the degree of synonymy between the word to be mined and a candidate basic synonym set, and adding the word to be mined to the target basic synonym set includes:

[0023] When the degree of synonymy between the word to be mined and the candidate basic synonym set exceeds a preset synonym degree threshold, the candidate basic synonym set is used as a target basic synonym set, and the word to be mined is added to the target basic synonym set.

[0024] In one embodiment, determining a target basic synonym set based on the degree of synonymy between the word to be mined and a candidate basic synonym set, and adding the word to be mined to the target basic synonym set includes:

[0025] When the synonymy degree between the word to be mined and the candidate basic synonym set does not exceed a preset synonymy degree threshold, the word to be mined is used as the target basic synonym set.

[0026] A synonym mining device, comprising:

[0027] An acquisition module is used to obtain the words to be mined and the candidate basic synonym sets;

[0028] The distance calculation module is used to calculate the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculate the edit distance between the basic synonyms in the basic synonym set to obtain the distance features of each word;

[0029] The feature extraction module is used to vectorize the words to be mined and the basic synonyms respectively to obtain the vector features of each word, and to extract the knowledge representation of the words to be mined and the basic synonyms respectively to obtain the knowledge features of each word;

[0030] The target feature acquisition module is used to fuse the word distance feature, word vector feature and word knowledge feature corresponding to the word to be mined to obtain the word target feature corresponding to the word to be mined, and fuse the word distance feature, word vector feature and word knowledge feature corresponding to the basic synonym to obtain the word target feature corresponding to the basic synonym;

[0031] A synonym calculation module, used for calculating the synonymy degree between the to-be-mined word and the candidate basic synonym set based on the word target features corresponding to the to-be-mined word and the word target features corresponding to the basic synonyms;

[0032] The target set obtaining module is used to determine the target basic synonym set based on the synonymy degree between the word to be mined and the candidate basic synonym set, and add the word to be mined to the target basic synonym set.

[0033] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0034] Obtain the words to be mined and the candidate basic synonym sets;

[0035] Calculate the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculate the edit distance between the basic synonyms in the basic synonym set to obtain the distance features of each word;

[0036] Vectorize the words to be mined and basic synonyms respectively to obtain the vector features of each word, extract the knowledge representation of the words to be mined and basic synonyms respectively, and obtain the knowledge features of each word;

[0037] The word distance features, word vector features and word knowledge features corresponding to the words to be mined are integrated to obtain the word target features corresponding to the words to be mined; the word distance features, word vector features and word knowledge features corresponding to the basic synonyms are integrated to obtain the word target features corresponding to the basic synonyms;

[0038] Calculate the synonymy degree between the word to be mined and the candidate basic synonym set based on the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms;

[0039] The target basic synonym set is determined based on the degree of synonymy between the word to be mined and the candidate basic synonym set, and the word to be mined is added to the target basic synonym set.

[0040] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0041] Obtain the words to be mined and the candidate basic synonym sets;

[0042] Calculate the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculate the edit distance between the basic synonyms in the basic synonym set to obtain the distance features of each word;

[0043] Vectorize the words to be mined and basic synonyms respectively to obtain the vector features of each word, extract the knowledge representation of the words to be mined and basic synonyms respectively, and obtain the knowledge features of each word;

[0044] The word distance features, word vector features and word knowledge features corresponding to the words to be mined are integrated to obtain the word target features corresponding to the words to be mined; the word distance features, word vector features and word knowledge features corresponding to the basic synonyms are integrated to obtain the word target features corresponding to the basic synonyms;

[0045] Calculate the synonymy degree between the word to be mined and the candidate basic synonym set based on the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms;

[0046] The target basic synonym set is determined based on the degree of synonymy between the word to be mined and the candidate basic synonym set, and the word to be mined is added to the target basic synonym set.

[0047] The above-mentioned synonym mining method, device, computer equipment and storage medium calculate the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculate the edit distance between the basic synonyms in the basic synonym set to obtain the distance features of each word; the word to be mined and the basic synonyms are respectively vectorized to obtain the vector features of each word, and the knowledge representations of the word to be mined and the basic synonyms are respectively extracted to obtain the knowledge features of each word, and then the word distance features, word vector features and word knowledge features are used to calculate the degree of synonymy between the word to be mined and the candidate basic synonym set, thereby improving the accuracy of the degree of synonymy. Then, the degree of synonymy between the word to be mined and the candidate basic synonym set is used to determine the target basic synonym set, and the word to be mined is added to the target basic synonym set, that is, the synonymy degree is used to determine the synonym set that is synonymous with the word to be mined, thereby improving the accuracy of synonym mining.

[0048] A question-answering method, comprising:

[0049] Get the query statement;

[0050] Extracting non-standard query words from query sentences;

[0051] Obtain each synonym set, where the synonym set is obtained by obtaining the word to be mined and the candidate basic synonym set; calculate the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculate the edit distance between the basic synonyms in the basic synonym set to obtain each word distance feature; vectorize the word to be mined and the basic synonyms respectively to obtain each word vector feature, extract the knowledge representation of the word to be mined and the basic synonyms respectively, and obtain each word knowledge feature; fuse the word distance feature, word vector feature and word knowledge feature corresponding to the word to be mined to obtain the word target feature corresponding to the word to be mined, fuse the word distance feature, word vector feature and word knowledge feature corresponding to the basic synonym to obtain the word target feature corresponding to the basic synonym; calculate the synonymy degree between the word to be mined and the candidate basic synonym set based on the word target feature corresponding to the word to be mined and the word target feature corresponding to the basic synonym; determine the target basic synonym set based on the synonymy degree between the word to be mined and the candidate basic synonym set, and add the word to be mined to the target basic synonym set to obtain;

[0052] Searching for a target synonym set corresponding to a non-standard query term in each synonym set;

[0053] Obtaining standard synonyms corresponding to non-standard query words from the target synonym set;

[0054] Based on standard synonyms, the corresponding reply words are queried from the established knowledge graph, and replies are made based on the reply words.

[0055] In one embodiment, the method further comprises:

[0056] The target synonyms in the target synonym set are added to the established knowledge graph to obtain a target knowledge graph.

[0057] A question-answering device, comprising:

[0058] A statement acquisition module, used for acquiring query statements;

[0059] A word extraction module, used for extracting non-standard query words from the query sentence;

[0060] The word set acquisition module is used to obtain each synonym set. The synonym set is obtained by obtaining the word to be mined and the candidate basic synonym set; calculating the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculating the edit distance between the basic synonyms in the basic synonym set to obtain each word distance feature; vectorizing the word to be mined and the basic synonyms respectively to obtain each word vector feature, extracting the knowledge representation of the word to be mined and the basic synonyms respectively, and obtaining each word knowledge feature; fusing the word distance feature, word vector feature and word knowledge feature corresponding to the word to be mined to obtain the word target feature corresponding to the word to be mined, fusing the word distance feature, word vector feature and word knowledge feature corresponding to the basic synonym to obtain the word target feature corresponding to the basic synonym; calculating the synonymy degree between the word to be mined and the candidate basic synonym set based on the word target feature corresponding to the word to be mined and the word target feature corresponding to the basic synonym; determining the target basic synonym set based on the synonymy degree between the word to be mined and the candidate basic synonym set, and adding the word to be mined to the target basic synonym set to obtain;

[0061] A query module, used for querying a target synonym set corresponding to a non-standard query word in each synonym set;

[0062] A standard word acquisition module is used to acquire standard synonyms corresponding to non-standard query words from a target synonym set;

[0063] The reply module is used to query the corresponding reply words from the established knowledge graph based on standard synonyms and reply based on the reply words.

[0064] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0065] Get the query statement;

[0066] Extracting non-standard query words from query sentences;

[0067] Obtain each synonym set, where the synonym set is obtained by obtaining the word to be mined and the candidate basic synonym set; calculate the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculate the edit distance between the basic synonyms in the basic synonym set to obtain each word distance feature; vectorize the word to be mined and the basic synonyms respectively to obtain each word vector feature, extract the knowledge representation of the word to be mined and the basic synonyms respectively, and obtain each word knowledge feature; fuse the word distance feature, word vector feature and word knowledge feature corresponding to the word to be mined to obtain the word target feature corresponding to the word to be mined, fuse the word distance feature, word vector feature and word knowledge feature corresponding to the basic synonym to obtain the word target feature corresponding to the basic synonym; calculate the synonymy degree between the word to be mined and the candidate basic synonym set based on the word target feature corresponding to the word to be mined and the word target feature corresponding to the basic synonym; determine the target basic synonym set based on the synonymy degree between the word to be mined and the candidate basic synonym set, and add the word to be mined to the target basic synonym set to obtain;

[0068] Searching for a target synonym set corresponding to a non-standard query term in each synonym set;

[0069] Obtaining standard synonyms corresponding to non-standard query words from the target synonym set;

[0070] Based on standard synonyms, the corresponding reply words are queried from the established knowledge graph, and replies are made based on the reply words.

[0071] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0072] Get the query statement;

[0073] Extracting non-standard query words from query sentences;

[0074] Obtain each synonym set, where the synonym set is obtained by obtaining the word to be mined and the candidate basic synonym set; calculate the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculate the edit distance between the basic synonyms in the basic synonym set to obtain each word distance feature; vectorize the word to be mined and the basic synonyms respectively to obtain each word vector feature, extract the knowledge representation of the word to be mined and the basic synonyms respectively, and obtain each word knowledge feature; fuse the word distance feature, word vector feature and word knowledge feature corresponding to the word to be mined to obtain the word target feature corresponding to the word to be mined, fuse the word distance feature, word vector feature and word knowledge feature corresponding to the basic synonym to obtain the word target feature corresponding to the basic synonym; calculate the synonymy degree between the word to be mined and the candidate basic synonym set based on the word target feature corresponding to the word to be mined and the word target feature corresponding to the basic synonym; determine the target basic synonym set based on the synonymy degree between the word to be mined and the candidate basic synonym set, and add the word to be mined to the target basic synonym set to obtain;

[0075] Searching for a target synonym set corresponding to a non-standard query term in each synonym set;

[0076] Obtaining standard synonyms corresponding to non-standard query words from the target synonym set;

[0077] Based on standard synonyms, the corresponding reply words are queried from the established knowledge graph, and replies are made based on the reply words.

[0078] The above-mentioned question-answering method, device, computer equipment and storage medium use the non-standard query words in the query sentence to query the corresponding target synonym set, then obtain the standard synonyms corresponding to the non-standard query words from the target synonym set, and finally use the standard synonyms to query the corresponding reply words from the established knowledge graph, and reply based on the reply words. That is, it is possible to query the corresponding standard synonyms for the non-standard query sentence, and then use the standard synonyms to query the corresponding reply words, and then use the reply words to reply, which can improve the accuracy of the reply to the query sentence. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 An application environment diagram of a synonym mining method in an embodiment;

[0080] Figure 2 A flowchart of a synonym mining method in one embodiment;

[0081] Figure 3 A schematic diagram of a process for obtaining word knowledge features in one embodiment;

[0082] Figure 4 A schematic diagram of a process of training an entity transfer model in one embodiment;

[0083] Figure 5 A schematic diagram of a process of training an ontology transfer model in one embodiment;

[0084] Figure 6 A schematic diagram of a process for calculating the degree of synonyms in one embodiment;

[0085] Figure 7 A schematic diagram of a process for training a synonymy recognition model in one embodiment;

[0086] Figure 8 A schematic diagram of a flow chart of a question-answering method in one embodiment;

[0087] Fig. 9 A flowchart of a synonym mining method in a specific embodiment;

[0088] Fig.10 A schematic diagram of a framework for synonym mining in a specific embodiment;

[0089] Fig.11 is a structural block diagram of a synonym mining device in one embodiment;

[0090] Fig.12 is a structural block diagram of a question-answering device in an embodiment;

[0091] Fig.13 is an internal structure diagram of a computer device in one embodiment;

[0092] Fig.14 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION

[0093] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0094] Natural language processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between people and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field will involve natural language, that is, the language people use in daily life, so it is closely related to the study of linguistics. Natural language processing technology usually includes text processing, semantic understanding, machine translation, robot question answering, knowledge graph and other technologies.

[0095] The solution provided in the embodiments of the present application involves artificial intelligence machine translation, robot question answering, knowledge graph and other technologies, which are specifically described by the following embodiments:

[0096] The synonym mining method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The terminal 102 sends a synonym mining instruction to the server, and the server 104 receives the synonym mining instruction and obtains the word to be mined and the candidate basic synonym set from the database 106 according to the synonym mining instruction; the server 104 calculates the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculates the edit distance between the basic synonyms in the basic synonym set to obtain the distance features of each word; the server 104 vectorizes the word to be mined and the basic synonyms respectively to obtain the vector features of each word, extracts the knowledge representation of the word to be mined and the basic synonyms respectively, and obtains the knowledge features of each word; the server The server 104 fuses the word distance feature, word vector feature and word knowledge feature corresponding to the word to be mined to obtain the word target feature corresponding to the word to be mined, and fuses the word distance feature, word vector feature and word knowledge feature corresponding to the basic synonym to obtain the word target feature corresponding to the basic synonym; the server 104 calculates the synonymy degree between the word to be mined and the candidate basic synonym set based on the word target feature corresponding to the word to be mined and the word target feature corresponding to the basic synonym; the server 104 determines the target basic synonym set based on the synonymy degree between the word to be mined and the candidate basic synonym set, and adds the word to be mined to the target basic synonym set. The server 104 returns the synonym mining result to the terminal 102 for display. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this.

[0097] In one embodiment, Figure 2 As shown, a synonym mining method is provided, which is applied to Figure 1 The server in the example is used for explanation. It can be understood that the method can also be applied in a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server.

[0098] The following steps are involved:

[0099] Step 202: Obtain the words to be mined and the candidate basic synonym sets.

[0100] The word to be mined refers to the word that needs to be judged as a synonym, that is, it is necessary to identify whether the word to be mined is a synonym in the candidate basic synonym set. The candidate basic synonym set refers to the basic synonym set that currently needs to be identified as being synonymous with the word to be mined. The basic synonym set is a set of pre-set basic synonyms and is the basic data of synonyms. There is at least one candidate basic synonym set.

[0101] Specifically, the server can directly obtain the words to be mined and the candidate basic synonym sets from the database. The words to be mined can also be obtained from the Internet, and then the candidate basic synonym sets can be obtained from the database. The server can also obtain the words to be mined provided by the terminal, and then obtain the candidate basic synonym sets from the database. The server can also obtain the words to be mined sent by the business server, and then obtain the candidate basic synonym sets from the database. In one embodiment, different application scenarios can establish different candidate basic synonym sets, and then obtain the words to be mined and the candidate basic synonym sets under the business scenario according to the business scenario. For example, a financial application scenario can also establish a financial basic synonym set, a medical application scenario can also establish a medical basic synonym set, and an educational application scenario can establish an educational basic synonym set. An Internet application scenario can establish an Internet basic synonym set, and so on, and then further perform synonym mining.

[0102] Step 204 , calculate the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculate the edit distance between the basic synonyms in the basic synonym set to obtain the distance features of each word.

[0103] The edit distance refers to the Levenshtein distance, which refers to the minimum number of edit operations required to convert one string into another. Permitted edit operations include replacing one character with another, inserting a character, and deleting a character. The word distance feature refers to the feature between words obtained based on the edit distance.

[0104] Specifically, the server uses the edit distance algorithm to calculate the edit distance between the word to be mined and the basic synonyms in each candidate basic synonym set, and obtains the edit distance between the word to be mined and the basic synonyms, that is, obtains the word distance feature between the word to be mined and each basic synonym. Then the server uses the edit distance algorithm to calculate the edit distance between the basic synonyms and the basic synonyms in the basic synonym set, and obtains the word distance feature between the basic synonyms and the basic synonyms.

[0105] In one embodiment, the server calculates a first minimum number of editing operations corresponding to converting a to-be-mined word into a basic synonym, and uses the first minimum number of editing operations as the edit distance between the to-be-mined word and the basic synonym, and then calculates a second minimum number of editing operations corresponding to converting a first basic synonym in a candidate basic synonym set into a second basic synonym in the candidate basic synonym set, and uses the second minimum number of editing operations as the edit distance between basic synonyms in the basic synonym set.

[0106] Among them, the first minimum number of editing operations refers to the minimum number of editing operations required to convert the word to be mined into a basic synonym. The second minimum number of editing operations refers to the minimum number of editing operations required to convert the first basic synonym in the candidate basic synonym set into the second basic synonym in the candidate basic synonym set. The first basic synonym and the second basic synonym refer to different basic synonyms in the candidate basic synonym set. Then the server converts the word to be mined into a basic synonym through replacement, insertion and deletion operations, and counts the first minimum number of editing operations required. At the same time, the server converts the first basic synonym into the second basic synonym through replacement, insertion and deletion operations, and counts the second minimum number of editing operations required. The first minimum number of editing operations is used as the editing distance between the word to be mined and the basic synonym, and the second minimum number of editing operations is used as the editing distance between the basic synonyms in the basic synonym set.

[0107] Step 206, vectorize the words to be mined and the basic synonyms respectively to obtain the vector features of each word, extract the knowledge representations of the words to be mined and the basic synonyms respectively, and obtain the knowledge features of each word.

[0108] Among them, vectorization refers to the process of converting words into vectors. Word vector features refer to the features obtained after word vectorization. Knowledge representation refers to representing words in a low-dimensional dense vector space. Word knowledge features refer to the features obtained after knowledge representation extraction of words.

[0109] Specifically, the server can use a vectorization algorithm to vectorize the words to be mined and the basic synonyms respectively, and obtain the word vector features corresponding to the words to be mined and the word vector features corresponding to each basic synonym. The vectorization algorithm can be a Word2vec algorithm (a group of related models used to generate word vectors), a BERT (Bidirectional Encoder Representations from Transformers, bidirectional encoding representation based on transformers) algorithm, an ALBERT (a simplified BERT) algorithm, etc. Then the server can use a natural language transfer (translational) algorithm to extract the knowledge representation of the words to be mined and the basic synonyms to obtain the knowledge features of each word, wherein the natural language transfer (translational) algorithm can be a Trans series algorithm, which can include a TransE algorithm (Translation embeddings for modeling multi-relation data, multi-relation data embedding), a TransH algorithm (Knowledge graph embedding by translating on hyperplanes, embedding knowledge into hyperplanes), a TransR algorithm (Learning Entity and Relation Embeddings for Knowledge Graph Completion, entities and relations are embedded separately), etc.

[0110] In one embodiment, the server inputs the words to be mined and the basic synonyms into the vectorization model for vectorization, and obtains the vector features of each word with equal dimensions.

[0111] The vectorization model refers to a model used for word vectorization, which is a model established in advance through a vectorization algorithm.

[0112] Specifically, the server can use the vectorization algorithm to train the vectorization model in advance, and then deploy and use the vectorization model. When in use, that is, when the words to be mined and basic synonyms to be vectorized are obtained, the deployed vectorization model is called, and the words to be mined and basic synonyms are respectively input into the vectorization model for vectorization, and the output word vector features of equal dimensions are obtained. The dimensions of the word vectorization features are equal.

[0113] Step 208, the word distance features, word vector features and word knowledge features corresponding to the word to be mined are integrated to obtain the word target features corresponding to the word to be mined, and the word distance features, word vector features and word knowledge features corresponding to the basic synonyms are integrated to obtain the word target features corresponding to the basic synonyms.

[0114] Among them, the word target feature refers to the feature obtained by integrating the word distance feature, word vector feature and word knowledge feature.

[0115] Specifically, the server can fuse the word distance features, word vector features, and word knowledge features corresponding to the word to be mined to obtain the word target features corresponding to the word to be mined. Then, the word distance features, word vector features, and word knowledge features corresponding to the basic synonyms are fused to obtain the word target features corresponding to the basic synonyms. The fusion can be a concat operation, a multiplication operation, a vector sum operation, a vector product operation, and the like. There are multiple word distance features corresponding to the basic synonym, including the word distance features between the basic synonym and the word to be mined and the word distance features between the basic synonym and all other basic synonyms in the candidate basic synonym set. After the fusion, the server can obtain multiple word target features corresponding to the basic synonym.

[0116] In one embodiment, the server concatenates the word distance features, word vector features, and word knowledge features corresponding to the word to be mined to obtain the word target features corresponding to the word to be mined, and concatenates the word distance features, word vector features, and word knowledge features corresponding to the basic synonyms to obtain the word target features corresponding to the basic synonyms.

[0117] Specifically, the server concatenates the word distance features, word vector features, and word knowledge features corresponding to the word to be mined in sequence to obtain the word target features corresponding to the word to be mined, and then concatenates the word distance features, word vector features, and word knowledge features corresponding to the basic synonyms in sequence to obtain the word target features corresponding to the basic synonyms. The server may also concatenate the word knowledge features, word vector features, and word distance features in sequence to obtain the corresponding word target features. The server may also concatenate the word vector features, word knowledge features, and word distance features in sequence to obtain the corresponding word target features.

[0118] Step 210 , calculating the synonymy degree between the word to be mined and the candidate basic synonym set based on the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms.

[0119] The synonymy degree is used to characterize the possibility that the word to be mined is synonymous with the candidate basic synonym set.

[0120] Specifically, the server can use the cosine similarity algorithm to calculate the synonymy between the word to be mined and the candidate basic synonym set using the word target feature corresponding to the word to be mined and the word target feature corresponding to the basic synonym. That is, the cosine similarity between the word target feature corresponding to the word to be mined and the candidate basic synonym set is calculated, and then the synonymy between the word to be mined and the candidate basic synonym set is obtained.

[0121] Step 212: determine a target basic synonym set based on the degree of synonymy between the word to be mined and the candidate basic synonym set, and add the word to be mined to the target basic synonym set.

[0122] Specifically, the server determines the candidate basic synonym set corresponding to the maximum synonymy degree from the synonymy degree between the mined word and the candidate basic synonym set, and uses the candidate basic synonym set as the target basic synonym set. Then the server adds the word to be mined to the target basic synonym set, that is, summarizes the word to be mined into the target basic synonym set, thereby obtaining an expanded basic synonym set. In one embodiment, the synonymy degree between the mined word and the candidate basic synonym set can be compared with a preset synonymy degree threshold. When the synonymy degree between the mined word and the candidate basic synonym set exceeds the preset synonymy degree threshold, the word to be mined is added to the target basic synonym set to obtain an expanded basic synonym set.

[0123] In one embodiment, after a synonym set is mined, the synonym set can be used for question-answering processing. For example, the synonym set is applied to an online medical consultation scenario. When a user's medical inquiry statement is obtained, the standard synonyms corresponding to the colloquial words in the medical inquiry statement can be queried from the synonym set. Then, the medical inquiry statement can be replied according to the queried standard synonyms, which can improve the accuracy of the online medical consultation results.

[0124] In one embodiment, after the synonym set is mined, the synonym set can be used for query processing. For example, the synonym set is applied to an online query scenario. When the user's query statement is obtained, the various synonyms of the words in the query statement can be queried from the synonym set, and then the various synonyms can be used to obtain the query results, thereby enriching the query results and improving the accuracy of the query results.

[0125] In one embodiment, after the synonym set is mined, the synonym set can be used to supplement the knowledge graph, that is, the synonyms of the entities in the knowledge graph can be obtained based on the synonym set, and the synonyms of the entities are used as synonymous relationships of the entities to supplement the knowledge graph, which can improve the richness of the existing knowledge graph and enhance the expressive power of the knowledge graph.

[0126] The above-mentioned synonym mining method calculates the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculates the edit distance between the basic synonyms in the basic synonym set to obtain the distance features of each word; the word to be mined and the basic synonyms are vectorized respectively to obtain the vector features of each word, and the knowledge representations of the word to be mined and the basic synonyms are extracted respectively to obtain the knowledge features of each word, and then the word distance features, word vector features and word knowledge features are used to calculate the degree of synonymy between the word to be mined and the candidate basic synonym set, thereby improving the accuracy of the degree of synonymy. Then, the degree of synonymy between the word to be mined and the candidate basic synonym set is used to determine the target basic synonym set, and the word to be mined is added to the target basic synonym set, that is, the synonym set with the word to be mined is determined using the degree of synonymy, thereby improving the accuracy of synonym mining.

[0127] In one embodiment, Figure 3 As shown, step 206, respectively extracting the knowledge representations of the words to be mined and the basic synonyms to obtain the knowledge features of each word; including:

[0128] Step 302, input the words to be mined and the basic synonyms into the entity transfer model respectively to extract semantic information and obtain the semantic features of each word. The entity transfer model is a transfer model established based on the entity triples in the established entity knowledge graph.

[0129] The entity transfer model refers to a transfer model established through the knowledge graph of entity-relationship triples. The knowledge graph includes entity sets, relationship sets, and entity-relationship triple sets. The entity transfer model is obtained by training the entity sets, relationship sets, and entity-relationship triple sets using the natural speech transfer algorithm.

[0130] Specifically, the server obtains the knowledge graph, which is pre-established based on entity relationships. Then, the entity set, relationship set, and entity relationship triple set in the knowledge graph are obtained, and the entity transfer model is obtained through training with the natural language transfer algorithm. The entity transfer model can be trained using the TransE algorithm, and then the entity transfer model is deployed and used. When the words to be mined and basic synonyms are obtained, the words to be mined and the basic synonyms are respectively input into the entity transfer model for semantic information extraction to obtain the semantic features of each word. The semantic information of the entity relationship is implicit in the extracted word semantic features.

[0131] Step 304, inputting the semantic features of each word into the ontology transfer model for knowledge enhancement, and obtaining the knowledge features of each word containing ontology knowledge information. The ontology transfer model is a transfer model established based on the ontology triples in the established ontology knowledge graph.

[0132] Among them, the ontology transfer model refers to the transfer model established through the knowledge graph of ontology relationship triples. Ontology refers to the definition of the knowledge graph, which defines the specific representation, domain, scope and other metadata of all entity nodes and relationship nodes in the knowledge graph. The categories (or concepts) in the ontology are of great significance for guiding the tasks at the knowledge graph level. Ontology is an abstract generalization of the knowledge graph. For example, the nodes in the ontology are concepts (such as broad concepts such as diseases and drugs).

[0133] Specifically, the server obtains the ontology knowledge graph, which includes a class set, a relationship set, and an ontology triple set. There are only subclass relationships in the relationship set, that is, the ontology is not a tree-structured network. Then the ontology knowledge graph is used to train the natural language transfer algorithm to obtain the ontology transfer model. For example, the TransC algorithm can be used to train the ontology transfer model. The trained ontology transfer model is then deployed and used. When the semantic features of each word are obtained, each word semantic feature is input into the ontology transfer model for knowledge enhancement to obtain each word knowledge feature containing ontology knowledge information, that is, the knowledge information of the ontology can be further integrated into the vector expression of the entity to obtain an enhanced vector representation.

[0134] In the above embodiment, the entity transfer model is used to represent the knowledge of the words to be mined and the basic synonyms to obtain the semantic features of each word, and then the ontology transfer model is further used to enhance the knowledge of each word semantic feature, so that the knowledge information of the ontology is integrated into the word semantic feature, so that the obtained word knowledge feature has rich knowledge information, thereby improving the accuracy of subsequent synonym recognition.

[0135] In one embodiment, Figure 4 As shown, the training of the entity transfer model includes the following steps:

[0136] Step 402, obtaining correct entity triples and incorrect entity triples from the established entity knowledge graph.

[0137] Among them, the correct entity triple refers to the correct entity triple, and the incorrect entity triple refers to the triple obtained by randomly replacing the correct entity triple with the entity or entity relationship.

[0138] Specifically, the server obtains the established entity knowledge graph, and then obtains the correct entity triples from the established entity knowledge graph. The correct entity triples are used to randomly replace entities or entity relationships to obtain the wrong entity triples. For example, the tail entity in the correct entity triple can be replaced with other entities to obtain the wrong entity triples, the head entity in the correct entity triple can be replaced with other entities to obtain the wrong entity triples, and the entity relationships in the correct entity triples can be replaced with other entity relationships to obtain the wrong entity triples.

[0139] Step 404: input the correct entity triples and the incorrect entity triples into the initial entity transfer model to obtain an initial correct entity triple vector and an initial incorrect entity triple vector.

[0140] The initial entity transfer model refers to the entity transfer model with model parameters initialized, which may be randomly initialized or zero initialized, etc. The initial correct entity triple vector refers to the vector of correct entity triples obtained using the initial model parameters, and the initial incorrect entity triple vector refers to the vector of incorrect entity triples obtained using the initial model parameters.

[0141] Specifically, the server directly inputs the correct entity triples and the incorrect entity triples into the initial entity transfer model, and the initial entity transfer model obtains an initial correct entity triple vector and an initial incorrect entity triple vector.

[0142] Step 406, performing distance calculation based on the initial correct entity triplet vector to obtain the initial correct entity distance, and performing distance calculation based on the initial incorrect entity triplet vector to obtain the initial incorrect entity distance.

[0143] The initial correct entity distance refers to the distance between the initial correct entity triplet vectors obtained by using a pre-set scoring function for distance calculation, that is, the distance between the head entity and the relationship and the tail entity. The initial incorrect entity distance refers to the distance between the initial incorrect entity triplet vectors obtained by using a pre-set scoring function for distance calculation, that is, the distance between the head entity and the relationship and the tail entity.

[0144] Specifically, the server uses a scoring function to calculate the initial correct entity triple vector and the initial wrong entity triple vector to obtain the initial correct entity distance and the initial wrong entity distance. In a specific embodiment, the scoring function can use the following formula (1).

[0145]

[0146] Among them, h refers to the head entity vector in the triple, r refers to the relation vector in the triple, and t refers to the tail entity vector in the triple. Refers to the L2 norm. Formula (1) is used to calculate the initial correct entity triple vector and the initial correct entity distance and initial incorrect entity distance corresponding to the initial incorrect entity triple. That is, an entity transfer model of h+r=t is constructed.

[0147] Step 408 , calculating a distance error based on the initial correct entity distance and the initial incorrect entity distance, and updating the initial entity transfer model based on the distance error to obtain an updated entity transfer model.

[0148] The distance error refers to the error between the initial correct entity distance and the initial incorrect entity distance. The updated entity transfer model refers to the entity transfer model after the model parameters are updated.

[0149] Specifically, the server uses the loss function to calculate the distance error between the initial correct entity distance and the initial incorrect entity distance, and then uses the gradient descent algorithm to reversely update the initial entity transfer model through the distance error to obtain an updated entity transfer model. The distance error can be calculated using the formula (2) shown below.

[0150] L(h,r,t)=max(0,d_pos-d_neg+margin) Formula (2)

[0151] Among them, d_pos refers to the initial correct entity distance, d_neg refers to the initial incorrect entity distance, and margin is a hyperparameter used to control the distance between positive and negative sample spaces. It can be set as needed, for example, the tail can be set to 0.2.

[0152] Step 410, taking the updated entity transfer model as the initial entity transfer model, and returning to the step of obtaining correct entity triples and incorrect entity triples for iterative execution until the preset entity training completion condition is met, thereby obtaining the entity transfer model.

[0153] Among them, the preset entity training completion conditions refer to the pre-set conditions for the entity transfer model to complete the training, which may include the number of iterations reaching the maximum number, the value of the loss function reaching the preset threshold, and the model parameters no longer changing, etc.

[0154] Specifically, the server will update the entity transfer model as the initial entity transfer model, and then return to the step of obtaining correct entity triples and incorrect entity triples to continue iterative execution until the preset entity training completion condition is reached, and the initial entity transfer model when the preset entity training completion condition is reached will be used as the final trained entity transfer model.

[0155] In the above embodiment, correct entity triplets and incorrect entity triplets are input into the initial entity transfer model, and then the distance error between the initial correct entity distance and the initial incorrect entity distance is calculated. The distance error is used to reversely update the initial entity transfer model, and training iterations are continuously performed to train the entity transfer model, thereby improving the accuracy of the training.

[0156] In one embodiment, Figure 5 As shown, the training of the ontology transfer model includes the following steps:

[0157] Step 502, obtaining category information, relationship information, correct ontology triples and incorrect ontology triples from the established ontology knowledge graph.

[0158] Among them, category information refers to the set of categories in the ontology knowledge graph. Relationship information refers to the set of subclass relationships (subClassOf) in the ontology knowledge graph. Ontology triples refer to triples of subclass relationships in the ontology knowledge graph. Correct ontology triples refer to ontology triples with correct subclass relationships, and incorrect ontology triples refer to ontology triples with incorrect subclass relationships.

[0159] Specifically, the server obtains the established ontology knowledge graph, and then obtains category information, relationship information, and correct ontology triples from the established ontology knowledge graph, and then randomly replaces the correct ontology triples to obtain incorrect ontology triples, wherein the subclass relationship in the correct ontology triples can be randomly replaced to obtain incorrect ontology triples, the head category in the correct ontology triples can be randomly replaced to obtain incorrect ontology triples, and the tail category in the correct ontology triples can be randomly replaced to obtain incorrect ontology triples. In a specific embodiment, the ontology knowledge graph refers to the medical knowledge graph, and the categories can be "disease" and "drug", and the relationships are "therapeutic drug" and "contraindicated drug", then the ontology triples can be "disease_therapeutic drug_drug" and "disease_contraindicated drug_drug".

[0160] Step 504, input the category information, relationship information, correct ontology triples and incorrect ontology triples into the initial ontology transfer model, the initial ontology transfer model inputs the category information and relationship information into the initial ontology network, the initial ontology network determines the initial ontology range parameters corresponding to the category information based on the category information and relationship information, inputs the initial ontology range parameters and the correct ontology triples and incorrect ontology triples into the initial ontology fusion network, and the initial ontology fusion network outputs the initial correct ontology triple vector and the initial incorrect ontology triple vector.

[0161] Among them, the initial ontology transfer model refers to the ontology transfer model with model parameters initialized. The initial ontology network refers to the ontology network with network parameters initialized, which is used to determine the initial ontology scope parameters corresponding to the category information based on the category information and relationship information. The initial ontology scope parameters refer to the ontology scope parameters corresponding to the initial category. Among them, each category is considered to be a circular space, and the parameters of the circular space are the ontology scope parameters, which may include the radius and the center of the circle. The initial ontology fusion network refers to the ontology fusion network with network parameters initialized, and the ontology fusion network is used to fuse the knowledge information of the ontology into the vector expression of the entity.

[0162] Specifically, the server inputs category information, relationship information, correct ontology triples and incorrect ontology triples into the initial ontology transfer model, the initial ontology transfer model inputs the category information and relationship information into the initial ontology network, the initial ontology network determines the initial ontology range parameters corresponding to the category information based on the category information and relationship information, inputs the initial ontology range parameters and the correct ontology triples and incorrect ontology triples into the initial ontology fusion network, and the initial ontology fusion network outputs an initial correct ontology triplet vector and an initial incorrect ontology triplet vector.

[0163] Step 506, performing loss calculation based on the initial correct ontology triplet vector and the corresponding initial ontology range parameters to obtain the initial correct ontology error, and performing loss calculation based on the initial incorrect ontology triplet vector and the corresponding initial ontology parameters to obtain the initial incorrect ontology error.

[0164] The initial correct ontology error refers to the error calculated using the initial correct ontology triplet vector and the corresponding initial ontology range parameters, and the initial incorrect ontology error refers to the error calculated using the initial incorrect ontology triplet vector and the corresponding initial ontology parameters.

[0165] Specifically, the server uses the initial correct ontology triplet vector and the corresponding initial ontology range parameters to perform loss calculation to obtain the initial correct ontology error, and performs loss calculation based on the initial incorrect ontology triplet vector and the corresponding initial ontology parameters to obtain the initial incorrect ontology error.

[0166] In a specific embodiment, the loss information can be calculated using formula (3), formula (4) and formula (5) as shown below.

[0167]

[0168] Among them, m refers to the radius corresponding to the category. It refers to the radius corresponding to the head category in the ontology triple vector. It refers to the radius corresponding to the tail category in the ontology triple vector. When the tail category in the ontology triple vector belongs to the head category in the ontology triple vector, the error between the categories is calculated using formula (3).

[0169]

[0170] Among them, p refers to the center of the circle corresponding to the category, p_c_i refers to the center of the circle corresponding to the head category in the ontology triple vector. p_c_j refers to the center of the circle corresponding to the tail category in the ontology triple vector. When the tail category in the ontology triple vector does not belong to the head category in the ontology triple vector, the error between categories is calculated using formula (3).

[0171] f(i,c)=||ip||2-m Formula (5)

[0172] Here, i refers to the entity, c refers to the category, and m refers to the radius corresponding to the category. That is, the error between the entity and the category is calculated using formula (5). That is, the loss information of the relationship (instanceOf) between the entity and the category is calculated.

[0173] Step 508 , calculate target loss information based on the initial correct ontology error and the initial incorrect ontology error, and update the initial ontology transfer model based on the target loss information to obtain an updated ontology transfer model.

[0174] Among them, the target loss information refers to the loss information calculated using the preset loss function.

[0175] Specifically, the server uses a pre-set loss function to calculate the loss information between the initial correct ontology error and the initial wrong ontology error to obtain the target loss information, and then uses the gradient descent algorithm to reversely update the model parameters in the initial ontology transfer model to obtain the updated ontology transfer model. In a specific embodiment, the loss function of the TransC algorithm can be used to calculate the target loss information.

[0176] Step 510, taking the updated ontology transfer model as the initial ontology transfer model, and returning to the step of obtaining category information, relationship information, correct ontology triples and incorrect ontology triples from the established ontology knowledge graph, and iteratively executing until the preset ontology training completion condition is reached, the ontology transfer model is obtained.

[0177] Among them, the preset ontology training completion conditions refer to the pre-set conditions for the completion of the ontology transfer model training, including the number of iterations reaching the maximum number, the value of the loss function reaching the preset threshold, and the model parameters no longer changing, etc.

[0178] Specifically, the server updates the ontology transfer model as the initial ontology transfer model, and returns to iteratively execute the steps of obtaining category information, relationship information, correct ontology triples, and incorrect ontology triples from the established ontology knowledge graph until the preset ontology training completion conditions are met to obtain the ontology transfer model.

[0179] In the above embodiment, by using category information, relationship information, correct ontology triples and incorrect ontology triples into the initial ontology transfer model, and then calculating the target loss information, using the target loss information to reversely update the initial ontology transfer model, and continuously performing training iterations, the ontology transfer model is trained to improve the accuracy of the training.

[0180] In one embodiment, Figure 6 As shown, step 210, based on the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms, calculates the synonymy degree between the word to be mined and the candidate basic synonym set, including:

[0181] Step 602 , performing average feature similarity calculation based on the word target features corresponding to the basic synonyms, and obtaining the similarity corresponding to the candidate basic synonym set.

[0182] The similarity corresponding to the candidate basic synonym set refers to the similarity corresponding to the candidate basic synonym set.

[0183] Specifically, the server uses a similarity algorithm to calculate the similarity between the word target features corresponding to the basic synonyms, and then calculates the average value of the similarity between the word target features corresponding to the candidate basic synonym set to obtain the similarity corresponding to the candidate basic synonym set, wherein the similarity algorithm can be a Euclidean distance algorithm, a Pearson correlation coefficient algorithm, a cosine similarity algorithm, and the like.

[0184] In one embodiment, the server calculates the cosine similarities of the synonyms between the word target features corresponding to the basic synonyms; and calculates the average value of the cosine similarities of the synonyms to obtain the similarities corresponding to the candidate basic synonym set.

[0185] Specifically, the server uses the cosine similarity algorithm to calculate the synonym cosine similarity between the word target features corresponding to each basic synonym in the candidate basic synonym set and the word target features corresponding to other basic synonyms, and then calculates the average of all synonym cosine similarities to obtain the similarity corresponding to the candidate basic synonym set. For example, there are three synonyms A, B and C in the candidate basic synonym set. At this time, the cosine similarity algorithm is used to calculate the synonym cosine similarity between the word target features corresponding to A and B, the synonym cosine similarity between the word target features corresponding to A and C, and the synonym cosine similarity between the word target features corresponding to B and C. Then the average of the three cosine similarities is calculated to obtain the similarity corresponding to the candidate basic synonym set (A, B, C).

[0186] Step 604 , performing average feature similarity calculation based on the word target features corresponding to the to-be-mined word and the word target features corresponding to the basic synonyms, to obtain the similarity corresponding to the to-be-mined word.

[0187] The similarity corresponding to the word to be mined refers to the set similarity obtained after adding the word to be mined to the candidate basic synonym set.

[0188] Specifically, the server uses the cosine similarity algorithm to calculate the cosine similarity of the mined word between the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms, and then uses the cosine similarity algorithm to calculate the cosine similarity of the synonyms between the word target features corresponding to the basic synonyms, and calculates the average of the sum of all the cosine similarities of the mined words and the cosine similarities of the synonyms to obtain the similarity corresponding to the word to be mined.

[0189] In one embodiment, the server calculates the cosine similarity of the word to be mined between the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms; and calculates the average of the cosine similarity of the word to be mined and the cosine similarity of the synonyms to obtain the similarity corresponding to the word to be mined.

[0190] Specifically, the server uses cosine similarity to calculate the similarity between the word target feature corresponding to the word to be mined and the word target feature corresponding to each basic synonym, and obtains the cosine similarity of the word to be mined. Then, the cosine similarities of all synonyms are obtained, and the average of the cosine similarity of the word to be mined and the cosine similarity of the synonyms is calculated to obtain the similarity corresponding to the word to be mined. For example, if the word to be mined is D, the cosine similarities between the word to be mined D and A, B and C in the candidate basic synonym set are calculated to obtain three newly added cosine similarities, and then the average similarity of the six cosine similarities is calculated to obtain the similarity corresponding to the word to be mined.

[0191] Step 606, calculating the difference between the similarity corresponding to the candidate basic synonym set and the similarity corresponding to the word to be mined, and determining the degree of synonymy between the word to be mined and the candidate basic synonym set based on the difference.

[0192] Specifically, the server calculates the difference between the similarity corresponding to the candidate basic synonym set and the similarity corresponding to the word to be mined, normalizes the difference, and determines the degree of synonymy between the word to be mined and the candidate basic synonym set.

[0193] In the above embodiment, by calculating the similarity corresponding to the candidate basic synonym set and the similarity corresponding to the word to be mined, the average similarity is used as the similarity corresponding to the candidate basic synonym set and the similarity corresponding to the word to be mined, so that the calculated similarity improves accuracy. Then, by calculating the difference between the similarity corresponding to the candidate basic synonym set and the similarity corresponding to the word to be mined, the synonymy degree between the word to be mined and the candidate basic synonym set is obtained, which can improve the accuracy of the obtained synonymy degree.

[0194] In one embodiment, step 210, i.e., calculating the synonymy degree between the word to be mined and the candidate basic synonym set based on the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms, includes the steps of:

[0195] The word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms are input into the synonymy degree recognition model; the synonymy degree recognition model calculates the average feature similarity based on the word target features corresponding to the basic synonyms through a fully connected network to obtain the similarity corresponding to the candidate basic synonym set, and calculates the average feature similarity based on the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms to obtain the similarity corresponding to the word to be mined, calculates the difference between the similarity corresponding to the candidate basic synonym set and the similarity corresponding to the word to be mined, and non-linearly maps the difference through a non-linear mapping network to obtain the synonymy degree between the word to be mined and the candidate basic synonym set.

[0196] The synonymy degree recognition model is used to identify the synonymy degree between the word to be mined and the candidate basic synonym set, and then determine whether the word to be mined belongs to the candidate basic synonym set according to the synonymy degree.

[0197] Specifically, the server pre-trains the synonymy degree recognition model and deploys it for use, then inputs the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms into the synonymy degree recognition model, the synonymy degree recognition model calculates the average feature similarity based on the word target features corresponding to the basic synonyms through the fully connected network, obtains the similarity corresponding to the candidate basic synonym set, and calculates the average feature similarity based on the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms, obtains the similarity corresponding to the word to be mined, calculates the difference between the similarity corresponding to the candidate basic synonym set and the similarity corresponding to the word to be mined, and non-linearly maps the difference through a non-linear mapping network to obtain the synonymy degree between the word to be mined and the candidate basic synonym set. In one embodiment, the synonymy degree recognition model can be a classification model, and the category includes that the word to be mined belongs to the candidate basic synonym set and that the word to be mined does not belong to the candidate basic synonym set. When the synonymy degree recognition model obtains the synonymy degree between the word to be mined and the candidate basic synonym set, it determines whether the word to be mined belongs to the candidate basic synonym set according to the synonymy degree, and outputs the classification recognition result. In a specific embodiment, the synonymy degree may be calculated using formula (6) shown below.

[0198] Pr(t∈S)=f(S,t)=sigmoid(q(S∪{t})-q(S)) Formula (6)

[0199] Among them, Pr refers to the degree of synonymy, t refers to the word to be mined, and S refers to the candidate basic synonym set. q refers to the calculated average similarity. q(S∪{t}) refers to the similarity corresponding to the word to be mined. q(S) refers to the similarity corresponding to the candidate basic synonym set. f refers to the synonymy degree recognition model. That is, the synonymy degree recognition model will use all entity words in a set to be closer in the vector space, and entity words in other sets will be farther away from the set.

[0200] In one embodiment, Figure 7 As shown, the training of the synonymy recognition model includes the following steps:

[0201] Step 702: Acquire each training synonym set, and determine a target training synonym set and a label word based on each training synonym set.

[0202] The training synonym set refers to the set of synonyms used in training. The target training synonym set refers to the set of synonyms used in the current training. The label word refers to a word with a classification label, and the classification label includes a category belonging to the target training synonym set and a category not belonging to the target training synonym set.

[0203] Specifically, the server can obtain each training synonym set from the database, and then randomly select a target training synonym set and a synonym from the training synonym set, and then obtain a classification label of the synonym according to whether the synonym belongs to the target training synonym set to obtain a label word.

[0204] Step 704 , calculating the edit distance between the label word and the training synonyms in the target training synonym set, and calculating the edit distance between the training synonyms in the target training synonym set, to obtain the distance features of each training word.

[0205] The training word distance feature refers to the distance feature between words calculated during training.

[0206] Specifically, the server uses an edit distance algorithm to calculate the edit distance between the label word and each training synonym in the target training synonym set, and simultaneously calculates the edit distance between the training synonyms in the target training synonym set to obtain the distance features of each training word.

[0207] Step 706, respectively vectorize the label words and the training synonyms to obtain the vector features of each training word, respectively extract the knowledge representations of the label words and the training synonyms to obtain the knowledge features of each training word.

[0208] Among them, the training word vector feature refers to the vector feature corresponding to the word calculated during training. The training word knowledge feature refers to the word knowledge feature calculated during training.

[0209] Specifically, the server can use a vectorization algorithm to vectorize the label words and training synonyms respectively to obtain the vector features of each training word. Then the server can extract the knowledge representation of the label words and training synonyms to obtain the knowledge features of each training word. In a specific embodiment, the vectorization model can be used to vectorize the label words and training synonyms respectively to obtain the vector features of each training word. The server can use the entity transfer model and the ontology transfer model to extract the knowledge representation of the label words and training synonyms to obtain the knowledge features of each training word.

[0210] Step 708, the training word distance feature, training word vector feature and training word knowledge feature corresponding to the label word are integrated to obtain the training word target feature corresponding to the label word, and the training word distance feature, training word vector feature and training word knowledge feature corresponding to the training synonym are integrated to obtain the training word target feature corresponding to the training synonym.

[0211] Specifically, the server concatenates the training word distance feature, training word vector feature, and word knowledge feature corresponding to the label word to obtain the training word target feature corresponding to the label word, and concatenates the training word distance feature, training word vector feature, and training word knowledge feature corresponding to the training synonym to obtain the training word target feature corresponding to the training synonym. In a specific embodiment, the training word distance feature S, the training word vector feature W, and the training word knowledge feature G are concatenated to obtain the training word target feature V.

[0212] Step 710: input the training word target features corresponding to the label word and the training word target features corresponding to the training synonyms into the initial synonymy degree recognition model to obtain the initial synonymy degree of the output label word and the target training synonym set.

[0213] The initial synonymy degree recognition model refers to the synonymy degree recognition model with model parameters initialized. The initial synonymy degree refers to the synonymy degree calculated by the initial model parameters.

[0214] Specifically, the server inputs the training word target features corresponding to the label word and the training word target features corresponding to the training synonym into the initial synonymy degree recognition model to obtain the initial synonymy degree of the output label word and the target training synonym set. In a specific embodiment, there are n entities in the target training synonym set, n is a positive integer, and there are a total of n*(n-1) / 2 synonym word pairs. In the initial synonymy degree recognition model, n*(n-1) / 2 judgments need to be performed, that is, to determine whether the words in the target training synonym set are synonyms.

[0215] Step 712, based on the initial synonymy degree and the training labels corresponding to the label words, the initial synonymy degree recognition model is updated, and the step of determining the target training synonymy set and label words based on each training synonymy set is returned to iterative execution until the preset training completion condition is met to obtain the synonymy degree recognition model.

[0216] Among them, the preset training completion conditions refer to the pre-set conditions for completing the synonymy recognition model training, including that the number of iterations reaches the maximum number, the value of the loss function reaches the preset threshold, and the model parameters no longer change, etc.

[0217] Specifically, the server uses a pre-set loss function to calculate the loss information between the initial synonymy degree and the label word, uses the loss information to reversely update the initial synonymy degree recognition model through a gradient descent algorithm, and returns to the step of determining the target training synonym set and label word based on each training synonym set for iterative execution until the preset training completion condition is reached, and the synonymy degree recognition model is obtained. In one embodiment, the loss function can use a log-likelihood function. As shown in the following formula (7).

[0218]

[0219] Among them, L refers to the loss information. y_i refers to the label of the label word, f refers to the initial synonymy recognition model, S_i refers to the target features of the training words corresponding to the training synonyms in the target training synonym set, and t_i refers to the target features of the training words corresponding to the label words.

[0220] In the above embodiment, by obtaining each training synonym set, determining the target training synonym set and label words from each training synonym set, using the target training synonym set and label words to train the initial synonymy degree recognition model, when the training is completed, the synonymy degree recognition model is obtained, which can improve the accuracy of the trained synonymy degree recognition model.

[0221] In one embodiment, after obtaining the synonymy recognition model, the method further includes:

[0222] The target basic synonym set is obtained, and the target basic synonym set is used as the training synonym set. The steps of obtaining each training synonym set are returned to be iteratively executed again until the preset target training condition is reached, thereby obtaining the target synonym degree recognition model.

[0223] Specifically, when the target basic synonym set is obtained, that is, after the basic synonym set has been expanded for a period of time, the expanded synonym set can be used to retrain the synonym degree recognition model. That is, the target basic synonym set is used as the training synonym set, and the steps of obtaining each training synonym set are returned and iterated again until the preset target training conditions are reached to obtain the target synonym degree recognition model. The preset target training conditions refer to the pre-set completion conditions for retraining the synonym degree recognition model, which may include the number of iterations reaching the upper limit, the loss information reaching the preset threshold, or the model parameters no longer changing. That is, the mined words can be continuously identified, the synonym set can be expanded, and then the expanded synonym set can be used to retrain the synonym degree recognition model every pre-set time interval. Thereby, the accuracy of the synonym degree recognition model in synonym degree recognition can be improved.

[0224] In one embodiment, step 212, i.e., determining a target basic synonym set based on the degree of synonymy between the word to be mined and the candidate basic synonym set, and adding the word to be mined to the target basic synonym set, includes the steps of:

[0225] When the degree of synonymy between the word to be mined and the candidate basic synonym set exceeds a preset synonym degree threshold, the candidate basic synonym set is used as the target basic synonym set, and the word to be mined is added to the target basic synonym set.

[0226] Specifically, the server determines the degree of synonymy between the word to be mined and the candidate basic synonym set and the preset synonym degree threshold, and the preset synonym degree threshold refers to the threshold of the pre-set synonym degree. When the degree of synonymy between the word to be mined and the candidate basic synonym set exceeds the preset synonym degree threshold, it means that the word to be mined belongs to the candidate basic synonym set. At this time, the candidate basic synonym set is used as the target basic synonym set, and the word to be mined is added to the target basic synonym set. In a specific embodiment, when the degree of synonymy between the word to be mined and multiple candidate basic synonym sets exceeds the preset synonym degree threshold, the degree of synonymy between the word to be mined and multiple candidate basic synonym sets is compared, and the candidate basic synonym set corresponding to the largest degree of synonymy is selected as the target basic synonym set, and the word to be mined is added to the target basic synonym set.

[0227] In one embodiment, step 212, i.e., determining a target basic synonym set based on the degree of synonymy between the word to be mined and the candidate basic synonym set, and adding the word to be mined to the target basic synonym set, includes the steps of:

[0228] When the synonymy degree between the word to be mined and the candidate basic synonym set does not exceed the preset synonymy degree threshold, the word to be mined is used as the target basic synonym set.

[0229] Specifically, when the server determines that the synonymy degree between the word to be mined and all candidate basic synonym sets does not exceed the preset synonymy degree threshold, it means that the word to be mined does not belong to the current candidate basic synonym set. At this time, the word to be mined is taken as a new synonym set separately, that is, the target basic synonym set is obtained.

[0230] In the above embodiment, by judging the degree of synonymy between the word to be mined and all candidate basic synonym sets and the preset synonym degree threshold, it is possible to determine whether the word to be mined belongs to the candidate synonym set, thereby obtaining the target basic synonym set, which can improve efficiency.

[0231] In one embodiment, Figure 8 As shown, a question-answering method is provided, which is applied to Figure 1 The server in the example is used for explanation. It is understandable that the method can also be applied in a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. The following steps are included:

[0232] Step 802: Obtain a query statement and extract non-standard query words from the query statement.

[0233] The interrogation sentence refers to an interrogation sentence, which may be an interrogation sentence in the medical field, for example, an interrogation sentence on how to treat a disease. It may also be an interrogation sentence in the financial field, for example, an interrogation sentence on how to invest. It may also be an interrogation sentence in the educational field, for example, an interrogation sentence on asking questions. Non-standard interrogation words refer to colloquial interrogation words.

[0234] Specifically, the server obtains the query sentence sent by the user terminal, and then performs word segmentation on the query sentence to obtain non-standard query words.

[0235] Step 804, obtaining each synonym set, the synonym set is obtained by obtaining the word to be mined and the candidate basic synonym set; calculating the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculating the edit distance between the basic synonyms in the basic synonym set to obtain each word distance feature; vectorizing the word to be mined and the basic synonyms respectively to obtain each word vector feature, extracting the knowledge representation of the word to be mined and the basic synonyms respectively to obtain each word knowledge feature; fusing the word distance feature, word vector feature and word knowledge feature corresponding to the word to be mined to obtain the word target feature corresponding to the word to be mined, fusing the word distance feature, word vector feature and word knowledge feature corresponding to the basic synonym to obtain the word target feature corresponding to the basic synonym; calculating the synonymy degree between the word to be mined and the candidate basic synonym set based on the word target feature corresponding to the word to be mined and the word target feature corresponding to the basic synonym; determining the target basic synonym set based on the synonymy degree between the word to be mined and the candidate basic synonym set, and adding the word to be mined to the target basic synonym set to obtain it.

[0236] Among them, the synonym set refers to a collection of synonyms, and each synonym set has a set of standard words. The standard words are professional words, for example, in the financial field, they can be professional words related to finance, in the medical field, they can be professional words related to medical care, and in the education field, they can be transfer words related to education.

[0237] Specifically, the server can use the above-mentioned synonym mining method embodiments to mine various synonym sets. For example, the server can obtain the word to be mined and the candidate basic synonym set, calculate the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculate the edit distance between the basic synonyms in the basic synonym set to obtain each word distance feature. The word to be mined and the basic synonyms are vectorized respectively to obtain each word vector feature, and the knowledge representation of the word to be mined and the basic synonyms are extracted respectively to obtain each word knowledge feature. The word distance feature, word vector feature and word knowledge feature corresponding to the word to be mined are fused to obtain the word target feature corresponding to the word to be mined, and the word distance feature, word vector feature and word knowledge feature corresponding to the basic synonym are fused to obtain the word target feature corresponding to the basic synonym. The synonymy degree of the word to be mined and the candidate basic synonym set is calculated based on the word target feature corresponding to the word to be mined and the word target feature corresponding to the basic synonym. Based on the degree of synonymy between the words to be mined and the candidate basic synonym sets, the target basic synonym set is determined, and the words to be mined are added to the target basic synonym set, thereby mining various synonym sets. For example, synonym sets in the medical field, synonym sets in the financial field, and synonym sets in the education field can be mined through the synonym mining method.

[0238] Step 806: Search each synonym set for a target synonym set corresponding to the non-standard query term.

[0239] Step 808: Acquire the standard synonyms corresponding to the non-standard query terms from the target synonym set.

[0240] The target synonym set refers to a synonym set containing non-standard query words, and the standard synonyms refer to professional words, which are synonyms of non-standard query words.

[0241] Specifically, the server searches for non-standard query words in each synonym set. When a non-standard query word is found in the synonym set, the corresponding synonym set is used as a target synonym set. Then, the standard synonym corresponding to the non-standard query word is obtained from the target synonym set. In one embodiment, when the non-standard query word is not found in all the synonym sets, the non-standard query word can be used as a word to be mined, and each synonym set can be used as a candidate basic synonym. Then, the synonym mining method in the above embodiments is used to determine the synonym set to which the non-standard query word belongs, thereby determining the target synonym set, and then obtaining the standard synonym corresponding to the non-standard query word from the target synonym set.

[0242] Step 810, query corresponding reply words from the established knowledge graph based on standard synonyms, and reply based on the reply words.

[0243] The established knowledge graph refers to a pre-established knowledge graph that can be used for knowledge question answering. The reply word is a word used to reply to a synonym.

[0244] Specifically, the server uses standard synonyms to query the corresponding reply words from the established knowledge graph and responds based on the reply words. For example, a knowledge graph in the medical field can be established. When standard synonyms in the medical field are obtained, the corresponding reply words can be queried in the knowledge graph in the medical field. A knowledge graph in the financial field can also be established. When standard synonyms in the financial field are obtained, the corresponding reply words can be queried in the knowledge graph in the financial field. A knowledge graph in the education field can also be established. When standard synonyms in the education field are obtained, the corresponding reply words can be queried in the knowledge graph in the education field.

[0245] The above-mentioned question-answering method uses the non-standard query words in the query sentence to query the corresponding target synonym set, then obtains the standard synonyms corresponding to the non-standard query words from the target synonym set, and finally uses the standard synonyms to query the corresponding reply words from the established knowledge graph, and replies based on the reply words. That is, it is possible to query the corresponding standard synonyms for the non-standard query sentence, and then use the standard synonyms to query the corresponding reply words, and then use the reply words to reply, which can improve the accuracy of the reply to the query sentence.

[0246] In one embodiment, the method further comprises:

[0247] Add the target synonyms in the target synonym set to the established knowledge graph to obtain the target knowledge graph.

[0248] Specifically, the server can also add the target synonyms in the target synonym set to the established knowledge graph, that is, the target synonyms in the target synonym set can be used as synonym entities of the standard synonyms in the knowledge graph to supplement the knowledge graph and obtain the target knowledge graph, thereby improving the accuracy of the obtained target knowledge graph.

[0249] In one embodiment, the query statement includes a medical symptom query statement;

[0250] Step 804, respectively extracting the knowledge representations of the words to be mined and the basic synonyms to obtain the knowledge features of each word, including the steps of:

[0251] The medical symptom words to be mined and the basic medical symptom synonyms are respectively input into the medical symptom entity transfer model for semantic information extraction to obtain the semantic features of each medical symptom word. The medical symptom entity transfer model is a transfer model established based on the medical symptom entity triples in the established medical symptom entity knowledge graph; the semantic features of each medical symptom word are input into the medical symptom ontology transfer model for knowledge enhancement to obtain the knowledge features of each medical symptom word containing medical symptom ontology knowledge information. The medical symptom ontology transfer model is a transfer model established based on the medical symptom ontology triples in the established medical symptom ontology knowledge graph.

[0252] Among them, medical symptom query sentences refer to sentences that describe medical disease symptoms and make inquiries. Medical symptom word semantic features refer to the semantic features corresponding to medical symptom words. Medical symptom word knowledge features refer to the enhanced semantic features corresponding to medical symptom words. Medical symptom entity knowledge graph refers to the knowledge graph with medical symptom words as entities. Medical symptom ontology knowledge graph refers to the knowledge graph with medical symptom words as ontology.

[0253] Specifically, the server can perform question-and-answer processing on medical symptoms, that is, obtain medical symptom inquiry statements, and extract non-standard medical symptom inquiry words from the medical symptom inquiry statements. Obtain each medical symptom synonym set, and query the target medical symptom synonym set corresponding to the non-standard medical symptom inquiry words in each medical symptom synonym set. Obtain the standard medical symptom synonyms corresponding to the non-standard medical symptom inquiry words from the target medical symptom synonym set. Based on the standard medical symptom synonyms, query the corresponding medical symptom reply words from the established medical symptom knowledge graph, and reply based on the medical symptom reply words. For example, the medical symptom inquiry statement obtained may be "I have a headache, what medicine should I take?" The reply statement obtained may then be "You can use XX medicine for treatment."

[0254] Among them, when mining each medical symptom synonym set, the medical symptom words to be mined and the basic medical symptom synonyms can be respectively input into the medical symptom entity transfer model for semantic information extraction to obtain the semantic features of each medical symptom word. The medical symptom entity transfer model is a transfer model established based on the medical symptom entity triples in the established medical symptom entity knowledge graph; the semantic features of each medical symptom word are input into the medical symptom ontology transfer model for knowledge enhancement to obtain the knowledge features of each medical symptom word containing medical symptom ontology knowledge information. The medical symptom ontology transfer model is a transfer model established based on the medical symptom ontology triples in the established medical symptom ontology knowledge graph. In one embodiment, the medical symptom ontology transfer model allows all entities belonging to the same category or concept to be as close as possible to the circular space with a center of p and a radius of m, so that the expression of the entity can be enhanced. For example, when the "new crown pneumonia" entity is enhanced through the medical symptom ontology transfer model, it will be close to the three categories of "lung disease", "infectious disease" and "disease" at the same time, so that the knowledge representation of "new crown pneumonia" will be more expressive, and the medical symptom word knowledge features corresponding to the "new crown pneumonia" contain category information.

[0255] In the above embodiment, medical symptom word knowledge features are extracted through the medical symptom entity transfer model and the medical symptom ontology transfer model, so that the extracted medical symptom word knowledge features contain knowledge information of the medical category, thereby improving the accuracy of the obtained medical symptom word knowledge features.

[0256] In a specific embodiment, Fig. 9 As shown, a synonym mining method is provided, which specifically includes the following steps:

[0257] Step 902: Obtain the words to be mined and the candidate basic synonym sets.

[0258] Step 904, calculate the first minimum number of editing operations corresponding to converting the word to be mined into a basic synonym, use the first minimum number of editing operations as the edit distance between the word to be mined and the basic synonym, calculate the second minimum number of editing operations corresponding to converting the first basic synonym in the candidate basic synonym set into the second basic synonym in the candidate basic synonym set, and use the second minimum number of editing operations as the edit distance between the basic synonyms in the basic synonym set.

[0259] Step 906: Input the words to be mined and the basic synonyms into the vectorization model for vectorization, and obtain the vector features of each word with equal dimensions.

[0260] Step 908, input the words to be mined and basic synonyms into the entity transfer model for semantic information extraction to obtain the semantic features of each word, input the semantic features of each word into the ontology transfer model for knowledge enhancement to obtain the knowledge features of each word containing ontology knowledge information.

[0261] Step 910, concatenate the word distance features, word vector features and word knowledge features corresponding to the word to be mined to obtain the word target features corresponding to the word to be mined, and concatenate the word distance features, word vector features and word knowledge features corresponding to the basic synonyms to obtain the word target features corresponding to the basic synonyms.

[0262] Step 912: Input the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms into the synonymy degree recognition model to obtain the synonymy degree of the output word to be mined and the candidate basic synonym set.

[0263] Step 914: when the synonymy degree between the word to be mined and the candidate basic synonym set exceeds a preset synonymy degree threshold, the candidate basic synonym set is used as the target basic synonym set, and the word to be mined is added to the target basic synonym set.

[0264] As disclosed in the present application, the synonym mining method, wherein these synonym data can be stored on the blockchain.

[0265] In a specific embodiment, the synonym mining method of the present application is subjected to comparative testing using a five-fold cross validation algorithm. Specifically:

[0266] A set of medical symptom synonyms with high confidence was obtained as a data set, and the data set was divided into five equal parts. One of the parts was selected as a test set without duplication, and the other four parts were used as training sets for training, and then a comparative test was performed. The test results are shown in Table 1 below.

[0267] Table 1 Comparative test results

[0268]

[0269] It is obvious that all indicators of the synonym mining method proposed by the present invention are significantly better than those of the prior art, that is, the performance of synonym mining has been greatly improved by the present application. More than 7,000 medical symptom synonym sets have been constructed through the present application.

[0270] The present application also provides an application scenario, which applies the above-mentioned synonym mining method. Specifically, it is applied to mining synonyms of medical symptoms in the medical field, such as Fig.10The figure shows a schematic diagram of the framework of synonym mining, in which the server obtains a list of medical entity words to be mined and an established medical synonym set. Among them, the established medical synonym set can be used to train to obtain a discriminant classifier f for entities and sets, that is, a synonym degree recognition model f. Then the synonym degree recognition model f can be used for prediction. That is, the entity word t to be mined and the candidate medical synonym set s are obtained, and the distance features of each word are obtained by extracting the distance features of the entity word t and the candidate medical synonym set s. The entity word t to be mined and the candidate medical synonym set s are input into the vectorization model for vectorization to obtain the vector features of each word, and then the entity word t to be mined and the candidate medical synonym set s are input into the transfer model established by the external knowledge graph using the TransE algorithm and the TransC algorithm to obtain the knowledge features of each word. Then, the word distance features, word vector features and word knowledge features corresponding to the words to be mined are fused to obtain the word target features corresponding to the words to be mined, the word distance features, word vector features and word knowledge features corresponding to the basic synonyms are fused to obtain the word target features corresponding to the basic synonyms, and the word target features corresponding to the words to be mined and the word target features corresponding to the basic synonyms are input into the synonymy degree recognition model f to obtain the output synonymy degree Pr of the entity word t to be mined and the candidate medical synonym set s. Then, when the synonymy degree exceeds the preset threshold, the entity word t is summarized into the candidate medical synonym set s to obtain the expanded medical synonym set, and then each medical entity word in the medical entity word list is summarized into the medical synonym set, and then the expanded medical synonym set is used as the next round of synonym set and the synonymy degree recognition model is retrained to obtain the retrained synonymy degree recognition model, and then the retrained synonymy degree recognition model is used for prediction, and then the training iteration is continuously performed, so that the synonym set can be continuously expanded, which improves the accuracy and efficiency. In a specific embodiment, synonym mining can also be performed on fields other than medical symptoms, such as mining synonyms for diseases, mining synonyms for drugs, mining synonyms for medical examination items, and so on. The server saves the mined synonym set in the medical field. The synonym set in the medical field is then applied to the online consultation scenario. For example, the server can obtain a query statement on how to treat a disease, such as "what medicine should I take if I catch a cold". The server finds the standard synonym "cold" for "cold" from the synonym set in the medical field. According to the standard synonym "cold", the corresponding reply word for "cold" is searched from the established medical knowledge graph, and then a reply sentence containing the reply word is obtained. The reply sentence is used to respond to the online consultation, so that the user can get a more accurate consultation result.

[0271] In a specific embodiment, the server can also save the mined synonym set in the medical field, and then apply the synonym set in the medical field to the medical knowledge query scenario. Specifically: the server obtains the medical query statement sent by the user terminal, for example: "What should I do if I have high blood pressure?" The medical query term "hypertension" is extracted from the medical query statement, and then the target synonym set corresponding to the medical query term "hypertension" is found from the synonym set in the medical field, and then each synonym in the target synonym set is used to query to obtain various query results. For example, "hypertension" and its synonyms "hypertension disease" and "hypertension" are used to query to obtain various query results, such as "XX antihypertensive drug can be used for treatment", etc., and then each query result is returned to the user terminal for display, thereby improving the accuracy of the query results.

[0272] It should be understood that although Figure 2-Figure 9 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-Figure 9 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0273] In one embodiment, Fig.11 As shown, a synonym mining device 1100 is provided. The device can adopt a software module or a hardware module, or a combination of the two to become a part of a computer device. The device specifically includes: an acquisition module 1102, a distance calculation module 1104, a feature extraction module 1106, a target feature acquisition module 1108, a synonym calculation module 1110 and a target set acquisition module 1112, wherein:

[0274] An acquisition module 1102 is used to acquire words to be mined and candidate basic synonym sets;

[0275] The distance calculation module 1104 is used to calculate the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculate the edit distance between the basic synonyms in the basic synonym set to obtain the distance features of each word;

[0276] The feature extraction module 1106 is used to vectorize the words to be mined and the basic synonyms respectively to obtain the vector features of each word, and to extract the knowledge representations of the words to be mined and the basic synonyms respectively to obtain the knowledge features of each word;

[0277] The target feature acquisition module 1108 is used to fuse the word distance feature, word vector feature and word knowledge feature corresponding to the word to be mined to obtain the word target feature corresponding to the word to be mined, and fuse the word distance feature, word vector feature and word knowledge feature corresponding to the basic synonym to obtain the word target feature corresponding to the basic synonym;

[0278] A synonym calculation module 1110 is used to calculate the synonymy degree between the word to be mined and the candidate basic synonym set based on the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms;

[0279] The target set obtaining module 1112 is used to determine the target basic synonym set based on the synonymy degree between the word to be mined and the candidate basic synonym set, and add the word to be mined to the target basic synonym set.

[0280] In one embodiment, the distance calculation module 1104 is further used to calculate the first minimum number of editing operations corresponding to converting the word to be mined into a basic synonym, and use the first minimum number of editing operations as the editing distance between the word to be mined and the basic synonym; calculate the second minimum number of editing operations corresponding to converting the first basic synonym in the candidate basic synonym set into the second basic synonym in the candidate basic synonym set, and use the second minimum number of editing operations as the editing distance between the basic synonyms in the basic synonym set.

[0281] In one embodiment, the feature extraction module 1106 is further used to input the words to be mined and the basic synonyms into the vectorization model for vectorization, so as to obtain the vector features of each word with equal dimensions.

[0282] In one embodiment, the feature extraction module 1106 is also used to input the words to be mined and the basic synonyms into the entity transfer model for semantic information extraction to obtain the semantic features of each word. The entity transfer model is a transfer model established based on the entity triples in the established entity knowledge graph; the semantic features of each word are input into the ontology transfer model for knowledge enhancement to obtain the knowledge features of each word containing ontology knowledge information. The ontology transfer model is a transfer model established based on the ontology triples in the established ontology knowledge graph.

[0283] In one embodiment, the synonym mining device 1100 further includes:

[0284] The entity model training module is used to obtain correct entity triples and incorrect entity triples from the established entity knowledge graph; input the correct entity triples and incorrect entity triples into the initial entity transfer model to obtain the initial correct entity triple vector and the initial incorrect entity triple vector; perform distance calculation based on the initial correct entity triple vector to obtain the initial correct entity distance, and perform distance calculation based on the initial incorrect entity triple to obtain the initial incorrect entity distance; calculate the distance error based on the initial correct entity distance and the initial incorrect entity distance, and update the initial entity transfer model based on the distance error to obtain the updated entity transfer model; use the updated entity transfer model as the initial entity transfer model, and return to iterate the steps of obtaining the correct entity triples and incorrect entity triples until the preset entity training completion conditions are met to obtain the entity transfer model.

[0285] In one embodiment, the synonym mining device 1100 further includes:

[0286] The ontology model training module is used to obtain category information, relationship information, correct ontology triples and incorrect ontology triples from the established ontology knowledge graph; the category information, relationship information, correct ontology triples and incorrect ontology triples are input into the initial ontology transfer model; the initial ontology transfer model inputs the category information and relationship information into the initial ontology network; the initial ontology network determines the initial ontology range parameters corresponding to the category information based on the category information and relationship information; the initial ontology range parameters and the correct ontology triples and incorrect ontology triples are input into the initial ontology fusion network; the initial ontology fusion network outputs the initial correct ontology triple vector and the initial incorrect ontology triple vector; based on the initial correct ontology The loss is calculated based on the initial ontology triplet vector and the corresponding initial ontology range parameters to obtain the initial correct ontology error, and the loss is calculated based on the initial wrong ontology triplet vector and the corresponding initial ontology parameters to obtain the initial wrong ontology error; the target loss information is calculated based on the initial correct ontology error and the initial wrong ontology error, and the initial ontology transfer model is updated based on the target loss information to obtain the updated ontology transfer model; the updated ontology transfer model is used as the initial ontology transfer model, and the steps of obtaining category information, relationship information, correct ontology triples and wrong ontology triples from the established ontology knowledge graph are returned and iteratively executed until the preset ontology training completion condition is reached to obtain the ontology transfer model.

[0287] In one embodiment, the target feature acquisition module 1108 is also used to splice the word distance features, word vector features and word knowledge features corresponding to the word to be mined to obtain the word target features corresponding to the word to be mined; and to splice the word distance features, word vector features and word knowledge features corresponding to the basic synonyms to obtain the word target features corresponding to the basic synonyms.

[0288] In one embodiment, the synonym calculation module 1110 is also used to perform average feature similarity calculation based on the word target features corresponding to the basic synonyms to obtain the similarity corresponding to the candidate basic synonym set; perform average feature similarity calculation based on the word target features corresponding to the to-be-mined words and the word target features corresponding to the basic synonyms to obtain the similarity corresponding to the to-be-mined words; calculate the difference between the similarity corresponding to the candidate basic synonym set and the similarity corresponding to the to-be-mined words, and determine the degree of synonymy between the to-be-mined words and the candidate basic synonym set based on the difference.

[0289] In one embodiment, the synonym calculation module 1110 is further used to calculate the synonym cosine similarities between the word target features corresponding to the basic synonyms; and calculate the average value of the synonym cosine similarities to obtain the similarities corresponding to the candidate basic synonym set.

[0290] In one embodiment, the synonym calculation module 1110 is also used to calculate the cosine similarity of the word to be mined between the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms; and calculate the average of the cosine similarity of the word to be mined and the cosine similarity of the synonyms to obtain the similarity corresponding to the word to be mined.

[0291] In one embodiment, the synonym calculation module 1110 is also used to input the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms into the synonymy degree recognition model; the synonymy degree recognition model performs average feature similarity calculation based on the word target features corresponding to the basic synonyms through a fully connected network to obtain the similarity corresponding to the candidate basic synonym set, and performs average feature similarity calculation based on the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms to obtain the similarity corresponding to the word to be mined, calculates the difference between the similarity corresponding to the candidate basic synonym set and the similarity corresponding to the word to be mined, and non-linearly maps the difference through a non-linear mapping network to obtain the synonymy degree between the word to be mined and the candidate basic synonym set.

[0292] In one embodiment, the synonym mining device 1100 further includes:

[0293] The synonym model training module is used to obtain each training synonym set, determine the target training synonym set and label word based on each training synonym set; calculate the edit distance between the label word and the training synonyms in the target training synonym set, and calculate the edit distance between the training synonyms in the target training synonym set to obtain the distance features of each training word; vectorize the label word and the training synonym respectively to obtain the vector features of each training word, extract the knowledge representation of the label word and the training synonym respectively, and obtain the knowledge features of each training word; fuse the training word distance feature, training word vector feature and training word knowledge feature corresponding to the label word to obtain the training word corresponding to the label word The training word distance feature, the training word vector feature and the training word knowledge feature corresponding to the training synonym are integrated to obtain the training word target feature corresponding to the training synonym; the training word target feature corresponding to the label word and the training word target feature corresponding to the training synonym are input into the initial synonymy degree recognition model to obtain the initial synonymy degree of the output label word and the target training synonym set; the initial synonymy degree recognition model is updated based on the initial synonymy degree and the training label corresponding to the label word, and the step of determining the target training synonym set and the label word based on each training synonym set is returned and iteratively executed until the preset training completion condition is met to obtain the synonymy degree recognition model.

[0294] In one embodiment, the synonym mining device 1100 further includes:

[0295] The iterative training module is used to obtain the target basic synonym set, use the target basic synonym set as the training synonym set, and return to the step of obtaining each training synonym set to iterate again until the preset target training condition is reached to obtain the target synonym degree recognition model.

[0296] In one embodiment, the target set obtaining module 1112 is further configured to use the candidate basic synonym set as the target basic synonym set and add the target basic synonym set to the target basic synonym set when the synonymy degree between the word to be mined and the candidate basic synonym set exceeds a preset synonymy degree threshold.

[0297] In one embodiment, the target set obtaining module 1112 is further configured to use the word to be mined as the target basic synonym set when the synonymy degree between the word to be mined and the candidate basic synonym set does not exceed a preset synonymy degree threshold.

[0298] In one embodiment, Fig.12 As shown, a question-answering device 1200 is provided. The device can adopt a software module or a hardware module, or a combination of the two to become a part of a computer device. The device specifically includes: a sentence acquisition module 1202, a word extraction module 1204, a word set acquisition module 1206, a query module 1208, a standard word acquisition module 1210 and a reply module 1212, wherein:

[0299] A statement acquisition module 1202 is used to acquire a query statement;

[0300] A word extraction module 1204, for extracting non-standard query words from the query sentence;

[0301] The word set acquisition module 1206 is used to acquire each synonym set, and the synonym set is obtained by acquiring the word to be mined and the candidate basic synonym set; calculating the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculating the edit distance between the basic synonyms in the basic synonym set to obtain each word distance feature; vectorizing the word to be mined and the basic synonyms respectively to obtain each word vector feature, extracting the knowledge representation of the word to be mined and the basic synonyms respectively to obtain each word knowledge feature; fusing the word distance feature, word vector feature and word knowledge feature corresponding to the word to be mined to obtain the word target feature corresponding to the word to be mined, fusing the word distance feature, word vector feature and word knowledge feature corresponding to the basic synonym to obtain the word target feature corresponding to the basic synonym; calculating the synonymy degree between the word to be mined and the candidate basic synonym set based on the word target feature corresponding to the word to be mined and the word target feature corresponding to the basic synonym; determining the target basic synonym set based on the synonymy degree between the word to be mined and the candidate basic synonym set, and adding the word to be mined to the target basic synonym set to obtain;

[0302] A query module 1208, configured to query each synonym set for a target synonym set corresponding to a non-standard query term;

[0303] A standard word acquisition module 110 is used to acquire standard synonyms corresponding to non-standard query words from a target synonym set;

[0304] The reply module 1212 is used to query the corresponding reply words from the established knowledge graph based on the standard synonyms, and reply based on the reply words.

[0305] In one embodiment, the question-answering device 1200 further includes:

[0306] The target graph acquisition module is used to add the target synonyms in the target synonym set to the established knowledge graph to obtain the target knowledge graph.

[0307] In one embodiment, the query statement includes a medical symptom query statement;

[0308] The word set acquisition module 1206 is also used to input the medical symptom words to be mined and the basic medical symptom synonyms into the medical symptom entity transfer model for semantic information extraction, and obtain the semantic features of each medical symptom word. The medical symptom entity transfer model is a transfer model established based on the medical symptom entity triples in the established medical symptom entity knowledge graph; input the semantic features of each medical symptom word into the medical symptom ontology transfer model for knowledge enhancement, and obtain the knowledge features of each medical symptom word containing medical symptom ontology knowledge information. The medical symptom ontology transfer model is a transfer model established based on the medical symptom ontology triples in the established medical symptom ontology knowledge graph.

[0309] For the specific limitations of the synonym mining device and the question-answering device, please refer to the limitations of the synonym mining method and the question-answering method in the above text, which will not be repeated here. The various modules in the above-mentioned synonym mining device and question-answering device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0310] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.13 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store training synonym set data and knowledge graph data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a synonym mining method and a question-answering method are implemented.

[0311] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.14As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a synonym mining method and a question-and-answer method are implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball or a touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0312] Those skilled in the art will understand that Fig.13 and Fig.14 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0313] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0314] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0315] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-mentioned method embodiments.

[0316] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0317] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0318] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A synonym mining method, characterized in that: The method comprises: Obtain the words to be mined and the candidate basic synonym sets; Calculating the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculating the edit distance between the basic synonyms in the basic synonym set, to obtain distance features of each word; Vectorizing the words to be mined and the basic synonyms respectively to obtain vector features of each word, extracting knowledge representations of the words to be mined and the basic synonyms respectively to obtain knowledge features of each word; The word distance feature, word vector feature and word knowledge feature corresponding to the word to be mined are integrated to obtain the word target feature corresponding to the word to be mined, and the word distance feature, word vector feature and word knowledge feature corresponding to the basic synonym are integrated to obtain the word target feature corresponding to the basic synonym; Calculating the synonymy degree between the word to be mined and the candidate basic synonym set based on the word target feature corresponding to the word to be mined and the word target feature corresponding to the basic synonym; A target basic synonym set is determined based on the degree of synonymy between the word to be mined and the candidate basic synonym set, and the word to be mined is added to the target basic synonym set.

2. The method according to claim 1, characterized in that The step of calculating the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculating the edit distance between the basic synonyms in the basic synonym set, includes: Calculating a first minimum number of editing operations corresponding to converting the word to be mined into the basic synonym, and using the first minimum number of editing operations as the editing distance between the word to be mined and the basic synonym; A second minimum number of editing operations corresponding to converting a first basic synonym in the candidate basic synonym set to a second basic synonym in the candidate basic synonym set is calculated, and the second minimum number of editing operations is used as the editing distance between basic synonyms in the basic synonym set.

3. The method according to claim 1, characterized in that The word to be mined and the basic synonyms are respectively vectorized to obtain respective word vector features, including: The words to be mined and the basic synonyms are respectively input into the vectorization model for vectorization to obtain word vector features of equal dimensions.

4. The method according to claim 1, characterized in that: Extracting the knowledge representations of the words to be mined and the basic synonyms respectively to obtain knowledge features of each word; including: Inputting the words to be mined and the basic synonyms into an entity transfer model to extract semantic information and obtain semantic features of each word, wherein the entity transfer model is a transfer model established based on entity triples in an established entity knowledge graph; The semantic features of each word are input into the ontology transfer model for knowledge enhancement to obtain the knowledge features of each word containing ontology knowledge information. The ontology transfer model is a transfer model established based on the ontology triples in the established ontology knowledge graph.

5. The method according to claim 4, characterized in that The training of the entity transfer model includes the following steps: Obtain correct entity triples and incorrect entity triples from the established entity knowledge graph; Inputting the correct entity triples and the incorrect entity triples into an initial entity transfer model to obtain an initial correct entity triple vector and an initial incorrect entity triple vector; Performing distance calculation based on the initial correct entity triplet vector to obtain an initial correct entity distance, and performing distance calculation based on the initial incorrect entity triplet vector to obtain an initial incorrect entity distance; Calculate a distance error based on the initial correct entity distance and the initial incorrect entity distance, and update the initial entity transfer model based on the distance error to obtain an updated entity transfer model; The updated entity transfer model is used as the initial entity transfer model, and the step of obtaining correct entity triples and incorrect entity triples is returned to iterative execution until a preset entity training completion condition is met, thereby obtaining the entity transfer model.

6. The method according to claim 4, characterized in that The training of the ontology transfer model includes the following steps: Obtain category information, relationship information, correct ontology triples and incorrect ontology triples from the established ontology knowledge graph; Inputting the category information, relationship information, correct ontology triples and incorrect ontology triples into an initial ontology transfer model, the initial ontology transfer model inputs the category information and the relationship information into an initial ontology network, the initial ontology network determines an initial ontology range parameter corresponding to the category information based on the category information and the relationship information, inputs the initial ontology range parameter and the correct ontology triples and incorrect ontology triples into an initial ontology fusion network, and the initial ontology fusion network outputs an initial correct ontology triple vector and an initial incorrect ontology triple vector; Performing loss calculation based on the initial correct ontology triplet vector and the corresponding initial ontology range parameter to obtain an initial correct ontology error, and performing loss calculation based on the initial incorrect ontology triplet vector and the corresponding initial ontology parameter to obtain an initial incorrect ontology error; Calculate target loss information based on the initial correct ontology error and the initial incorrect ontology error, and update the initial ontology transfer model based on the target loss information to obtain an updated ontology transfer model; The updated ontology transfer model is used as the initial ontology transfer model, and the step of obtaining category information, relationship information, correct ontology triples and incorrect ontology triples from the established ontology knowledge graph is returned and iteratively executed until the preset ontology training completion condition is reached, thereby obtaining the ontology transfer model.

7. The method according to claim 1, characterized in that The step of fusing the word distance feature, word vector feature and word knowledge feature corresponding to the word to be mined to obtain the word target feature corresponding to the word to be mined, and fusing the word distance feature, word vector feature and word knowledge feature corresponding to the basic synonym to obtain the word target feature corresponding to the basic synonym, includes: The word distance feature, word vector feature and word knowledge feature corresponding to the word to be mined are concatenated to obtain the word target feature corresponding to the word to be mined; The word distance features, word vector features and word knowledge features corresponding to the basic synonyms are concatenated to obtain the word target features corresponding to the basic synonyms.

8. The method according to claim 1, characterized in that The calculating the synonymy degree between the word to be mined and the candidate basic synonym set based on the word target feature corresponding to the word to be mined and the word target feature corresponding to the basic synonym, comprises: Performing average feature similarity calculation based on the word target features corresponding to the basic synonyms to obtain the similarity corresponding to the candidate basic synonym set; Based on the word target features corresponding to the to-be-mined words and the word target features corresponding to the basic synonyms, average feature similarity calculation is performed to obtain the similarity corresponding to the to-be-mined words; The difference between the similarity corresponding to the candidate basic synonym set and the similarity corresponding to the word to be mined is calculated, and the degree of synonymy between the word to be mined and the candidate basic synonym set is determined based on the difference.

9. The method according to claim 8, characterized in that The calculating of average feature similarity based on the word target features corresponding to the basic synonyms to obtain the similarity corresponding to the candidate basic synonym set includes: Calculating the synonym cosine similarity between the word target features corresponding to the basic synonyms; And the average value of the cosine similarities of the synonyms is calculated to obtain the similarity corresponding to the candidate basic synonym set.

10. The method according to claim 9, characterized in that The calculating of average feature similarity based on the word target feature corresponding to the word to be mined and the word target feature corresponding to the basic synonym to obtain the similarity corresponding to the word to be mined includes: Calculate the cosine similarity of the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms; And the average value of the cosine similarity of the word to be mined and the cosine similarity of the synonym is calculated to obtain the similarity corresponding to the word to be mined.

11. The method according to claim 1, characterized in that: The calculating the synonymy degree between the word to be mined and the candidate basic synonym set based on the word target feature corresponding to the word to be mined and the word target feature corresponding to the basic synonym, comprises: Inputting the word target features corresponding to the to-be-mined words and the word target features corresponding to the basic synonyms into a synonymy degree recognition model; The synonymy degree recognition model calculates average feature similarity based on the word target features corresponding to the basic synonyms through a fully connected network to obtain the similarity corresponding to the candidate basic synonym set, and calculates average feature similarity based on the word target features corresponding to the to-be-mined words and the word target features corresponding to the basic synonyms to obtain the similarity corresponding to the to-be-mined words, calculates the difference between the similarity corresponding to the candidate basic synonym set and the similarity corresponding to the to-be-mined words, and nonlinearly maps the difference through a nonlinear mapping network to obtain the synonymy degree between the to-be-mined words and the candidate basic synonym set.

12. The method according to claim 11, characterized in that The training of the synonymy recognition model includes the following steps: Acquire each training synonym set, and determine a target training synonym set and a label word based on each training synonym set; Calculating the edit distance between the label word and the training synonyms in the target training synonym set, and calculating the edit distance between the training synonyms in the target training synonym set, to obtain distance features of each training word; Vectorizing the label words and the training synonyms respectively to obtain vector features of each training word, and extracting knowledge representations of the label words and the training synonyms respectively to obtain knowledge features of each training word; The training word distance feature, training word vector feature and training word knowledge feature corresponding to the label word are integrated to obtain the training word target feature corresponding to the label word, and the training word distance feature, training word vector feature and training word knowledge feature corresponding to the training synonym are integrated to obtain the training word target feature corresponding to the training synonym; Inputting the training word target features corresponding to the label word and the training word target features corresponding to the training synonyms into an initial synonymy degree recognition model to obtain the output initial synonymy degree of the label word and the target training synonym set; The initial synonymy degree recognition model is updated based on the initial synonymy degree and the training label corresponding to the label word, and the step of determining the target training synonym set and label word based on the various training synonym sets is returned to iterative execution until the preset training completion condition is met, thereby obtaining the synonymy degree recognition model.

13. The method according to claim 12, characterized in that After obtaining the synonymy recognition model, the method further includes: The target basic synonym set is obtained, and the target basic synonym set is used as a training synonym set. The step of obtaining each training synonym set is returned to be iteratively executed again until a preset target training condition is reached, thereby obtaining a target synonym degree recognition model.

14. The method according to claim 1, characterized in that The step of determining a target basic synonym set based on the degree of synonymy between the word to be mined and the candidate basic synonym set, and adding the word to be mined to the target basic synonym set includes: When the degree of synonymy between the word to be mined and the candidate basic synonym set exceeds a preset synonym degree threshold, the candidate basic synonym set is used as a target basic synonym set, and the word to be mined is added to the target basic synonym set.

15. The method according to claim 1, characterized in that The step of determining a target basic synonym set based on the degree of synonymy between the word to be mined and the candidate basic synonym set, and adding the word to be mined to the target basic synonym set includes: When the synonymy degree between the word to be mined and the candidate basic synonym set does not exceed a preset synonymy degree threshold, the word to be mined is used as the target basic synonym set.

16. A question-answering method, characterized in that: The method comprises: Get the query statement; extracting non-standard query words from the query sentence; Obtain each synonym set, wherein the synonym set is obtained by obtaining a word to be mined and a candidate basic synonym set; calculating the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculating the edit distance between the basic synonyms in the basic synonym set to obtain each word distance feature; vectorizing the word to be mined and the basic synonyms respectively to obtain each word vector feature, extracting the knowledge representation of the word to be mined and the basic synonyms respectively, and obtaining each word knowledge feature; comparing the word distance feature, word vector feature and The word knowledge features are integrated to obtain the word target features corresponding to the word to be mined, and the word distance features, word vector features and word knowledge features corresponding to the basic synonyms are integrated to obtain the word target features corresponding to the basic synonyms; the synonymy degree between the word to be mined and the candidate basic synonym set is calculated based on the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms; the target basic synonym set is determined based on the synonymy degree between the word to be mined and the candidate basic synonym set, and the word to be mined is added to the target basic synonym set; Searching the target synonym set corresponding to the non-standard query term in each synonym set; Acquire the standard synonym corresponding to the non-standard query word from the target synonym set; Based on the standard synonyms, corresponding reply words are queried from the established knowledge graph, and a reply is made based on the reply words.

17. The method according to claim 16, characterized in that The method further comprises: The target synonyms in the target synonym set are added to the established knowledge graph to obtain a target knowledge graph.

18. The method according to claim 16, characterized in that The inquiry statement includes a medical symptom inquiry statement; The extracting the knowledge representations of the words to be mined and the basic synonyms respectively to obtain knowledge features of each word includes: The medical symptom words to be mined and the basic medical symptom synonyms are respectively input into the medical symptom entity transfer model to extract semantic information, and the semantic features of each medical symptom word are obtained. The medical symptom entity transfer model is a transfer model established based on the medical symptom entity triples in the established medical symptom entity knowledge graph; The semantic features of each medical symptom word are input into the medical symptom ontology transfer model for knowledge enhancement to obtain the knowledge features of each medical symptom word containing medical symptom ontology knowledge information. The medical symptom ontology transfer model is a transfer model established based on the medical symptom ontology triples in the established medical symptom ontology knowledge graph.

19. A synonym mining device, characterized in that: The device comprises: An acquisition module is used to obtain the words to be mined and the candidate basic synonym sets; A distance calculation module, used to calculate the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculate the edit distance between the basic synonyms in the basic synonym set to obtain the distance features of each word; A feature extraction module is used to vectorize the words to be mined and the basic synonyms to obtain vector features of each word, and to extract knowledge representations of the words to be mined and the basic synonyms to obtain knowledge features of each word; A target feature acquisition module is used to fuse the word distance feature, word vector feature and word knowledge feature corresponding to the word to be mined to obtain the word target feature corresponding to the word to be mined, and fuse the word distance feature, word vector feature and word knowledge feature corresponding to the basic synonym to obtain the word target feature corresponding to the basic synonym; A synonym calculation module, used for calculating the synonymy degree between the word to be mined and the candidate basic synonym set based on the word target feature corresponding to the word to be mined and the word target feature corresponding to the basic synonym; The target set obtaining module is used to determine the target basic synonym set based on the synonymy degree between the word to be mined and the candidate basic synonym set, and add the word to be mined to the target basic synonym set.

20. The device according to claim 19, characterized in that The distance calculation module is also used to calculate the first minimum number of editing operations corresponding to converting the word to be mined into the basic synonym, and use the first minimum number of editing operations as the editing distance between the word to be mined and the basic synonym; calculate the second minimum number of editing operations corresponding to converting the first basic synonym in the candidate basic synonym set into the second basic synonym in the candidate basic synonym set, and use the second minimum number of editing operations as the editing distance between the basic synonyms in the basic synonym set.

21. The device according to claim 19, characterized in that The feature extraction module is also used to input the words to be mined and the basic synonyms into the vectorization model for vectorization, so as to obtain the word vector features of equal dimensions.

22. The device according to claim 19, characterized in that The feature extraction module is also used to input the words to be mined and the basic synonyms into the entity transfer model for semantic information extraction to obtain the semantic features of each word, and the entity transfer model is a transfer model established based on the entity triples in the established entity knowledge graph; input the semantic features of each word into the ontology transfer model for knowledge enhancement to obtain the knowledge features of each word containing ontology knowledge information, and the ontology transfer model is a transfer model established based on the ontology triples in the established ontology knowledge graph.

23. The device according to claim 22, characterized in that The device further comprises: An entity model training module is used to obtain correct entity triples and incorrect entity triples from an established entity knowledge graph; input the correct entity triples and the incorrect entity triples into an initial entity transfer model to obtain an initial correct entity triple vector and an initial incorrect entity triple vector; perform distance calculation based on the initial correct entity triple vector to obtain an initial correct entity distance, and perform distance calculation based on the initial incorrect entity triple to obtain an initial incorrect entity distance; calculate a distance error based on the initial correct entity distance and the initial incorrect entity distance, and update the initial entity transfer model based on the distance error to obtain an updated entity transfer model; use the updated entity transfer model as the initial entity transfer model, and return to the step of obtaining correct entity triples and incorrect entity triples for iterative execution until a preset entity training completion condition is met to obtain the entity transfer model.

24. The device according to claim 22, characterized in that The device further comprises: The ontology model training module is used to obtain category information, relationship information, correct ontology triples and incorrect ontology triples from the established ontology knowledge graph; the category information, relationship information, correct ontology triples and incorrect ontology triples are input into the initial ontology transfer model; the initial ontology transfer model inputs the category information and the relationship information into the initial ontology network; the initial ontology network determines the initial ontology range parameters corresponding to the category information based on the category information and the relationship information; the initial ontology range parameters and the correct ontology triples and incorrect ontology triples are input into the initial ontology fusion network; the initial ontology fusion network outputs the initial correct ontology triple vector and the initial incorrect ontology triple vector; based on the The initial correct ontology triplet vector and the corresponding initial ontology range parameters are used for loss calculation to obtain the initial correct ontology error, and the loss calculation is performed based on the initial incorrect ontology triplet vector and the corresponding initial ontology parameters to obtain the initial incorrect ontology error; the target loss information is calculated based on the initial correct ontology error and the initial incorrect ontology error, and the initial ontology transfer model is updated based on the target loss information to obtain an updated ontology transfer model; the updated ontology transfer model is used as the initial ontology transfer model, and the step of obtaining category information, relationship information, correct ontology triples and incorrect ontology triples from the established ontology knowledge graph is returned and iteratively executed until the preset ontology training completion condition is reached to obtain the ontology transfer model.

25. The device according to claim 19, characterized in that The target feature obtaining module is also used to concatenate the word distance feature, word vector feature and word knowledge feature corresponding to the word to be mined, so as to obtain the word target feature corresponding to the word to be mined; The word distance features, word vector features and word knowledge features corresponding to the basic synonyms are concatenated to obtain the word target features corresponding to the basic synonyms.

26. The device according to claim 19, characterized in that The synonym calculation module is also used to perform average feature similarity calculation based on the word target features corresponding to the basic synonyms to obtain the similarity corresponding to the candidate basic synonym set; perform average feature similarity calculation based on the word target features corresponding to the to-be-mined words and the word target features corresponding to the basic synonyms to obtain the similarity corresponding to the to-be-mined words; The difference between the similarity corresponding to the candidate basic synonym set and the similarity corresponding to the word to be mined is calculated, and the degree of synonymy between the word to be mined and the candidate basic synonym set is determined based on the difference.

27. The device according to claim 26, characterized in that The synonym calculation module is also used to calculate the synonym cosine similarities between the word target features corresponding to the basic synonyms; and calculate the average value of the synonym cosine similarities to obtain the similarity corresponding to the candidate basic synonym set.

28. The device according to claim 27, characterized in that The synonym calculation module is also used to calculate the cosine similarity of the word to be mined between the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms; and calculate the average value of the cosine similarity of the word to be mined and the cosine similarity of the synonyms to obtain the similarity corresponding to the word to be mined.

29. The device according to claim 19, characterized in that The synonym calculation module is also used to input the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms into the synonymy degree recognition model; the synonymy degree recognition model performs average feature similarity calculation based on the word target features corresponding to the basic synonyms through a fully connected network to obtain the similarity corresponding to the candidate basic synonym set, and performs average feature similarity calculation based on the word target features corresponding to the word to be mined and the word target features corresponding to the basic synonyms to obtain the similarity corresponding to the word to be mined, calculates the difference between the similarity corresponding to the candidate basic synonym set and the similarity corresponding to the word to be mined, and non-linearly maps the difference through a non-linear mapping network to obtain the synonymy degree between the word to be mined and the candidate basic synonym set.

30. The device according to claim 29, characterized in that The device further comprises: The synonym model training module is used to obtain each training synonym set, determine the target training synonym set and label word based on each training synonym set; calculate the edit distance between the label word and the training synonyms in the target training synonym set, and calculate the edit distance between the training synonyms in the target training synonym set to obtain each training word distance feature; vectorize the label word and the training synonym respectively to obtain each training word vector feature, extract the knowledge representation of the label word and the training synonym respectively, and obtain each training word knowledge feature; fuse the training word distance feature, training word vector feature and training word knowledge feature corresponding to the label word to obtain the training word target corresponding to the label word Features, the training word distance features, training word vector features and training word knowledge features corresponding to the training synonyms are integrated to obtain the training word target features corresponding to the training synonyms; the training word target features corresponding to the label words and the training word target features corresponding to the training synonyms are input into the initial synonymy degree recognition model to obtain the output initial synonymy degree of the label words and the target training synonym set; the initial synonymy degree recognition model is updated based on the initial synonymy degree and the training labels corresponding to the label words, and the step of determining the target training synonym set and the label word based on the respective training synonym sets is returned to iterative execution until the preset training completion condition is reached to obtain the synonymy degree recognition model.

31. The device according to claim 30, characterized in that The device further comprises: The iterative training module is used to obtain the target basic synonym set, use the target basic synonym set as a training synonym set, and return to the step of obtaining each training synonym set to iterate again until the preset target training condition is reached to obtain a target synonym degree recognition model.

32. The device according to claim 19, characterized in that The target set obtaining module is also used to use the candidate basic synonym set as the target basic synonym set and add the word to be mined to the target basic synonym set when the synonymy degree between the word to be mined and the candidate basic synonym set exceeds a preset synonymy degree threshold.

33. The device according to claim 19, characterized in that The target set obtaining module is further configured to use the word to be mined as the target basic synonym set when the synonymy degree between the word to be mined and the candidate basic synonym set does not exceed a preset synonymy degree threshold.

34. A question-answering device, characterized in that: The device comprises: A statement acquisition module, used for acquiring query statements; A word extraction module, used to extract non-standard query words from the query sentence; The word set acquisition module is used to acquire each synonym set, wherein the synonym set is obtained by acquiring the word to be mined and the candidate basic synonym set; calculating the edit distance between the word to be mined and the basic synonyms in the candidate basic synonym set, and calculating the edit distance between the basic synonyms in the basic synonym set to obtain each word distance feature; vectorizing the word to be mined and the basic synonyms respectively to obtain each word vector feature, extracting the knowledge representation of the word to be mined and the basic synonyms respectively, and obtaining each word knowledge feature; and vectorizing the word distance feature and the word vector feature corresponding to the word to be mined. The word target feature corresponding to the word to be mined is obtained by fusing the word distance feature, the word vector feature and the word knowledge feature corresponding to the basic synonym, and the word target feature corresponding to the basic synonym is obtained by fusing; the synonymy degree between the word to be mined and the candidate basic synonym set is calculated based on the word target feature corresponding to the word to be mined and the word target feature corresponding to the basic synonym; the target basic synonym set is determined based on the synonymy degree between the word to be mined and the candidate basic synonym set, and the word to be mined is added to the target basic synonym set; A query module, used for querying the target synonym set corresponding to the non-standard query word in each synonym set; A standard word acquisition module, used for acquiring a standard synonym corresponding to the non-standard query word from the target synonym set; The reply module is used to query the corresponding reply words from the established knowledge graph based on the standard synonyms, and reply based on the reply words.

35. The device according to claim 34, characterized in that The device further comprises: The target graph obtaining module is used to add the target synonyms in the target synonym set to the established knowledge graph to obtain the target knowledge graph.

36. The device according to claim 34, characterized in that The inquiry statement includes a medical symptom inquiry statement; The word set acquisition module is also used to input the medical symptom words to be mined and the basic medical symptom synonyms into the medical symptom entity transfer model for semantic information extraction, and obtain the semantic features of each medical symptom word. The medical symptom entity transfer model is a transfer model established based on the medical symptom entity triples in the established medical symptom entity knowledge graph; input the semantic features of each medical symptom word into the medical symptom ontology transfer model for knowledge enhancement, and obtain the knowledge features of each medical symptom word containing medical symptom ontology knowledge information. The medical symptom ontology transfer model is a transfer model established based on the medical symptom ontology triples in the established medical symptom ontology knowledge graph.

37. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 18 are implemented.

38. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 18 are implemented.

39. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 18 are implemented.