WO2021232589A1 - 基于注意力机制的意图识别方法、装置、设备及存储介质 - Google Patents

基于注意力机制的意图识别方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2021232589A1
WO2021232589A1 PCT/CN2020/105090 CN2020105090W WO2021232589A1 WO 2021232589 A1 WO2021232589 A1 WO 2021232589A1 CN 2020105090 W CN2020105090 W CN 2020105090W WO 2021232589 A1 WO2021232589 A1 WO 2021232589A1
Authority
WO
WIPO (PCT)
Prior art keywords
feature
image
text
intent
intention
Prior art date
Application number
PCT/CN2020/105090
Other languages
English (en)
French (fr)
Inventor
孙思
曹锋铭
Original Assignee
平安国际智慧城市科技股份有限公司
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 平安国际智慧城市科技股份有限公司 filed Critical 平安国际智慧城市科技股份有限公司
Publication of WO2021232589A1 publication Critical patent/WO2021232589A1/zh

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/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • This application relates to the field of knowledge representation and reasoning, and in particular to an intention recognition method, device, device and storage medium based on an attention mechanism.
  • voice interaction systems have also developed and become one of today's hot research fields.
  • voice interaction systems when faced with the problem of how to conduct effective conversations with users through the voice interaction system, the intention recognition of interactive information has become a powerful solution, and the accuracy of the intention recognition of interactive information is also Become one of the concerns that need to be resolved urgently.
  • the feature information is obtained by extracting features of the interactive information, and the intent classification processing is performed on the feature information through a plurality of preset intent recognition models, so as to realize the intention recognition.
  • the inventor realizes that in the prior art, due to the bilinear multi-modal fusion method, for some information that indirectly requires simple reasoning, the intent of the information cannot be accurately recognized, and the intent is recognized.
  • the type of information is somewhat limited. Generally, only text information is intended to be recognized. For example, when it is not possible to inquire about the “Use of Security Check Infrared Gates” through the input language, it is necessary to input the image of “Security Check Infrared Gates”. For consultation, it is difficult for the bilinear multimodal fusion method to inferentially analyze the image information of the “security check infrared gate” to identify the corresponding “security check infrared gate use” intention type. As a result, the accuracy of multi-modal intention recognition for the information to be inferred is low.
  • the main purpose of this application is to solve the problem of low accuracy of multi-modal intention recognition for information to be inferred.
  • the first aspect of this application provides an intention recognition method based on an attention mechanism, including:
  • Acquire text information and image information extract the intention features of the text information through a preset gated recurrent unit neural network model, obtain the text intention features, and perform processing on the image information through the preset regional convolutional neural network model Intent feature extraction, to obtain image intent features;
  • the attention fusion intention feature is generated, and according to the preset gating mechanism, the text intention feature and the Image intention features, generate gating mechanism to merge intention features;
  • the second aspect of the present application provides an intent recognition device based on an attention mechanism.
  • the intent recognition device based on the attention mechanism includes a memory, a processor, and is stored in the memory and can run on the processor.
  • the processor executes the intention recognition program based on the attention mechanism, the following steps are implemented when the processor executes the attention mechanism-based intention recognition program:
  • Acquire text information and image information extract the intention features of the text information through a preset gated recurrent unit neural network model, obtain the text intention features, and perform processing on the image information through the preset regional convolutional neural network model Intent feature extraction, to obtain image intent features;
  • the attention fusion intention feature is generated, and according to the preset gating mechanism, the text intention feature and the Image intention features, generate gating mechanism to merge intention features;
  • a third aspect of the present application provides a computer-readable storage medium that stores computer instructions, and when the computer instructions are executed on a computer, the computer executes the following steps:
  • Acquire text information and image information extract the intention features of the text information through a preset gated recurrent unit neural network model, obtain the text intention features, and perform processing on the image information through the preset regional convolutional neural network model Intent feature extraction, to obtain image intent features;
  • the attention fusion intention feature is generated, and according to the preset gating mechanism, the text intention feature and the Image intention features, generate gating mechanism to merge intention features;
  • the fourth aspect of the present application provides an intention recognition device based on an attention mechanism, including:
  • the feature extraction module is used to obtain text information and image information, and extract the intention features of the text information through the preset gated recurrent unit neural network model to obtain the text intention features, and use the preset regional convolutional neural network model Performing intention feature extraction on the image information to obtain the image intention feature;
  • a calculation module configured to calculate the attention of the text intention feature and the image intention feature, respectively, to obtain the text attention value and the image attention value;
  • the first generating module is configured to generate a text-heavy feature matrix according to the text attention value and the text intention feature, and generate an image-heavy feature matrix according to the image attention value and the image intention feature;
  • the second generation module is used to generate attention fusion intent features according to the text intent feature, the image intent feature, the text biased feature matrix, and the image biased feature matrix, and according to the preset gating mechanism, Describe the text intention features and the image intention features, and generate the gating mechanism to merge the intention features;
  • a splicing processing module for splicing the attention fusion intention feature and the gating mechanism fusion intention feature to obtain the target intention feature
  • the intention classification module is used to classify the target intention features to obtain the corresponding target intention.
  • the text intent feature of the text information and the image intent feature of the image information are obtained; the text attention value and the image attention value are calculated respectively; the text emphasis feature matrix is generated according to the text attention value and the text intent feature, And according to the image attention value and image intent feature to generate the image weighted feature matrix; according to the text intent feature, image intent feature, text weighted feature matrix and image weighted feature matrix, generate attention fusion intent feature, and according to the preset gating mechanism, Text intention features and image intention features to generate gating mechanism fusion intention features; merge attention fusion intention features and gating mechanism fusion intention features for splicing processing to obtain target intention features; perform intention classification on target intention features to obtain the corresponding target intention.
  • the intra-modal and inter-modal attention mechanism is used to fuse image information and text information to capture the image information, text information, and between image information and text information.
  • the text information and image information are classified into intent to obtain the target intent, and the accuracy of multi-modal intent recognition for the information to be inferred is improved.
  • FIG. 1 is a schematic diagram of an embodiment of an intention recognition method based on an attention mechanism in an embodiment of the application
  • FIG. 2 is a schematic diagram of an embodiment of an intention recognition apparatus based on an attention mechanism in an embodiment of the application
  • Fig. 3 is a schematic diagram of an embodiment of an intention recognition device based on an attention mechanism in an embodiment of the application.
  • the embodiments of the present application provide an intent recognition method, device, equipment, and storage medium based on an attention mechanism, so as to improve the accuracy of multi-modal intent recognition for information to be inferred.
  • An embodiment of the intention recognition method based on the attention mechanism in the embodiment of the present application includes:
  • the execution subject of the present application may be an intent recognition device based on an attention mechanism, and may also be a terminal or a server, which is not specifically limited here.
  • the embodiment of the present application takes the server as the execution subject as an example for description.
  • the server After the server obtains the text information and the image information, it calls the preset gated recurrent unit neural network (gated recurrent unit, GRU) model, and uses the state of the previous transmission feature in the gated recurrent unit neural network model and the characteristics of the current node. Input and activate the function sigmoid to obtain the gate value for controlling reset and the gate value for controlling update, and reset the text intention feature through the reset gate combined with the gate value for reset control to obtain candidate reset information, and Through the activation function tanh, the candidate reset information is scaled to the range of -1 to 1 to obtain the target reset information, and the target reset information is updated through the reset gate combined with the gate value of the control update gate to obtain the text information Textual intention features.
  • GRU gated recurrent unit neural network
  • the intent feature extraction of the text information is carried out through the fast iterative feature of the gated recurrent unit neural network GRU model, which improves the convergence speed and process operation efficiency of the intent feature extraction.
  • the server calls the preset regional convolutional neural network model (faster-regions with cnn features, Faster-RCNN) to extract the intent features of the image information to improve the accuracy and efficiency of the image intent feature extraction.
  • the server obtains the information to be identified and identifies the data type of each information in the information to be identified; the server classifies the information to be identified according to the data type to obtain the classification information; the server calls the preset text processing model and image processing model to classify respectively The information undergoes data transformation processing to obtain text information and image information.
  • the information to be recognized can be any two of voice information, text information, video information, and image information.
  • the information to be recognized can include voice information, text information, and video information, as well as text information and image information.
  • the server calls the corresponding data processing algorithm or tool to perform a series of data preprocessing (data transformation processing and/or classification processing) according to the data type of the read information to be identified, for example: the classification information is voice information A and video respectively
  • the server calls a speech recognition model (text processing model) to convert A into text information, and calls an interception tool or a video image interception model (image processing model) to perform image interception processing on B to obtain image information.
  • the server calls the convolutional neural network layer in the preset regional convolutional neural network model to extract the intent feature map of the image information to obtain the intent feature map; the server performs image object recognition on the intent feature map to obtain the candidate intent Feature map, and generate a suggestion window for the candidate intent feature map; the server performs image object feature analysis on the candidate intent feature map through the suggestion window and the fully connected layer of the visual geometric group network in the regional convolutional neural network model to obtain the image intent feature.
  • the server calls the preset regional convolutional neural network model (faster-regions with cnn features, Faster-RCNN) in the convolution + non-linear + pooling layer (that is, the convolutional neural network layer) to extract the intent of the image intent feature Feature map, cut and filter the intent feature map, and perform image object recognition on the intent feature map that has been cut and filtered to obtain the candidate intent feature map, identify whether the feature information in the intent feature map is an object, and return to bounding through the bounding box
  • the box regression is corrected to generate the proposal window proposals, and the candidate intent feature maps are analyzed according to the proposals and the fully connected layer of the visual geometry group network (visual geometry group network 16, VGG16) (that is, the visual geometry group network fully connected layer), and obtain Image intent feature.
  • Faster-RCNN is used to extract intent features of image information to improve the accuracy and efficiency of image intent feature extraction.
  • the server can obtain the weight by calculating the similarity value between the query information and the key value in the text intention feature, and normalize the weight through the preset classification function to obtain the target weight, and the target weight and the key corresponding to the target weight The value is weighted and summed to obtain the attention value corresponding to each text intent feature in the text intent feature; by calculating the correlation between the first hidden state of the preset decoder and all hidden states of the preset encoder, Obtain the score corresponding to the hidden state of the encoder; input the score into the softmax layer of the classifier for normalization to obtain the weight value of the attention distribution; use the weight value of the attention distribution to weight the key value and obtain the text attention Force value. In the same way, the image attention value can be obtained.
  • the text intention features obtained by the server through the preset gated recurrent unit neural network model and the image intention features obtained through the preset regional convolutional neural network model are both matrix vectors, and the server obtains image attention and image attention
  • the text-heavy feature matrix can be generated by multiplying the matrix vector.
  • the text attention value is C
  • the text intent feature is C1
  • the image attention value is D
  • the image intent feature is D1
  • the text-heavy feature matrix is C ⁇ C1
  • the characteristic matrix of image bias is D ⁇ D1.
  • the server performs feature stitching processing on the text-heavy feature matrix and the image intent feature, and the image-heavy feature matrix and the text intent feature for feature stitching to achieve cross-modal feature stitching processing.
  • feature stitching processing is performed between features, and feature splicing processing is performed between image biased feature matrix and image intent feature to realize the feature splicing process in the modal, so as to obtain the attention fusion intent feature.
  • the text intent feature and the image intent feature are filtered through a preset gating mechanism.
  • the text intention feature and the image intention feature are combined to provide more matchable information for intent recognition, and make full use of the input sequence of fusion features. Information, so as to improve the accuracy of multi-modal intention recognition that requires reasoning information.
  • the server multiplies the text-heavy feature matrix and the image intent feature to obtain the text image fusion feature, multiplies the image-heavy feature matrix and the text intent feature to obtain the image text fusion feature, and determines the text image fusion feature and the image text fusion feature as The first fusion intent feature; the server multiplies the text-heavy feature matrix and the text intent feature to obtain the text fusion feature, multiplies the image-heavy feature matrix and the image intent feature to obtain the image fusion feature, and determines the text fusion feature and the image fusion feature as the first 2.
  • Fusion intention features The server determines the first fusion intention feature and the second fusion intention feature as attention fusion intention features.
  • the text-heavy feature matrix is A
  • the text-intent feature is C
  • the image-heavy feature matrix is D
  • the image intent feature is E
  • the product of A and E is the text image fusion feature A1
  • the product of D and C is the image text Fusion feature B1
  • the product of A and C is the text fusion feature C1
  • the product of D and E is the image fusion feature D1
  • A1 and B1 are the first fusion intention features
  • C1 and D1 are the second Fusion of intent features.
  • the server can also use a preset multi-view learning algorithm (multi-view learning, MVL) to separately analyze each intent feature of the text intent feature and the image intent feature and the emphasis feature processed by the attention mechanism (ie, text and image fusion).
  • multi-view learning multi-view learning
  • Feature and image text fusion feature create a kernel function, synthesize all the kernel functions to obtain the kernel feature, and perform regression processing and classification processing on the kernel feature through the regression function or classifier, thereby obtaining the first fusion intention feature.
  • the second fusion intention feature can be obtained.
  • the server calculates the text image gate value of the text information to the image information and the image text gate value of the image information to the text information through the preset gating mechanism;
  • the text image gate value filters and selects the text intent features to obtain the updated text intent features, and filters and selects the image intent features according to the gated loop unit and the image text gate value to obtain the updated image intent features ;
  • the server performs matrix multiplication processing on the updated text intent feature and the updated image intent feature to obtain the gating mechanism fusion intent feature.
  • Both the updated text intent feature and the image intent feature are matrix vectors, and the server multiplies the matrix vector corresponding to the updated text intent feature and the matrix vector corresponding to the updated image intent feature to obtain the gating mechanism fusion intent feature.
  • the text intention feature and the image intention feature are filtered (ie, selected) to ensure the quality of the text intention feature and the image intention feature, thereby improving the fusion of the text intention feature and the image intention feature The accuracy of the gating mechanism fusion intent features.
  • the server can also expand the column_stack function and row_stack function in the Numpy system through preset numerical calculations to add the feature matrix vector to the attention fusion intention feature and the gating mechanism fusion intention feature to merge into a matrix, for example: attention fusion
  • the feature matrix vector of the intention feature is A2
  • the feature matrix vector in the gating mechanism fusion intention feature is B2
  • the server can also use the pre-built multi-feature fusion tracking algorithm based on the covariance matrix to use the regional covariance descriptor to fuse the attention intent feature and the gating mechanism intent to fuse the color, edge and texture of the image feature in the feature with the attention.
  • Fusion intent features and gating mechanism fusion intent features corresponding text intent features are fused, and the effective information in the covariance matrix in the attention fusion intention feature and the attention fusion intention feature is extracted by the fast covariance crossover algorithm to the fused Attention fusion intention features and gating mechanism fusion intention features are updated to obtain target intention features.
  • the server performs main component extraction processing on the first fusion intent feature, the second fusion intent feature, and the gating mechanism fusion intent feature to obtain the first initial feature, the second initial feature, and the third initial feature;
  • An initial feature, a second initial feature, and a third initial feature are processed by dimensionality reduction to obtain the first target feature, the second target feature, and the third target feature;
  • the server converts the first target feature, the second target feature, and the third target feature Perform parallel fusion to obtain the target intention feature.
  • the fusion intent feature is matrix S, matrix L, and matrix T.
  • the server uses the preset Principal Component Analysis (PCA) algorithm, according to S’s
  • PCA Principal Component Analysis
  • the covariance matrix obtains the conversion matrix D corresponding to S
  • the conversion matrix L1 corresponding to L is obtained according to the covariance matrix of L
  • the conversion matrix H corresponding to T is obtained from the covariance matrix of T
  • the matrix S is converted by the conversion matrix D
  • the matrix L is transformed to the transformation domain of the principal component through the transformation matrix L1
  • the columns of K, Y, and W are sorted in the order of the variance value from small to large, and respectively Extract the first N-dimensional principal components of K, Y, and W, and compose the first N-dimensional principal components into the first target feature matrix, the second target feature matrix, and the third target feature matrix of e rows and r columns.
  • the vector combines the first target feature matrix, the second target feature matrix and the third target feature matrix in parallel to form a feature vector to obtain the target intention feature.
  • the server After the server obtains the target intent feature, it inputs the target intent feature into the preset intent classifier, and matches the target feature to the corresponding intent type through the preset intent classifier, to classify the intent of the information to be identified, and obtain the intent to be identified The intent of the target corresponding to the information.
  • the server can also obtain the target intent corresponding to the text information and the image information by obtaining historical to-be-identified information with target intent characteristics from the database, and corresponding intent information from the note information of the historical to-be-recognized information.
  • the server can also create the first knowledge graph of the target intent feature and obtain the preset intent knowledge graph, and compare and analyze the first knowledge graph and the intention knowledge graph, and obtain the same or similar node information as the first knowledge graph.
  • the target node information of the corresponding intent knowledge graph uses the intent corresponding to the target node information as the target intent.
  • the server creates the key value of the target intent feature, retrieves the preset intent hash table according to the key value, and obtains the intent information corresponding to the key value from the intent hash table; the server takes the intent information corresponding to the key value as the target intention.
  • the target intention features processed by the attention mechanism are all matrix vectors.
  • An intent hash table is stored in the database.
  • the intent hash table includes the intent type, the feature information corresponding to the intent type, and the reply information corresponding to the intent type.
  • the server matches the intent type and intent corresponding to the target intent feature from the intent hash table.
  • Type the corresponding reply information to obtain the corresponding target intention. Retrieval and matching are performed through key-value and hash table methods to improve the accuracy and efficiency of target intent acquisition, thereby improving the accuracy of multi-modal intent recognition for inference information.
  • the server performs intent classification on the target intent feature, and after obtaining the corresponding target intent, obtains the error information of the target intent, based on the preset deep residual network algorithm, first-order optimization algorithm, back propagation algorithm and error information, Optimize the recognition of target intent in text information and image information, and the error message is used to indicate that the target intent is inconsistent with the real intent.
  • the error information is the error information where the target intention does not match the text information and image information, the error information where the correlation between the intention information and the text information and the image information is less than a preset threshold, and the error information where the target intention is incomplete, such as: target intention B3, the true intention of combining text information and image information is C3, B3 ⁇ C3, then B3 is mismatched error information; or, if the similarity between B3 and C3 is less than the preset threshold, then B3 is that the degree of association is less than the preset threshold Or, B3 is "fire extinguisher", C3 is "how to use the fire extinguisher”, then B3 is the error message of incomplete target intention.
  • the server obtains the wrong information about the target intent entered by the user, and can also analyze the relevance of the text information and image information corresponding to the target intent and the target intent, and use the relevance as the score value.
  • the score value is less than the preset threshold.
  • the target intention and the corresponding text information and image information are used as the error information of the target intention to obtain the error information of the target intention, and the training sample information corresponding to the error information of the target intention is obtained, and the error information of the target intention and the training sample are obtained.
  • Deep ResNet deep residual network
  • the error information and training sample information of the target intent are trained through the deep ResNet to recognize the target intent in the text information and image information, and through reverse
  • the forward propagation algorithm and the first-order optimization algorithm adjust the weight values of the recognition of the target intent in the text information and the image information respectively, so as to realize the update and optimization of the recognition of the target intent in the text information and the image information.
  • the intra-modal and inter-modal attention mechanisms are used to fuse image information and text information to capture the image information, the text information, and the image information and text information.
  • the text information and the image information are classified to obtain the target intention, and through the deep residual network algorithm, the first-order optimization algorithm, Backpropagation algorithms and error information train and optimize the recognition of target intent in text information and image information to improve the accuracy of target intent recognition, thereby improving the accuracy of multi-modal intent recognition for information to be inferred.
  • An embodiment of the intent recognition apparatus based on the attention mechanism in the embodiment of the present application includes:
  • the feature extraction module 201 is used to obtain text information and image information, extract the intention features of the text information through the preset gated recurrent unit neural network model, obtain the text intention features, and use the preset regional convolutional neural network model to Extract the intent feature of the image information to obtain the image intent feature;
  • the calculation module 202 is configured to calculate the attention of the text intent feature and the image intent feature respectively to obtain the text attention value and the image attention value;
  • the first generation module 203 is configured to generate a text-heavy feature matrix according to the text attention value and the text intention feature, and generate the image-heavy feature matrix according to the image attention value and the image intention feature;
  • the second generation module 204 is used to generate attention fusion intent features according to text intent features, image intent features, text-heavy feature matrix, and image-heavy feature matrix, and according to preset gating mechanisms, text intent features, and image intent features, Generate gating mechanism to fuse intent features;
  • the splicing processing module 205 is used to merge the attention fusion intention feature and the gating mechanism fusion intention feature to perform splicing processing to obtain the target intention feature;
  • the intent classification module 206 is used to classify the intent of the target intent to obtain the corresponding target intent.
  • the second generation module 204 may also be specifically used for:
  • the first fusion intention feature and the second fusion intention feature are determined as attention fusion intention features.
  • the splicing processing module 205 may also be specifically used for:
  • the first target feature, the second target feature, and the third target feature are merged in parallel to obtain the target intention feature.
  • the second generation module 204 may also be specifically used for:
  • the updated text intent feature and the updated image intent feature are subjected to matrix multiplication processing to obtain the gating mechanism fusion intent feature.
  • the feature extraction module 201 may also be specifically used for:
  • the image object feature analysis is performed on the candidate intent feature map to obtain the image intent feature.
  • the feature extraction module 201 may also be specifically used for:
  • the intent classification module 206 may also be specifically used to:
  • Create the key value of the target intent feature retrieve the preset intent hash table according to the key value, and obtain the intent information corresponding to the key value from the intent hash table; take the intent information corresponding to the key value as the target intent.
  • the intent recognition device based on the attention mechanism further includes:
  • the optimization module is used to obtain the error information of the target intention. Based on the preset deep residual network algorithm, first-order optimization algorithm, back propagation algorithm and error information, it optimizes the recognition of the target intention in the text information and image information. Information is used to indicate that the target intention is inconsistent with the real intention.
  • each module and each unit in the above attention mechanism-based intention recognition device corresponds to the steps in the above-mentioned attention mechanism-based intention recognition method embodiment, and the functions and realization processes are not repeated here.
  • the intra-modal and inter-modal attention mechanisms are used to fuse image information and text information to capture the image information, the text information, and the image information and text information.
  • the text information and the image information are classified to obtain the target intention, and through the deep residual network algorithm, the first-order optimization algorithm, Backpropagation algorithms and error information train and optimize the recognition of target intent in text information and image information to improve the accuracy of target intent recognition, thereby improving the accuracy of multi-modal intent recognition for information to be inferred.
  • the above Figure 2 describes in detail the intent recognition device based on the attention mechanism in the embodiment of the present application from the perspective of the modular functional entity, and the following describes the intent recognition device based on the attention mechanism in the embodiment of the present application in detail from the perspective of hardware processing. .
  • FIG. 3 is a schematic structural diagram of an intent recognition device based on an attention mechanism provided by an embodiment of the present application.
  • the intent recognition device 300 based on an attention mechanism may have relatively large differences due to different configurations or performances, and may include one or One or more central processing units (CPU) 310 (for example, one or more processors) and memory 320, one or more storage media 330 for storing application programs 333 or data 332 (for example, one or one storage device with a large amount of storage) ).
  • the memory 320 and the storage medium 330 may be short-term storage or persistent storage.
  • the program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the intent recognition device 300 based on the attention mechanism.
  • the processor 310 may be configured to communicate with the storage medium 330, and execute a series of instruction operations in the storage medium 330 on the intent recognition device 300 based on the attention mechanism.
  • the intent recognition device 300 based on the attention mechanism may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and/or, one or more operating systems 331 , Such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD and so on.
  • operating systems 331 Such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD and so on.
  • FIG. 3 does not constitute a limitation on the intent recognition device based on the attention mechanism, and may include more or less components than those shown in the figure, or Combining certain components, or different component arrangements.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium.
  • the computer-readable storage medium may also be a volatile computer-readable storage medium.
  • the read storage medium stores instructions, and when the instructions run on the computer, the computer executes the steps of the intention recognition method based on the attention mechanism.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disks or optical disks and other media that can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computational Linguistics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Image Analysis (AREA)

