Joint task implementation method, device, equipment and medium

Through the joint task implementation method, the graph attention network and the multi-layer perceptual network are used to share vector encoding data, which solves the problems of high resource usage and low accuracy caused by the independence of the intent recognition and entity recognition models, and achieves more efficient recognition results.

CN117648930BActive Publication Date: 2024-09-06PING AN TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311568460.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-22
Publication Date
2024-09-06
Estimated Expiration
2043-11-22

AI Technical Summary

Technical Problem

The existing intent recognition and entity recognition models are independent of each other, resulting in high resource usage and difficulty in data acquisition. In addition, intent recognition has problems such as lack of data and low recognition accuracy.

Method used

Using a joint task implementation method, deep semantic information and shallow semantic information are obtained through the graph attention network in the preset intention recognition model, and input into the multi-layer perceptual network, combined with the entity recognition model for vector encoding data sharing, sharing vector encoding data To achieve the joint tasks of intent recognition and entity recognition.

Benefits of technology

By sharing vector-encoded data, machine resources are saved, text correlation is enhanced, the vanishing gradient problem is avoided, and the accuracy and efficiency of intent recognition and entity recognition are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117648930B
    Figure CN117648930B
Patent Text Reader

Abstract

The embodiment of the present invention discloses a joint task implementation method, device, equipment and medium, which relates to the fields of smart finance and smart elderly care. The method includes: obtaining target text data to be identified, and converting the target text data into vector coded data; identifying the intent type of the text data through the vector coded data and a preset intent recognition model; inputting the vector coded data into a preset entity recognition model to obtain entity information of the text data; and using the intent type and the entity information as the implementation result of the joint task for the text data. By obtaining and splicing the deep semantic information and shallow semantic information of the vector coded data, the correlation between texts is strengthened, and problems such as gradient disappearance can be avoided. The intent recognition and entity recognition in the joint task share vector coded data, and the results of the two tasks are predicted at the same time, which can also save the consumption of machine resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart finance and smart elderly care technology, and in particular to a joint task implementation method, device, equipment and medium. Background Art

[0002] In the banking, insurance, and financial industries, intent recognition and entity recognition are key AI technologies. In the banking field, intent recognition technology can help machines understand users' intentions and needs, and entity recognition can help machines understand users' key entity information. Automatic intent recognition and entity recognition can realize automated customer service, allowing robots to replace customer service personnel to complete customer consultation, loan applications, account inquiries and other services, improve response speed and efficiency, and save corporate costs.

[0003] However, the existing models for intent recognition and entity recognition are independent of each other and require independent inputs, that is, independent input data sets need to be constructed, which results in the inability of intent recognition and entity recognition to learn from each other and influence each other, and the machine resources are more occupied. At the same time, the intent recognition process is short of data sources. Intent recognition requires a large amount of data support, but the data in the financial insurance field is relatively sensitive, and there are few annotated texts, which are also difficult to obtain. Users' expressions are not standardized, and the input text of the model may have problems such as omitted content, too colloquialism, and too many referential relationships, which will cause difficulties in intent recognition. Intents are implicit, and users may not clearly reflect their intentions. Entity recognition has the problem of low recognition accuracy. Summary of the invention

[0004] In view of this, the present invention provides a joint task implementation method, device, equipment and medium, which are used to solve the problem in the prior art that intent recognition and entity recognition are supported by independent models, require independent inputs, and occupy more machine resources.

[0005] To achieve one or part or all of the above purposes or other purposes, the present invention proposes a joint task implementation method, including: obtaining target text data to be recognized, and converting the target text data into vector encoding data;

[0006] Acquire deep semantic information of the vector-encoded data through a preset graph attention network in a preset intent recognition model, acquire shallow semantic information of the vector-encoded data through a preset auxiliary branch in the preset intent recognition model, and input the deep semantic information and the shallow semantic information into a preset multi-layer perception network in the preset intent recognition model to obtain the intent type of the target text data;

[0007] Inputting the vector encoded data into a preset entity recognition model to obtain entity information of the target text data;

[0008] The intent type and the entity information are taken as the implementation result of the joint task for the target text data.

[0009] On the other hand, the present application provides a joint task implementation device, characterized in that the device includes:

[0010] A data receiving module, used for acquiring target text data to be recognized and converting the target text data into vector encoding data;

[0011] An intention recognition module, used for obtaining deep semantic information of the vector-encoded data through a preset graph attention network in a preset intention recognition model, obtaining shallow semantic information of the vector-encoded data through a preset auxiliary branch in the preset intention recognition model, and inputting the deep semantic information and the shallow semantic information into a preset multi-layer perception network in the preset intention recognition model to obtain the intention type of the target text data;

[0012] An entity recognition model, used for inputting the vector encoded data into a preset entity recognition model to obtain entity information of the target text data;

[0013] An output module is used to use the intention type and the entity information as the implementation result of the joint task for the target text data.

