CN111666375B - Text similarity matching method, electronic device and computer readable medium - Google Patents

Text similarity matching method, electronic device and computer readable medium Download PDF

Info

Publication number
CN111666375B
CN111666375B CN202010432317.8A CN202010432317A CN111666375B CN 111666375 B CN111666375 B CN 111666375B CN 202010432317 A CN202010432317 A CN 202010432317A CN 111666375 B CN111666375 B CN 111666375B
Authority
CN
China
Prior art keywords
text
input
matching
training
input text
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010432317.8A
Other languages
Chinese (zh)
Other versions
CN111666375A (en
Inventor
刘江宁
鞠剑勋
李健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Zhilv Information Technology Co ltd
Original Assignee
Shanghai Zhilv Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Zhilv Information Technology Co ltd filed Critical Shanghai Zhilv Information Technology Co ltd
Priority to CN202010432317.8A priority Critical patent/CN111666375B/en
Publication of CN111666375A publication Critical patent/CN111666375A/en
Application granted granted Critical
Publication of CN111666375B publication Critical patent/CN111666375B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3346Query execution using probabilistic model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks

Abstract

The invention discloses a matching method of text similarity, electronic equipment and a computer readable medium, wherein the matching method comprises the following steps: acquiring an input text, wherein the input text comprises at least one input vocabulary; inputting the input text to a text similarity matching model to perform matching prediction, wherein general context information of the at least one input word is respectively introduced into the input text through a graph neural network, and the matching prediction is performed according to the introduced input text; and outputting a label of the predicted text which is matched and predicted through the text similarity matching model. The invention can effectively complete the similarity matching task of the short text, thereby greatly improving the matching accuracy and the matching efficiency.

Description

Text similarity matching method, electronic device and computer readable medium
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a short text similarity matching method based on fusion vocabulary context characteristics.
Background
In recent years, text similarity matching tasks (such as searching, search questions and answers, etc.) have made significant progress thanks to the rapid development of deep learning. The text similarity matching task may be defined as: given a piece of input text as a Query, the document or answer most relevant to it is then matched out of the candidate document or answer set candates.
Currently, text similarity matching models typically analyze the meaning expressed by an input text by means of vocabulary and its contextual information in the input text, and further match documents or answers most relevant thereto in a candidate set candidates through some deep learning architecture.
However, when faced with short text Query consisting of only a few or even one vocabulary, the general text similarity matching model is not a strategy for understanding short text due to serious lack of context information, resulting in reduced matching accuracy and matching efficiency.
Disclosure of Invention
The invention aims to overcome the defect that in the prior art, a text similarity matching model cannot effectively match short texts, so that the matching accuracy and the matching efficiency are reduced.
The invention solves the technical problems by the following technical scheme:
a matching method of text similarity comprises the following steps:
acquiring an input text, wherein the input text comprises at least one input vocabulary;
inputting the input text to a text similarity matching model to perform matching prediction, wherein general context information of the at least one input word is respectively introduced into the input text through a graph neural network, and the matching prediction is performed according to the introduced input text; the method comprises the steps of,
and outputting labels of the predicted text which are matched and predicted through the text similarity matching model.
Optionally, the method further comprises the following steps:
acquiring training texts, wherein the training texts comprise at least one training vocabulary;
and inputting the training text into a text similarity matching model to perform model training, wherein the general context information of the at least one training word is respectively introduced into the training text through a graph neural network, and model training is performed according to the introduced training text.
Optionally, in the step of introducing general context information of the at least one input vocabulary into the input text via the graphic neural network,
fusing general context information of the at least one input word with original semantics based on mean value operation and introducing the general context information into the input text;
in the step of introducing general context information of the at least one training vocabulary into the training text via the graphic neural network,
and fusing the general context information of the at least one training vocabulary with original semantics based on mean value operation and introducing the general context information into the training text.
Optionally, the step of performing matching prediction further includes:
introducing a binary feature (binary feature of exact match) to each input word of the input text, wherein the binary feature is used for representing whether the corresponding word exists in the candidate document or the answer to be matched;
the step of performing model training further comprises:
one of the binary features is also introduced into each training vocabulary of the training text.
Optionally, the step of performing the matching prediction includes a model encoding step including:
the vector representation sequence corresponding to the input text and the vector representation sequence corresponding to the candidate set are encoded through a fully connected layer and a bi-directional recurrent neural network with a ReLU function (linear rectification function) as an activation function.
Optionally, the model encoding step further includes:
after coding the vector representation sequence corresponding to the input text, the feature representation of the input text is further coded through the expressway network.
Optionally, the step of performing matching prediction includes an interactive attention step, and the interactive attention step includes:
performing feature aggregation on a feature representation sequence of the input text based on the pooling operation of the weights to obtain feature vectors of information aggregation;
each candidate in the candidate set is individually feature aggregated using a weight-based pooling operation.
Optionally, the step of interactively paying attention further comprises:
respectively calculating the weight of the input text attention candidate set and the weight of the candidate set attention input text;
based on the calculated two attention weights, respectively extracting features related to the input text and the candidate set;
and fusing the associated information through two different expressway networks to respectively acquire the input text and the final representation of the candidate set.
Optionally, the step of performing matching prediction includes a similarity calculation step, and the similarity calculation step includes:
and calculating the similarity between the input text and each candidate answer in the candidate set, and selecting the candidate answer with the highest similarity as a label of the predicted text.
An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor performs the steps of the matching method of text similarity as described above when the computer program is executed.
A computer readable medium having stored thereon computer instructions, which when executed by a processor, implement the steps of a matching method of text similarity as described above.
On the basis of conforming to the common knowledge in the field, the preferred conditions can be arbitrarily combined to obtain the preferred embodiments of the invention.
The invention has the positive progress effects that:
the text similarity matching method provided by the invention can effectively complete the similarity matching task of the short text, thereby greatly improving the matching accuracy and the matching efficiency.
Drawings
The features and advantages of the present invention will be better understood upon reading the detailed description of embodiments of the present disclosure in conjunction with the following drawings. In the drawings, the components are not necessarily to scale and components having similar related features or characteristics may have the same or similar reference numerals.
Fig. 1 is a flow chart of a text similarity matching method according to an embodiment of the invention.
Fig. 2 is a schematic structural diagram of a text similarity matching model according to an embodiment of the present invention.
Fig. 3 is a schematic structural diagram of an electronic device implementing a matching method of text similarity according to another embodiment of the present invention.
Detailed Description
The invention is further illustrated by means of the following examples, which are not intended to limit the scope of the invention.
In order to overcome the above-mentioned drawbacks existing at present, the present embodiment provides a matching method for text similarity, which includes the following steps: acquiring an input text, wherein the input text comprises at least one input vocabulary; inputting the input text to a text similarity matching model to perform matching prediction, wherein general context information of the at least one input word is respectively introduced into the input text through a graph neural network, and the matching prediction is performed according to the introduced input text; and outputting a label of the predicted text which is matched and predicted through the text similarity matching model.
In this embodiment, the matching method mainly relates to the field of artificial intelligence, in particular to the field of natural language processing, and mainly uses technologies such as graph rolling network (GCN), recurrent Neural Network (RNN), attention mechanism, and the like.
In the embodiment, the matching method can effectively complete the similarity matching task of the short text, so that the matching accuracy and the matching efficiency are greatly improved.
Specifically, as an embodiment, as shown in fig. 1, the matching method of text similarity provided in this embodiment mainly includes the following steps:
and 101, acquiring a training text, and training a text similarity matching model according to the training text.
In this step, a set of training text is received, the training text being a short text for training a model, and is input to a text similarity matching model to train the text similarity matching model.
As shown in fig. 2, the text similarity matching model of the present embodiment mainly includes an input nesting layer, a model coding layer, an interactive attention layer, and an output layer, and the workflow of each layer is specifically described below.
1) Input nested layer (Input Embedding Layer)
Given a training short text
Figure BDA0002500987020000051
And a candidate answer set consisting mainly of several answers +.>
Figure BDA0002500987020000052
The input nesting layer aims at converting text composed of characters into a vector sequence containing semantic features:
Figure BDA0002500987020000053
Figure BDA0002500987020000054
wherein the method comprises the steps of
Figure BDA0002500987020000055
The superscript large C refers to the number of candidate answers, and E refers to the GloVe vocabulary vector matrix;
Figure BDA0002500987020000056
refer to the t-th vocabulary in Query consisting of m vocabularies,/and->
Figure BDA0002500987020000057
A vector representation of the t-th vocabulary in Query; candidate answer symbols have the same meaning as above.
In this embodiment, general context information of the vocabulary in the document is introduced into the short text query through the graph neural network, so that the context of the short text is enriched.
Firstly, the present embodiment constructs a lexical mutual information map (PMI, point-wise mutual information) based on text data corpus of a specific domain, pmi= (V, E), each node V in fig. 2 i E represents a vocabulary in the corpus, E represents a set of inter-node edges.
And secondly, constructing a normalized Laplace matrix A based on the adjacency matrix and the degree matrix of the mutual information graph, wherein the values in the matrix represent the association weights among vocabularies.
Finally, the lexical intersection V ' (|v ' |=k) between the short text Query and V is calculated, K representing the number of nodes in the intersection, and the weights a ' associated with the nodes in V ', i.e. the rows of nodes in V ' corresponding in matrix a, are sampled from matrix a.
Based on the above information, the present embodiment extracts context information associated with the vocabulary in V' through the spectrogram convolution network GCN:
Figure BDA0002500987020000061
wherein σ is an activation function ReLU, W is a trainable parameter matrix, c i The context vector corresponding to the i-th vocabulary.
In order to introduce the vocabulary context information without losing the original semantics thereof, the embodiment fuses the vocabulary context information and the original semantics thereof based on the mean value operation:
Figure BDA0002500987020000062
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure BDA0002500987020000063
corresponds to +.>
Figure BDA0002500987020000064
The vocabulary sequence in (1), U is->
Figure BDA0002500987020000065
Difference from V'.
Furthermore, this embodiment introduces a binary feature for each word in the short text, which is used to indicate whether the word exists in the candidate document or answer to be matched, in order to highlight the importance of the word in the short text, which can be expressed as follows:
Figure BDA0002500987020000066
this binary feature proves particularly important when the model incorporates generic contextual information of the vocabulary in the document.
The final output of the input nesting layer is a vector representation sequence corresponding to Query
Figure BDA0002500987020000067
Figure BDA0002500987020000068
Vector representation sequence corresponding to Candida>
Figure BDA0002500987020000069
Figure BDA00025009870200000610
Figure BDA00025009870200000611
Refer to the vector +>
Figure BDA00025009870200000612
Vector->
Figure BDA00025009870200000613
Spliced together.
2) Model coding layer (Model Encoding Layer)
The model coding layer aims to analyze the meaning of the whole piece of text based on vocabulary and its context information.
In this module, the embodiment uses a full connection layer using ReLU as an activation function and a bi-directional cyclic neural network pair Embed\u query And Ebed/u candidates Encoding to generate a feature representation fused with context information:
Figure BDA00025009870200000614
Figure BDA00025009870200000615
Figure BDA0002500987020000071
Figure BDA0002500987020000072
furthermore, the module additionally introduces a highway network (highway networks) to further encode the feature representation of the Query, aimed at optimizing the feature representation of the vocabulary by means of the context of the text as a whole:
Figure BDA0002500987020000073
the highway network can be decomposed as follows:
Figure BDA0002500987020000074
Figure BDA0002500987020000075
Figure BDA0002500987020000076
wherein the variables comprising W and b are both trainable parameters, [ ] refers to stitching together two vectors, which is a multiplication operation.
3) Interactive attention layer (Interactive Attention Layer)
In this module, the present embodiment first weights-pooling the characteristic representation sequence of weighted-pooling versus Query based on weights
Figure BDA0002500987020000077
Feature aggregation is performed to obtain feature vectors of the information high aggregation:
Figure BDA0002500987020000078
wherein the weighted-pivoting module can be decomposed as follows:
Figure BDA0002500987020000079
a j =softmax(s j )
Figure BDA00025009870200000710
since a text may include several features of different topics, the present embodiment further refines the features of different topics through different parameters, as follows:
Figure BDA00025009870200000711
Figure BDA00025009870200000712
wherein the superscript large L is a superparameter defining the number of subject features to be extracted from a piece of text, and variables including W and b are trainable parameters.
Next, the present embodiment uses weighted-mapping to individually target each candidate in Candida
Figure BDA0002500987020000081
Feature polymerization is carried out:
Figure BDA0002500987020000082
Figure BDA0002500987020000083
wherein, the superscript big C refers to the number of candidate answers, and variables including W and b are trainable parameters.
Before calculating the similarity of the input text Query to each Candidate answer Candidate, the present embodiment proposes an interactive attention mechanism in hopes of optimizing the respective feature representations based on information related to each other.
First, the weights A of the Query attention to Candida are calculated respectively q Candida noticing weight A of Query c
A q ,A c =Bi_Attention(H q ,H c )
The bi_attention module can decompose as follows:
Figure BDA0002500987020000084
A q =softmax(S)
A c =sigmoid(S T )
wherein, the characteristic expression H of Query q And the characterization H of Candida c The size of the last dimension of (a) is equal, the symbol d refers to the size of the last dimension, and the table T refers to matrix transposition; furthermore, using sigmoid as a weight normalization function is intended to be darkThe candidate answer may be shown without attention to the characteristics of the input text Query, or may be closely focused on a plurality of different characteristics thereof.
Secondly, based on the two attention weights, respectively extracting features related to the input text Query and candidate answers Candida
Figure BDA0002500987020000085
And->
Figure BDA0002500987020000086
Cxt q =A q H c
Cxt c =A c H q
Finally, the associated information is fused through two different expressway networks to respectively obtain final representations of Query and Candidates
Figure BDA0002500987020000091
Figure BDA0002500987020000092
Figure BDA0002500987020000093
4) Output Layer (Output Layer)
The output layer calculates the similarity between the input text Query and each Candidate answer Candidate, and picks the Candidate answer most similar to the Query.
First, the module aggregates L different features of the Query based on the weighted pooling operation to generate a final vector representation z q
Figure BDA0002500987020000094
Finally, using matrix multiplication to calculate the input text Query about eachSimilarity a of Candidate answers Candidate i
[a 0 ,…a i ,…a C ]=softmax(z q V c T +b)
Wherein a is i Is a scalar representing the similarity of the input text Query with respect to the i-th candidate answer, and variables including W and b are trainable parameters.
In this embodiment, as described above, the step of training the text similarity matching model mainly includes the steps of:
s1, data processing, namely word segmentation is carried out on an input training text Query and a candidate answer set Candidates, and a vocabulary is generated to an index of the vocabulary located in a dictionary according to a vocabulary dictionary;
s2, constructing a vocabulary mutual information diagram: constructing a vocabulary mutual information map PMI based on text data corpus (based on scenic spot description data in the embodiment) in a specific field;
s3, vectorization: introducing a trained word vector matrix GloVE from the outside, and converting the vocabulary into vectors, namely, inquiring the corresponding word vectors in the GloVE according to the vocabulary index;
s4, inputting a vocabulary mutual information map PMI, a vector representation sequence corresponding to an input training text Query and a vector representation sequence set corresponding to a candidate answer set Candida to an input nesting layer in a model to obtain a corresponding feature representation Ebed\u query And Ebed/u candidates
S5, inputting the feature representations of the input training text Query and the candidate answer set Candida to a model coding layer to obtain a middleware representation of the input training text Query and the candidate answer set Candida
Figure BDA0002500987020000101
And
Figure BDA0002500987020000102
s6, U obtained in the step S5 q And Ecand is input to the interactive attention layer to get the final representation V of Query and Candida q ,V c
S7, final representation V of Query and Candida q ,V c Input to the model output layer to obtain similarity a of Query about Candidate candidates i
S8, calculating cross entropy loss according to probability distribution of real candidate answers of Query and candidate answers predicted by the model, minimizing the loss by using Adam (Adaptive Moment Estimation) optimization algorithm (optimization algorithm in deep learning), and continuously performing iterative training to obtain the final text similarity matching model.
And 102, acquiring an input text, and carrying out matching prediction according to the trained text similarity matching model.
In this step, the input text is preferably a short text, and the similarity matching prediction is performed on the input text by using the text similarity matching model trained in step 101.
In this embodiment, the specific matching prediction step may refer to the data processing process during model training in step 101, so that the details are not repeated.
And 103, outputting labels of the predicted text which are matched and predicted through the text similarity matching model.
In this step, the label of the predicted text corresponding to the input text is finally output through the calculation of the text similarity matching model in step 102.
In this embodiment, the step of outputting the label specifically refers to the data output process during the training of the model in step 101, so that the description is omitted.
Table 1 is a comparison of predicted results for short text Query on a model without context and with context.
Table 1:
short textThe Query Non-incoming context prediction results Introducing context prediction results
Natural protection region of cocoa Hu Yanglin Animals
Guangzhou long stone Urban scene Animals
Marble (L.) Gaertn Place name Ancient village
Rice city butylene Place name Ancient village
Happy cereal Pleasure boat Paradise
Fang Te Pleasure boat Paradise
Wide and narrow roadway Praying for temple Food for delicacies
Sha county Business business Food for delicacies
Prague (Prague) Place name Island
Seban is provided Business business Island
In this embodiment, the validity of the matching method of text similarity of the fusion vocabulary context features is evaluated on short text test data. As shown in table 1, the matching method of text similarity fusing lexical context features performs better on short text implying potential intent.
Fig. 3 is a schematic structural diagram of an electronic device according to another embodiment of the present invention. The electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the matching method of text similarity in the above embodiments when executing the program. The electronic device 30 shown in fig. 3 is only an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 3, the electronic device 30 may be embodied in the form of a general purpose computing device, which may be a server device, for example. Components of electronic device 30 may include, but are not limited to: the at least one processor 31, the at least one memory 32, a bus 33 connecting the different system components, including the memory 32 and the processor 31.
The bus 33 includes a data bus, an address bus, and a control bus.
Memory 32 may include volatile memory such as Random Access Memory (RAM) 321 and/or cache memory 322, and may further include Read Only Memory (ROM) 323.
Memory 32 may also include a program/utility 325 having a set (at least one) of program modules 324, such program modules 324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The processor 31 executes various functional applications and data processing, such as the matching method of text similarity in the above embodiments of the present invention, by running a computer program stored in the memory 32.
The electronic device 30 may also communicate with one or more external devices 34 (e.g., keyboard, pointing device, etc.). Such communication may be through an input/output (I/O) interface 35. Also, model-generating device 30 may also communicate with one or more networks, such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet, via network adapter 36. As shown in fig. 3, network adapter 36 communicates with the other modules of model-generating device 30 via bus 33. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in connection with the model-generating device 30, including, but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, data backup storage systems, and the like.
It should be noted that although several units/modules or sub-units/modules of an electronic device are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more units/modules described above may be embodied in one unit/module in accordance with embodiments of the present invention. Conversely, the features and functions of one unit/module described above may be further divided into ones that are embodied by a plurality of units/modules.
The present embodiment also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps in the matching method of text similarity in the above embodiments.
More specifically, among others, readable storage media may be employed including, but not limited to: portable disk, hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible implementation manner, the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps of the matching method implementing the text similarity as in the above embodiments, when the program product is run on the terminal device.
Wherein the program code for carrying out the invention may be written in any combination of one or more programming languages, the program code may execute entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device, partly on a remote device or entirely on the remote device.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the principles and spirit of the invention, but such changes and modifications fall within the scope of the invention.