Abstract

涉及人工智能领域,公开了一种基于注意力机制的意图识别方法、装置、设备(300)及存储介质,用于提高对需推理的信息进行多模态意图识别的准确性。方法包括:获取文本信息的文本意图特征和图像信息的图像意图特征(101);分别计算文本注意力值和图像注意力值(102);根据文本注意力值和文本意图特征以及图像注意力值与图像意图特征,分别获得文本偏重特征矩阵和图像偏重特征矩阵(103);根据文本意图特征、图像意图特征、文本偏重特征矩阵、图像偏重特征矩阵和预置门控机制,生成注意力融合意图特征和门控机制融合意图特征(104);将注意力融合意图特征和门控机制融合意图特征进行拼接处理得到目标意图特征(105);对目标意图特征进行意图分类得到对应的目标意图(106)。

Description

基于注意力机制的意图识别方法、装置、设备及存储介质
本申请要求于2020年5月21日提交中国专利局、申请号为202010433435.0、发明名称为“基于注意力机制的意图识别方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及知识表示与推理领域,尤其涉及一种基于注意力机制的意图识别方法、装置、设备及存储介质。
背景技术
随着语音技术和自然语言理解等技术的发展,语音交互系统也随之发展,成为当今的热门研究领域之一。随着语音交互系统的发展,在面对如何通过语音交互系统与用户进行有效的对话的问题时,对交互信息进行意图识别成为有力的解决方案,而对交互信息进行意图识别的准确性也就成为亟需解决的关注问题之一。目前的交互信息意图识别中,通过对交互信息进行特征提取,获得特征信息,通过多个预置的意图识别模型对该特征信息进行意图分类处理,从而实现意图识别。
发明人意识到在现有技术中,由于是采用双线性的多模态融合方式,在对于一些间接需要简单推理的信息时,并不能准确地对该信息的意图进行识别,且进行意图识别的信息类型有些局限,一般都是仅对文本信息进行意图识别,例如:当无法通过输入用语言表述对“安检红外闸机的使用”进行咨询时,需要输入“安检红外闸机”的图像以进行咨询,而双线性的多模态融合方式难以通过对“安检红外闸机”图像信息进行推理分析从而识别到对应的“安检红外闸机的使用”意图类型。因而,导致对需推理的信息进行多模态意图识别的准确性低。
发明内容
本申请的主要目的在于解决对需推理的信息进行多模态意图识别的准确性低的问题。
本申请第一方面提供了一种基于注意力机制的意图识别方法,包括:
获取文本信息和图像信息,通过预置的门控循环单元神经网络模型对所述文本信息进行意图特征提取,得到文本意图特征,并通过预置的区域卷积神经网络模型对所述图像信息进行意图特征提取,得到图像意图特征;
分别计算所述文本意图特征和所述图像意图特征的注意力,得到文本注意力值和图像注意力值;
根据所述文本注意力值与所述文本意图特征生成文本偏重特征矩阵,并根据所述图像注意力值与所述图像意图特征生成图像偏重特征矩阵;
根据所述文本意图特征、所述图像意图特征、所述文本偏重特征矩阵和所述图像偏重特征矩阵,生成注意力融合意图特征,并根据预置门控机制、所述文本意图特征和所述图像意图特征,生成门控机制融合意图特征;
将所述注意力融合意图特征和所述门控机制融合意图特征进行拼接处理,得到目标意图特征;
对所述目标意图特征进行意图分类,得到对应的目标意图。
本申请第二方面提供了一种基于注意力机制的意图识别设备,所述基于注意力机制的意图识别设备包括:存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的基于注意力机制的意图识别程序,所述处理器执行所述基于注意力机制的意图识别程序时实现如下步骤:
获取文本信息和图像信息,通过预置的门控循环单元神经网络模型对所述文本信息进行意图特征提取,得到文本意图特征,并通过预置的区域卷积神经网络模型对所述图像信 息进行意图特征提取,得到图像意图特征;
分别计算所述文本意图特征和所述图像意图特征的注意力,得到文本注意力值和图像注意力值;
根据所述文本注意力值与所述文本意图特征生成文本偏重特征矩阵,并根据所述图像注意力值与所述图像意图特征生成图像偏重特征矩阵;
根据所述文本意图特征、所述图像意图特征、所述文本偏重特征矩阵和所述图像偏重特征矩阵,生成注意力融合意图特征,并根据预置门控机制、所述文本意图特征和所述图像意图特征,生成门控机制融合意图特征;
将所述注意力融合意图特征和所述门控机制融合意图特征进行拼接处理,得到目标意图特征;
对所述目标意图特征进行意图分类,得到对应的目标意图。
本申请第三方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:
获取文本信息和图像信息,通过预置的门控循环单元神经网络模型对所述文本信息进行意图特征提取,得到文本意图特征,并通过预置的区域卷积神经网络模型对所述图像信息进行意图特征提取,得到图像意图特征;
分别计算所述文本意图特征和所述图像意图特征的注意力,得到文本注意力值和图像注意力值;
根据所述文本注意力值与所述文本意图特征生成文本偏重特征矩阵,并根据所述图像注意力值与所述图像意图特征生成图像偏重特征矩阵;
根据所述文本意图特征、所述图像意图特征、所述文本偏重特征矩阵和所述图像偏重特征矩阵,生成注意力融合意图特征,并根据预置门控机制、所述文本意图特征和所述图像意图特征,生成门控机制融合意图特征;
将所述注意力融合意图特征和所述门控机制融合意图特征进行拼接处理,得到目标意图特征;
对所述目标意图特征进行意图分类,得到对应的目标意图。
本申请第四方面提供了一种基于注意力机制的意图识别装置,包括:
特征提取模块,用于获取文本信息和图像信息,通过预置的门控循环单元神经网络模型对所述文本信息进行意图特征提取,得到文本意图特征,并通过预置的区域卷积神经网络模型对所述图像信息进行意图特征提取,得到图像意图特征;
计算模块,用于分别计算所述文本意图特征和所述图像意图特征的注意力,得到文本注意力值和图像注意力值;
第一生成模块,用于根据所述文本注意力值与所述文本意图特征生成文本偏重特征矩阵,并根据所述图像注意力值与所述图像意图特征生成图像偏重特征矩阵;
第二生成模块,用于根据所述文本意图特征、所述图像意图特征、所述文本偏重特征矩阵和所述图像偏重特征矩阵,生成注意力融合意图特征,并根据预置门控机制、所述文本意图特征和所述图像意图特征,生成门控机制融合意图特征;
拼接处理模块,用于将所述注意力融合意图特征和所述门控机制融合意图特征进行拼接处理,得到目标意图特征;
意图分类模块,用于对所述目标意图特征进行意图分类,得到对应的目标意图。
本申请提供的技术方案中,获取文本信息的文本意图特征和图像信息的图像意图特征;分别计算文本注意力值和图像注意力值;根据文本注意力值与文本意图特征生成文本偏重特征矩阵,并根据图像注意力值与图像意图特征生成图像偏重特征矩阵;根据文本意图特 征、图像意图特征、文本偏重特征矩阵和图像偏重特征矩阵,生成注意力融合意图特征,并根据预置门控机制、文本意图特征和图像意图特征,生成门控机制融合意图特征;将注意力融合意图特征和门控机制融合意图特征进行拼接处理,得到目标意图特征;对目标意图特征进行意图分类,得到对应的目标意图。本申请中,在多模态融合基础上,采用模态内和模态间的注意力机制对图像信息与文本信息进行融合,以捕获图像信息内、文本信息内以及图像信息和文本信息之间的联系,根据图像信息内、文本信息内以及图像信息和文本信息之间的联系对文本信息和图像信息进行意图分类,获得目标意图,提高对需推理的信息进行多模态意图识别的准确性。
附图说明
图1为本申请实施例中基于注意力机制的意图识别方法的一个实施例示意图;
图2为本申请实施例中基于注意力机制的意图识别装置的一个实施例示意图;
图3为本申请实施例中基于注意力机制的意图识别设备的一个实施例示意图。
具体实施方式
本申请实施例提供了一种基于注意力机制的意图识别方法、装置、设备及存储介质,提高对需推理的信息进行多模态意图识别的准确性。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”或“具有”及其任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
为便于理解,下面对本申请实施例的具体流程进行描述,请参阅图1,本申请实施例中基于注意力机制的意图识别方法的一个实施例包括:
101、获取文本信息和图像信息,通过预置的门控循环单元神经网络模型对文本信息进行意图特征提取,得到文本意图特征,并通过预置的区域卷积神经网络模型对图像信息进行意图特征提取,得到图像意图特征;
可以理解的是,本申请的执行主体可以为基于注意力机制的意图识别装置,还可以是终端或者服务器,具体此处不做限定。本申请实施例以服务器为执行主体为例进行说明。
其中,服务器获得文本信息和图像信息后,调用预置的门控循环单元神经网络(gated recurrent unit,GRU)模型,通过门控循环单元神经网络模型中上一个传输特征的状态、当前节点的特征输入和激活函数sigmoid,获取控制重置的门控值和控制更新的门控值,通过重置门结合控制重置的门控值对文本意图特征进行重置处理,得到候选重置信息,以及通过激活函数tanh将候选重置信息放缩到-1~1的范围内得到目标重置信息,通过重置门结合控制更新门的门控值对目标重置信息进行更新处理,得到文本信息的文本意图特征。通过门控循环单元神经网络GRU模型的快速迭代特性对文本信息进行意图特征提取,提高意图特征提取的收敛速度和进程操作效率。服务器调用预置的区域卷积神经网络模型(faster-regions with cnn features,Faster-RCNN)中对图像信息进行意图特征提取,提高对图像意图特征提取的准确度和效率。
具体地,服务器获取待识别信息,并识别待识别信息中各信息的数据类型;服务器根据数据类型对待识别信息进行分类,得到分类信息;服务器调用预置的文本处理模型和图像处理模型分别对分类信息进行数据变换处理,得到文本信息和图像信息。
待识别信息可为语音信息、文本信息、视频信息和图像信息中的任意两种,例如:待 识别信息中可包括语音信息、文本信息和视频信息,也可包括文本信息和图像信息。服务器根据读取的待识别信息的数据类型调用对应的数据处理算法或工具对其进行一系列的数据预处理(数据变换处理和/或分类处理),例如:分类信息分别为语音信息A和视频信息B,则服务器调用语音识别模型(文本处理模型)将A转换为文本信息,调用截取工具或视频图像截取模型(图像处理模型)对B进行图像截取处理,得到图像信息。通过对待识别信息进行数据预处理,以便于快速而准确地对待识别信息中不同的信息进行对应的操作,进而既能保证信息的质量,又能提高操作效率。
具体地,服务器调用预置的区域卷积神经网络模型中的卷积神经网络层,对图像信息的意图特征图谱进行提取,得到意图特征图谱;服务器对意图特征图谱进行图像物体识别,得到候选意图特征图谱,并生成候选意图特征图谱的建议窗口;服务器通过建议窗口和区域卷积神经网络模型中的视觉几何群网络全连接层,对候选意图特征图谱进行图像物体特征分析,得到图像意图特征。
例如:服务器调用预置的区域卷积神经网络模型(faster-regions with cnn features,Faster-RCNN)中的卷积+非线性+池化层(即卷积神经网络层)提取图像意图特征的意图特征图谱,对意图特征图谱进行裁剪过滤处理,并对经过裁剪过滤处理的意图特征图谱进行图像物体识别获得候选意图特征图谱,识别意图特征图谱中的特征信息是否为物体,并通过边界框回归bounding box regression进行修正,以生成建议窗口proposals,根据proposals和视觉几何群网络(visual geometry group network 16,VGG16)的全连接层(即视觉几何群网络全连接层)对候选意图特征图谱进行分析,获得图像意图特征。通过Faster–RCNN对图像信息进行意图特征提取,提高对图像意图特征提取的准确度和效率。
102、分别计算文本意图特征和图像意图特征的注意力,得到文本注意力值和图像注意力值;
其中,服务器可通过计算文本意图特征中查询信息与键值的相似度值,获得权重,通过预置的分类函数对权重进行归一化处理,获得目标权重,将目标权重和目标权重对应的键值进行加权求和,获得文本意图特征中每个文本意图特征对应的注意力值;通过计算预置解码器的第一个隐藏状态和预置编码器的所有隐藏状态之间的相关性,以获取编码器隐藏状态对应的分数;将分数输入到分类器softmax层进行归一化处理,获得注意力分配的权重值;通过该注意力分配的权重值对键值进行加权求和,获得文本注意力值。同理可得图像注意力值。
103、根据文本注意力值与文本意图特征生成文本偏重特征矩阵,并根据图像注意力值与图像意图特征生成图像偏重特征矩阵;
其中,服务器通过预置的门控循环单元神经网络模型获得的文本意图特征,和通过预置的区域卷积神经网络模型获得的图像意图特征均为矩阵向量,服务器获得图像注意力和图像注意力之后,可通过矩阵向量相乘的方式生成文本偏重特征矩阵,例如:文本注意力值为C,文本意图特征为C1,图像注意力值为D,图像意图特征为D1,则文本偏重特征矩阵为C·C1,图像偏重特征矩阵为D·D1。通过获取文本偏重特征矩阵和图像偏重特征矩阵,以利用有限的注意力资源从大量特征信息(文本意图特征和图像意图特征)中快速筛选出高价值的信息。
104、根据文本意图特征、图像意图特征、文本偏重特征矩阵和图像偏重特征矩阵,生成注意力融合意图特征,并根据预置门控机制、文本意图特征和图像意图特征,生成门控机制融合意图特征;
服务器通过将文本偏重特征矩阵与图像意图特征进行特征拼接处理,将图像偏重特征 矩阵与文本意图特征进行特征拼接处理,以实现跨模态间的特征拼接处理,通过将文本偏重特征矩阵与文本意图特征之间进行特征拼接处理,将图像偏重特征矩阵与图像意图特征之间进行特征拼接处理,以实现模态内的特征拼接处理,从而获得注意力融合意图特征。文本意图特征与图像意图特征进行拼接处理之前,通过预置门控机制对文本意图特征和图像意图特征进行过滤。通过对跨模态间的特征拼接处理和模态内的特征拼接处理,以结合文本意图特征和图像意图特征,为意图识别提供更多可匹配的信息,充分利用输入的融合特征的序列携带的信息,从而提高需推理信息的多模态意图识别准确性。
具体地,服务器将文本偏重特征矩阵与图像意图特征相乘得到文本图像融合特征,将图像偏重特征矩阵与文本意图特征相乘得到图像文本融合特征,将文本图像融合特征和图像文本融合特征确定为第一融合意图特征;服务器将文本偏重特征矩阵与文本意图特征相乘得到文本融合特征,将图像偏重特征矩阵与图像意图特征相乘得到图像融合特征,将文本融合特征和图像融合特征确定为第二融合意图特征;服务器将第一融合意图特征和第二融合意图特征确定为注意力融合意图特征。
例如:文本偏重特征矩阵为甲,文本意图特征为丙,图像偏重特征矩阵为丁,图像意图特征为戊,则甲与戊的乘积为文本图像融合特征甲1,丁与丙的乘积为图像文本融合特征乙1,甲与丙的乘积为文本融合特征丙1,丁与戊的乘积为图像融合特征丁1,而甲1和乙1为第一融合意图特征,丙1和丁1为第二融合意图特征。其中,服务器也可通过预置的多视图学习算法(multi-view learning,MVL)分别对文本意图特征和图像意图特征中的每个意图特征和注意力机制处理后的偏重特征(即文本图像融合特征和图像文本融合特征)创建一个核函数,合成所有核函数,获得核特征,通过回归函数或分类器对核特征进行回归处理和分类处理,从而获得第一融合意图特征。同理可得第二融合意图特征。
具体地,服务器通过预置门控机制计算文本信息对图像信息的文本图像门控值,以及图像信息对文本信息的图像文本门控值;服务器根据预置门控机制中的门控循环单元和文本图像门控值对文本意图特征进行过滤选择处理,得到更新后的文本意图特征,并根据门控循环单元和图像文本门控值对图像意图特征进行过滤选择处理,得到更新后的图像意图特征;服务器将更新后的文本意图特征和更新后的图像意图特征进行矩阵相乘处理,得到门控机制融合意图特征。
其中,服务器通过以下公式计算文本信息对图像信息的文本图像门控值和图像信息对文本信息的图像文本门控值,公式如下:G R→E=σ(Linear(Avg Pool(R);θ RP)),G R←E=σ(Linear(Avg Pool(E);θ EP)),其中,G R→E表示文本图像门控值,G R←E表示图像文本门控值,Avg Pool表示池化层的平均池化处理,Linear表示线性层的处理,R表示文本意图特征,E表示图像意图特征,θ RP表示对文本意图特征进行处理的线性层的参数,θ EP表示对图像意图特征进行处理的线性层的参数,σ表示用于将值映射到0-1之间的参数。
更新后的文本意图特征和图像意图特征均为矩阵向量,服务器将更新后的文本意图特征对应的矩阵向量和更新后的图像意图特征对应的矩阵向量进行相乘,得到门控机制融合意图特征。通过预置的门控循环单元对文本意图特征和图像意图特征进行过滤处理(即选择处理),以保证文本意图特征和图像意图特征的质量,从而提高将文本意图特征和图像意图特征融合所得的门控机制融合意图特征的准确性。
105、将注意力融合意图特征和门控机制融合意图特征进行拼接处理,得到目标意图特 征;
服务器也可通过预置的数值计算扩展Numpy系统中的column_stack函数和row_stack函数对注意力融合意图特征和门控机制融合意图特征进行特征矩阵向量相加,以合并为一个矩阵,例如:注意力融合意图特征的特征矩阵向量为A2,门控机制融合意图特征中的特征矩阵向量为B2,则目标意图特征为C2=A2+B2。服务器也可通过预置的基于协方差矩阵的多特征融合跟踪算法利用区域协方差描述子将注意力意图融合特征和门控机制意图融合特征中图像特征的颜色、边缘和纹理等特征与注意力融合意图特征和门控机制融合意图特征中对应的文本意图特征进行融合,并通过快速协方差交叉算法提取注意力融合意图特征和注意力融合意图特征中的协方差矩阵中的有效信息对融合的注意力融合意图特征和门控机制融合意图特征进行更新,从而获得目标意图特征。通过对注意力融合意图特征、第二融合意图特征和门控机制融合意图特征进行拼接处理,实现在强调有偏重(注意力分配的权重值)的目标意图特征的基础上能不丢失原始的注意力融合意图特征和门控机制融合意图特征。
具体地,服务器分别对第一融合意图特征、第二融合意图特征和门控机制融合意图特征进行主要成分提取处理,得到第一初始特征、第二初始特征和第三初始特征;服务器分别对第一初始特征、第二初始特征和第三初始特征进行降维处理,得到第一目标特征、第二目标特征和第三目标特征;服务器将第一目标特征、第二目标特征和第三目标特征进行并行融合,得到目标意图特征。
例如:第一融合意图特征、第二融合意图特征和门控机制融合意图特征为矩阵S、矩阵L和矩阵T,服务器通过预置的主要成分分析算法(Principal Component Analysis,PCA),根据S的协方差矩阵求得S对应的转换矩阵D,根据L的协方差矩阵求得L对应的转换矩阵L1,根据T的协方差矩阵求得T对应的转换矩阵H,通过转换矩阵D将矩阵S转换到主成分的变换域上,得到第一初始特征K=S·D,通过转换矩阵L1将矩阵L转换到主成分的变换域上,得到第二初始特征矩阵Y=L·L1,通过转换矩阵H将矩阵T转换到主成分的变换域上,将得到第三初始特征矩阵W=T·H,将K、Y和W中的各列按照方差值从小到大的顺序进行排序,并分别提取K、Y和W中的前N维的主成分,将前N维的主成分组成e行r列的第一目标特征矩阵、第二目标特征矩阵和第三目标特征矩阵,通过预设负向量将第一目标特征矩阵、第二目标特征矩阵和第三目标特征矩阵进行矩阵的并行相加以组成一个特征向量,得到目标意图特征。
106、对目标意图特征进行意图分类,得到对应的目标意图。
服务器获得目标意图特征后,将目标意图特征输入到预置的意图分类器中,通过预置的意图分类器结合目标特征匹配到对应的意图类型,以对待识别信息的意图分类处理,获得待识别信息对应的目标意图。服务器也可通过从数据库中获取具备有目标意图特征的历史待识别信息,从历史待识别信息的便签信息中获取对应的意图信息,从而获得文本信息和图像信息对应的目标意图。通过结合目标意图特征进行意图识别,为意图识别提供多角度的分类信息,有效地对需推理信息进行多模态的意图识别,提高需推理信息的多模态意图识别准确性。服务器也可创建目标意图特征的第一知识图谱和获取预置的意图知识图谱,对第一知识图谱和意图知识图谱之间进行对比分析,获取与第一知识图谱中的节点信息相同或相似最多所对应的意图知识图谱的目标节点信息,将目标节点信息对应的意图作为目标意图。
具体地,服务器创建目标意图特征的键值,根据键值检索预置的意图哈希表,从意图哈希表中获取与键值对应的意图信息;服务器将与键值对应的意图信息作为目标意图。
经过注意力机制处理所得的目标意图特征均为矩阵向量。数据库中存储有意图哈希表, 该意图哈希表包括意图类型、意图类型对应的特征信息和意图类型对应的回复信息,服务器从意图哈希表中匹配与目标意图特征对应的意图类型和意图类型对应的回复信息,获得对应的目标意图。通过键值和哈希表方式进行检索和匹配,提高目标意图获取的准确性和效率,从而提高需推理信息的多模态意图识别准确性。
可选的,服务器对目标意图特征进行意图分类,得到对应的目标意图之后,获取目标意图的错误信息,基于预置的深度残差网络算法、一阶优化算法、反向传播算法和错误信息,对文本信息和图像信息中目标意图的识别进行优化,错误信息用于指示目标意图与真实意图不一致。
其中,错误信息为目标意图与文本信息和图像信息不匹配的错误信息、意图信息与文本信息和图像信息的关联度小于预设阈值的错误信息和目标意图不完整的错误信息,例如:目标意图为B3,结合文本信息和图像信息的真实意图为C3,B3≠C3,则B3为不匹配的错误信息;或者,B3与C3的相似度小于预设阈值,则B3为关联度小于预设阈值的错误信息;或者,B3为“灭火器”,C3为“如何使用灭火器”,则B3为目标意图不完整的错误信息。
服务器通过获取用户输入的关于目标意图的错误信息,也可通过对目标意图和目标意图对应的文本信息和图像信息进行关联性分析,并将关联性作为评分值,将评分值小于预设阈值的目标意图和对应的文本信息和图像信息作为目标意图的错误信息而获得目标意图的错误信息,以及获取目标意图的错误信息对应的待识别的训练样本信息,将该目标意图的错误信息和训练样本信息输入深度残差网络算法(deep residual network,Deep ResNet)中,通过深度ResNet对该目标意图的错误信息和训练样本信息分别对对文本信息和图像信息中目标意图的识别进行训练,并通过反向传播算法和一阶优化算法(adaptive moment estimation,Adam)分别对文本信息和图像信息中目标意图的识别的权重值调整,以实现对对文本信息和图像信息中目标意图的识别的更新优化。
通过深度残差网络算法、一阶优化算法Adam优化算法、反向传播算法和错误信息对文本信息和图像信息中目标意图的识别进行训练和优化,以提高目标意图的识别准确度,从而提高了需推理信息的多模态意图识别准确性。
本申请实施例中,在多模态融合基础上,采用模态内和模态间的注意力机制对图像信息与文本信息进行融合,以捕获图像信息内、文本信息内以及图像信息和文本信息之间的联系,根据图像信息内、文本信息内以及图像信息和文本信息之间的联系对文本信息和图像信息进行意图分类,获得目标意图,并通过深度残差网络算法、一阶优化算法、反向传播算法和错误信息对文本信息和图像信息中目标意图的识别进行训练和优化,以提高目标意图的识别准确度,从而提高了对需推理的信息进行多模态意图识别的准确性。
请参阅图2,本申请实施例中基于注意力机制的意图识别装置的一个实施例包括:
特征提取模块201,用于获取文本信息和图像信息,通过预置的门控循环单元神经网络模型对文本信息进行意图特征提取,得到文本意图特征,并通过预置的区域卷积神经网络模型对图像信息进行意图特征提取,得到图像意图特征;
计算模块202,用于分别计算文本意图特征和图像意图特征的注意力,得到文本注意力值和图像注意力值;
第一生成模块203,用于根据文本注意力值与文本意图特征生成文本偏重特征矩阵,并根据图像注意力值与图像意图特征生成图像偏重特征矩阵;
第二生成模块204,用于根据文本意图特征、图像意图特征、文本偏重特征矩阵和图像偏重特征矩阵,生成注意力融合意图特征,并根据预置门控机制、文本意图特征和图像意图特征,生成门控机制融合意图特征;
拼接处理模块205,用于将注意力融合意图特征和门控机制融合意图特征进行拼接处理,得到目标意图特征;
意图分类模块206,用于对目标意图特征进行意图分类,得到对应的目标意图。
可选的,第二生成模块204还可以具体用于:
将文本偏重特征矩阵与图像意图特征相乘得到文本图像融合特征,将图像偏重特征矩阵与文本意图特征相乘得到图像文本融合特征,将文本图像融合特征和图像文本融合特征确定为第一融合意图特征;
将文本偏重特征矩阵与文本意图特征相乘得到文本融合特征,将图像偏重特征矩阵与图像意图特征相乘得到图像融合特征,将文本融合特征和图像融合特征确定为第二融合意图特征;
将第一融合意图特征和第二融合意图特征确定为注意力融合意图特征。
可选的,拼接处理模块205还可以具体用于:
分别对第一融合意图特征、第二融合意图特征和门控机制融合意图特征进行主要成分提取处理,得到第一初始特征、第二初始特征和第三初始特征;
分别对第一初始特征、第二初始特征和第三初始特征进行降维处理,得到第一目标特征、第二目标特征和第三目标特征;
将第一目标特征、第二目标特征和第三目标特征进行并行融合,得到目标意图特征。
可选的,第二生成模块204还可以具体用于:
通过预置门控机制计算文本信息对图像信息的文本图像门控值,以及图像信息对文本信息的图像文本门控值;
根据预置门控机制中的门控循环单元和文本图像门控值对文本意图特征进行过滤选择处理,得到更新后的文本意图特征,并根据门控循环单元和图像文本门控值对图像意图特征进行过滤选择处理,得到更新后的图像意图特征;
将更新后的文本意图特征和更新后的图像意图特征进行矩阵相乘处理,得到门控机制融合意图特征。
可选的,特征提取模块201还可以具体用于:
调用预置的区域卷积神经网络模型中的卷积神经网络层,对图像信息的意图特征图谱进行提取,得到意图特征图谱;
对意图特征图谱进行图像物体识别,得到候选意图特征图谱,并生成候选意图特征图谱的建议窗口;
通过建议窗口和区域卷积神经网络模型中的视觉几何群网络全连接层,对候选意图特征图谱进行图像物体特征分析,得到图像意图特征。
可选的,特征提取模块201还可以具体用于:
获取待识别信息,并识别待识别信息中各信息的数据类型;
根据数据类型对待识别信息进行分类,得到分类信息;
调用预置的文本处理模型和图像处理模型分别对分类信息进行数据变换处理,得到文本信息和图像信息。
可选的,意图分类模块206还可以具体用于:
创建目标意图特征的键值,根据键值检索预置的意图哈希表,从意图哈希表中获取与键值对应的意图信息;将与键值对应的意图信息作为目标意图。
可选的,基于注意力机制的意图识别装置,还包括:
优化模块,用于获取目标意图的错误信息,基于预置的深度残差网络算法、一阶优化算法、反向传播算法和错误信息,对文本信息和图像信息中目标意图的识别进行优化,错 误信息用于指示目标意图与真实意图不一致。
上述基于注意力机制的意图识别装置中各模块和各单元的功能实现与上述基于注意力机制的意图识别方法实施例中各步骤相对应,其功能和实现过程在此处不再一一赘述。
本申请实施例中,在多模态融合基础上,采用模态内和模态间的注意力机制对图像信息与文本信息进行融合,以捕获图像信息内、文本信息内以及图像信息和文本信息之间的联系,根据图像信息内、文本信息内以及图像信息和文本信息之间的联系对文本信息和图像信息进行意图分类,获得目标意图,并通过深度残差网络算法、一阶优化算法、反向传播算法和错误信息对文本信息和图像信息中目标意图的识别进行训练和优化,以提高目标意图的识别准确度,从而提高了对需推理的信息进行多模态意图识别的准确性。
上面图2从模块化功能实体的角度对本申请实施例中的基于注意力机制的意图识别装置进行详细描述,下面从硬件处理的角度对本申请实施例中基于注意力机制的意图识别设备进行详细描述。
图3是本申请实施例提供的一种基于注意力机制的意图识别设备的结构示意图,该基于注意力机制的意图识别设备300可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processing units,CPU)310(例如,一个或一个以上处理器)和存储器320,一个或一个以上存储应用程序333或数据332的存储介质330(例如一个或一个以上海量存储设备)。其中,存储器320和存储介质330可以是短暂存储或持久存储。存储在存储介质330的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对基于注意力机制的意图识别设备300中的一系列指令操作。更进一步地,处理器310可以设置为与存储介质330通信,在基于注意力机制的意图识别设备300上执行存储介质330中的一系列指令操作。
基于注意力机制的意图识别设备300还可以包括一个或一个以上电源340,一个或一个以上有线或无线网络接口350,一个或一个以上输入输出接口360,和/或,一个或一个以上操作系统331,例如Windows Serve,Mac OS X,Unix,Linux,FreeBSD等等。本领域技术人员可以理解,图3示出的基于注意力机制的意图识别设备结构并不构成对基于注意力机制的意图识别设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
本申请还提供一种计算机可读存储介质,该计算机可读存储介质可以为非易失性计算机可读存储介质,该计算机可读存储介质也可以为易失性计算机可读存储介质,计算机可读存储介质中存储有指令,当指令在计算机上运行时,使得计算机执行基于注意力机制的意图识别方法的步骤。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实 施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (20)

  1. 一种基于注意力机制的意图识别方法,其中,所述基于注意力机制的意图识别方法包括:
    获取文本信息和图像信息,通过预置的门控循环单元神经网络模型对所述文本信息进行意图特征提取,得到文本意图特征,并通过预置的区域卷积神经网络模型对所述图像信息进行意图特征提取,得到图像意图特征;
    分别计算所述文本意图特征和所述图像意图特征的注意力,得到文本注意力值和图像注意力值;
    根据所述文本注意力值与所述文本意图特征生成文本偏重特征矩阵,并根据所述图像注意力值与所述图像意图特征生成图像偏重特征矩阵;
    根据所述文本意图特征、所述图像意图特征、所述文本偏重特征矩阵和所述图像偏重特征矩阵,生成注意力融合意图特征,并根据预置门控机制、所述文本意图特征和所述图像意图特征,生成门控机制融合意图特征;
    将所述注意力融合意图特征和所述门控机制融合意图特征进行拼接处理,得到目标意图特征;
    对所述目标意图特征进行意图分类,得到对应的目标意图。
  2. 根据权利要求1所述的基于注意力机制的意图识别方法,其中,所述根据所述文本意图特征、所述图像意图特征、所述文本偏重特征矩阵和所述图像偏重特征矩阵,生成注意力融合意图特征,包括:
    将所述文本偏重特征矩阵与所述图像意图特征相乘得到文本图像融合特征,将所述图像偏重特征矩阵与所述文本意图特征相乘得到图像文本融合特征,将所述文本图像融合特征和所述图像文本融合特征确定为第一融合意图特征;
    将所述文本偏重特征矩阵与所述文本意图特征相乘得到文本融合特征,将所述图像偏重特征矩阵与所述图像意图特征相乘得到图像融合特征,将所述文本融合特征和所述图像融合特征确定为第二融合意图特征;
    将所述第一融合意图特征和所述第二融合意图特征确定为注意力融合意图特征。
  3. 根据权利要求2所述的基于注意力机制的意图识别方法,其中,所述将所述注意力融合意图特征和所述门控机制融合意图特征进行拼接处理,得到目标意图特征,包括:
    分别对所述第一融合意图特征、所述第二融合意图特征和所述门控机制融合意图特征进行主要成分提取处理,得到第一初始特征、第二初始特征和第三初始特征;
    分别对所述第一初始特征、所述第二初始特征和所述第三初始特征进行降维处理,得到第一目标特征、第二目标特征和第三目标特征;
    将所述第一目标特征、所述第二目标特征和所述第三目标特征进行并行融合,得到目标意图特征。
  4. 根据权利要求1所述的基于注意力机制的意图识别方法,其中,所述根据预置门控机制、所述文本意图特征和所述图像意图特征,生成门控机制融合意图特征,包括:
    通过预置门控机制计算所述文本信息对所述图像信息的文本图像门控值,以及所述图像信息对所述文本信息的图像文本门控值;
    根据预置门控机制中的门控循环单元和所述文本图像门控值对所述文本意图特征进行过滤选择处理,得到更新后的文本意图特征,并根据所述门控循环单元和所述图像文本门控值对所述图像意图特征进行过滤选择处理,得到更新后的图像意图特征;
    将所述更新后的文本意图特征和所述更新后的图像意图特征进行矩阵相乘处理,得到门控机制融合意图特征。
  5. 根据权利要求1所述的基于注意力机制的意图识别方法,其中,所述通过预置的区域卷积神经网络模型对所述待识别信息中的图像信息进行意图特征提取,得到图像意图特征,包括:
    调用预置的区域卷积神经网络模型中的卷积神经网络层,对所述图像信息的意图特征图谱进行提取,得到意图特征图谱;
    对所述意图特征图谱进行图像物体识别,得到候选意图特征图谱,并生成所述候选意图特征图谱的建议窗口;
    通过所述建议窗口和所述区域卷积神经网络模型中的视觉几何群网络全连接层,对所述候选意图特征图谱进行图像物体特征分析,得到图像意图特征。
  6. 根据权利要求1所述的基于注意力机制的意图识别方法,其中,所述获取文本信息和图像信息,包括:
    获取待识别信息,并识别所述待识别信息中各信息的数据类型;
    根据所述数据类型对所述待识别信息进行分类,得到分类信息;
    调用预置的文本处理模型和图像处理模型分别对所述分类信息进行数据变换处理,得到文本信息和图像信息。
  7. 根据权利要求1-6中任一项所述的基于注意力机制的意图识别方法,其中,所述对所述目标意图特征进行意图分类,得到对应的目标意图之后,还包括:
    获取所述目标意图的错误信息,基于预置的深度残差网络算法、一阶优化算法、反向传播算法和所述错误信息,对所述文本信息和所述图像信息中目标意图的识别进行优化,所述错误信息用于指示所述目标意图与真实意图不一致。
  8. 一种基于注意力机制的意图识别设备,其中,所述基于注意力机制的意图识别设备包括:存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的基于注意力机制的意图识别程序,所述处理器执行所述基于注意力机制的意图识别程序时实现如下步骤:
    获取文本信息和图像信息,通过预置的门控循环单元神经网络模型对所述文本信息进行意图特征提取,得到文本意图特征,并通过预置的区域卷积神经网络模型对所述图像信息进行意图特征提取,得到图像意图特征;
    分别计算所述文本意图特征和所述图像意图特征的注意力,得到文本注意力值和图像注意力值;
    根据所述文本注意力值与所述文本意图特征生成文本偏重特征矩阵,并根据所述图像注意力值与所述图像意图特征生成图像偏重特征矩阵;
    根据所述文本意图特征、所述图像意图特征、所述文本偏重特征矩阵和所述图像偏重特征矩阵,生成注意力融合意图特征,并根据预置门控机制、所述文本意图特征和所述图像意图特征,生成门控机制融合意图特征;
    将所述注意力融合意图特征和所述门控机制融合意图特征进行拼接处理,得到目标意图特征;
    对所述目标意图特征进行意图分类,得到对应的目标意图。
  9. 如权利要求8所述的基于注意力机制的意图识别设备,其中,所述处理器执行所述基于注意力机制的意图识别程序实现所述根据所述文本意图特征、所述图像意图特征、所述文本偏重特征矩阵和所述图像偏重特征矩阵,生成注意力融合意图特征时,包括以下步骤:
    将所述文本偏重特征矩阵与所述图像意图特征相乘得到文本图像融合特征,将所述图像偏重特征矩阵与所述文本意图特征相乘得到图像文本融合特征,将所述文本图像融合特征和所述图像文本融合特征确定为第一融合意图特征;
    将所述文本偏重特征矩阵与所述文本意图特征相乘得到文本融合特征,将所述图像偏重特征矩阵与所述图像意图特征相乘得到图像融合特征,将所述文本融合特征和所述图像融合特征确定为第二融合意图特征;
    将所述第一融合意图特征和所述第二融合意图特征确定为注意力融合意图特征。
  10. 如权利要求9所述的基于注意力机制的意图识别设备,其中,所述处理器执行所述基于注意力机制的意图识别程序实现所述根据所述将所述注意力融合意图特征和所述门控机制融合意图特征进行拼接处理,得到目标意图特征时,包括以下步骤:
    分别对所述第一融合意图特征、所述第二融合意图特征和所述门控机制融合意图特征进行主要成分提取处理,得到第一初始特征、第二初始特征和第三初始特征;
    分别对所述第一初始特征、所述第二初始特征和所述第三初始特征进行降维处理,得到第一目标特征、第二目标特征和第三目标特征;
    将所述第一目标特征、所述第二目标特征和所述第三目标特征进行并行融合,得到目标意图特征。
  11. 如权利要求8所述的基于注意力机制的意图识别设备,其中,所述处理器执行所述基于注意力机制的意图识别程序实现所述根据所述根据预置门控机制、所述文本意图特征和所述图像意图特征,生成门控机制融合意图特征时,包括以下步骤:
    通过预置门控机制计算所述文本信息对所述图像信息的文本图像门控值,以及所述图像信息对所述文本信息的图像文本门控值;
    根据预置门控机制中的门控循环单元和所述文本图像门控值对所述文本意图特征进行过滤选择处理,得到更新后的文本意图特征,并根据所述门控循环单元和所述图像文本门控值对所述图像意图特征进行过滤选择处理,得到更新后的图像意图特征;
    将所述更新后的文本意图特征和所述更新后的图像意图特征进行矩阵相乘处理,得到门控机制融合意图特征。
  12. 如权利要求8所述的基于注意力机制的意图识别设备,其中,所述处理器执行所述基于注意力机制的意图识别程序实现所述根据所述通过预置的区域卷积神经网络模型对所述待识别信息中的图像信息进行意图特征提取,得到图像意图特征时,包括以下步骤:
    调用预置的区域卷积神经网络模型中的卷积神经网络层,对所述图像信息的意图特征图谱进行提取,得到意图特征图谱;
    对所述意图特征图谱进行图像物体识别,得到候选意图特征图谱,并生成所述候选意图特征图谱的建议窗口;
    通过所述建议窗口和所述区域卷积神经网络模型中的视觉几何群网络全连接层,对所述候选意图特征图谱进行图像物体特征分析,得到图像意图特征。
  13. 如权利要求8所述的基于注意力机制的意图识别设备,其中,所述处理器执行所述基于注意力机制的意图识别程序实现所述根据所述获取文本信息和图像信息时,包括以下步骤:
    获取待识别信息,并识别所述待识别信息中各信息的数据类型;
    根据所述数据类型对所述待识别信息进行分类,得到分类信息;
    调用预置的文本处理模型和图像处理模型分别对所述分类信息进行数据变换处理,得到文本信息和图像信息。
  14. 如权利要求8-13中任一项所述的基于注意力机制的意图识别设备,其中,所述处理器执行所述基于注意力机制的意图识别程序实现所述根据所述目标意图特征进行意图分类,得到对应的目标意图之后,还包括以下步骤:
    获取所述目标意图的错误信息,基于预置的深度残差网络算法、一阶优化算法、反向 传播算法和所述错误信息,对所述文本信息和所述图像信息中目标意图的识别进行优化,所述错误信息用于指示所述目标意图与真实意图不一致。
  15. 一种计算机可读存储介质,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:
    获取文本信息和图像信息,通过预置的门控循环单元神经网络模型对所述文本信息进行意图特征提取,得到文本意图特征,并通过预置的区域卷积神经网络模型对所述图像信息进行意图特征提取,得到图像意图特征;
    分别计算所述文本意图特征和所述图像意图特征的注意力,得到文本注意力值和图像注意力值;
    根据所述文本注意力值与所述文本意图特征生成文本偏重特征矩阵,并根据所述图像注意力值与所述图像意图特征生成图像偏重特征矩阵;
    根据所述文本意图特征、所述图像意图特征、所述文本偏重特征矩阵和所述图像偏重特征矩阵,生成注意力融合意图特征,并根据预置门控机制、所述文本意图特征和所述图像意图特征,生成门控机制融合意图特征;
    将所述注意力融合意图特征和所述门控机制融合意图特征进行拼接处理,得到目标意图特征;
    对所述目标意图特征进行意图分类,得到对应的目标意图。
  16. 如权利要求15所述的计算机可读存储介质,所述计算机可读存储介质执行所述计算机指令实现所述根据所述文本意图特征、所述图像意图特征、所述文本偏重特征矩阵和所述图像偏重特征矩阵,生成注意力融合意图特征时,包括以下步骤:
    将所述文本偏重特征矩阵与所述图像意图特征相乘得到文本图像融合特征,将所述图像偏重特征矩阵与所述文本意图特征相乘得到图像文本融合特征,将所述文本图像融合特征和所述图像文本融合特征确定为第一融合意图特征;
    将所述文本偏重特征矩阵与所述文本意图特征相乘得到文本融合特征,将所述图像偏重特征矩阵与所述图像意图特征相乘得到图像融合特征,将所述文本融合特征和所述图像融合特征确定为第二融合意图特征;
    将所述第一融合意图特征和所述第二融合意图特征确定为注意力融合意图特征。
  17. 如权利要求16所述的计算机可读存储介质,所述计算机可读存储介质执行所述计算机指令实现所述将所述注意力融合意图特征和所述门控机制融合意图特征进行拼接处理,得到目标意图特征时,包括以下步骤:
    分别对所述第一融合意图特征、所述第二融合意图特征和所述门控机制融合意图特征进行主要成分提取处理,得到第一初始特征、第二初始特征和第三初始特征;
    分别对所述第一初始特征、所述第二初始特征和所述第三初始特征进行降维处理,得到第一目标特征、第二目标特征和第三目标特征;
    将所述第一目标特征、所述第二目标特征和所述第三目标特征进行并行融合,得到目标意图特征。
  18. 如权利要求15所述的计算机可读存储介质,所述计算机可读存储介质执行所述计算机指令实现所述根据预置门控机制、所述文本意图特征和所述图像意图特征,生成门控机制融合意图特征时,包括以下步骤:
    通过预置门控机制计算所述文本信息对所述图像信息的文本图像门控值,以及所述图像信息对所述文本信息的图像文本门控值;
    根据预置门控机制中的门控循环单元和所述文本图像门控值对所述文本意图特征进行过滤选择处理,得到更新后的文本意图特征,并根据所述门控循环单元和所述图像文本门 控值对所述图像意图特征进行过滤选择处理,得到更新后的图像意图特征;
    将所述更新后的文本意图特征和所述更新后的图像意图特征进行矩阵相乘处理,得到门控机制融合意图特征。
  19. 如权利要求15所述的计算机可读存储介质,所述计算机可读存储介质执行所述计算机指令实现所述通过预置的区域卷积神经网络模型对所述待识别信息中的图像信息进行意图特征提取,得到图像意图特征时,包括以下步骤:
    调用预置的区域卷积神经网络模型中的卷积神经网络层,对所述图像信息的意图特征图谱进行提取,得到意图特征图谱;
    对所述意图特征图谱进行图像物体识别,得到候选意图特征图谱,并生成所述候选意图特征图谱的建议窗口;
    通过所述建议窗口和所述区域卷积神经网络模型中的视觉几何群网络全连接层,对所述候选意图特征图谱进行图像物体特征分析,得到图像意图特征。
  20. 一种基于注意力机制的意图识别装置,其中,所述基于注意力机制的意图识别装置包括:
    特征提取模块,用于获取文本信息和图像信息,通过预置的门控循环单元神经网络模型对所述文本信息进行意图特征提取,得到文本意图特征,并通过预置的区域卷积神经网络模型对所述图像信息进行意图特征提取,得到图像意图特征;
    计算模块,用于分别计算所述文本意图特征和所述图像意图特征的注意力,得到文本注意力值和图像注意力值;
    第一生成模块,用于根据所述文本注意力值与所述文本意图特征生成文本偏重特征矩阵,并根据所述图像注意力值与所述图像意图特征生成图像偏重特征矩阵;
    第二生成模块,用于根据所述文本意图特征、所述图像意图特征、所述文本偏重特征矩阵和所述图像偏重特征矩阵,生成注意力融合意图特征,并根据预置门控机制、所述文本意图特征和所述图像意图特征,生成门控机制融合意图特征;
    拼接处理模块,用于将所述注意力融合意图特征和所述门控机制融合意图特征进行拼接处理,得到目标意图特征;
    意图分类模块,用于对所述目标意图特征进行意图分类,得到对应的目标意图。