[0014] On the other hand, the present application provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to perform the following steps: obtaining target text data to be recognized, and converting the target text data into vector encoding data; obtaining deep semantic information of the vector encoding data through a preset graph attention network in a preset intention recognition model, obtaining shallow semantic information of the vector encoding data through a preset auxiliary branch in the preset intention recognition model, and inputting the deep semantic information and the shallow semantic information into a preset multi-layer perception network in the preset intention recognition model to obtain the intent type of the target text data; inputting the vector encoding data into a preset entity recognition model to obtain the entity information of the target text data; and taking the intent type and the entity information as the implementation result of a joint task for the target text data.

[0015] On the other hand, the present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program is executed by a processor when it is run: obtaining target text data to be recognized, and converting the target text data into vector encoded data; obtaining deep semantic information of the vector encoded data through a preset graph attention network in a preset intention recognition model, obtaining shallow semantic information of the vector encoded data through a preset auxiliary branch in the preset intention recognition model, and inputting the deep semantic information and the shallow semantic information into a preset multi-layer perception network in the preset intention recognition model to obtain the intent type of the target text data; inputting the vector encoded data into a preset entity recognition model to obtain the entity information of the target text data; and taking the intent type and the entity information as the implementation result of a joint task for the target text data.

[0016] Implementing the embodiments of the present invention will have the following beneficial effects:

[0017] By obtaining the target text data to be recognized and converting the target text data into vector encoding data; obtaining the deep semantic information of the vector encoding data through the preset graph attention network in the preset intention recognition model, obtaining the shallow semantic information of the vector encoding data through the preset auxiliary branch in the preset intention recognition model, and inputting the deep semantic information and the shallow semantic information into the preset multi-layer perception network in the preset intention recognition model to obtain the intent type of the target text data; inputting the vector encoding data into the preset entity recognition model to obtain the entity information of the target text data; and using the intent type and the entity information as the implementation result of the joint task for the target text data. By obtaining and splicing the deep semantic information and shallow semantic information of the vector encoding data, the correlation between texts is strengthened, and problems such as gradient disappearance can be avoided. The intent recognition and entity recognition in the joint task share the vector encoding data, and the results of the two tasks are predicted at the same time, which can also save the consumption of machine resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] in:

[0020] Figure 1 It is an application scenario diagram of a joint task implementation method provided in an embodiment of the present application;

[0021] Figure 2 is a flow chart of a method for implementing a joint task provided in an embodiment of the present application;

[0022] Figure 3 It is a structural diagram of a joint task implementation device provided in an embodiment of the present application;

[0023] Figure 4 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;

[0024] Figure 5 is another structural schematic diagram of a computer device in one embodiment of the present invention;

[0025] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0026] Figure 7 It is a structural schematic diagram of a storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] The joint task implementation method provided by the embodiment of the present invention can be applied in the following aspects: Figure 1In the application environment, the user terminal communicates with the server terminal through the network. The server terminal can obtain the target text data to be recognized and convert the target text data into vector encoding data; obtain the deep semantic information of the vector encoding data through the preset graph attention network in the preset intention recognition model, obtain the shallow semantic information of the vector encoding data through the preset auxiliary branch in the preset intention recognition model, and input the deep semantic information and the shallow semantic information into the preset multi-layer perception network in the preset intention recognition model to obtain the intention type of the target text data; input the vector encoding data into the preset entity recognition model to obtain the entity information of the target text data; use the intention type and the entity information as the implementation result of the joint task for the target text data. In the present invention, by obtaining and splicing the deep semantic information and the shallow semantic information of the vector encoding data, the correlation between texts is strengthened, and the problems such as gradient disappearance can be avoided. The intention recognition and entity recognition in the joint task share the vector encoding data, and the results of the two tasks are predicted at the same time, which can also save the consumption of machine resources. Among them, the user terminal can be but not limited to various personal computers, laptops, smart phones, tablet computers, smart camera devices and portable wearable devices. The server side can be implemented by an independent server or a server cluster composed of multiple servers. The present invention is described in detail below through specific embodiments.

[0029] Exemplarily, in actual applications, the server can obtain the target text data to be identified through the client, and the server converts the target text data into vector encoded data; obtains the deep semantic information of the vector encoded data through the preset graph attention network in the preset intention recognition model, obtains the shallow semantic information of the vector encoded data through the preset auxiliary branch in the preset intention recognition model, and inputs the deep semantic information and the shallow semantic information into the preset multi-layer perception network in the preset intention recognition model to obtain the intent type of the target text data; inputs the vector encoded data into the preset entity recognition model to obtain the entity information of the target text data; uses the intent type and the entity information as the implementation result of the joint task for the target text data. For example, in financial scenarios such as banks and insurance, the server can obtain the target text data to be identified through the client, and the server converts the target text data into vector encoded data, and completes the joint task of intent recognition and entity recognition by sharing the preset intent recognition model and the preset entity recognition model of the vector encoded data.

[0030] Exemplarily, in the field of smart elderly care, for example, the server can obtain the target text data to be identified through the client (smart devices such as mobile phones and cameras), and the server converts the target text data into vector encoding data, and completes the joint task of intent recognition and entity recognition by sharing the preset intention recognition model and the preset entity recognition model of the vector encoding data, so as to timely identify the intentions of the elderly and the entities targeted by the intentions.