Claims (9)

1. The text similarity matching method is characterized by comprising the following steps of:
acquiring an input text, wherein the input text comprises at least one input vocabulary;
inputting the input text to a text similarity matching model to perform matching prediction, wherein general context information of the at least one input word is respectively introduced into the input text through a graph neural network, and the matching prediction is performed according to the introduced input text; the method comprises the steps of,
outputting a label of the predicted text which is matched and predicted through the text similarity matching model;
wherein the step of performing matching prediction includes an interactive attention step, the interactive attention step including:
performing feature aggregation on a feature representation sequence of the input text based on the pooling operation of the weights to obtain feature vectors of information aggregation;
respectively carrying out feature aggregation on each candidate item in the candidate set by utilizing a pooling operation based on the weight;
wherein the step of interactively paying attention further comprises:
respectively calculating the weight of the input text attention candidate set and the weight of the candidate set attention input text;
based on the calculated two attention weights, respectively extracting features related to the input text and the candidate set;
and fusing the associated information through two different expressway networks to respectively acquire the input text and the final representation of the candidate set.
2. The matching method of claim 1, further comprising the steps of:
acquiring training texts, wherein the training texts comprise at least one training vocabulary;
and inputting the training text into a text similarity matching model to perform model training, wherein the general context information of the at least one training word is respectively introduced into the training text through a graph neural network, and model training is performed according to the introduced training text.
3. The matching method of claim 2, wherein, in the step of introducing general context information of the at least one input vocabulary into the input text via a graphic neural network, respectively,
fusing general context information of the at least one input word with original semantics based on mean value operation and introducing the general context information into the input text;
in the step of introducing general context information of the at least one training vocabulary into the training text via the graphic neural network,
and fusing the general context information of the at least one training vocabulary with original semantics based on mean value operation and introducing the general context information into the training text.
4. The matching method of claim 2, wherein the step of performing a match prediction further comprises:
introducing a binary feature to each input vocabulary of the input text, wherein the binary feature is used for representing whether the corresponding vocabulary exists in candidate documents or answers to be matched;
the step of performing model training further comprises:
one of the binary features is also introduced into each training vocabulary of the training text.
5. The matching method of claim 1, wherein the step of performing matching prediction includes a model encoding step including:
and encoding the vector representation sequence corresponding to the input text and the vector representation sequence corresponding to the candidate set through a fully connected layer taking the ReLU function as an activation function and a bidirectional cyclic neural network.
6. The matching method of claim 5, wherein said model encoding step further comprises:
after coding the vector representation sequence corresponding to the input text, the feature representation of the input text is further coded through the expressway network.
7. The matching method according to claim 1, wherein the step of performing matching prediction includes a similarity calculation step including:
and calculating the similarity between the input text and each candidate answer in the candidate set, and selecting the candidate answer with the highest similarity as a label of the predicted text.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the matching method of text similarity according to any of claims 1-7 when the computer program is executed.
9. A computer readable medium having stored thereon computer instructions, which when executed by a processor, implement the steps of a method of matching text similarity according to any of claims 1 to 7.
CN202010432317.8A 2020-05-20 2020-05-20 Text similarity matching method, electronic device and computer readable medium Active CN111666375B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010432317.8A CN111666375B (en) 2020-05-20 2020-05-20 Text similarity matching method, electronic device and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010432317.8A CN111666375B (en) 2020-05-20 2020-05-20 Text similarity matching method, electronic device and computer readable medium