PCT/CN2020/105090 2020-05-21 2020-07-28 基于注意力机制的意图识别方法、装置、设备及存储介质 WO2021232589A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010433435.0A CN111737458B (zh) 2020-05-21 2020-05-21 基于注意力机制的意图识别方法、装置、设备及存储介质
CN202010433435.0 2020-05-21

Publications (1)

Publication Number Publication Date
WO2021232589A1 true WO2021232589A1 (zh) 2021-11-25

Family

ID=72647534

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/105090 WO2021232589A1 (zh) 2020-05-21 2020-07-28 基于注意力机制的意图识别方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN111737458B (zh)
WO (1) WO2021232589A1 (zh)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113870102A (zh) * 2021-12-06 2021-12-31 深圳市大头兄弟科技有限公司 图像的动漫化方法、装置、设备及存储介质
CN114139637A (zh) * 2021-12-03 2022-03-04 哈尔滨工业大学(深圳) 多智能体信息融合方法、装置、电子设备及可读存储介质
CN114444572A (zh) * 2021-12-25 2022-05-06 西北工业大学 一种面向数据错误的空中目标意图识别方法及装置
CN114463209A (zh) * 2022-01-25 2022-05-10 广州大学 一种基于深度多特征协同学习的图像修复方法
CN114550156A (zh) * 2022-02-18 2022-05-27 支付宝(杭州)信息技术有限公司 图像处理方法及装置
CN114626455A (zh) * 2022-03-11 2022-06-14 北京百度网讯科技有限公司 金融信息处理方法、装置、设备、存储介质及产品
CN115858942A (zh) * 2023-02-27 2023-03-28 西安电子科技大学 面向用户输入的序列化推荐方法及装置
CN115984293A (zh) * 2023-02-09 2023-04-18 中国科学院空天信息创新研究院 基于边缘感知注意力机制的空间目标分割网络及方法
CN116503517A (zh) * 2023-06-27 2023-07-28 江西农业大学 长文本生成图像的方法及系统
CN116597467A (zh) * 2023-07-17 2023-08-15 粤港澳大湾区数字经济研究院(福田) 一种图纸检测方法、系统、设备及存储介质
CN116702091A (zh) * 2023-06-21 2023-09-05 中南大学 基于多视图clip的多模态讽刺意图识别方法、装置和设备
CN116779091A (zh) * 2023-06-15 2023-09-19 兰州交通大学 一种多模态网络互联融合的胸部影像诊断报告自动生成方法
WO2023197512A1 (zh) * 2022-04-11 2023-10-19 苏州浪潮智能科技有限公司 一种文本纠错方法、装置、电子设备和介质
CN116958424A (zh) * 2023-07-12 2023-10-27 源海广筑工程科技(河南)有限公司 基于平面图的三维建筑模型生成方法及系统
CN117708568A (zh) * 2024-02-02 2024-03-15 智慧眼科技股份有限公司 大语言模型的特征提取方法、装置、计算机设备及介质

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112599124A (zh) * 2020-11-20 2021-04-02 内蒙古电力(集团)有限责任公司电力调度控制分公司 一种面向电网调度的语音调度方法及系统
CN112580599B (zh) * 2020-12-30 2024-05-14 北京达佳互联信息技术有限公司 一种视频识别方法、装置及计算机可读存储介质
CN112817914A (zh) * 2021-01-21 2021-05-18 深圳大学 基于注意力的深度跨模态哈希检索方法、装置及相关设备
CN112817604B (zh) * 2021-02-18 2022-08-05 北京邮电大学 安卓系统控件意图识别方法、装置、电子设备及存储介质
CN112861882B (zh) * 2021-03-10 2023-05-09 齐鲁工业大学 一种基于频率自适应的图像-文本匹配方法及系统
CN112966760B (zh) * 2021-03-15 2021-11-09 清华大学 融合文本和图像数据的神经网络及其建筑结构的设计方法
CN113032614A (zh) * 2021-04-28 2021-06-25 泰康保险集团股份有限公司 一种跨模态信息检索方法和装置
CN113220919B (zh) * 2021-05-17 2022-04-22 河海大学 一种大坝缺陷图像文本跨模态检索方法及模型
CN113449725B (zh) * 2021-06-30 2024-02-02 平安科技(深圳)有限公司 对象分类方法、装置、设备及存储介质
CN113590827B (zh) * 2021-08-12 2023-08-01 云南电网有限责任公司电力科学研究院 一种基于多角度的科研项目文本分类装置和方法
CN113886572A (zh) * 2021-08-24 2022-01-04 北京达佳互联信息技术有限公司 资源分类方法、装置、电子设备及存储介质
CN113761167B (zh) * 2021-09-09 2023-10-20 上海明略人工智能(集团)有限公司 一种会话信息抽取方法、系统、电子设备及存储介质
CN114064870B (zh) * 2021-11-10 2024-04-05 京东科技信息技术有限公司 面向多模态的对话方法、装置、电子设备、存储介质
CN115080766B (zh) * 2022-08-16 2022-12-06 之江实验室 基于预训练模型的多模态知识图谱表征系统及方法
CN115408509B (zh) * 2022-11-01 2023-02-14 杭州一知智能科技有限公司 一种意图识别方法、系统、电子设备和存储介质
CN115690552A (zh) * 2022-12-30 2023-02-03 智慧眼科技股份有限公司 多意图识别方法、装置、计算机设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415923A (zh) * 2017-10-18 2018-08-17 北京邮电大学 封闭域的智能人机对话系统
US20190163691A1 (en) * 2017-11-30 2019-05-30 CrowdCare Corporation Intent Based Dynamic Generation of Personalized Content from Dynamic Sources
CN110334344A (zh) * 2019-06-13 2019-10-15 腾讯科技(深圳)有限公司 一种语义意图识别方法、装置、设备及存储介质
CN110717514A (zh) * 2019-09-06 2020-01-21 平安国际智慧城市科技股份有限公司 会话意图识别方法、装置、计算机设备和存储介质
CN110929013A (zh) * 2019-12-04 2020-03-27 成都中科云集信息技术有限公司 一种基于bottom-up attention和定位信息融合的图片问答实现方法
CN111160467A (zh) * 2019-05-31 2020-05-15 北京理工大学 一种基于条件随机场和内部语义注意力的图像描述方法

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10565305B2 (en) * 2016-11-18 2020-02-18 Salesforce.Com, Inc. Adaptive attention model for image captioning
WO2019204186A1 (en) * 2018-04-18 2019-10-24 Sony Interactive Entertainment Inc. Integrated understanding of user characteristics by multimodal processing
CN108595590A (zh) * 2018-04-19 2018-09-28 中国科学院电子学研究所苏州研究院 一种基于融合注意力模型的中文文本分类方法
CN108920587B (zh) * 2018-06-26 2021-09-24 清华大学 融合外部知识的开放域视觉问答方法及装置
CN109543714B (zh) * 2018-10-16 2020-03-27 北京达佳互联信息技术有限公司 数据特征的获取方法、装置、电子设备及存储介质
CN110263912B (zh) * 2019-05-14 2021-02-26 杭州电子科技大学 一种基于多目标关联深度推理的图像问答方法
CN111046668B (zh) * 2019-12-04 2023-09-22 北京信息科技大学 多模态文物数据的命名实体识别方法与装置
CN110928997A (zh) * 2019-12-04 2020-03-27 北京文思海辉金信软件有限公司 意图识别方法、装置、电子设备及可读存储介质
CN111160452A (zh) * 2019-12-25 2020-05-15 北京中科研究院 一种基于预训练语言模型的多模态网络谣言检测方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415923A (zh) * 2017-10-18 2018-08-17 北京邮电大学 封闭域的智能人机对话系统
US20190163691A1 (en) * 2017-11-30 2019-05-30 CrowdCare Corporation Intent Based Dynamic Generation of Personalized Content from Dynamic Sources
CN111160467A (zh) * 2019-05-31 2020-05-15 北京理工大学 一种基于条件随机场和内部语义注意力的图像描述方法
CN110334344A (zh) * 2019-06-13 2019-10-15 腾讯科技(深圳)有限公司 一种语义意图识别方法、装置、设备及存储介质
CN110717514A (zh) * 2019-09-06 2020-01-21 平安国际智慧城市科技股份有限公司 会话意图识别方法、装置、计算机设备和存储介质
CN110929013A (zh) * 2019-12-04 2020-03-27 成都中科云集信息技术有限公司 一种基于bottom-up attention和定位信息融合的图片问答实现方法

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114139637A (zh) * 2021-12-03 2022-03-04 哈尔滨工业大学(深圳) 多智能体信息融合方法、装置、电子设备及可读存储介质
CN113870102A (zh) * 2021-12-06 2021-12-31 深圳市大头兄弟科技有限公司 图像的动漫化方法、装置、设备及存储介质
CN114444572A (zh) * 2021-12-25 2022-05-06 西北工业大学 一种面向数据错误的空中目标意图识别方法及装置
CN114463209A (zh) * 2022-01-25 2022-05-10 广州大学 一种基于深度多特征协同学习的图像修复方法
CN114463209B (zh) * 2022-01-25 2022-12-16 广州大学 一种基于深度多特征协同学习的图像修复方法
CN114550156A (zh) * 2022-02-18 2022-05-27 支付宝(杭州)信息技术有限公司 图像处理方法及装置
CN114626455A (zh) * 2022-03-11 2022-06-14 北京百度网讯科技有限公司 金融信息处理方法、装置、设备、存储介质及产品
WO2023197512A1 (zh) * 2022-04-11 2023-10-19 苏州浪潮智能科技有限公司 一种文本纠错方法、装置、电子设备和介质
CN115984293A (zh) * 2023-02-09 2023-04-18 中国科学院空天信息创新研究院 基于边缘感知注意力机制的空间目标分割网络及方法
CN115984293B (zh) * 2023-02-09 2023-11-07 中国科学院空天信息创新研究院 基于边缘感知注意力机制的空间目标分割网络及方法
CN115858942A (zh) * 2023-02-27 2023-03-28 西安电子科技大学 面向用户输入的序列化推荐方法及装置
CN116779091A (zh) * 2023-06-15 2023-09-19 兰州交通大学 一种多模态网络互联融合的胸部影像诊断报告自动生成方法
CN116779091B (zh) * 2023-06-15 2024-02-27 兰州交通大学 一种多模态网络互联融合的胸部影像诊断报告自动生成方法
CN116702091B (zh) * 2023-06-21 2024-03-08 中南大学 基于多视图clip的多模态讽刺意图识别方法、装置和设备
CN116702091A (zh) * 2023-06-21 2023-09-05 中南大学 基于多视图clip的多模态讽刺意图识别方法、装置和设备
CN116503517A (zh) * 2023-06-27 2023-07-28 江西农业大学 长文本生成图像的方法及系统
CN116503517B (zh) * 2023-06-27 2023-09-05 江西农业大学 长文本生成图像的方法及系统
CN116958424A (zh) * 2023-07-12 2023-10-27 源海广筑工程科技(河南)有限公司 基于平面图的三维建筑模型生成方法及系统
CN116958424B (zh) * 2023-07-12 2024-05-07 源海广筑工程科技(河南)有限公司 基于平面图的三维建筑模型生成方法及系统
CN116597467B (zh) * 2023-07-17 2023-10-31 粤港澳大湾区数字经济研究院(福田) 一种图纸检测方法、系统、设备及存储介质
CN116597467A (zh) * 2023-07-17 2023-08-15 粤港澳大湾区数字经济研究院(福田) 一种图纸检测方法、系统、设备及存储介质
CN117708568A (zh) * 2024-02-02 2024-03-15 智慧眼科技股份有限公司 大语言模型的特征提取方法、装置、计算机设备及介质