[0031] Exemplarily, in the field of smart finance, for example, the server can obtain the target text data to be identified ("I want to know about insurance business") through the client (smart devices such as mobile phones and cameras), and the server converts the target text data into vector encoded data, and completes the joint task of intent recognition and entity recognition by sharing the preset intention recognition model and the preset entity recognition model of the vector encoded data, and timely identifies the user's intention ("want to know") and the entity targeted by the intention (me, insurance business).

[0032] like Figure 2 As shown, the embodiment of the present application provides a method for implementing a joint task, including:

[0033] S101, obtaining target text data to be recognized, and converting the target text data into vector encoding data;

[0034] The joint task implementation method provided in the embodiment of the present application can be applied to the joint task implementation device or joint task implementation engine in various scenarios. The joint task implementation process is usually implemented through the server, which can transmit data with the user's user terminal in real time to facilitate the identification of user intentions and corresponding entities. For example, when banks, stores, nursing homes, etc. need to carry out intent recognition and entity recognition together, in order to reduce the consumption of machine resources, intent recognition and entity recognition share vector encoding data, that is, only one encoding is performed to provide the same input data for intent recognition and entity recognition.

[0035] Exemplarily, the process of obtaining the target text data to be recognized can be to recognize the voice information spoken by the user as text information through voice recognition technology, and use the text information as the target text data; or the user's facial expression image can be recognized through image recognition technology. Specifically, by recognizing the user's mouth shape image, the text corresponding to the user's mouth shape is obtained, and then the target text data is obtained. The process of recognizing the user's mouth shape image is essentially a process of "lip reading".

[0036] Exemplarily, in a specific scenario, for example, for a specific group of people who are not convenient to make sounds, the user's body image (sign language image) can be identified through image recognition technology to obtain the target text data.

[0037] Exemplarily, the target text data is converted into vector encoding data using a Chinese pre-trained model (RoBERTa model). Specifically, the RoBERTa model maps the text sequence of the target text data into a high-dimensional vector space to obtain the vector encoding data of the target text data.

[0038] Exemplarily, the target text data is sentence information, for example, "I want to learn about insurance business", and the vector encoding data is data that represents a quantized value through a vector value, and the quantized value is a text in the sentence information.

[0039] S102, obtaining deep semantic information of the vector-encoded data through a preset graph attention network in a preset intent recognition model, obtaining shallow semantic information of the vector-encoded data through a preset auxiliary branch in the preset intent recognition model, and inputting the deep semantic information and the shallow semantic information into a preset multi-layer perception network in the preset intent recognition model to obtain the intent type of the target text data;

[0040] Exemplarily, the graph attention network can adapt to different graph structures and can more flexibly process input texts (target text data) of different lengths. At the same time, when facing input texts (target text data) of longer lengths, the graph attention network can more accurately obtain the semantic information of the input text (target text data) through the graph structure.

[0041] Exemplarily, the graph network structure (graph attention network) only uses the high-level semantic features output after multiple layers of convolution and ignores the intermediate layer features. It avoids the errors caused by gradient vanishing and feature neglect by presetting auxiliary branches. The preset auxiliary branches use the information retained by the intermediate layer features to make up for the partial information loss caused by multiple layers of convolution.

[0042] Exemplarily, a multi-layer perception network is used to map multiple input data sets (the deep semantic information and the shallow semantic information) to a single output data set (intent type).

[0043] S103, inputting the vector encoding data into a preset entity recognition model to obtain entity information of the target text data;

[0044] Exemplarily, the vector encoded data output by the Chinese pre-trained model (RoBERTa model) is input into a preset entity recognition model to obtain entity information of the target text data. The preset entity model can adopt a bidirectional long short-term memory network, and the entity information is an entity with a specific meaning, for example, proper nouns such as names of people, places, and institutions.

[0045] S104. Use the intent type and the entity information as the implementation result of the joint task for the target text data.

[0046] By obtaining the target text data to be recognized and converting the target text data into vector encoding data; obtaining the deep semantic information of the vector encoding data through the preset graph attention network in the preset intention recognition model, obtaining the shallow semantic information of the vector encoding data through the preset auxiliary branch in the preset intention recognition model, and inputting the deep semantic information and the shallow semantic information into the preset multi-layer perception network in the preset intention recognition model to obtain the intent type of the target text data; inputting the vector encoding data into the preset entity recognition model to obtain the entity information of the target text data; and using the intent type and the entity information as the implementation result of the joint task for the target text data. By obtaining and splicing the deep semantic information and shallow semantic information of the vector encoding data, the correlation between texts is strengthened, and problems such as gradient disappearance can be avoided. The intent recognition and entity recognition in the joint task share the vector encoding data, and the results of the two tasks are predicted at the same time, which can also save the consumption of machine resources.

[0047] In a possible implementation, the step of obtaining target text data to be recognized includes:

[0048] Acquire a request information set of a target user within a preset time by using different sampling methods, wherein the different sampling methods include at least two of voice collection, facial image collection, and body image collection;

[0049] Convert each request information in the request information set into text to obtain a text data set corresponding to the request information set;

[0050] Target text data to be recognized is determined based on the text data set.

