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

Semantic similarity matching method and matching device based on 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, can solve the problems of failure to accurately characterize interaction relationship, failure to characterize semantic relationship, etc., so as to reduce the number of model parameters and reduce training time. Effect

Active Publication Date: 2022-03-15
PING AN TECH (SHENZHEN) CO LTD
View PDF7 Cites 0 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
  • Semantic similarity matching method and matching device based on cross-attention mechanism
  • Semantic similarity matching method and matching device based on cross-attention mechanism
  • Semantic similarity matching method and matching device based on 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, device, computer equipment and storage medium based on a cross-attention mechanism, which are suitable for the technical field of voice interaction and can realize cross-representation of two sentences at the semantic level. The present invention firstly uses word2vec to characterize each word segment in two sentences, obtains two splicing matrices through bidirectional LSTM respectively, and then cross-represents the two splicing matrices to each other, and obtains each splicing matrix in any sentence The importance of a participle relative to another sentence. On this basis, the maximization process is carried out and input to the fully connected layer, and finally the matching score between the two sentences is obtained. The above solution proposed by the present invention overcomes the limitations existing in the prior art when using LSTM alone or interactive matching, so that the calculation of the matching degree between two sentences 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 Patents(China)
IPC IPC(8): G06F40/30G06N3/04G06N3/08
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