Publications (2)

Publication Number Publication Date
CN111666375A CN111666375A (en) 2020-09-15
CN111666375B true CN111666375B (en) 2023-07-04

Family

ID=72384048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010432317.8A Active CN111666375B (en) 2020-05-20 2020-05-20 Text similarity matching method, electronic device and computer readable medium

Country Status (1)

Country Link
CN (1) CN111666375B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114049505B (en) * 2021-10-11 2022-08-23 数采小博科技发展有限公司 Method, device, equipment and medium for matching and identifying commodities
CN116304748B (en) * 2023-05-17 2023-07-28 成都工业学院 Text similarity calculation method, system, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107145573A (en) * 2017-05-05 2017-09-08 上海携程国际旅行社有限公司 The problem of artificial intelligence customer service robot, answers method and system
CN109947912A (en) * 2019-01-25 2019-06-28 四川大学 A kind of model method based on paragraph internal reasoning and combined problem answer matches
CN110083682A (en) * 2019-04-19 2019-08-02 西安交通大学 It is a kind of to understand answer acquisition methods based on the machine readings for taking turns attention mechanism more
CN110188176A (en) * 2019-04-30 2019-08-30 深圳大学 Deep learning neural network and training, prediction technique, system, equipment, medium
CN110532353A (en) * 2019-08-27 2019-12-03 海南阿凡题科技有限公司 Text entities matching process, system, device based on deep learning
CN111177325A (en) * 2020-04-10 2020-05-19 支付宝(杭州)信息技术有限公司 Method and system for automatically generating answers

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107145573A (en) * 2017-05-05 2017-09-08 上海携程国际旅行社有限公司 The problem of artificial intelligence customer service robot, answers method and system
CN109947912A (en) * 2019-01-25 2019-06-28 四川大学 A kind of model method based on paragraph internal reasoning and combined problem answer matches
CN110083682A (en) * 2019-04-19 2019-08-02 西安交通大学 It is a kind of to understand answer acquisition methods based on the machine readings for taking turns attention mechanism more
CN110188176A (en) * 2019-04-30 2019-08-30 深圳大学 Deep learning neural network and training, prediction technique, system, equipment, medium
CN110532353A (en) * 2019-08-27 2019-12-03 海南阿凡题科技有限公司 Text entities matching process, system, device based on deep learning
CN111177325A (en) * 2020-04-10 2020-05-19 支付宝(杭州)信息技术有限公司 Method and system for automatically generating answers