[0051] Exemplarily, when the target user's request information is obtained as the target text data based on a single sampling method, accidental errors are inevitable. For example, the user's request information is collected through voice. At this time, the request information is voice data. When the voice data is converted into text data and used as the target text data, the obtained text data is prone to errors due to the influence of factors such as the voice environment (for example, recognizing other people's voice data as the user's request information) and / or the voice recognition algorithm. Therefore, it is more reasonable and accurate to obtain the target user's request information set within the same preset time through at least two sampling methods, that is, to obtain different forms of the same request information, and to obtain the final target text data by identifying the request information in different forms.

[0052] Exemplarily, by acquiring a facial image of the target user, and based on image recognition technology, obtaining the target user's request information within a preset time as "I want to know about insurance"; by acquiring the target user's voice data within the same preset time, and converting the voice data into "I want to know about insurance (user voice) he is a manager (environmental voice)", wherein the request information set includes (facial image, voice data), and the text data set corresponding to the request information set is ("I want to know about insurance", "I want to know about insurance (user voice) he is a manager (environmental voice)").

[0053] Exemplarily, based on mutual verification of two text data in the text data set, "I want to know about insurance" is determined as the target text data.

[0054] Exemplarily, when acquiring the target text data to be recognized, in order to avoid the influence of the voice environment (for example, recognizing other people's voice data as the user's request information), an identity recognition module can also be set, such as a timbre / voiceprint recognition module, to achieve the effect of only recognizing the target user's voice information.

[0055] Exemplarily, the facial image of the target user is obtained, and the process of identifying the lip language of the target user based on image recognition technology can be that the image information of the target human object is obtained by combining a depth camera with at least one of an infrared camera and a color camera; according to the position correspondence between the depth image of the target human object obtained by the depth camera and the infrared image obtained by the infrared camera or / and the color image obtained by the color camera, the image of the area corresponding to the position of the face image in the color image or / and the infrared image in the depth image is extracted and determined as the face image; or, the face image is extracted from the infrared image obtained by the infrared camera or / and the color image obtained by the color camera, and according to the infrared image or / and the color image obtained by the color camera, the face image is extracted. and a position correspondence between the color image and the depth image of the target human object acquired by the depth camera, to obtain a facial image of the target human object in the depth image; to determine whether the image information includes the nose tip of the target human object according to the depth feature information; when the image information includes the nose tip of the target human object, to detect whether there is an elliptical facial contour area on both sides of the nose tip; if the facial contour area exists, to obtain a regional image including the nose tip and the facial contour as the facial image of the target human object; to extract a regional image below the nose tip in the facial image as a lip regional image; to extract lip features from the lip regional image, and to perform lip reading recognition on the lip features.

[0056] In one possible implementation, the preset graph attention network is a graph attention network combined with a multi-head attention mechanism, wherein the multi-head attention mechanism is a mechanism that enables the graph attention network to calculate the feature vectors of each node in the graph attention network based on interaction data, and the interaction data is the attention coefficient between each node and the nodes adjacent to each node.

[0057] Exemplarily, in the preset graph attention network, since the preset graph attention network is a graph attention network combined with a multi-head attention mechanism, that is, each node in the preset graph attention network interacts through the relationship between the nodes adjacent to each node, when calculating the features of the node, the node is allowed to aggregate the information of its (the node calculating the features) adjacent nodes in different ways, and the new feature vector of the node can be obtained by calculating the attention coefficient between the node and its (the node calculating the features) adjacent nodes, and weighted averaging the corresponding feature vectors. Through the use of the multi-head attention mechanism, the node can obtain the neighboring nodes that are most useful for classification or prediction, and automatically obtain the importance and correlation between the current node and its (the current node) adjacent nodes.

[0058] Exemplarily, the multi-head attention mechanism calculates the attention weight of each position of the sentence (the target text data) during the encoding process, and then calculates the vector representation (deep semantic information) of the entire sentence using the sum of the weights.

[0059] In a possible implementation, the step of acquiring shallow semantic information of the vector encoding data through a preset auxiliary branch in the preset intent recognition model includes:

[0060] Constructing the preset auxiliary branch based on the residual structure;

[0061] The vector encoding data is input into the preset auxiliary branch to obtain shallow semantic information of the vector encoding data.

[0062] Exemplarily, the vector encoded data is input into a preset auxiliary branch of the residual structure to obtain shallow semantic information of the vector encoded data.

[0063] Exemplarily, the residual structure is used to solve the problems of gradient vanishing and gradient exploding in the deep learning process. The vector encoded data is input into the preset auxiliary branch so that the predicate-related components in the vector encoded data are labeled to obtain shallow semantic information, such as agent, patient, time and place, etc.

[0064] In a possible implementation, the step of inputting the deep semantic information and the shallow semantic information into a preset multi-layer perception network in the preset intention recognition model to obtain the intention type of the target text data includes:

[0065] The deep semantic information and the shallow semantic information are concatenated by a preset connection function to obtain target semantic information of the target text data;

[0066] Inputting the target semantic information into a fully connected layer in the preset multi-layer perception network to obtain an output vector;

[0067] Inputting the output vector into a preset activation function layer in the preset multi-layer perception network to obtain a probability value set of the target semantic information for different intent types;

[0068] Selecting a maximum probability value from the probability value set as the target probability value;