Also Published As

Publication number Publication date
CN111737458A (zh) 2020-10-02
CN111737458B (zh) 2024-05-21

Similar Documents

Publication Publication Date Title
WO2021232589A1 (zh) 基于注意力机制的意图识别方法、装置、设备及存储介质
US10776470B2 (en) Verifying identity based on facial dynamics
Jayalekshmi et al. Facial expression recognition and emotion classification system for sentiment analysis
Kim et al. Deep learning for robust feature generation in audiovisual emotion recognition
Lin et al. A post-processing method for detecting unknown intent of dialogue system via pre-trained deep neural network classifier
US20230206928A1 (en) Audio processing method and apparatus
Ohi et al. Deep speaker recognition: Process, progress, and challenges
CN112836025A (zh) 一种意图识别方法及装置
CN114693397A (zh) 一种基于注意力神经网络的多视角多模态商品推荐方法
Chaaraoui et al. Adaptive human action recognition with an evolving bag of key poses
Goutsu et al. Classification of multi-class daily human motion using discriminative body parts and sentence descriptions
Yan et al. An incremental intelligent object recognition system based on deep learning
CN113590798B (zh) 对话意图识别、用于识别对话意图的模型的训练方法
Atkar et al. Speech Emotion Recognition using Dialogue Emotion Decoder and CNN Classifier
Gantayat et al. Study of algorithms and methods on emotion detection from facial expressions: a review from past research
EP4158491A1 (en) Method, non-transitory computer-readable storage medium, and apparatus for searching an image database
Agrawal et al. Fusion based emotion recognition system
Medikonda et al. Higher order information set based features for text-independent speaker identification
CN113642674A (zh) 一种基于图卷积神经网络的多轮对话分类方法
Guermal et al. Thorn: Temporal human-object relation network for action recognition
Joshi et al. Meta-Learning, Fast Adaptation, and Latent Representation for Head Pose Estimation
Wang et al. Feature transformation network for few-shot learning
Belharbi et al. Input/output deep architecture for structured output problems
Uddin An Ada-Random Forests based grammatical facial expressions recognition approach
Fatima et al. Machine Learning for Masked Face Recognition in COVID-19 Pandemic Situation.

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20936251

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 13.03.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20936251

Country of ref document: EP

Kind code of ref document: A1