Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A semantic similarity matching method and device based on a cross attention mechanism

A technology of semantic similarity and matching method, which is applied in the field of semantic similarity matching based on cross-attention mechanism, which can solve the problems such as failure to accurately characterize interaction relationship and failure to represent semantic relationship.

Active Publication Date: 2019-05-28
PING AN TECH (SHENZHEN) CO LTD
View PDF7 Cites 16 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the Siamese structure only independently represents the two sentences, and fails to accurately represent the interaction between the two sentences.
On the other hand, the interactive matching method only considers the point-to-point inner product operation, which can only express the local correlation between two sentences, and cannot effectively represent the semantic relationship

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A semantic similarity matching method and device based on a cross attention mechanism
  • A semantic similarity matching method and device based on a cross attention mechanism
  • A semantic similarity matching method and device based on a cross attention mechanism

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0057] see figure 1 , a kind of semantic similarity matching method based on cross-attention mechanism of the present embodiment, comprises the following steps:

[0058] S1: Obtain multiple first basic words in the first basic sentence, and obtain multiple second basic words in the second basic sentence.

[0059] This step is used to divide all the words contained in the sentence. For example, sentence 1 is "I am Chinese", and it can be divided into three basic words "I", "Yes" and "Chinese". Another example is that sentence 2 is "I am Chinese", which can be divided into three basic words "I", "am" and "Chinese".

[0060] S2: performing word vector representation on each of the first basic word and the second basic word to obtain multiple first basic vectors and multiple second basic vectors.

[0061] This step preferably uses the word2vec word vector model to represent each word in the sentence. The advantage is that the word2vec word vector model reduces the dimension of ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a semantic similarity matching method and device based on a cross attention mechanism, computer equipment and a storage medium, is suitable for the technical field of voice interaction, and can realize cross representation of two statements on a semantic level. According to the method, firstly, word vector representation is carried out on each segmented word in two sentencesthrough word2vec, two splicing matrixes are obtained after bidirectional LSTM, then cross representation is carried out between the two splicing matrixes, and the importance degree of each segmentedword in any sentence relative to the other sentence is obtained. And on the basis, maximization processing is carried out and a full connection layer is input, and finally a matching degree score between the two statements is obtained. According to the scheme provided by the invention, the limitation existing when the LSTM is independently used or interactive matching is carried out in the prior art is overcome, so that the calculation of the matching degree between the two statements is more accurate and complete and approaches the real situation.

Description

technical field [0001] The invention relates to the technical field of voice interaction, in particular to a semantic similarity matching method, device, computer equipment and storage medium based on a cross-attention mechanism. Background technique [0002] The currently recognized semantic similarity matching methods based on deep learning include: 1) Siamese structure, that is, first two sentences or texts are represented by convolutional neural network (CNN), LSTM and other neural networks to obtain two sentence vectors, and then Carry out similarity calculation; 2) The method of interactive matching, that is, first perform an inner product operation between the word vectors of two sentences to obtain a three-dimensional matrix, and then input it into neural networks such as CNN and LSTM. However, the Siamese structure only independently represents the two sentences, and fails to accurately represent the interaction between the two sentences. On the other hand, the int...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/27
CPCG06F40/30G06F40/279G06N3/044
Inventor 周涛涛周宝陈远旭肖京
Owner PING AN TECH (SHENZHEN) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products