Multi-model fusion text matching method, device, equipment and storage medium
Through the multi-model fusion method, combined with knowledge graphs and medical text rules, the shortcomings of traditional text matching models in semantic understanding are solved, and efficient and accurate text matching is achieved, which is suitable for text matching tasks in the field of intelligent decision-making.
Patent Information
- Application Number
- CN202010045333.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-01-16
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2040-01-16
AI Technical Summary
Traditional text matching models cannot effectively handle the semantic relevance of words, and deep learning models are complex to train and rely on a large number of labeled samples, resulting in low matching efficiency and insufficient accuracy.
A multi-model fusion method is adopted, including a bidirectional gated recurrent unit model, a conditional random field, and a convolutional deep semantic structure model, combined with knowledge graphs and medical text rules, to perform initial text matching screening, entity extraction, and similarity calculation, and use label category classifiers and attention mechanisms to improve matching accuracy.
It improves the accuracy and efficiency of text matching, reduces the probability of missing standard words, and enhances the interpretability and intelligence of the matching process. It is suitable for text matching tasks in the field of intelligent decision-making.
Smart Images

Figure CN111259144B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent decision-making, and in particular to a multi-model fusion text matching method, device, equipment and storage medium. Background Art
[0002] The traditional process requires a large number of professionals to perform matching based on actual conditions, matching the data to be matched with names in a national standard library. This approach is labor-intensive, highly inefficient, and prone to errors. With the development of internet technology, a range of text matching solutions have emerged, based on string and bag-of-words models, or leveraging machine learning and deep learning. Essentially, these solutions rely on text similarity calculations. In the field of text matching, traditional text matching retrieval models, such as BM25, are exact matching models based on the bag-of-words model. However, these models have certain limitations, including their inability to handle the semantic relevance of words. They cannot recognize highly semantically consistent words like "headache" and "headache," nor can they understand sentences with similar words but different meanings. Recently, the emerging trend of end-to-end text matching models using deep learning has significantly addressed the issue of semantic understanding, leading to the emergence of a large number of modeling methods that directly perform deep text matching on samples, such as the deep semantic structured model (DSSM) and the convolutional deep semantic structured model (CDSSM) based on word sequences. Compared with traditional text retrieval and matching models, this deep text matching model alleviates the problem of semantic understanding, but it still has weaknesses. In order to achieve better performance, this end-to-end model often uses a very complex neural network model, which is very difficult to train and requires a large number of labeled samples. Summary of the Invention
[0003] The present invention provides a text matching method by configuring multiple models to fuse text matching, which can improve the accuracy of text matching.
[0004] In a first aspect, the present invention provides a multi-model fusion text matching method, comprising:
[0005] Get the data to be processed;
[0006] Preliminarily screening the data to be processed by a first neural network model to obtain candidate standard words, wherein the first neural model is a neural network with a series structure of a bidirectional gated recurrent unit model, an attention model, and a softmax layer;
[0007] Preliminarily screening the candidate standard word entities through a second neural network model to obtain a labeled entity, wherein the second neural network model is a conditional random field;
[0008] Inputting the labeled entity into a third neural network model to obtain multiple similarities, wherein the third neural network model is a convolutional deep semantic structure model;
[0009] Obtaining multiple similarity weights, and multiplying the similarities by corresponding similarity weights to obtain multiple labeled entity scores;
[0010] The annotation entities corresponding to the annotation scores are sorted from large to small according to the numerical values to form corresponding standard terms.
[0011] In some possible designs, the data to be processed is preliminarily screened by the first neural network model to obtain candidate standard words, including:
[0012] Inputting the data to be processed into the bidirectional gated recurrent unit model, converting the data to be processed into a vector matrix through the bidirectional gated recurrent unit model to obtain a feature vector;
[0013] Inputting the feature vector into the attention model, performing weighted summation on the feature vector using weights to obtain multiple text labels and probabilities of corresponding text labels;
[0014] The multiple text labels and the probabilities of the corresponding text labels are classified through a softmax layer to obtain the candidate standard words.
[0015] In some possible designs, the candidate standard word entities are preliminarily screened by a second neural network model to obtain labeled entities. The second neural network model is a conditional random field, including:
[0016] Acquire annotated corpus data, wherein the annotated corpus data includes at least words, parts of speech, and positions of characters in the words;
[0017] Iterating the medical corpus data through the second neural network model to obtain a trained conditional random field model;
[0018] Obtaining the word, part of speech, and position of the character in the candidate standard word to obtain the word features of the candidate standard word;
[0019] The word features are input into the trained conditional random field model, and sequence annotations are generated by the trained conditional random field model to obtain annotated entities.
[0020] In some possible designs, the labeled entity is input into a third neural network model to obtain multiple similarities, and the third neural network model is a convolutional deep semantic structure model, including:
[0021] Inputting the labeled entity into the third neural network model, wherein the third neural network model is a convolutional deep semantic structure model;
[0022] Performing a convolution operation on the labeled entity by linking convolutional layers to obtain multiple similarities;
[0023] The multiple similarities are linked to a pooling layer, and the maximum value of the multiple similarities is output through a window.
[0024] In some possible designs, before obtaining the data to be processed, the method further includes:
[0025] Get multiple training data;
[0026] Inputting the training data into the first neural network model, and updating the neuron weights of the first neural network model using a neural network training algorithm and the training data to obtain a target model;
[0027] The weights of the neurons of the target model are adjusted, and the first neural network model is updated.
[0028] In some possible designs, after preliminarily screening the data to be processed through the first neural network model to obtain candidate standard words, and before preliminarily screening the candidate standard word entities through the second neural network model to obtain labeled entities, the method further includes:
[0029] After the first neural network model obtains the candidate standard word, it returns a 32-bit binary number;
[0030] If the i-th bit is 1, it is determined that the neural network of the i+1-th layer is running normally, where i is an integer greater than or equal to 0 and less than 32;
[0031] If the i-th bit is 0, it is determined that there is an abnormality in the operation of the neural network in the i+1-th layer.
[0032] In some possible designs, obtaining a plurality of similarity weights and multiplying the similarities by the corresponding similarity weights to obtain a plurality of annotated entity scores includes:
[0033] pass Calculate the weight, where Fw refers to the weight, N refers to the number of sentences in which the core keyword appears, and M refers to the number of feature vectors;
[0034] The similarity is multiplied by the corresponding similarity weight to obtain multiple annotated entity scores.
[0035] In a second aspect, the present invention provides a multi-model fusion text matching device that implements the method corresponding to the multi-model fusion text matching platform provided in the first aspect. The functions can be implemented via hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above, and the modules can be software and / or hardware.
[0036] The multi-model fusion text matching device includes:
[0037] Input and output modules, used to obtain data to be processed;
[0038] A processing module is used to preliminarily screen the data to be processed through a first neural network model to obtain candidate standard words, where the first neural model is a neural network with a bidirectional gated recurrent unit model, an attention model, and a softmax layer serial structure; preliminarily screen the candidate standard word entities through a second neural network model to obtain labeled entities, where the second neural network model is a conditional random field; input the labeled entities into a third neural network model through the input-output module to obtain multiple similarities, where the third neural network model is a convolutional deep semantic structure model; obtain weights of multiple similarities, multiply the similarities by the corresponding similarity weights, and obtain multiple labeled entity scores; sort the labeled entities corresponding to the labeled scores from large to small according to numerical value to form corresponding standard terms.
[0039] In some possible designs, the processing module is further configured to:
[0040] Inputting the data to be processed into the bidirectional gated recurrent unit model, converting the data to be processed into a vector matrix through the bidirectional gated recurrent unit model to obtain a feature vector;
[0041] Inputting the feature vector into the attention model, performing weighted summation on the feature vector using weights to obtain multiple text labels and probabilities of corresponding text labels;
[0042] The multiple text labels and the probabilities of the corresponding text labels are classified through a softmax layer to obtain the candidate standard words.
[0043] In some possible designs, the processing module is further configured to:
[0044] Acquire annotated corpus data, wherein the annotated corpus data includes at least words, parts of speech, and positions of characters in the words;
[0045] Iterating the medical corpus data through the second neural network model to obtain a trained conditional random field model;
[0046] Obtaining the word, part of speech, and position of the character in the candidate standard word to obtain the word features of the candidate standard word;
[0047] The word features are input into the trained conditional random field model, and sequence annotations are generated by the trained conditional random field model to obtain annotated entities.
[0048] In some possible designs, the processing module is further configured to:
[0049] Inputting the labeled entity into the third neural network model, wherein the third neural network model is a convolutional deep semantic structure model;
[0050] Performing a convolution operation on the labeled entity by linking convolutional layers to obtain multiple similarities;
[0051] The multiple similarities are linked to a pooling layer, and the maximum value of the multiple similarities is output through a window.
[0052] In some possible designs, the processing module is further configured to:
[0053] Get multiple training data;
[0054] Inputting the training data into the first neural network model, and updating the neuron weights of the first neural network model using a neural network training algorithm and the training data to obtain a target model;
[0055] The weights of the neurons of the target model are adjusted, and the first neural network model is updated.
[0056] In some possible designs, the processing module is further configured to:
[0057] After the first neural network model obtains the candidate standard word, it returns a 32-bit binary number;
[0058] If the i-th bit is 1, it is determined that the neural network of the i+1-th layer is running normally, where i is an integer greater than or equal to 0 and less than 32;
[0059] If the i-th bit is 0, it is determined that there is an abnormality in the operation of the neural network in the i+1-th layer.
[0060] In some possible designs, the processing module is further configured to:
[0061] pass Calculate the weight, where Fw refers to the weight, N refers to the number of sentences in which the core keyword appears, and M refers to the number of feature vectors;
[0062] The similarity is multiplied by the corresponding similarity weight to obtain multiple annotated entity scores.
[0063] Another aspect of the present invention provides a multi-model fusion text matching device, which includes at least one connected processor, memory, and input and output units, wherein the memory is used to store program code, and the processor is used to call the program code in the memory to execute the methods described in the above aspects.
[0064] Yet another aspect of the present invention provides a computer storage medium comprising instructions, which, when executed on a computer, enables the computer to execute the methods described in the above aspects.
[0065] The present invention proposes a complete set of data standardization governance solutions. The present invention is mainly divided into two major modules: Module 1: Preliminary screening module based on knowledge graph; Module 2: Matching module based on deep text similarity. Compared with the existing mechanism, there are mainly three innovations: First, before deep text matching, external knowledge such as knowledge graph is introduced to preliminarily screen standard words, making the matching process more accurate and more explainable. Second, in the process of generating the knowledge graph candidate list, in addition to the common entity extraction and entity linking, a label category classifier is also introduced to find the upper-level label of the target entity in the knowledge graph, and obtain more relevant standard word entities based on the label, reducing the situation where standard words are missed and improving the recall rate. Third, after deep text similarity matching, the medical text similarity rules are used to further correct the similarity matching value in combination with the actual situation of medical business. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 Schematic diagram of the process of the multi-model fusion text matching method in an embodiment of the present invention;
[0067] Figure 2 Schematic diagram of the structure of a multi-model fusion text matching device in an embodiment of the present invention;
[0068] Figure 3 Schematic diagram of the structure of a multi-model fusion text matching device in an embodiment of the present invention.
[0069] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0070] It should be understood that the specific embodiments described herein are intended only to explain the present invention and are not intended to limit the present invention. The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules that are clearly listed, but may include other steps or modules that are not clearly listed or that are inherent to these processes, methods, products or devices. The division of modules that appears in the present invention is merely a logical division. In actual applications, there may be other division methods when implementing, for example, multiple modules can be combined into or integrated into another system, or some features can be ignored or not executed.
[0071] In order to solve the above technical problems, the present invention mainly provides the following technical solutions
[0072] The present invention adopts a multi-model dialogue intent recognition system that combines rule filtering, traditional similarity, and deep semantic matching. It not only solves the low accuracy of traditional literal matching, but also speeds up the efficiency of deep text matching. Through text retrieval and traditional similarity methods, fast matching and return are selected to solve a certain amount of data needs. When the traditional similarity method cannot solve the problem, a combination of deep semantics or text classification is selected. The methods used are all efficient algorithms with millisecond-level returns. Through model fusion, compared with using a single model for intent recognition, the accuracy can be greatly improved and the intelligence of the dialogue system can be enhanced.
[0073] Please refer to Figure 1 The following is an example of a multi-model fusion text matching method provided by the present invention, which includes:
[0074] 101. Get the data to be processed.
[0075] The data to be processed is matched with standard medical data in databases using knowledge graphs and deep learning technologies. Due to discrepancies between the databases stored in various information platforms and the national standard database, numerous inconsistencies in terminology and standard terminology exist. This can lead to reimbursement errors, necessitating standardized data governance to map the data into standard terminology, a process known as coding.
[0076] 102. Preliminary screening of the data to be processed is performed using the first neural network model to obtain candidate standard words.
[0077] The first neural model is a neural network with a bidirectional gated recurrent unit (Bi-GRU) model, an attention model, and a softmax layer serial structure.
[0078] The system consists of a label classification module and a medical entity extraction and linking module. The label classifier obtains the upper-level labels of the input text and uses the knowledge graph to obtain relevant standard word entities as a subset of candidate standard words. Through medical entity extraction and entity linking, it retrieves another subset of relevant candidate standard word entities from the knowledge graph. The label classification module uses the upper-level structural label words of the standard words in the knowledge graph as classification labels. The input module converts the input text into a word vector matrix, which is then passed through a convolutional neural network (and its variants) to obtain the long-range semantic features of the text. The attention module then assigns different weights to each word in the text, ultimately outputting the text label and the probability of each label.
[0079] 103. The candidate standard word entities are preliminarily screened through the second neural network model to obtain the labeled entities.
[0080] The second neural network model is a conditional random field algorithm (CRF).
[0081] Another part of the initial screening process using knowledge graphs is the extraction of medical entities. There are many methods for entity extraction, including traditional rule-based methods and statistical methods. This paper uses conditional random fields and a first-order predicate model to identify entity abbreviations. First, the text is segmented, and then a first-order conditional random field model is built to sequence the segmentation results and generate abbreviations.
[0082] 104. Input the labeled entity into the third neural network model to obtain multiple similarities.
[0083] The third neural network model is a convolutional deep semantic structure model.
[0084] Traditional similarity calculations cannot take into account semantic information, such as BM25. The present invention uses a deep learning matching model to calculate the similarity between the input text and the candidate standard words. Then, a method for correcting the model similarity using medical rules is proposed. In the similarity calculation part, it is mainly divided into two steps. First, it is based on the deep text matching model, and then adjusted according to the actual business situation. The deep text matching model can automatically extract the relationship between words from a large number of samples, identify the semantic meaning of the text, and can describe the text matching problem more finely. This module calculates the text similarity between the input text and the candidate standard words through the model.
[0085] 105. Obtain multiple similarity weights, multiply the similarity by the corresponding similarity weight, and obtain multiple labeled entity scores.
[0086] The deep learning text similarity matching score of the candidate words is obtained, and the present invention proposes to further adjust the similarity score according to the business logic. Taking into account certain words, such as body parts, etc., the meaning accounts for a large proportion in actual business. The model cannot distinguish the business importance of different substrings very well. For example, two similar-looking strings of different body parts have completely different actual meanings. The present invention creatively proposes a medical text rule. If the input text and the candidate text contain body part keywords at the same time, and the score is greater than the threshold, a post-processing operation is performed: according to whether the input text and the candidate text contain the same body part keywords, the similarity score is multiplied by different coefficients to make the text similarity scores of different body parts as low as possible.
[0087] 106. Sort the labeled entities corresponding to the scores from large to small according to their numerical values to form corresponding standard terms.
[0088] The present invention proposes a complete set of data standardization governance solutions. The present invention is mainly divided into two major modules: Module 1: Preliminary screening module based on knowledge graph; Module 2: Matching module based on deep text similarity. Compared with the existing mechanism, there are mainly three innovations: First, before deep text matching, external knowledge such as knowledge graph is introduced to preliminarily screen standard words, making the matching process more accurate and more explainable. Second, in the process of generating the knowledge graph candidate list, in addition to the common entity extraction and entity linking, a label category classifier is also introduced to find the upper-level label of the target entity in the knowledge graph, and obtain more relevant standard word entities based on the label, reducing the situation where standard words are missed and improving the recall rate. Third, after deep text similarity matching, the medical text similarity rules are used to further correct the similarity matching value in combination with the actual situation of medical business.
[0089] In some implementations, the data to be processed is preliminarily screened by a first neural network model to obtain candidate standard words, including:
[0090] Inputting the data to be processed into the bidirectional gated recurrent unit model, converting the data to be processed into a vector matrix through the bidirectional gated recurrent unit model to obtain a feature vector;
[0091] The feature vector is input into the attention model, and the feature vector is weighted and summed by the weights to obtain multiple text labels and the probabilities of the corresponding text labels;
[0092] Multiple text labels and the probabilities of corresponding text labels are classified through the softmax layer to obtain candidate standard words.
[0093] In the above implementation, the Bi-GRU model is used in the label classification step to represent the input text as a vector. In medical text, each word has a different weight. For example, in the sentence "right / shoulder / elderly / sex / osteoporosis / accompanied / pathological / fracture," text classification clearly relies more on words like "osteoporosis" and "fracture," while words like "accompanied" are largely irrelevant. Therefore, an Attention mechanism is used to calculate the weight of each feature word and then perform a weighted average. This gives greater attention to keywords. Adding Attention allows for a clearer understanding of the importance of each word to the classification category.
[0094] In some implementations, the second neural network model is used to preliminarily screen candidate standard word entities to obtain labeled entities, including:
[0095] Obtaining annotated corpus data, where the annotated corpus data includes at least words, parts of speech, and positions of characters in the words;
[0096] The medical corpus data is iterated through the second neural network model to obtain a trained conditional random field model;
[0097] Obtain the word, part of speech and position of the character in the candidate standard word to obtain the word features of the candidate standard word;
[0098] The word features are input into the trained conditional random field model, and the sequence annotations are generated by the trained conditional random field model to obtain the labeled entities.
[0099] In the above implementation, when building the CRF named entity recognition model, annotated medical corpus data is first prepared. The training corpus is read in, and for each word, medical entity-related word features are extracted, including the word, part of speech, and position of the character within the word. Finally, CRF++ is used to iterate the input training corpus to generate a CRF model. After model training is complete, new input text is first segmented to obtain word features. The newly trained model is then used to identify and extract medical-related entities.
[0100] In some implementations, the labeled entities are input into a third neural network model to obtain multiple similarities, including:
[0101] Inputting the labeled entities into a third neural network model, which is a convolutional deep semantic structure model;
[0102] Perform convolution operations on the labeled entities by linking convolutional layers to obtain multiple similarities;
[0103] Link multiple similarities to the pooling layer and output the maximum value of multiple similarities through the window.
[0104] In the above implementation, the CDSSM model is used. This model solves the problem that traditional fully connected neural networks have too many parameters and ignore word order relationships. At the same time, for such matching problems with strong local information, the learned local matching information can be better applied to the global level. The model structure first represents the input text and standard words as word vectors. Then, the convolution layer is connected to perform a convolution operation on each word vector to obtain a vector representation of the phrase. After that, the pooling layer is connected to take the maximum value of the fixed position of the vector output by all windows, which is the pooling operation.
[0105] In some implementations, before obtaining the data to be processed, the method further includes:
[0106] Get multiple training data;
[0107] Inputting the training data into the first neural network model, and updating the neuron weights of the first neural network model through the neural network training algorithm and the training data to obtain the target model;
[0108] The weights of the neurons of the target model are adjusted, and the first neural network model is updated.
[0109] In the above embodiment, the first neural network model is trained by the above method so that it has corresponding functions.
[0110] In some embodiments, after preliminarily screening the data to be processed using the first neural network model to obtain candidate standard words, the method further includes:
[0111] After the first neural network model obtains the candidate standard word, it returns a 32-bit binary number;
[0112] If the i-th bit is 1, it is determined that the neural network of the i+1th layer is running normally, and i is an integer greater than or equal to 0 and less than 32;
[0113] If the i-th bit is 0, it is determined that there is an abnormality in the operation of the neural network in the i+1-th layer.
[0114] In the above embodiment, the execution status of each layer of the neural network of the first neural network model is checked through an exception flag. The exception flag refers to a 32-bit binary number used to detect code abnormalities, and each bit of the binary number represents the status of the operation of each layer of the neural network.
[0115] In some implementations, multiple similarity weights are obtained, and the similarities are multiplied by the corresponding similarity weights to obtain multiple labeled entity scores, including:
[0116] pass Calculate the weight, where Fw refers to the weight, N refers to the number of sentences in which the core keyword appears, and M refers to the number of feature vectors;
[0117] Multiply the similarity by the corresponding similarity weight to obtain multiple labeled entity scores.
[0118] In the above embodiment, the weights of the corresponding words are calculated using the above method.
[0119] like Figure 2 The structure diagram of a multi-model fusion text matching device 20 shown in FIG. 2 is applicable to multi-model fusion text matching. The multi-model fusion text matching device in the embodiment of the present invention can achieve the corresponding Figure 1 The steps of the multi-model fusion text matching method executed in the corresponding embodiment. The functions implemented by the multi-model fusion text matching device 20 can be implemented by hardware, or the corresponding software can be implemented by hardware. The hardware or software includes one or more modules corresponding to the above functions, and the modules can be software and / or hardware. The multi-model fusion text matching device may include an input and output module 201 and a processing module 202. The functions of the processing module 202 and the input and output module 201 can be implemented by reference to Figure 1 The operations performed in the corresponding embodiments are not described in detail here. The input-output module 201 can be used to control the input, output and acquisition operations of the input-output module 201 .
[0120] In some implementations, the input-output module 201 may be used to obtain data to be processed;
[0121] The processing module 202 can be used to preliminarily screen the data to be processed through a first neural network model to obtain candidate standard words, where the first neural model is a neural network with a bidirectional gated recurrent unit model, an attention model, and a softmax layer serial structure; preliminarily screen the candidate standard word entities through a second neural network model to obtain labeled entities, where the second neural network model is a conditional random field; input the labeled entities into a third neural network model through the input-output module to obtain multiple similarities, where the third neural network model is a convolutional deep semantic structure model; obtain weights of multiple similarities, multiply the similarities by the corresponding similarity weights, and obtain multiple labeled entity scores; and sort the labeled entities corresponding to the labeled scores from large to small according to numerical values to form corresponding standard terms.
[0122] In some implementations, the processing module 202 is further configured to:
[0123] Inputting the data to be processed into the bidirectional gated recurrent unit model, converting the data to be processed into a vector matrix through the bidirectional gated recurrent unit model to obtain a feature vector;
[0124] Inputting the feature vector into the attention model, performing weighted summation on the feature vector using weights to obtain multiple text labels and probabilities of corresponding text labels;
[0125] The multiple text labels and the probabilities of the corresponding text labels are classified through a softmax layer to obtain the candidate standard words.
[0126] In some implementations, the processing module 202 is further configured to:
[0127] Acquire annotated corpus data, wherein the annotated corpus data includes at least words, parts of speech, and positions of characters in the words;
[0128] Iterating the medical corpus data through the second neural network model to obtain a trained conditional random field model;
[0129] Obtaining the word, part of speech, and position of the character in the candidate standard word to obtain the word features of the candidate standard word;
[0130] The word features are input into the trained conditional random field model, and sequence annotations are generated by the trained conditional random field model to obtain annotated entities.
[0131] In some implementations, the processing module 202 is further configured to:
[0132] Inputting the labeled entity into the third neural network model, wherein the third neural network model is a convolutional deep semantic structure model;
[0133] Performing a convolution operation on the labeled entity by linking convolutional layers to obtain multiple similarities;
[0134] The multiple similarities are linked to a pooling layer, and the maximum value of the multiple similarities is output through a window.
[0135] In some implementations, the processing module 202 is further configured to:
[0136] Get multiple training data;
[0137] Inputting the training data into the first neural network model, and updating the neuron weights of the first neural network model using a neural network training algorithm and the training data to obtain a target model;
[0138] The weights of the neurons of the target model are adjusted, and the first neural network model is updated.
[0139] In some implementations, the processing module 202 is further configured to:
[0140] After the first neural network model obtains the candidate standard word, it returns a 32-bit binary number;
[0141] If the i-th bit is 1, it is determined that the neural network of the i+1-th layer is running normally, where i is an integer greater than or equal to 0 and less than 32;
[0142] If the i-th bit is 0, it is determined that there is an abnormality in the operation of the neural network in the i+1-th layer.
[0143] In some implementations, the processing module 202 is further configured to:
[0144] pass Calculate the weight, where Fw refers to the weight, N refers to the number of sentences in which the core keyword appears, and M refers to the number of feature vectors;
[0145] The similarity is multiplied by the corresponding similarity weight to obtain multiple annotated entity scores.
[0146] The above describes the multi-model fusion text matching device in the embodiment of the present invention from the perspective of modular functional entities. The following introduces a multi-model fusion text matching device from the hardware perspective. Figure 3 As shown, it includes: a processor, a memory, an input and output unit (which can also be a transceiver, Figure 3 (not shown) and a computer program stored in the memory and executable on the processor. For example, the computer program may be Figure 1 The corresponding program of the multi-model fusion text matching method in the corresponding embodiment. For example, when the computer device implements the Figure 2 When the multi-model fusion text matching device 20 shown in FIG. 1 is used, the processor executes the computer program to implement the above Figure 2 The steps of the multi-model fusion text matching method executed by the multi-model fusion text matching device 20 in the corresponding embodiment. Alternatively, the processor implements the above when executing the computer program Figure 2 The functions of each module in the multi-model fusion text matching device 20 of the corresponding embodiment. For example, the computer program can be Figure 1 The program corresponding to the multi-model fusion text matching method in the corresponding embodiment.
[0147] The processor may be a central processing unit (CPU), other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device and connects the various parts of the entire computer device using various interfaces and lines.
[0148] The memory can be used to store the computer programs and / or modules, and the processor implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, video data, etc.). In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0149] The input and output units can also be replaced by receivers and transmitters, which can be the same or different physical entities. When they are the same physical entities, they can be collectively referred to as input and output units. The input and output can be transceivers.
[0150] The memory may be integrated into the processor or may be provided separately from the processor.
[0151] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, or of course by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM) and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0152] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of the present invention, or directly or indirectly used in other related technical fields, all fall within the protection of the present invention.
Claims
1. A multi-model fusion text matching method, characterized in that: The method comprises: Get the data to be processed; The data to be processed is preliminarily screened by a first neural network model to obtain candidate standard words, wherein the first neural network model is a neural network having a series structure of a bidirectional gated recurrent unit model, an attention model, and a softmax layer; the data to be processed is preliminarily screened by the first neural network model to obtain candidate standard words, including: inputting the data to be processed into the bidirectional gated recurrent unit model, converting the data to be processed into a vector matrix by the bidirectional gated recurrent unit model to obtain a feature vector; inputting the feature vector into the attention model, performing weighted summation on the feature vector by weights to obtain multiple text labels and probabilities of corresponding text labels; and classifying the multiple text labels and the probabilities of corresponding text labels by a softmax layer to obtain the candidate standard words; Performing preliminary entity screening on the candidate standard words through a second neural network model to obtain a labeled entity, wherein the second neural network model is a conditional random field; performing preliminary entity screening on the candidate standard words through the second neural network model to obtain the labeled entity, including: obtaining labeled corpus data, wherein the labeled corpus data at least includes words, parts of speech, and positions of characters in words; iterating the labeled corpus data through the second neural network model to obtain a trained conditional random field model; obtaining words, parts of speech, and positions of characters in words of the candidate standard words to obtain word features of the candidate standard words; inputting the word features into the trained conditional random field model, generating sequence annotations through the trained conditional random field model to obtain the labeled entity; Inputting the labeled entity into a third neural network model to obtain multiple similarities, wherein the third neural network model is a convolutional deep semantic structure model; the similarities are obtained by correcting the model similarity through medical rules; Obtaining multiple similarity weights, and multiplying the similarities by corresponding similarity weights to obtain multiple labeled entity scores; The annotated entities are sorted from large to small according to the numerical values of their corresponding annotated entity scores to form corresponding standard terms.
2. The method according to claim 1, characterized in that The labeling entity is input into a third neural network model to obtain multiple similarities, including: Inputting the labeled entity into the third neural network model; Performing a convolution operation on the labeled entity by linking convolution layers to obtain multiple similarities; The multiple similarities are linked to a pooling layer, and the maximum value of the multiple similarities is output through a window.
3. The method according to claim 1, characterized in that Before obtaining the data to be processed, the method further includes: Get multiple training data; Inputting the plurality of training data into the first neural network model, and updating the neuron weights of the first neural network model using a neural network training algorithm and the plurality of training data to obtain a target model; The weights of the neurons of the target model are adjusted, and the first neural network model is updated.
4. The method according to any one of claims 1 to 3, characterized in that After the data to be processed is preliminarily screened by the first neural network model to obtain candidate standard words, and before the candidate standard words are preliminarily screened by the second neural network model to obtain labeled entities, the method further includes: After the first neural network model obtains the candidate standard word, it returns a 32-bit binary number; If the i-th bit is 1, it is determined that the neural network of the i+1-th layer is running normally, where i is an integer greater than or equal to 0 and less than 32; If the i-th bit is 0, it is determined that there is an abnormality in the operation of the neural network in the i+1-th layer.
5. The method according to claim 1, characterized in that The obtaining of the weights of the plurality of similarities and multiplying the similarities by the corresponding weights of the similarities to obtain the plurality of annotated entity scores includes: pass Calculate the weight of the similarity, where Fw refers to the weight of the similarity, N refers to the number of sentences in which the core keyword appears, and M refers to the number of the feature vectors; The similarity is multiplied by the corresponding similarity weight to obtain multiple annotated entity scores.
6. A multi-model fusion text matching device, characterized in that: The device comprises: Input and output modules, used to obtain data to be processed; A processing module is used to perform a preliminary screening of the data to be processed through a first neural network model to obtain candidate standard words, wherein the first neural network model is a neural network with a bidirectional gated recurrent unit model, an attention model and a softmax layer in series; the data to be processed is input into the bidirectional gated recurrent unit model, and the data to be processed is converted into a vector matrix through the bidirectional gated recurrent unit model to obtain a feature vector; the feature vector is input into the attention model, and the feature vector is weighted and summed by weights to obtain multiple text labels and the probabilities of corresponding text labels; the multiple text labels and the probabilities of corresponding text labels are classified through a softmax layer to obtain the candidate standard words; the candidate standard words are preliminarily screened for entities through a second neural network model to obtain labeled entities, and the second neural network model is a conditional random field; annotated corpus data is obtained, and the annotated corpus data At least including words, parts of speech and positions of characters in words; iterating the annotated corpus data through the second neural network model to obtain a trained conditional random field model; obtaining the words, parts of speech and positions of characters in words of the candidate standard words to obtain the word features of the candidate standard words; inputting the word features into the trained conditional random field model, generating sequence annotations through the trained conditional random field model to obtain annotated entities; inputting the annotated entities into the third neural network model through the input and output module to obtain multiple similarities, the third neural network model is a convolutional deep semantic structure model; the similarities are obtained by correcting the model similarity through medical rules; obtaining the weights of multiple similarities, multiplying the similarities by the corresponding similarity weights to obtain multiple annotated entity scores; sorting the annotated entities from large to small according to the numerical values of their corresponding annotated entity scores to form corresponding standard terms.
7. A multi-model fusion text matching device, characterized in that: The multi-model fusion text matching device includes: at least one processor, memory, and input-output unit; The memory is used to store program codes, and the processor is used to call the program codes stored in the memory to execute the method according to any one of claims 1 to 5.
8. A computer storage medium, characterized in that The method comprises instructions which, when executed on a computer, cause the computer to perform the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Network text named entity recognition method based on neural network probability disambiguation
CN107203511A
Text matching method and device, storage medium and computer equipment
CN109740126A
Text entity matching method, system and device based on deep learning
CN110532353A