Text matching method based on interactive neural network and related device
By employing an interactive neural network-based text matching method, semantic features are extracted using the BERT model and a bidirectional LSTM network. By combining cross-interaction and self-attention mechanisms to analyze the relationships between texts, the problem of inaccurate matching results in existing technologies is solved, achieving higher accuracy and reliability in text matching.
Patent Information
- Application Number
- CN202310244455.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-13
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2043-03-13
AI Technical Summary
Existing text matching methods, when using neural networks for training, ignore the semantic correlation and global information between texts, resulting in a lack of accuracy and reliability in the matching results.
The text to be matched is preprocessed using a pre-set BERT model. Semantic feature vectors are extracted using a pre-set bidirectional LSTM network. Cross-attention mechanism is used to analyze the cross-correlation between texts. Global feature analysis is performed using self-attention mechanism. Finally, matching prediction is performed in a pre-set matcher.
It improves the accuracy and reliability of text matching, ensures that semantic feature vectors can accurately express the meaning of the text, capture the similarity between texts, and enhance the reliability of matching prediction results.
Smart Images

Figure CN116227458B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of natural language processing, and particularly relates to a text matching method based on an interactive neural network and a related device. BACKGROUND
[0002] Natural language processing is an important direction in the field of computer science and artificial intelligence. It studies various theories and methods that can realize effective communication between people and computers using daily language (natural language). Natural language processing is the process of analyzing natural language text and obtaining the intent of the text.
[0003] At present, many text matching methods obtain only the digital features of the semantic content of a text in the process of training using a neural network, and directly compare and match the digital features of the semantic content of other texts, ignoring the semantic information correlation between the matching texts, so that the text information processing process lacks the influence of the information between the matching texts. Moreover, the matching process ignores global information, so that the matching result lacks accuracy and reliability. SUMMARY
[0004] The present application provides a text matching method based on an interactive neural network and a related device, which is used to solve the technical problem that the correlation analysis of text information in the prior art is too little, and the influence of global information is easily ignored, resulting in a lack of accuracy and reliability of the matching result.
[0005] Therefore, the first aspect of the present application provides a text matching method based on an interactive neural network, comprising:
[0006] A preset Bert model is used to preprocess two texts to be matched to obtain a first text vector and a second text vector;
[0007] A preset bidirectional LSTM network is used to analyze the features of the first text vector and the second text vector respectively to obtain a corresponding first semantic feature vector and a second semantic feature vector;
[0008] A cross-attention mechanism is used to calculate the cross-correlation relationship between the sub-vectors in the first semantic feature vector and the second semantic feature vector respectively to obtain a first weight distribution vector and a second weight distribution vector;
[0009] A preset self-attention mechanism is used to analyze the global features according to the first semantic feature vector, the second semantic feature vector, the first weight distribution vector and the second weight distribution vector to obtain a first global feature vector and a second global feature vector;
[0010] The first global feature vector and the second global feature vector are input into a preset matcher for matching prediction operation to obtain a matching prediction result.
[0011] Preferably, the cross-attention mechanism-based calculation of the cross-correlation relationship of the sub-vectors in the first and second semantic feature vectors respectively obtains the first and second weight distribution vectors, including:
[0012] The cosine similarity between each sub-vector in the first semantic feature vector and each sub-vector in the second semantic feature vector is calculated based on the cross-attention mechanism, and the first weight distribution vector is obtained;
[0013] The cosine similarity between each sub-vector in the second semantic feature vector and each sub-vector in the first semantic feature vector is calculated based on the cross-attention mechanism, and the second weight distribution vector is obtained.
[0014] Preferably, the global feature analysis based on the first semantic feature vector, the second semantic feature vector, the first weight distribution vector, and the second weight distribution vector through the preset self-attention mechanism obtains the first and second global feature vectors, including:
[0015] The first semantic feature vector and the first weight distribution vector are concatenated to obtain a first global concatenation vector, and at the same time, the second semantic feature vector and the second weight distribution vector are concatenated to obtain a second global concatenation vector;
[0016] The first and second global concatenation vectors are respectively analyzed for global feature analysis through the preset self-attention mechanism to obtain the first and second global feature vectors.
[0017] Preferably, the first and second global feature vectors are input into a preset matcher for matching prediction operation to obtain a matching prediction result, including:
[0018] The first and second global feature vectors are concatenated to obtain a concatenation feature vector;
[0019] The concatenation feature vector is matched for probability prediction through an objective function in the preset matcher to obtain a matching prediction result.
[0020] The second aspect of the present application provides a text matching device based on an interactive neural network, including:
[0021] A vector expression module for pre-processing two texts to be matched using a preset BERT model to obtain a first text vector and a second text vector;
[0022] a semantic analysis module, configured to perform feature analysis on the first text vector and the second text vector respectively by using a preset bidirectional LSTM network, to obtain a first semantic feature vector and a second semantic feature vector;
[0023] a correlation analysis module, configured to calculate cross-correlation relationships of sub-vectors in the first semantic feature vector and the second semantic feature vector respectively based on a cross-attention mechanism, to obtain a first weight distribution vector and a second weight distribution vector;
[0024] a global analysis module, configured to perform global feature analysis on the first semantic feature vector, the second semantic feature vector, the first weight distribution vector and the second weight distribution vector according to a preset self-attention mechanism, to obtain a first global feature vector and a second global feature vector;
[0025] a matching prediction module, configured to input the first global feature vector and the second global feature vector into a preset matcher to perform a matching prediction operation, to obtain a matching prediction result.
[0026] Preferably, the correlation analysis module is specifically configured to:
[0027] calculate cosine similarities between each sub-vector in the first semantic feature vector and each sub-vector in the second semantic feature vector based on the cross-attention mechanism, and obtain the first weight distribution vector;
[0028] calculate cosine similarities between each sub-vector in the second semantic feature vector and each sub-vector in the first semantic feature vector based on the cross-attention mechanism, and obtain the second weight distribution vector.
[0029] Preferably, the global analysis module is specifically configured to:
[0030] concatenate the first semantic feature vector and the first weight distribution vector to obtain a first global concatenation vector, and concatenate the second semantic feature vector and the second weight distribution vector to obtain a second global concatenation vector;
[0031] perform global feature analysis on the first global concatenation vector and the second global concatenation vector respectively by using a preset self-attention mechanism, to obtain the first global feature vector and the second global feature vector.
[0032] Preferably, the matching prediction module is specifically configured to:
[0033] perform vector concatenation operation on the first global feature vector and the second global feature vector to obtain a concatenation feature vector;
[0034] The target function in the preset matcher is used for matching probability prediction on the spliced feature vector, to obtain a matching prediction result.
[0035] The third aspect of the present application provides an interactive neural network-based text matching device, which comprises a processor and a memory;
[0036] The memory is configured to store program code and transmit the program code to the processor.
[0037] The processor is configured to execute the interactive neural network-based text matching method according to the instructions in the program code.
[0038] The fourth aspect of the present application provides a computer readable storage medium for storing program code, which is used to execute the interactive neural network-based text matching method.
[0039] From the above technical solutions, the embodiments of the present application have the following advantages:
[0040] In the present application, an interactive neural network-based text matching method is provided, which comprises: preprocessing two texts to be matched by using a preset Bert model to obtain a first text vector and a second text vector; performing feature analysis on the first text vector and the second text vector by using a preset bidirectional LSTM network to obtain a corresponding first semantic feature vector and a second semantic feature vector; calculating the cross-correlation relationship between the sub-vectors in the first semantic feature vector and the second semantic feature vector based on a cross-attention mechanism to obtain a first weight distribution vector and a second weight distribution vector; performing global feature analysis on the first semantic feature vector, the second semantic feature vector, the first weight distribution vector and the second weight distribution vector by using a preset self-attention mechanism to obtain a first global feature vector and a second global feature vector; and inputting the first global feature vector and the second global feature vector into a preset matcher to perform a matching prediction operation to obtain a matching prediction result.
[0041] The interactive neural network-based text matching method provided by the present application uses a preset bidirectional LSTM network to perform correlation analysis on the context information of the text, so as to ensure that the extracted semantic feature vector can more accurately express the meaning of the text; moreover, the cross-attention mechanism is used to analyze the cross-correlation relationship between the two texts to be matched, so as to capture the similarity between the two texts to be matched, which can improve the accuracy of the matching prediction result; in addition, the self-attention mechanism is used to analyze the global information of the text, which can further ensure the reliability of the matching prediction result. Therefore, the present application can solve the technical problem that the correlation analysis of the text information in the prior art is too little and the global information is easily ignored, resulting in a lack of accuracy and reliability of the matching result. Attached Figure Description
[0042] Figure 1 A flowchart illustrating the text matching method based on an interactive neural network provided in this application embodiment;
[0043] Figure 2 A schematic diagram of the structure of a text matching device based on an interactive neural network provided in an embodiment of this application;
[0044] Figure 3 This is a schematic diagram of the text matching network framework structure provided in the embodiments of this application;
[0045] Figure 4 A flowchart illustrating the text matching method provided in this application embodiment;
[0046] Figure 5 The experimental results curve of the text matching method provided in the embodiments of this application are shown in the figure. Detailed Implementation
[0047] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0048] For easier understanding, please refer to Figure 1 The embodiments of the text matching method based on interactive neural networks provided in this application include:
[0049] Step 101: Use the preset BERT model to preprocess the two texts to be matched to obtain the first text vector and the second text vector.
[0050] The goal of the BERT model is to train on a large-scale unlabeled corpus and obtain a text representation containing rich semantic information. Therefore, this embodiment uses a pre-defined BERT model to encode the two texts to be matched into text vectors, where the first and second text vectors are represented as p. n =[e1,e2,e3,......,e n ] and q m =[e1,e2,e3,……,e m ], p i q i Let e represent the first and second text vectors in the i-th text group. i This represents the vector of the i-th word.
[0051] Step 102, feature analysis is performed on the first text vector and the second text vector respectively by presetting a bidirectional LSTM network to obtain corresponding first semantic feature vectors and second semantic feature vectors.
[0052] The preset bidirectional LSTM network can extract context information in the text, and can improve the accuracy of feature expression. In this embodiment, a bidirectional LSTM network is used to perform semantic feature extraction on the first text vector p n and the second text vector q m , and semantic feature vectors, i.e. first semantic feature vectors H pn =[h p1 ,h p2 ,h p3 ,......,h pn ] and second semantic feature vectors H qm =[h q1 ,h q2 ,h q3 ,……,h qm ] can be obtained. The specific extraction process can be expressed as:
[0053]
[0054]
[0055] wherein h pi is the semantic feature expression of the i-th word in the p-th text vector, h qj is the semantic feature expression of the j-th word in the q-th text vector, and BiLSTM() is the objective function of the preset bidirectional LSTM network.
[0056] Step 103, cross-related relationships of sub-vectors in the first semantic feature vector and the second semantic feature vector are calculated based on a cross-attention mechanism to obtain a first weight distribution vector and a second weight distribution vector.
[0057] Further, step 103 comprises:
[0058] The cosine similarity between each sub-vector in the first semantic feature vector and each sub-vector in the second semantic feature vector is calculated based on the cross-attention mechanism, and a first weight distribution vector is calculated;
[0059] The cosine similarity between each sub-vector in the second semantic feature vector and each sub-vector in the first semantic feature vector is calculated based on the cross-attention mechanism, and a second weight distribution vector is calculated.
[0060] Please refer to Figure 3For example, based on the first semantic feature vector, the cosine similarity calculation process based on the cross-attention mechanism can be described as calculating the first semantic feature vector H pn = [h p1 , h p2 , h p3 , …, h pn ] based on the cosine similarity formula pi The similarity between each subvector in the second semantic feature vector H qm = [h q1 , h q2 , h q3 , …, h qm ] is denoted as any subvector in the second semantic feature vector h qj , then the calculation process can be expressed as:
[0061]
[0062]
[0063] wherein α pij is the cosine similarity between the subvector h pi and the subvector h qj , is the first weight distribution vector corresponding to the subvector h pi , and the cosine similarity calculation process of the second semantic feature vector and the acquisition process of the second weight distribution vector can be obtained in the same way:
[0064]
[0065]
[0066] wherein α qji is the cosine similarity between the subvector h qj and the subvector h pi , is the second weight distribution vector corresponding to the subvector h qj .
[0067] Step 104, performing global feature analysis according to the first semantic feature vector, the second semantic feature vector, the first weight distribution vector and the second weight distribution vector through a preset self-attention mechanism to obtain a first global feature vector and a second global feature vector.
[0068] Further, step 104 comprises:
[0069] The first semantic feature vector is spliced with the first weight distribution vector to obtain a first global splicing vector, and the second semantic feature vector is spliced with the second weight distribution vector to obtain a second global splicing vector.
[0070] The first global splicing vector and the second global splicing vector are analyzed by a preset self-attention mechanism to obtain a first global feature vector and a second global feature vector.
[0071] The first semantic feature vector H pn =[h p1 ,h p2 ,h p3 ,......,h pn ] and the first weight distribution vector are taken as an example, the semantic feature vector is spliced with the weight feature vector to obtain V pi =[H pi ,T i q ], that is, the first global splicing vector, which can express the global feature of the text information, and V pi =[v p1 ,v p2 ......,v pi ......,v pn ], is a splicing subvector. Similarly, the second semantic feature vector and the second weight distribution vector can also obtain a corresponding second global splicing vector V qj =[v q1 ,v q2 ……,v qj ……,v qm ],
[0072] The first global splicing vector is taken as an example, the first global splicing vector is analyzed by a preset self-attention mechanism to obtain a first global feature vector, first, the correlation between the semantic feature information in the vector and the text expression is calculated to obtain a total attention distribution, then the weight size of each word in the text is calculated according to the total attention distribution, and the specific process is as follows:
[0073]
[0074]
[0075] wherein, is the total attention distribution, is the weight expression of the a-th word in the text, and the combination of all weight expressions can obtain the first global feature vector Similarly, the second global feature vector can be obtained by the same calculation method The weight expression of the xth word in the text.
[0076] It should be noted that the process of using the preset self-attention mechanism to analyze the global features of the spliced vector in this embodiment can achieve the purpose of enhancing the matching information, which can further improve the accuracy and reliability of the subsequent prediction results.
[0077] Step 105, input the first global feature vector and the second global feature vector into the preset matcher for matching prediction operation to obtain a matching prediction result.
[0078] Further, step 105 comprises:
[0079] The first global feature vector and the second global feature vector are subjected to vector splicing operation to obtain a spliced feature vector;
[0080] The spliced feature vector is subjected to matching probability prediction by a target function in the preset matcher to obtain a matching prediction result.
[0081] Splicing means splicing the first global feature vector with the second global feature vector to perform calculation in the preset matcher, which is essentially a preset fully connected network layer. The specific matching probability is predicted by a softmax function, and then the matching prediction result is obtained:
[0082]
[0083] The specific operation process and experimental results of the text matching method in this embodiment are described in Figure 4 and Figure 5 , Figure 5 The model training matching accuracy and loss rate corresponding to the method of this embodiment are provided.
[0084] The text matching method based on interactive neural network provided by the embodiments of the present application uses a preset bidirectional LSTM network to analyze the context information of the text, ensuring that the extracted semantic feature vector can more accurately express the meaning of the text. Moreover, the cross-attention mechanism is used to analyze the cross-relation between the two texts to be matched, which can capture the similarity between the texts to be matched, and can improve the accuracy of the matching prediction result. In addition, the self-attention mechanism is used to analyze the global information of the text, which can further ensure the reliability of the matching prediction result. Therefore, the embodiments of the present application can solve the technical problems that the existing technology has too little correlation analysis of text information and easily ignores the influence of global information, resulting in lack of accuracy and reliability of the matching result.
[0085] For ease of understanding, please refer to Figure 2 The application provides an embodiment of a text matching device based on an interactive neural network, comprising:
[0086] A vector expression module 201 is configured to preprocess two texts to be matched by using a preset Bert model to obtain a first text vector and a second text vector;
[0087] A semantic analysis module 202 is configured to analyze the features of the first text vector and the second text vector respectively by using a preset bidirectional LSTM network to obtain a corresponding first semantic feature vector and a second semantic feature vector;
[0088] An association analysis module 203 is configured to calculate the cross-correlation relationship between the sub-vectors in the first semantic feature vector and the second semantic feature vector respectively based on a cross-attention mechanism to obtain a first weight distribution vector and a second weight distribution vector;
[0089] A global analysis module 204 is configured to analyze the global features according to the first semantic feature vector, the second semantic feature vector, the first weight distribution vector, and the second weight distribution vector by using a preset self-attention mechanism to obtain a first global feature vector and a second global feature vector;
[0090] A matching prediction module 205 is configured to input the first global feature vector and the second global feature vector into a preset matcher to perform a matching prediction operation to obtain a matching prediction result.
[0091] Further, the association analysis module 203 is specifically configured to:
[0092] Calculate the cosine similarity between each sub-vector in the first semantic feature vector and each sub-vector in the second semantic feature vector based on the cross-attention mechanism, and obtain the first weight distribution vector;
[0093] Calculate the cosine similarity between each sub-vector in the second semantic feature vector and each sub-vector in the first semantic feature vector based on the cross-attention mechanism, and obtain the second weight distribution vector.
[0094] Further, the global analysis module 204 is specifically configured to:
[0095] Concatenate the first semantic feature vector and the first weight distribution vector to obtain a first global concatenation vector, and simultaneously, concatenate the second semantic feature vector and the second weight distribution vector to obtain a second global concatenation vector;
[0096] Perform global feature analysis on the first global concatenation vector and the second global concatenation vector respectively by using a preset self-attention mechanism to obtain the first global feature vector and the second global feature vector.
[0097] Further, the matching prediction module 205 is specifically configured to:
[0098] perform a vector splicing operation on the first global feature vector and the second global feature vector to obtain a spliced feature vector;
[0099] perform matching probability prediction on the spliced feature vector through a target function in a preset matcher to obtain a matching prediction result.
[0100] The application further provides a text matching device based on an interactive neural network, the device comprising a processor and a memory;
[0101] The memory is configured to store program code and transmit the program code to the processor.
[0102] The processor is configured to execute the text matching method based on the interactive neural network in the method embodiment according to instructions in the program code.
[0103] The application further provides a computer readable storage medium, the computer readable storage medium being configured to store program code, the program code being configured to execute the text matching method based on the interactive neural network in the method embodiment.
[0104] In several embodiments provided in the application, it should be understood that the disclosed devices and methods can be implemented in other manners. For example, the above-described device embodiments are merely illustrative. For example, the division of the units is only a logical function division. There can be another division manner for actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.
[0105] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0106] In addition, each functional unit in each embodiment of the application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0107] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, includes a plurality of instructions for executing all or part of the steps of the method described in various embodiments of the present application by a computer device (which can be a personal computer, a server, or a network device, etc.). The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (English full name: Read-Only Memory, English abbreviation: ROM), a random access memory (English full name: Random Access Memory, English abbreviation: RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0108] The above-described and the above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for text matching based on an interactive neural network, characterized in that, The method comprises the steps of: adopting a preset Bert model to pre-process two texts to be matched to obtain a first text vector and a second text vector; performing feature analysis on the first text vector and the second text vector respectively through a preset bidirectional LSTM network to obtain a corresponding first semantic feature vector and a second semantic feature vector; based on a cross-attention mechanism, calculating the cross-correlation relationship between sub-vectors in the first semantic feature vector and the second semantic feature vector to obtain a first weight distribution vector and a second weight distribution vector, and the specific process is as follows: based on the cross-attention mechanism, calculating the cosine similarity between each sub-vector in the first semantic feature vector and each sub-vector in the second semantic feature vector to obtain the first weight distribution vector; based on the cross-attention mechanism, calculating the cosine similarity between each sub-vector in the second semantic feature vector and each sub-vector in the first semantic feature vector to obtain the second weight distribution vector; performing global feature analysis on the first semantic feature vector, the second semantic feature vector, the first weight distribution vector and the second weight distribution vector through a preset self-attention mechanism to obtain a first global feature vector and a second global feature vector; inputting the first global feature vector and the second global feature vector into a preset matcher to perform a matching prediction operation to obtain a matching prediction result.
2. The interactive neural network based text matching method of claim 1, wherein, The global feature analysis on the first semantic feature vector, the second semantic feature vector, the first weight distribution vector and the second weight distribution vector through the preset self-attention mechanism to obtain the first global feature vector and the second global feature vector comprises: vector splicing the first semantic feature vector and the first weight distribution vector to obtain a first global splicing vector, and simultaneously, vector splicing the second semantic feature vector and the second weight distribution vector to obtain a second global splicing vector; performing global feature analysis on the first global splicing vector and the second global splicing vector respectively through a preset self-attention mechanism to obtain a first global feature vector and a second global feature vector. 3.The interactive neural network based text matching method of claim 1, wherein, The matching prediction operation of inputting the first global feature vector and the second global feature vector into the preset matcher to obtain a matching prediction result comprises: performing vector splicing operation on the first global feature vector and the second global feature vector to obtain a splicing feature vector; performing matching probability prediction on the splicing feature vector through a target function in the preset matcher to obtain a matching prediction result.
4. An apparatus for text matching based on an interactive neural network, characterized by, The method comprises the steps of: a vector expression module configured to adopt a preset Bert model to pre-process two texts to be matched to obtain a first text vector and a second text vector; a semantic analysis module configured to perform feature analysis on the first text vector and the second text vector respectively through a preset bidirectional LSTM network to obtain a corresponding first semantic feature vector and a second semantic feature vector; The association analysis module is configured to calculate cross-correlation relationships between sub-vectors in the first semantic feature vector and the second semantic feature vector based on a cross-attention mechanism, to obtain a first weight distribution vector and a second weight distribution vector. The cross-attention mechanism is used to calculate the cosine similarity between each sub-vector in the first semantic feature vector and each sub-vector in the second semantic feature vector, and to obtain the first weight distribution vector. The cross-attention mechanism is used to calculate the cosine similarity between each sub-vector in the second semantic feature vector and each sub-vector in the first semantic feature vector, and to obtain the second weight distribution vector. The global analysis module is configured to perform global feature analysis on the first semantic feature vector, the second semantic feature vector, the first weight distribution vector, and the second weight distribution vector based on a preset self-attention mechanism, to obtain a first global feature vector and a second global feature vector. The matching prediction module is configured to input the first global feature vector and the second global feature vector into a preset matcher to perform a matching prediction operation, to obtain a matching prediction result.
5. The interactive neural network based text matching apparatus according to claim 4, wherein, The global analysis module is configured to: perform vector concatenation on the first semantic feature vector and the first weight distribution vector to obtain a first global concatenation vector, and perform vector concatenation on the second semantic feature vector and the second weight distribution vector to obtain a second global concatenation vector; perform global feature analysis on the first global concatenation vector and the second global concatenation vector based on a preset self-attention mechanism, to obtain the first global feature vector and the second global feature vector.
6. The interactive neural network based text matching apparatus according to claim 4, wherein, The matching prediction module is configured to: perform vector concatenation on the first global feature vector and the second global feature vector to obtain a concatenation feature vector; perform matching probability prediction on the concatenation feature vector based on an objective function in the preset matcher, to obtain the matching prediction result.
7. An apparatus for text matching based on an interactive neural network, characterized by The device includes a processor and a memory. The memory is configured to store program code and transmit the program code to the processor. The processor is configured to execute the text matching method based on the interactive neural network according to the instructions in the program code.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium is configured to store program code for executing the text matching method based on the interactive neural network.
Citation Information
Patent Citations
Intention recognition method and device, electronic equipment and readable storage medium
CN110928997A
Text matching method and device, electronic equipment and computer readable storage medium
CN114492451A