[0069] The intention type corresponding to the target probability value is used as the intention type of the target text data.

[0070] Exemplarily, the deep semantic information and the shallow semantic information are concatenated through a preset connection function (concat function) to obtain the target semantic information of the target text data; the preset multi-layer perception network includes two fully connected layers, and the output vector of the fully connected layer in the preset multi-layer perception network is input into the preset activation function layer in the preset multi-layer perception network, and the function of the preset activation function layer is a normalized exponential function (softmax function), and the normalized exponential function converts each element of the output vector into a probability value between 0 and 1, each probability value represents the probability that the target text data belongs to a specific intent category, and the intent type corresponding to the target probability value is used as the intent type of the target text data.

[0071] In a possible implementation, the step of inputting the vector encoded data into a preset entity recognition model to obtain entity information of the target text data includes:

[0072] Inputting the vector encoding data into a bidirectional long short-term memory network in the preset entity recognition model to obtain context data of the target text data;

[0073] Inputting the context data into a first feedforward fully connected network in the preset entity recognition model to obtain an entity start position data set of the target text data;

[0074] Inputting the context data into a second feedforward fully connected network in the preset entity recognition model to obtain an entity end position data set of the target text data;

[0075] Entity information of the target text data is determined based on the entity start position data set and the entity end position data set.

[0076] Exemplarily, a feedforward neural network adopts a unidirectional multi-layer structure. Each layer contains a number of neurons, each of which can receive signals from neurons in the previous layer and generate outputs to the next layer. The 0th layer of the multi-layer structure is called the input layer, the last layer of the multi-layer structure is called the output layer, and the other intermediate layers of the multi-layer structure are called hidden layers (or hidden layers, hidden layers). The hidden layer can be one layer or multiple layers. In a feedforward neural network, different neurons belong to different layers, and the neurons in each layer can receive signals from neurons in the previous layer and generate signals to output to the next layer. The 0th layer is called the input layer, the last layer is called the output layer, and the middle layer is called the hidden layer. There is no feedback in the entire network, and the signal propagates unidirectionally from the input layer to the output layer, which can be represented by a directed acyclic graph.

[0077] For example, the long short-term memory network (LSTM) is a time recursive neural network that is suitable for processing and predicting time series with relatively long intervals and delays. It is a special recurrent neural network.

[0078] Exemplarily, the bidirectional long short-term memory network includes an input layer, a first bidirectional long short-term memory layer, a second bidirectional long short-term memory layer, a first fully connected layer, a second fully connected layer and an output layer connected in series. The number of units in the first bidirectional long short-term memory layer is 128, and its output is the result of splicing together each time step in each direction; the number of units in the second bidirectional long short-term memory layer is 64, and its output is the result of splicing together the last time step in each direction; the first fully connected layer is provided with 32 neurons; the second fully connected layer is provided with 1 neuron, and its output is the zero-speed judgment result.

[0079] Exemplarily, the context data is input into the first feedforward fully connected network in the preset entity recognition model to obtain the probability distribution of the entity start position of the target text data (entity start position data set); the context data is input into the second feedforward fully connected network in the preset entity recognition model to obtain the probability distribution of the entity end position of the target text data (entity end position data set).

[0080] In a possible implementation, the step of determining the entity information of the target text data based on the entity start position data set and the entity end position data set includes:

[0081] Input each entity start position data in the entity start position data set into the dual affine classifier in the preset entity recognition model to obtain a first score set for the entity start position data, select the score with the maximum value in the first score set as the first target score, and use the entity start position data corresponding to the first target score as the target entity start position data;

[0082] Input each entity end position data in the entity end position data set into the dual affine classifier in the preset entity recognition model to obtain a second score set for the entity end position data, select the score with the maximum value in the second score set as the second target score, and use the entity end position data corresponding to the second target score as the target entity end position data;

[0083] The entity information of the target text data is determined based on the target entity start position data and the target entity end position data.

[0084] Exemplarily, the dual affine classifier includes a target entity start position scoring formula and a target entity end position scoring formula, specifically:

[0085] The scoring formula for the target entity's starting position is:

[0086]

[0087] Among them, h s (i) is the score of the starting position data of the i-th target entity, FFNN s () is the first feed-forward fully connected network function, Start position data for the i-th target entity.

[0088] The scoring formula for the target entity's starting position is:

[0089]

[0090] Among them, h e (i) is the score of the end position data of the i-th target entity, FFNN e () is the second feed-forward fully connected network function, End position data for the i-th target entity.

[0091] Exemplarily, the step of determining the entity information of the target text data based on the target entity start position data and the target entity end position data is specifically to determine the entity information of the target text data by a summation formula, and the summation formula is:

[0092]

[0093] Among them, U, W, and b are preset parameters, which are obtained after initialization. m represents the combination of the starting position and the ending position of the target entity. Represents peace, represents the matrix transpose, r m (i) represents the combined score of the i-th target entity start position data and the i-th target entity end position data.

[0094] In one possible implementation, target text data to be recognized is obtained, and the target text data is converted into vector encoded data. Specifically, multimodal data (voice data, image data) are all converted into text data to obtain multiple groups of text data. The optimal text data is obtained through mutual verification of the multiple groups of text data to ensure the accuracy of the text data. The deep semantic information of the vector encoded data is obtained through a preset graph attention network in a preset intention recognition model. Specifically, a preset graph attention network with a multi-head attention mechanism is used to obtain the deep semantic information of the vector encoded data, which ensures the accuracy of the deep semantic information and makes the acquired deep semantic information more reliable and reasonable. The deep semantic information is obtained through a preset auxiliary branch in the preset intention recognition model. The shallow semantic information of the vector-encoded data, specifically, solves the problem of gradient vanishing and gradient exploding in the deep learning process, and at the same time, makes the semantic extraction of the target text data more comprehensive, avoiding ignoring the semantic features in the target text data; and inputs the deep semantic information and the shallow semantic information into the preset multi-layer perception network in the preset intention recognition model to obtain the intention type of the target text data; inputs the vector-encoded data into the preset entity recognition model to obtain the entity information of the target text data, specifically, adopts a dual affine classifier to obtain the entity information of the target text data, and ensures the accuracy of the entity information; uses the intention type and the entity information as the implementation result of the joint task for the target text data. Intent recognition and entity recognition in the joint task share vector-encoded data, and predict the results of the two tasks at the same time, which can also save the consumption of machine resources.

[0095] like Figure 3 As shown, an embodiment of the present application provides a joint task implementation device, the device comprising:

[0096] The data receiving module 201 is used to obtain target text data to be recognized and convert the target text data into vector encoding data;

[0097] An intention recognition module 202 is used to obtain deep semantic information of the vector-encoded data through a preset graph attention network in a preset intention recognition model, obtain shallow semantic information of the vector-encoded data through a preset auxiliary branch in the preset intention recognition model, and input the deep semantic information and the shallow semantic information into a preset multi-layer perception network in the preset intention recognition model to obtain the intention type of the target text data;

[0098] Entity recognition model 203, used for inputting the vector encoding data into a preset entity recognition model to obtain entity information of the target text data;

[0099] The output module 204 is used to use the intention type and the entity information as the implementation result of the joint task for the target text data.

[0100] In a possible implementation manner, the data receiving module 201 is used to:

[0101] Acquire a request information set of a target user within a preset time by using different sampling methods, wherein the different sampling methods include at least two of voice collection, facial image collection, and body image collection;

[0102] Convert each request information in the request information set into text to obtain a text data set corresponding to the request information set;

[0103] Target text data to be recognized is determined based on the text data set.

[0104] In a possible implementation, the preset graph attention network in the intention recognition module 202 is a graph attention network combined with a multi-head attention mechanism, and the multi-head attention mechanism is: a mechanism that enables the graph attention network to calculate the feature vectors of each node in the graph attention network based on interaction data, and the interaction data is: the attention coefficient between each node and the nodes adjacent to each node.

[0105] In a possible implementation manner, the intention recognition module 202 is further configured to:

[0106] Constructing the preset auxiliary branch based on the residual structure;

[0107] The vector encoding data is input into the preset auxiliary branch to obtain shallow semantic information of the vector encoding data.

[0108] In a possible implementation manner, the intention recognition module 202 is further configured to:

[0109] The deep semantic information and the shallow semantic information are concatenated by a preset connection function to obtain target semantic information of the target text data;

[0110] Inputting the target semantic information into a fully connected layer in the preset multi-layer perception network to obtain an output vector;

[0111] Inputting the output vector into a preset activation function layer in the preset multi-layer perception network to obtain a probability value set of the target semantic information for different intent types;

[0112] Selecting a maximum probability value from the probability value set as the target probability value;

[0113] The intention type corresponding to the target probability value is used as the intention type of the target text data.

[0114] In a possible implementation, the entity recognition model 203 is used to:

[0115] Inputting the vector encoding data into a bidirectional long short-term memory network in the preset entity recognition model to obtain context data of the target text data;

[0116] Inputting the context data into a first feedforward fully connected network in the preset entity recognition model to obtain an entity start position data set of the target text data;

[0117] Inputting the context data into a second feedforward fully connected network in the preset entity recognition model to obtain an entity end position data set of the target text data;

[0118] Entity information of the target text data is determined based on the entity start position data set and the entity end position data set.

[0119] In a possible implementation, the entity recognition model 203 is further used for:

[0120] Input each entity start position data in the entity start position data set into the dual affine classifier in the preset entity recognition model to obtain a first score set for the entity start position data, select the score with the maximum value in the first score set as the first target score, and use the entity start position data corresponding to the first target score as the target entity start position data;

[0121] Input each entity end position data in the entity end position data set into the dual affine classifier in the preset entity recognition model to obtain a second score set for the entity end position data, select the score with the maximum value in the second score set as the second target score, and use the entity end position data corresponding to the second target score as the target entity end position data;

[0122] The entity information of the target text data is determined based on the target entity start position data and the target entity end position data.

[0123] The present invention provides a joint task realization device, which obtains target text data to be recognized and converts the target text data into vector encoding data; obtains deep semantic information of the vector encoding data through a preset graph attention network in a preset intention recognition model, obtains shallow semantic information of the vector encoding data through a preset auxiliary branch in the preset intention recognition model, and inputs the deep semantic information and the shallow semantic information into a preset multi-layer perception network in the preset intention recognition model to obtain the intention type of the target text data; inputs the vector encoding data into a preset entity recognition model to obtain the entity information of the target text data; and uses the intention type and the entity information as the realization result of the joint task for the target text data. By obtaining and splicing the deep semantic information and shallow semantic information of the vector encoding data, the correlation between texts is strengthened, and problems such as gradient disappearance can be avoided. Intention recognition and entity recognition in the joint task share vector encoding data, and the results of the two tasks are predicted at the same time, which can also save the consumption of machine resources.

[0124] For the specific definition of the joint task implementation device, please refer to the definition of the joint task implementation method above, which will not be repeated here. The various modules in the above-mentioned joint task implementation device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0125] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external user terminal through a network connection. When the computer program is executed by the processor, it realizes a function or step on the service side of a joint task implementation method.

[0126] In one embodiment, a computer device is provided. The computer device may be a user terminal, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the user side of a joint task implementation method.

[0127] In a possible implementation, Figure 6 As shown, an embodiment of the present application provides an electronic device 300, including: a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor 320. When the processor 320 executes the computer program 311, it implements: obtaining target text data to be recognized, and converting the target text data into vector encoding data; obtaining deep semantic information of the vector encoding data through a preset graph attention network in a preset intention recognition model, obtaining shallow semantic information of the vector encoding data through a preset auxiliary branch in the preset intention recognition model, and inputting the deep semantic information and the shallow semantic information into a preset multi-layer perception network in the preset intention recognition model to obtain the intent type of the target text data; inputting the vector encoding data into a preset entity recognition model to obtain entity information of the target text data; and using the intent type and the entity information as the implementation result of the joint task for the target text data.

[0128] By obtaining the target text data to be recognized and converting the target text data into vector encoding data; obtaining the deep semantic information of the vector encoding data through the preset graph attention network in the preset intention recognition model, obtaining the shallow semantic information of the vector encoding data through the preset auxiliary branch in the preset intention recognition model, and inputting the deep semantic information and the shallow semantic information into the preset multi-layer perception network in the preset intention recognition model to obtain the intent type of the target text data; inputting the vector encoding data into the preset entity recognition model to obtain the entity information of the target text data; and using the intent type and the entity information as the implementation result of the joint task for the target text data. By obtaining and splicing the deep semantic information and shallow semantic information of the vector encoding data, the correlation between texts is strengthened, and problems such as gradient disappearance can be avoided. The intent recognition and entity recognition in the joint task share the vector encoding data, and the results of the two tasks are predicted at the same time, which can also save the consumption of machine resources.

[0129] In a possible implementation, Figure 7 As shown, an embodiment of the present application provides a computer-readable storage medium 400, on which a computer program 411 is stored. When the computer program 411 is executed by a processor, it implements: obtaining target text data to be recognized, and converting the target text data into vector encoding data; obtaining deep semantic information of the vector encoding data through a preset graph attention network in a preset intention recognition model, obtaining shallow semantic information of the vector encoding data through a preset auxiliary branch in the preset intention recognition model, and inputting the deep semantic information and the shallow semantic information into a preset multi-layer perception network in the preset intention recognition model to obtain the intent type of the target text data; inputting the vector encoding data into a preset entity recognition model to obtain the entity information of the target text data; and using the intent type and the entity information as the implementation result of the joint task for the target text data.

[0130] By obtaining the target text data to be recognized and converting the target text data into vector encoding data; obtaining the deep semantic information of the vector encoding data through the preset graph attention network in the preset intention recognition model, obtaining the shallow semantic information of the vector encoding data through the preset auxiliary branch in the preset intention recognition model, and inputting the deep semantic information and the shallow semantic information into the preset multi-layer perception network in the preset intention recognition model to obtain the intent type of the target text data; inputting the vector encoding data into the preset entity recognition model to obtain the entity information of the target text data; and using the intent type and the entity information as the implementation result of the joint task for the target text data. By obtaining and splicing the deep semantic information and shallow semantic information of the vector encoding data, the correlation between texts is strengthened, and problems such as gradient disappearance can be avoided. The intent recognition and entity recognition in the joint task share the vector encoding data, and the results of the two tasks are predicted at the same time, which can also save the consumption of machine resources.

[0131] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0132] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0133] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0134] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0135] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0136] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described above, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

[0137] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A joint task implementation method, characterized in that: include: Acquire target text data to be recognized, and convert the target text data into vector encoding data; The deep semantic information of the vector-encoded data is obtained through a preset graph attention network in a preset intent recognition model, the shallow semantic information of the vector-encoded data is obtained through a preset auxiliary branch in the preset intent recognition model, and the deep semantic information and the shallow semantic information are input into a preset multi-layer perception network in the preset intent recognition model to obtain the intent type of the target text data, wherein the preset graph attention network is a graph attention network combined with a multi-head attention mechanism, and the multi-head attention mechanism is a mechanism for enabling the graph attention network to calculate the feature vectors of each node in the graph attention network based on interaction data, and the interaction data is an attention coefficient between each node and a node adjacent to each node; The step of obtaining shallow semantic information of the vector encoding data through a preset auxiliary branch in the preset intention recognition model includes: Constructing the preset auxiliary branch based on the residual structure; Inputting the vector encoding data into the preset auxiliary branch to obtain shallow semantic information; Inputting the vector encoded data into a preset entity recognition model to obtain entity information of the target text data; The step of inputting the vector encoded data into a preset entity recognition model to obtain entity information of the target text data comprises: Inputting the vector encoding data into a bidirectional long short-term memory network in the preset entity recognition model to obtain context data of the target text data; Inputting the context data into a first feedforward fully connected network in the preset entity recognition model to obtain an entity start position data set of the target text data; Inputting the context data into a second feedforward fully connected network in the preset entity recognition model to obtain an entity end position data set of the target text data; Determine the entity information of the target text data based on the entity start position data set and the entity end position data set; The step of determining the entity information of the target text data based on the entity start position data set and the entity end position data set comprises: Input each entity start position data in the entity start position data set into the dual affine classifier in the preset entity recognition model to obtain a first score set for the entity start position data, select the score with the maximum value in the first score set as the first target score, and use the entity start position data corresponding to the first target score as the target entity start position data; Input each entity end position data in the entity end position data set into the dual affine classifier in the preset entity recognition model to obtain a second score set for the entity end position data, select the score with the maximum value in the second score set as the second target score, and use the entity end position data corresponding to the second target score as the target entity end position data; Determine the entity information of the target text data based on the target entity start position data and the target entity end position data; The intent type and the entity information are taken as the implementation result of the joint task for the target text data.

2. The joint task implementation method according to claim 1, characterized in that: The step of obtaining the target text data to be recognized includes: Acquire a request information set of a target user within a preset time by using different sampling methods, wherein the different sampling methods include at least two of voice collection, facial image collection, and body image collection; Convert each request information in the request information set into text to obtain a text data set corresponding to the request information set; Target text data to be recognized is determined based on the text data set.

3. The joint task implementation method according to claim 1, characterized in that: The step of inputting the deep semantic information and the shallow semantic information into a preset multi-layer perception network in the preset intention recognition model to obtain the intention type of the target text data includes: The deep semantic information and the shallow semantic information are concatenated by a preset connection function to obtain target semantic information of the target text data; Inputting the target semantic information into a fully connected layer in the preset multi-layer perception network to obtain an output vector; Inputting the output vector into a preset activation function layer in the preset multi-layer perception network to obtain a probability value set of the target semantic information for different intent types; Selecting a maximum probability value from the probability value set as the target probability value; The intention type corresponding to the target probability value is used as the intention type of the target text data.

4. A joint task implementation device, characterized in that: The device comprises: A data receiving module, used for acquiring target text data to be recognized and converting the target text data into vector encoding data; An intention recognition module, used for obtaining deep semantic information of the vector-encoded data through a preset graph attention network in a preset intention recognition model, obtaining shallow semantic information of the vector-encoded data through a preset auxiliary branch in the preset intention recognition model, and inputting the deep semantic information and the shallow semantic information into a preset multi-layer perception network in the preset intention recognition model to obtain the intention type of the target text data, wherein the preset graph attention network is a graph attention network combined with a multi-head attention mechanism, wherein the multi-head attention mechanism is a mechanism for enabling the graph attention network to calculate feature vectors of each node in the graph attention network based on interaction data, wherein the interaction data is an attention coefficient between each node and a node adjacent to each node; the step of obtaining shallow semantic information of the vector-encoded data through a preset auxiliary branch in the preset intention recognition model comprises: constructing the preset auxiliary branch based on a residual structure; inputting the vector-encoded data into the preset auxiliary branch to obtain shallow semantic information of the vector-encoded data; The entity recognition module is used to input the vector encoded data into a preset entity recognition model to obtain the entity information of the target text data. The step of inputting the vector encoded data into the preset entity recognition model to obtain the entity information of the target text data includes: inputting the vector encoded data into a bidirectional long short-term memory network in the preset entity recognition model to obtain the context data of the target text data; inputting the context data into a first feedforward fully connected network in the preset entity recognition model to obtain the entity start position data set of the target text data; inputting the context data into a second feedforward fully connected network in the preset entity recognition model to obtain the entity end position data set of the target text data; determining the entity information of the target text data based on the entity start position data set and the entity end position data set; determining the entity information based on the entity start position data set and the entity end position data set The steps of determining the entity information of the target text data include: inputting each entity start position data in the entity start position data set into the dual affine classifier in the preset entity recognition model to obtain a first scoring set for the entity start position data, selecting the maximum score in the first scoring set as the first target score, and using the entity start position data corresponding to the first target score as the target entity start position data; inputting each entity end position data in the entity end position data set into the dual affine classifier in the preset entity recognition model to obtain a second scoring set for the entity end position data, selecting the maximum score in the second scoring set as the second target score, and using the entity end position data corresponding to the second target score as the target entity end position data; determining the entity information of the target text data based on the target entity start position data and the target entity end position data; An output module is used to use the intention type and the entity information as the implementation result of the joint task for the target text data.

5. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the joint task implementation method as described in any one of claims 1 to 3 are performed.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the joint task implementation method according to any one of claims 1 to 3 are executed.