Also Published As

Publication number Publication date
CN111666375A (en) 2020-09-15

Similar Documents

Publication Publication Date Title
CN110209823B (en) Multi-label text classification method and system
CN110162749B (en) Information extraction method, information extraction device, computer equipment and computer readable storage medium
CN111783462A (en) Chinese named entity recognition model and method based on dual neural network fusion
CN111444340A (en) Text classification and recommendation method, device, equipment and storage medium
WO2023160472A1 (en) Model training method and related device
CN110990555B (en) End-to-end retrieval type dialogue method and system and computer equipment
CN113609965B (en) Training method and device of character recognition model, storage medium and electronic equipment
CN113626589B (en) Multi-label text classification method based on mixed attention mechanism
Le et al. An overview of deep learning in industry
CN113705313A (en) Text recognition method, device, equipment and medium
CN111666375B (en) Text similarity matching method, electronic device and computer readable medium
CN113065331A (en) Entity emotion recognition method and system based on entity context discrimination
CN113128232A (en) Named entity recognition method based on ALBERT and multi-word information embedding
CN115221846A (en) Data processing method and related equipment
CN114445832A (en) Character image recognition method and device based on global semantics and computer equipment
CN114281982B (en) Book propaganda abstract generation method and system adopting multi-mode fusion technology
CN111597816A (en) Self-attention named entity recognition method, device, equipment and storage medium
CN111597815A (en) Multi-embedded named entity identification method, device, equipment and storage medium
CN114036246A (en) Commodity map vectorization method and device, electronic equipment and storage medium
CN116385946B (en) Video-oriented target fragment positioning method, system, storage medium and equipment
CN116680407A (en) Knowledge graph construction method and device
CN113704466B (en) Text multi-label classification method and device based on iterative network and electronic equipment
CN113515947B (en) Training method for cascading place name entity recognition model
CN115310547B (en) Model training method, article identification method and device, electronic equipment and medium
CN117494815A (en) File-oriented credible large language model training and reasoning method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant