Identification method and device, computer equipment, storage medium and computer program product
By obtaining multi-dimensional feature data and using cross-attention processing, the problem of low accuracy of emotion recognition is solved and a more efficient emotion recognition effect is achieved.
Patent Information
- Application Number
- CN202310411969.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-17
- Publication Date
- 2024-10-29
AI Technical Summary
Existing emotion recognition technology has the problem of low recognition accuracy, making it difficult to effectively identify the user's emotional state.
By obtaining multi-dimensional feature data of the target user (such as image feature data, voice feature data, text feature data and physiological parameter feature data), and using a cross-attention processing mechanism, the feature data of different dimensions are fused to generate Multiple attention output data are finally determined based on these data.
The accuracy of emotion recognition is improved. Through the fusion of multi-dimensional feature data, the accuracy and reliability of the recognition results are enhanced, and the emotion recognition effect in human-vehicle interaction is improved.
Smart Images

Figure CN118862884A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to an identification method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] With the development of automobile and Internet technologies, vehicle-to-vehicle interaction has become a major research direction, among which emotion recognition is an important aspect of vehicle-to-vehicle interaction.
[0003] At present, the most prominent problem with emotion recognition technology is the low recognition accuracy. Summary of the invention
[0004] Based on this, it is necessary to provide a recognition method, device, computer equipment, storage medium and computer program product that can improve the accuracy of emotion recognition in response to the above technical problems.
[0005] In a first aspect, the present disclosure provides an identification method. The method comprises:
[0006] Acquire feature data of multiple dimensions of a target user, wherein the feature data of the multiple dimensions are related to a target identification service; acquire multiple data groups based on the feature data of the multiple dimensions, wherein the feature data in different data groups are different; perform cross-attention processing on each of the data groups to obtain multiple attention output data; and obtain an identification result of the target user corresponding to the target identification service based on the multiple attention output data and the feature data of the multiple dimensions.
[0007] In one of the embodiments, the target recognition service is an emotion recognition service, and the feature data of the multiple dimensions include at least one of image feature data, voice feature data, text feature data and physiological parameter feature data.
[0008] In one embodiment, the step of obtaining characteristic data of multiple dimensions of a target user includes:
[0009] Acquire the original data of multiple dimensions of the target user; perform information extraction processing on the original data of the multiple dimensions respectively, and perform encoding processing on the original data of the multiple dimensions respectively; obtain the feature data of the multiple dimensions according to the results of the information extraction processing and the results of the encoding processing.
[0010] In one embodiment, encoding the original data of the multiple dimensions respectively includes:
[0011] According to the dimension of each of the original data, a corresponding encoding algorithm is executed on each of the original data to perform encoding processing.
[0012] In one embodiment, executing a corresponding encoding algorithm on each of the original data according to the dimension of each of the original data includes:
[0013] For the first original data of the image dimension, the first original data is input into a pre-trained image feature extraction model to obtain the first encoded data output by the image feature extraction model.
[0014] In one embodiment, executing a corresponding encoding algorithm on each of the original data according to the dimension of each of the original data includes:
[0015] For the second original data of the target dimension, obtain the word vector corresponding to the second original data, obtain the sentence vector corresponding to the second original data, and obtain the sound vector of the second original data, and fuse the word vector, the sentence vector and the sound vector to obtain the second encoded data; wherein the target dimension includes at least one of a text dimension, a physiological parameter dimension and a speech dimension, and the sound vector includes a sound field vector or a sound range vector.
[0016] In one embodiment, obtaining the feature data of the multiple dimensions according to the result of the information extraction process and the result of the encoding process includes:
[0017] For each dimension, feature data of the dimension is acquired according to a result of information extraction processing corresponding to the dimension and a result of encoding processing corresponding to the dimension.
[0018] In one embodiment, each of the data groups includes two feature data of different dimensions, and the cross-attention processing is performed on each of the data groups to obtain multiple attention output data, including:
[0019] For each of the data groups, one feature data in the data group is processed based on the first weight and the second weight to obtain the first data and the second data, another feature data in the data group is processed based on the third weight to obtain the third data, and the attention output data corresponding to the data group is calculated based on the first data, the second data and the third data.
[0020] In one embodiment, the calculating the attention output data corresponding to the data group based on the first data, the second data and the third data includes:
[0021] Calculate the similarity between the first data and the second data; calculate the attention parameter based on the similarity and the third data; calculate the first attention data and the second attention data as the attention output data based on the attention parameter, the first data and the second data.
[0022] In one embodiment, obtaining the recognition result of the target user corresponding to the target recognition service based on the multiple attention output data and the feature data of the multiple dimensions includes:
[0023] The multiple attention output data and the feature data of the multiple dimensions are input into an initial recognition model; and a recognition result of the target user corresponding to the target recognition service is determined according to the output of the initial recognition model.
[0024] In one embodiment, the initial recognition model includes a plurality of recognition networks corresponding to different dimensions, and inputting the plurality of attention output data and the feature data of the plurality of dimensions into the initial recognition model includes:
[0025] For each of the recognition networks, the target attention output data among the multiple attention output data and the target feature data among the feature data of the multiple dimensions are input into the recognition network to obtain an initial recognition result output by the recognition network, wherein the dimensions of the feature data in the data group corresponding to the target attention output data are different from the dimensions corresponding to the recognition network, and the dimensions of the target feature data are the same as the dimensions of the recognition network.
[0026] In one embodiment, inputting target attention output data from the plurality of attention output data and target feature data from the plurality of dimensional feature data into the recognition network comprises:
[0027] The target feature data is processed based on the fourth weight, the fifth weight and the sixth weight respectively to obtain the first feature data, the second feature data and the third feature data; the first feature data and the first attention data in the target attention output data are fused to obtain the first fused data, and the second feature data and the second attention data in the target attention output data are fused to obtain the second fused data; the first fused data, the second fused data and the third feature data are input into the recognition network.
[0028] In one embodiment, determining the recognition result of the target user corresponding to the target recognition service according to the output of the initial recognition model includes:
[0029] The initial recognition results output by each recognition network are multiplied by different weights and then input into the voting neural network to obtain the recognition result of the target user output by the voting neural network corresponding to the target recognition service.
[0030] In one embodiment, the original data of each dimension includes currently collected data and historically collected data.
[0031] In a second aspect, the present disclosure further provides an identification device. The device comprises:
[0032] A first acquisition module is used to acquire feature data of multiple dimensions of a target user, wherein the feature data of multiple dimensions are related to a target identification service;
[0033] A second acquisition module is used to acquire multiple data groups according to the feature data of the multiple dimensions, wherein the feature data in different data groups are different;
[0034] A processing module, used for performing cross-attention processing on each of the data groups to obtain a plurality of attention output data;
[0035] An identification module is used to obtain an identification result of the target user corresponding to the target identification service based on the multiple attention output data and the feature data of the multiple dimensions.
[0036] In one of the embodiments, the target recognition service is an emotion recognition service, and the feature data of the multiple dimensions include at least one of image feature data, voice feature data, text feature data and physiological parameter feature data.
[0037] In one embodiment, the first acquisition module is specifically used to:
[0038] Acquire the original data of multiple dimensions of the target user; perform information extraction processing on the original data of the multiple dimensions respectively, and perform encoding processing on the original data of the multiple dimensions respectively; obtain the feature data of the multiple dimensions according to the results of the information extraction processing and the results of the encoding processing.
[0039] In one embodiment, the first acquisition module is specifically used to:
[0040] According to the dimension of each of the original data, a corresponding encoding algorithm is executed on each of the original data to perform encoding processing.
[0041] In one embodiment, the first acquisition module is specifically used to:
[0042] For the first original data of the image dimension, the first original data is input into a pre-trained image feature extraction model to obtain the first encoded data output by the image feature extraction model.
[0043] In one embodiment, the first acquisition module is specifically used to:
[0044] For the second original data of the target dimension, obtain the word vector corresponding to the second original data, obtain the sentence vector corresponding to the second original data, and obtain the sound vector of the second original data, and fuse the word vector, the sentence vector and the sound vector to obtain the second encoded data; wherein the target dimension includes at least one of a text dimension, a physiological parameter dimension and a speech dimension, and the sound vector includes a sound field vector or a sound range vector.
[0045] In one embodiment, the first acquisition module is specifically used to:
[0046] For each dimension, feature data of the dimension is acquired according to a result of information extraction processing corresponding to the dimension and a result of encoding processing corresponding to the dimension.
[0047] In one embodiment, each of the data groups includes two feature data of different dimensions, and the processing module is specifically used to:
[0048] For each of the data groups, one feature data in the data group is processed based on the first weight and the second weight to obtain the first data and the second data, another feature data in the data group is processed based on the third weight to obtain the third data, and the attention output data corresponding to the data group is calculated based on the first data, the second data and the third data.
[0049] In one embodiment, the processing module is specifically used to:
[0050] Calculate the similarity between the first data and the second data; calculate the attention parameter based on the similarity and the third data; calculate the first attention data and the second attention data as the attention output data based on the attention parameter, the first data and the second data.
[0051] In one embodiment, the identification module is specifically used to:
[0052] The multiple attention output data and the feature data of the multiple dimensions are input into an initial recognition model; and a recognition result of the target user corresponding to the target recognition service is determined according to the output of the initial recognition model.
[0053] In one embodiment, the initial recognition model includes a plurality of recognition networks corresponding to different dimensions, and the recognition module is specifically used to:
[0054] For each of the recognition networks, the target attention output data among the multiple attention output data and the target feature data among the feature data of the multiple dimensions are input into the recognition network to obtain an initial recognition result output by the recognition network, wherein the dimensions of the feature data in the data group corresponding to the target attention output data are different from the dimensions corresponding to the recognition network, and the dimensions of the target feature data are the same as the dimensions of the recognition network.
[0055] In one embodiment, the identification module is specifically used to:
[0056] The target feature data is processed based on the fourth weight, the fifth weight and the sixth weight respectively to obtain the first feature data, the second feature data and the third feature data; the first feature data and the first attention data in the target attention output data are fused to obtain the first fused data, and the second feature data and the second attention data in the target attention output data are fused to obtain the second fused data; the first fused data, the second fused data and the third feature data are input into the recognition network.
[0057] In one embodiment, the identification module is specifically used to:
[0058] The initial recognition results output by each recognition network are multiplied by different weights and then input into the voting neural network to obtain the recognition result of the target user output by the voting neural network corresponding to the target recognition service.
[0059] In one embodiment, the original data of each dimension includes currently collected data and historically collected data.
[0060] In a third aspect, the present disclosure further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps described in any one of the first aspects are implemented.
[0061] In a fourth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements any of the steps described in the first aspect.
[0062] In a fifth aspect, the present disclosure further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements any of the steps described in the first aspect.
[0063] The above-mentioned identification method, device, computer equipment, storage medium and computer program product obtain feature data of multiple dimensions of the target user related to the target identification business, and then obtain multiple data groups based on the feature data of multiple dimensions, wherein the feature data in different data groups are different. Next, cross-attention processing is performed on each data group to obtain multiple attention output data. Finally, the recognition result corresponding to the target identification business of the target user is obtained based on the multiple attention output data and the feature data of multiple dimensions. Since the target identification business is performed using the feature data of multiple dimensions of the target user, the recognition accuracy is better than that using the feature data of a single dimension. Furthermore, the feature data of multiple dimensions are processed using a cross-attention mechanism, especially the cross-attention mechanism is processed in units of data groups, and the feature data in different data groups are different. Therefore, a variety of different information interactions for different dimensions can be realized, thereby obtaining multiple attention output data. Performing a target identification business based on the multiple attention output data and the feature data of multiple dimensions can ensure that the recognition result fully integrates information from different dimensions, thereby helping to improve recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 is a schematic flow chart of an identification method in an embodiment;
[0065] Figure 2 A flowchart of a technical process for obtaining multi-dimensional feature data in one embodiment;
[0066] Figure 3 is a schematic diagram of an encoding process in one embodiment;
[0067] Figure 4 A flowchart of a technical process for performing cross-attention processing in one embodiment;
[0068] Figure 5 A flowchart of a technical process for calculating attention output data in one embodiment;
[0069] Figure 6 A flowchart of a technical process for obtaining a target user's identification result in one embodiment;
[0070] Figure 7 A schematic diagram of a voting neural network output in one embodiment;
[0071] Figure 8 A flowchart of a technical process of outputting an initial recognition result by a recognition network in one embodiment;
[0072] Fig. 9A flowchart of a technical process of inputting target attention output data and target feature data into a recognition network in one embodiment;
[0073] Fig.10 is a flow chart of an identification method in another embodiment;
[0074] Fig.11 is a schematic diagram of an initial recognition model in one embodiment;
[0075] Fig.12 is a structural block diagram of an identification device in an embodiment;
[0076] Fig.13 is a diagram of the internal structure of an electronic device in one embodiment;
[0077] Fig.14 FIG. 4 is a diagram showing the internal structure of a server in one embodiment. DETAILED DESCRIPTION
[0078] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure more clear, the embodiments of the present disclosure are further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the embodiments of the present disclosure and are not used to limit the embodiments of the present disclosure.
[0079] First of all, before specifically introducing the technical solution of the embodiments of the present disclosure, the technical background or technical evolution context on which the embodiments of the present disclosure are based is introduced.
[0080] At present, emotion recognition has become an important aspect of the research on human-vehicle interaction on the vehicle side. Generally speaking, by effectively identifying various emotional signals of users, it can provide the necessary foundation for subsequent human-vehicle interaction scenarios such as establishing a virtual image on the vehicle side, providing adaptive responses to users on the vehicle side, and providing psychological health counseling to users on the vehicle side.
[0081] Currently, the biggest problem with emotion recognition technology is the low recognition accuracy. Therefore, improving the accuracy of emotion recognition has become a current research hotspot.
[0082] In view of this, an embodiment of the present disclosure provides a recognition method, which is based on the user's multi-dimensional feature data and a cross-attention mechanism, and can effectively improve the accuracy of emotion recognition.
[0083] It should be pointed out that the execution subject of the identification method provided in the embodiment of the present disclosure may be an identification device, which may be implemented as part or all of an electronic device or a server through software, hardware, or a combination of software and hardware. In the embodiment of the present disclosure, the electronic device may be, for example, a vehicle-mounted device. The server may be a single server or a server cluster consisting of multiple servers. For the convenience of explanation, in the following embodiments, the execution subject is taken as an example of a computer device, and the reader needs to understand that the computer device may be the electronic device or server described above.
[0084] In one embodiment, Figure 1 As shown, an identification method is provided, which is described by taking the method applied to the computer device mentioned above as an example, and includes the following steps:
[0085] Step 101: A computer device obtains feature data of multiple dimensions of a target user.
[0086] Among them, the target user is the user for whom the target identification service is to be executed, wherein the target identification service can be, for example, a fatigue identification service, or a health status identification service, or an emotion identification service, etc. The embodiment of the present disclosure does not limit the specific type of the target identification service, and any identification service for the user should fall within the protection scope of the present disclosure.
[0087] Taking the target recognition business as an emotion recognition business as an example, in the scenario of human-vehicle interaction, the target user may be a passenger in the vehicle, etc., and in the scenario of online customer service, the target user may be a user being served, etc. The disclosed embodiments do not specifically limit the type of target user.
[0088] The feature data of the multiple dimensions are related to the target recognition service. In an optional embodiment of the present disclosure, the feature data of the multiple dimensions may include at least one of image feature data, voice feature data, text feature data and physiological parameter feature data.
[0089] Among them, the image feature data can be feature data of facial images, feature data of body posture images, feature data of vein images, etc., and the embodiments of the present disclosure do not make specific limitations on this. The voice feature data can be feature data of the target user's interactive voice, and the so-called interactive voice refers to the voice of the target user when interacting with other users or with a computer device. The text feature data can be feature data of the text converted from the target user's interactive voice, or can be feature data of the text input by the target user in the computer device. The physiological parameter feature data can be feature data of pulse, feature data of eye movement, feature data of blood oxygen saturation, feature data of neuropsychological electricity, feature data of respiratory rate, etc., and the embodiments of the present disclosure do not make specific limitations on this.
[0090] In an optional embodiment of the present disclosure, the multi-dimensional feature data can be obtained after a computer device performs feature extraction processing on the original data of each dimension of the target user collected. Therefore, the multi-dimensional feature data can reflect the characteristics of the original data of each dimension of the target user collected. Therefore, the accuracy of performing target identification services on the target user using the multi-dimensional feature data is higher.
[0091] It should be pointed out that the characteristic data of multiple dimensions of the target users mentioned above are obtained with the full consent and authorization of the target users.
[0092] For example, in an optional implementation, an authorization interface may be provided to the target user, in which authorization information related to the type of data, scope, purpose, etc. to be obtained may be provided. At the same time, the authorization interface also includes an authorization option, and the target user may trigger the authorization option on the premise of fully understanding and agreeing to the authorization information to authorize the computer device to obtain the characteristic data of the multiple dimensions. Of course, a stop authorization interface may also be provided to the target user, and the stop authorization interface may provide a stop authorization option. After the target user triggers the stop authorization option, the authorization to obtain the multi-dimensional characteristic data may be withdrawn.
[0093] Step 102: The computer device obtains multiple data groups based on feature data of multiple dimensions.
[0094] The feature data in different data groups are different. Optionally, the number of feature data included in different data groups is the same, and the dimensions of the feature number included in the same data group are different.
[0095] In an optional embodiment of the present application, each data group may include two feature data, and the dimensions of the two feature data included in each data group are different. Meanwhile, the feature data included in different data groups are different.
[0096] Taking the example that the multi-dimensional feature data includes image feature data, voice feature data, text feature data and physiological parameter feature data, in step 102, a data group including image feature data and voice feature data, a data group including voice feature data and text feature data, a data group including text feature data and physiological parameter feature data, and a data group including image feature data and text feature data can be obtained.
[0097] Step 103: The computer device performs cross-attention processing on each data group to obtain multiple attention output data.
[0098] The cross-attention mechanism is a deep learning mechanism. By performing cross-attention processing on the data group, the information fusion interaction of multiple feature data in the data group can be realized, so that the obtained attention output data can reflect the fusion interaction characteristics of multiple feature data in the data group.
[0099] Step 104: The computer device obtains a recognition result of the target user corresponding to the target recognition service based on the multiple attention output data and the feature data of multiple dimensions.
[0100] In an optional embodiment of the present disclosure, the computer device can obtain the recognition result of the target user corresponding to the target recognition service based on the neural network model. In other words, in an optional embodiment of the present disclosure, the computer device can input multiple attention output data and feature data of multiple dimensions into the neural network model, thereby obtaining the recognition result of the target user according to the output of the neural network model.
[0101] The recognition method provided in this embodiment obtains feature data of multiple dimensions of the target user related to the target recognition business, and then obtains multiple data groups based on the feature data of the multiple dimensions, wherein the feature data in different data groups are different. Next, cross-attention processing is performed on each data group to obtain multiple attention output data. Finally, the recognition result of the target user corresponding to the target recognition business is obtained based on the multiple attention output data and the feature data of multiple dimensions. Since the target recognition business is performed using the feature data of multiple dimensions of the target user, the recognition accuracy is better than that using the feature data of a single dimension. Furthermore, the feature data of multiple dimensions are processed using a cross-attention mechanism, especially the cross-attention mechanism is performed on a data group basis, and the feature data in different data groups are different. Therefore, a variety of different information interactions for different dimensions can be realized, thereby obtaining multiple attention output data. Performing the target recognition business based on the multiple attention output data and the feature data of multiple dimensions can ensure that the recognition result fully integrates the information of different dimensions, thereby helping to improve the recognition accuracy.
[0102] like Figure 2 As shown, the embodiment of the present disclosure provides an exemplary technical process for obtaining multi-dimensional feature data. Optionally, the technical process includes the following steps:
[0103] Step 201: A computer device obtains raw data of multiple dimensions of a target user.
[0104] In an optional embodiment of the present disclosure, the original data of multiple dimensions may include at least one of original image data, original voice data, original text data and original physiological parameter data.
[0105] Among them, the original image data can be a facial image, a body posture image, a vein image, etc., which is not specifically limited in the embodiments of the present disclosure. The original voice data can be the interactive voice of the target user. The original text data can be the text converted from the interactive voice of the target user, or it can be the text entered by the target user in the computer device. The original physiological parameter data can be pulse data, eye movement data, blood oxygen saturation, neuropsychological electrical data, respiratory rate, etc., which is not specifically limited in the embodiments of the present disclosure.
[0106] In an optional embodiment of the present disclosure, taking human-vehicle interaction as an example, the original image data may be data collected by an image acquisition device (such as a camera) installed in the vehicle, or data collected by a vehicle-mounted terminal, the original voice data may be data collected by a sound pickup device installed in the vehicle, or data collected by a vehicle-mounted terminal, and the original physiological parameter data may be data collected by a wearable device of the target user.
[0107] Similar to what has been described above, the multi-dimensional original data is also obtained after full consent and authorization from the target user, wherein the manner in which the target user fully consents and fully authorizes is as described above and will not be repeated in the embodiments of the present disclosure.
[0108] It should be noted that in an optional embodiment of the present disclosure, the original data of each dimension includes currently collected data and historically collected data. For example, the original data of each dimension may be sequence data, and the data sequence includes both currently collected data and historically collected data.
[0109] Considering that the user's emotions, health conditions, fatigue conditions, etc. often have historical inheritance, introducing historically collected data into the target recognition service can make the recognition results of the target recognition service fully utilize the historical information of the target user, thereby improving the recognition accuracy of the target recognition service.
[0110] Step 202: The computer device performs information extraction processing on the original data of multiple dimensions respectively, and performs encoding processing on the original data of multiple dimensions respectively.
[0111] In an optional embodiment of the present disclosure, for original data of different dimensions, the computer device may execute different information extraction algorithms, and may also execute different encoding algorithms. By providing different information extraction algorithms and encoding algorithms for original data of different dimensions, the information extraction processing and encoding processing may be more targeted, thereby improving the accuracy of the extracted information and the encoded data.
[0112] In the optional embodiments of the present disclosure, the essence of performing information extraction processing and encoding processing on the original data is to extract features from the original data. In other words, in step 202, the computer device extracts features from the original data in different ways by performing information extraction processing and encoding processing on the original data. In this way, the extracted features can be made more comprehensive and accurate, and the feature data obtained based on the results of the information extraction processing and the encoding processing can better reflect the features of the original data. Therefore, the recognition accuracy of the target recognition service based on the feature data is higher.
[0113] For the original image data, that is, the image dimension, the information extraction algorithm executed by the computer device may include: smoothing and denoising the original image data, for example, enhanced smoothing, binary denoising, etc., and then, locating the features of the original image data. For example, for facial images, the eyes, pupils, corners of the eyes, etc., which are highly correlated with expressions, can be located. Then, dimensionality reduction feature extraction can be performed to obtain information extracted from the original image data.
[0114] For the original speech data, that is, the speech dimension, the information extraction algorithm executed by the computer device may include: extracting short-time energy, speech duration, fundamental frequency, first three formants and Mel-frequency cepstral coefficients from the original speech data, and then fusing the short-time energy, speech duration, fundamental frequency, first three formants and Mel-frequency cepstral coefficients to obtain the information extracted from the original speech data.
[0115] For the original text data, that is, the text dimension, the information extraction algorithm executed by the computer device may include: removing redundant information such as auxiliary words from the original text data, extracting named entities from the original text data, etc., to obtain information extracted from the original text data.
[0116] For the original physiological parameter data, that is, the physiological parameter dimension, the information extraction algorithm executed by the computer device may include: inputting the original physiological parameters into a pre-trained neural network model, and obtaining information extracted from the original physiological parameters according to the output of the neural network model, wherein the neural network model may be a SVM model, a random forest model or a CNN model, etc.
[0117] In addition, for the original image data (referred to as the first original data in the description of the encoding process), that is, the image dimension, the encoding algorithm executed by the computer device includes: inputting the first original data into a pre-trained image feature extraction model to obtain the first encoded data output by the image feature extraction model.
[0118] For the original speech data, original text data and original physiological parameter data (collectively referred to as the second original data in the description of the encoding process), that is, the text dimension, the physiological parameter dimension and the speech dimension, the encoding algorithm executed by the computer device includes: obtaining the word vector corresponding to the second original data, obtaining the sentence vector corresponding to the second original data, and obtaining the sound vector of the second original data, fusing the word vector, the sentence vector and the sound vector to obtain the second encoded data, wherein the sound vector includes a sound field vector or a sound range vector.
[0119] In order to make it easier for readers to understand the encoding process provided by the embodiment of the present disclosure, please refer to Figure 3 ,like Figure 3 As shown, for the first original data, it can be output to the ResNet or VGG16 neural network to obtain the first encoded data output by the ResNet or VGG16 neural network. For the second original data, it can be divided into three-way encoding, and the results of the three-way encoding are fused to obtain the second encoded data, wherein the first encoding is to obtain the word encoding, and then obtain the word vector based on the word encoding, the second encoding is to obtain the hidden state, the hidden state is spliced and the output weight is calculated, and finally the sentence vector is obtained based on the output weight, and the third encoding is to determine the sound range or sound field, and then, a vector representation of the sound range / sound field is established, which is the sound vector.
[0120] Step 203: The computer device obtains feature data of multiple dimensions according to the results of the information extraction process and the encoding process.
[0121] In an optional embodiment of the present application, for a certain dimension, feature data of the dimension can be obtained based on the result of information extraction processing corresponding to the dimension and the result of encoding processing corresponding to the dimension. Optionally, the result of information extraction processing corresponding to the dimension and the result of encoding processing corresponding to the dimension can be fused to obtain the feature data of the dimension.
[0122] For example, for the image dimension, the result of the information extraction processing corresponding to the image dimension and the result of the encoding processing corresponding to the image dimension can be fused to obtain the feature data of the image dimension. For the text dimension, the result of the information extraction processing corresponding to the text dimension and the result of the encoding processing corresponding to the text dimension can be fused to obtain the feature data of the text dimension. For the speech dimension, the result of the information extraction processing corresponding to the speech dimension and the result of the encoding processing corresponding to the speech dimension can be fused to obtain the feature data of the speech dimension. For the physiological parameter dimension, the result of the information extraction processing corresponding to the physiological parameter dimension and the result of the encoding processing corresponding to the physiological parameter dimension can be fused to obtain the feature data of the physiological parameter dimension.
[0123] After explaining the method of obtaining multi-dimensional feature data, the embodiment of the present disclosure will explain the optional technical process of cross-attention processing and recognition processing. As mentioned above, in the optional embodiment of the present disclosure, each data group obtained in step 102 may contain two feature data, and the dimensions of the two feature data contained in each data group are different. At the same time, the feature data contained in different data groups are different. On this basis, Figure 4 As shown, the embodiment of the present disclosure provides an exemplary technical process for cross-attention processing. It should be noted that: Figure 4 The technical process shown can be applied to each data group. For the convenience of explanation, only one of the data groups is used as an example for cross attention processing. Optionally, the technical process includes the following steps:
[0124] Step 401: The computer device processes a feature data (hereinafter referred to as feature data 1) in a data group based on a first weight and a second weight respectively to obtain first data and second data.
[0125] The first weight and the second weight may be the same or different, and the embodiments of the present disclosure do not specifically limit this. In addition, optionally, the first weight and the second weight may be set by a technician according to the dimension to which the feature data 1 in the data group belongs. This is designed in consideration of the different credibility of data of different dimensions. In this way, the accuracy of the final recognition result can be guaranteed.
[0126] In an optional embodiment of the present disclosure, processing the feature data 1 in the data group based on the first weight and the second weight may be: multiplying the feature data 1 by the first weight and the second weight respectively.
[0127] Taking the case where the data group includes speech feature data and image feature data, and the feature data 1 is image feature data as an example, the process can be expressed in the following mathematical language:
[0128] K1=W k1 *T 图像 ;
[0129] V1=W v1 *T 图像 .
[0130] Among them, T 图像 is feature data 1, W k1 is the first weight, W v1 is the second weight, K1 is the first data, and V1 is the second data.
[0131] Step 402: The computer device processes another feature data (hereinafter referred to as feature data 2) in the data group based on the third weight to obtain third data.
[0132] The third weight may be the same as or different from the first weight and the second weight described above, and the present disclosure does not specifically limit this. In addition, optionally, the third weight may be set by a technician according to the dimension to which the feature data 2 in the data group belongs. Similarly, this is designed in consideration of the different credibility of data of different dimensions. In this way, the accuracy of the final recognition result can be guaranteed.
[0133] In an optional embodiment of the present disclosure, processing the feature data 2 in the data group based on the third weight may be: multiplying the feature data 2 by the third weight.
[0134] Taking the case where the data group includes speech feature data and image feature data, and the feature data 2 is speech feature data as an example, the process can be expressed in the following mathematical language:
[0135] Q1=W q1 *T 语音 .
[0136] Among them, T 语音 is feature data 2, W q1 is the third weight, and Q1 is the third data.
[0137] Step 403: The computer device calculates attention output data corresponding to the data group based on the first data, the second data, and the third data.
[0138] In an optional embodiment of the present disclosure, the computer device may calculate the first data, the second data and the third data using a preset algorithm to obtain attention output data corresponding to the data group.
[0139] like Figure 5 As shown, the embodiment of the present disclosure provides a technical process for exemplarily calculating attention output data. Optionally, the technical process includes the following steps:
[0140] Step 501: A computer device calculates the similarity between first data and second data.
[0141] Exemplarily, the computer device may calculate the similarity between the first data and the second data based on a preset similarity calculation algorithm.
[0142] Optionally, the embodiment of the present disclosure provides an exemplary similarity calculation algorithm, which can be expressed in the following mathematical language:
[0143] sim=(K1*V1) / (||K1||*||V1||).
[0144] Step 502: The computer device calculates an attention parameter based on the similarity and the third data.
[0145] Exemplarily, the computer device may calculate the attention parameter based on a preset attention parameter calculation algorithm.
[0146] Optionally, the embodiment of the present disclosure provides an exemplary attention parameter calculation algorithm, which can be expressed in the following mathematical language:
[0147] attention=(∑(e sim / ∑(e sim ))*Q1.
[0148] Among them, attention is the attention parameter. It is worth noting that in the embodiment of the present disclosure, the feature data 1 is segmented data. In other words, the feature data 1 may include multiple data segments. The first data and the second data obtained based on the feature data 1 are also segmented. In other words, they may also include multiple data segments. In step 501, for each data segment, a similarity operation can be performed. Then, multiple similarities can be obtained through step 501. When calculating the attention parameter, a summation operation can be performed based on the multiple similarities to obtain the attention parameter.
[0149] Step 503: The computer device calculates first attention data and second attention data as attention output data based on the attention parameter, the first data and the second data.
[0150] Exemplarily, the computer device may calculate the attention output data based on a preset attention output calculation algorithm.
[0151] Optionally, the embodiment of the present disclosure provides an exemplary attention output calculation algorithm, which can be expressed in the following mathematical language:
[0152] K2 = K1*ln(1+attention);
[0153] V2 = V1*ln(1+attention).
[0154] Among them, K2 is the first attention data, and V2 is the second attention data.
[0155] Based on the above examples, please refer to Figure 6 The embodiment of the present disclosure also provides an optional technical process for exemplarily obtaining the recognition result of the target user, such as Figure 6As shown, the technical process includes the following steps:
[0156] Step 601: The computer device inputs multiple attention output data and feature data of multiple dimensions into an initial recognition model.
[0157] In an optional embodiment of the present disclosure, the initial recognition model may be a transformer model, wherein the initial recognition model may include multiple recognition networks corresponding to different dimensions, for example, the initial recognition model may include 4 recognition networks, and the 4 recognition networks correspond to the four dimensions of image, speech, text and physiological parameters, respectively. In an optional embodiment of the present disclosure, the recognition network may be a transformer block network, and optionally, the recognition network may include a multi-head attention layer, an add&norm (residual connection and layer normalization) layer, a feed forward layer and an add&norm layer.
[0158] In step 601, for each recognition network, the computer device can determine the input data corresponding to the recognition network from multiple attention output data and feature data of multiple dimensions, thereby obtaining the output of the recognition network.
[0159] Providing different recognition networks for different dimensions makes each recognition network more targeted, so that each recognition network can output an initial recognition result that matches the corresponding dimension, thereby improving the accuracy of the final recognition result.
[0160] Step 602: The computer device determines a recognition result of the target user corresponding to the target recognition service according to the output of the initial recognition model.
[0161] In an optional embodiment of the present disclosure, the computer device can multiply the initial recognition results output by each recognition network by different weights and input them into the voting neural network, thereby obtaining the recognition results of the target user output by the voting neural network corresponding to the target recognition service.
[0162] Optionally, the voting neural network can be a blending network. The basic idea of blending is to build a multi-layer model and use the recognition results to refit the recognition. The disclosed embodiment mainly adopts adaptive blending to combine the initial recognition results of multiple dimensions, assign corresponding weights to the initial recognition results of each dimension, and perform the final class voting output.
[0163] By multiplying the initial recognition results output by each recognition network with different weights and inputting them into the voting neural network, the recognition results of the target user corresponding to the target recognition business output by the voting neural network can be obtained. This can avoid the recognition errors caused by poor data quality in a certain dimension to a certain extent, and at the same time fully combine the initial recognition results of each dimension, thereby improving the accuracy of the final recognition result.
[0164] To make it easier for readers to understand step 602, please refer to Figure 7 , which shows that the initial recognition results output by each recognition network are multiplied by different weights and then input into the voting neural network, so as to obtain the recognition results of the target user output by the voting neural network corresponding to the target recognition business.
[0165] Based on the above examples, please refer to Figure 8 The embodiment of the present disclosure also provides an exemplary optional technical process for the recognition network to output the initial recognition result. It should be noted that the technical process is for a certain recognition network in the initial recognition model, and the process of the other recognition networks outputting the initial recognition results is the same as Figure 8 Similarly, as shown Figure 8 As shown, the technical process includes the following steps:
[0166] Step 801: The computer device inputs target attention output data from a plurality of attention output data and target feature data from a plurality of dimensional feature data into a recognition network.
[0167] Among them, the dimensions of the feature data in the data group corresponding to the target attention output data are different from the dimensions corresponding to the recognition network, and the dimensions of the target feature data are the same as the dimensions of the recognition network.
[0168] Taking the first recognition network in the initial recognition model as an example, the first recognition network corresponds to the text dimension, and the target feature data of the first recognition network is text feature data. The feature data in the data group corresponding to the target attention output data of the first recognition network includes image feature data and speech feature data (neither of which belongs to the text dimension).
[0169] Through such an input method, the input of the recognition network corresponding to a certain dimension can fuse the information of this dimension and other dimensions. For example, for the first recognition network, its input fuses the information of text dimension, image dimension and voice dimension, which helps to improve the recognition accuracy of the recognition network, thereby improving the accuracy of the final recognition result.
[0170] Step 802: The computer device obtains an initial recognition result output by the recognition network.
[0171] Based on the above examples, please refer to Fig. 9 The disclosed embodiment also provides an exemplary optional technical process of inputting target attention output data and target feature data into the recognition network, such as Fig. 9 As shown, the technical process includes the following steps:
[0172] Step 901: The computer device processes the target feature data based on the fourth weight, the fifth weight, and the sixth weight to obtain the first feature data, the second feature data, and the third feature data.
[0173] The fourth weight, the fifth weight and the sixth weight may be the same or different, and the embodiment of the present disclosure does not specifically limit this. In an optional embodiment of the present disclosure, processing the target feature data based on the fourth weight, the fifth weight and the sixth weight may be: multiplying the fourth weight, the fifth weight and the sixth weight by the target feature data, respectively.
[0174] Taking the recognition network as the first recognition network and the target feature data as text feature data as an example, the process can be expressed in the following mathematical language:
[0175] K3=W k2 *T 文本 ;
[0176] V3=W v2 *T 文本 ;
[0177] Q2=W q2 *T 文本 .
[0178] Among them, W k2 is the fourth weight, W v2 is the fifth weight, W q2 is the sixth weight, T 文本 is the target feature data, K3 is the first feature data, V3 is the second feature data, and Q2 is the third feature data.
[0179] Step 902: The computer device fuses the first feature data and the first attention data in the target attention output data to obtain first fused data.
[0180] Taking the identification network as the first identification network, according to the above description, the computer device can fuse K3 and K2 to obtain the first fused data K4.
[0181] Step 903: The computer device fuses the second feature data and the second attention data in the target attention output data to obtain second fused data.
[0182] Taking the identification network as the first identification network, according to the above description, the computer device can fuse V3 and V2 to obtain second fused data V4.
[0183] Step 904: The computer device inputs the first fusion data, the second fusion data and the third feature data into the recognition network.
[0184] According to the above description, the computer device can input K4, V4 and Q2 into the first identification network.
[0185] Please refer to Fig.10 The present disclosure also provides an exemplary identification method, such as Fig.10 As shown, the technical process includes the following steps:
[0186] Step 1001: A computer device obtains raw data of multiple dimensions of a target user.
[0187] The original data of each dimension includes currently collected data and historically collected data.
[0188] Step 1002: The computer device performs information extraction processing on the original data of multiple dimensions respectively.
[0189] Step 1003: The computer device executes a corresponding encoding algorithm on each original data according to the dimension of each original data to perform encoding processing.
[0190] Among them, for the first original data of the image dimension, the computer device inputs the first original data into a pre-trained image feature extraction model to obtain the first encoded data output by the image feature extraction model.
[0191] For the second original data of the target dimension, the computer device obtains the word vector corresponding to the second original data, obtains the sentence vector corresponding to the second original data, and obtains the sound vector of the second original data, and fuses the word vector, sentence vector and sound vector to obtain second encoded data; wherein, the target dimension includes at least one of a text dimension, a physiological parameter dimension and a speech dimension, and the sound vector includes a sound field vector or a sound range vector.
[0192] Step 1004: For each dimension, the computer device obtains feature data of the dimension according to the result of the information extraction processing corresponding to the dimension and the result of the encoding processing corresponding to the dimension.
[0193] Among them, the feature data of multiple dimensions are related to the target recognition business, which is an emotion recognition business. The feature data of multiple dimensions include at least one of image feature data, voice feature data, text feature data and physiological parameter feature data.
[0194] Step 1005: The computer device obtains multiple data groups based on the feature data of multiple dimensions, wherein the feature data in different data groups are different, and each data group includes two feature data of different dimensions.
[0195] Step 1006: For each data group, the computer device processes one characteristic data in the data group based on the first weight and the second weight to obtain the first data and the second data, and processes another characteristic data in the data group based on the third weight to obtain the third data.
[0196] Step 1007: For each data group, the computer device calculates the similarity between the first data and the second data, calculates the attention parameter based on the similarity and the third data, and calculates the first attention data and the second attention data as attention output data based on the attention parameter, the first data and the second data.
[0197] Step 1008: The computer device inputs multiple attention output data and feature data of multiple dimensions into the initial recognition model.
[0198] The initial recognition model includes a plurality of recognition networks corresponding to different dimensions.
[0199] Optionally, for each recognition network, the computer device can input target attention output data from multiple attention output data and target feature data from multiple dimensions into the recognition network to obtain an initial recognition result output by the recognition network, wherein the dimensions of the feature data in the data group corresponding to the target attention output data are different from the dimensions corresponding to the recognition network, and the dimensions of the target feature data are the same as the dimensions of the recognition network.
[0200] Further, optionally, the computer device may process the target feature data based on the fourth weight, the fifth weight and the sixth weight, respectively, to obtain first feature data, second feature data and third feature data, and then fuse the first feature data with the first attention data in the target attention output data to obtain first fused data, fuse the second feature data with the second attention data in the target attention output data to obtain second fused data, and then input the first fused data, the second fused data and the third feature data into the recognition network.
[0201] Step 1009: The computer device multiplies the initial recognition results output by each recognition network by different weights and inputs the result into the voting neural network to obtain the recognition result of the target user output by the voting neural network corresponding to the target recognition service.
[0202] In order to make it easier for readers to understand the technical solutions provided by the embodiments of the present disclosure, please refer to Fig.11 ,like Fig.11As shown, the feature data of multiple dimensions include image feature data, speech feature data and text feature data, and the initial recognition model includes a first recognition network W1 corresponding to the image dimension, a second recognition network W2 corresponding to the speech dimension, and a third recognition network W3 corresponding to the text dimension, wherein the first recognition network W1, the second recognition network W2 and the third recognition network W3 are all transformer block networks, including a multi-head attention layer, an add&norm (residual connection and layer normalization) layer, a feed forward layer and an add&norm layer.
[0203] The speech feature data and text feature data are input into the first cross-attention module J1 for cross-attention processing, and then the attention output data and image feature data output by the first cross-attention module J1 are input into the first recognition network W1.
[0204] The image feature data and text feature data are input into the second cross-attention module J2 for cross-attention processing, and then the attention output data and speech feature data output by the second cross-attention module J2 are input into the second recognition network W2.
[0205] The image feature data and speech feature data are input into the third cross-attention module J3 for cross-attention processing, and then the attention output data and text feature data output by the third cross-attention module J3 are input into the third recognition network W3.
[0206] It should be understood that in order to simplify the diagram, Fig.11 The specific process of the cross-attention module for cross-attention processing is not provided, nor are the operations involved in inputting feature data and attention output data into the recognition network. At the same time, there is no design for the subsequent use of the initial recognition results output by the first recognition network W1, the second recognition network W2, and the third recognition network W3. These contents are explained in detail above, and readers are requested to refer to the description above.
[0207] Depend on Fig.11 It can be seen that in the embodiment of the present disclosure, the cross-attention module is placed outside the recognition network, that is, in the embodiment of the present disclosure, the cross-attention processing can be separated from the recognition network separately, so that the recognition network can be made more lightweight and the computing speed of the recognition network can be accelerated.
[0208] It should be understood that although Figure 1-10The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-10 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0209] In one embodiment, Fig.12 As shown, a recognition device 1200 is provided, comprising: a first acquisition module 1201, a second acquisition module 1202, a processing module 1203 and a recognition module 1204, wherein:
[0210] The first acquisition module 1201 is used to acquire feature data of multiple dimensions of a target user, where the feature data of multiple dimensions are related to a target identification service.
[0211] The second acquisition module 1202 is used to acquire multiple data groups according to the feature data of the multiple dimensions, wherein the feature data in different data groups are different.
[0212] The processing module 1203 is used to perform cross-attention processing on each data group to obtain multiple attention output data.
[0213] The recognition module 1204 is used to obtain a recognition result of the target user corresponding to the target recognition service based on the multiple attention output data and the feature data of the multiple dimensions.
[0214] In an optional embodiment of the present disclosure, the target recognition service is an emotion recognition service, and the feature data of multiple dimensions include at least one of image feature data, voice feature data, text feature data and physiological parameter feature data.
[0215] In an optional embodiment of the present disclosure, the first acquisition module 1201 is specifically used to: obtain the original data of multiple dimensions of the target user; perform information extraction processing on the original data of the multiple dimensions, and perform encoding processing on the original data of the multiple dimensions; and obtain the feature data of the multiple dimensions based on the results of the information extraction processing and the results of the encoding processing.
[0216] In an optional embodiment of the present disclosure, the first acquisition module 1201 is specifically used to: execute a corresponding encoding algorithm on each original data according to the dimension of each original data to perform encoding processing.
[0217] In an optional embodiment of the present disclosure, the first acquisition module 1201 is specifically used to: for the first original data of the image dimension, input the first original data into a pre-trained image feature extraction model to obtain the first encoded data output by the image feature extraction model.
[0218] In an optional embodiment of the present disclosure, the first acquisition module 1201 is specifically used to: for the second original data of the target dimension, obtain the word vector corresponding to the second original data, obtain the sentence vector corresponding to the second original data, and obtain the sound vector of the second original data, and fuse the word vector, the sentence vector and the sound vector to obtain second encoded data; wherein, the target dimension includes at least one of a text dimension, a physiological parameter dimension and a speech dimension, and the sound vector includes a sound field vector or a sound range vector.
[0219] In an optional embodiment of the present disclosure, the first acquisition module 1201 is specifically used to: for each dimension, acquire feature data of the dimension according to a result of information extraction processing corresponding to the dimension and a result of encoding processing corresponding to the dimension.
[0220] In an optional embodiment of the present disclosure, the processing module 1203 is specifically used to: for each data group, process one feature data in the data group based on the first weight and the second weight to obtain the first data and the second data, process another feature data in the data group based on the third weight to obtain the third data, and calculate the attention output data corresponding to the data group based on the first data, the second data and the third data.
[0221] In an optional embodiment of the present disclosure, the processing module 1203 is specifically used to: calculate the similarity between the first data and the second data; calculate the attention parameter based on the similarity and the third data; calculate the first attention data and the second attention data as the attention output data based on the attention parameter, the first data and the second data.
[0222] In an optional embodiment of the present disclosure, the recognition module 1204 is specifically used to: input the multiple attention output data and the feature data of the multiple dimensions into an initial recognition model; and determine the recognition result of the target user corresponding to the target recognition service based on the output of the initial recognition model.
[0223] In an optional embodiment of the present disclosure, the initial recognition model includes multiple recognition networks corresponding to different dimensions, and the recognition module 1204 is specifically used to: for each recognition network, input the target attention output data in the multiple attention output data and the target feature data in the feature data of the multiple dimensions into the recognition network to obtain an initial recognition result output by the recognition network, wherein the dimension of the feature data in the data group corresponding to the target attention output data is different from the dimension corresponding to the recognition network, and the dimension of the target feature data is the same as the dimension of the recognition network.
[0224] In an optional embodiment of the present disclosure, the recognition module 1204 is specifically used to: process the target feature data based on the fourth weight, the fifth weight and the sixth weight, respectively, to obtain first feature data, second feature data and third feature data; fuse the first feature data with the first attention data in the target attention output data to obtain first fused data, fuse the second feature data with the second attention data in the target attention output data to obtain second fused data; and input the first fused data, the second fused data and the third feature data into the recognition network.
[0225] In an optional embodiment of the present disclosure, the recognition module 1204 is specifically used to: multiply the initial recognition results output by each recognition network by different weights and input them into the voting neural network to obtain the recognition result of the target user output by the voting neural network corresponding to the target recognition service.
[0226] In an optional embodiment of the present disclosure, the original data of each dimension includes currently collected data and historically collected data.
[0227] For the specific definition of the identification device, please refer to the definition of the identification method above, which will not be repeated here. Each module in the above identification device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0228] Fig.13 1 is a block diagram of an electronic device 1300 according to an exemplary embodiment. For example, the electronic device 1300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0229] Reference Fig.13, the electronic device 1300 may include one or more of the following components: a processing component 1302, a memory 1304, a power component 1306, a multimedia component 1308, an audio component 1310, an input / output (I / O) interface 1312, a sensor component 1314, and a communication component 1316. The memory stores computer programs or instructions running on the processor.
[0230] The processing component 1302 generally controls the overall operation of the electronic device 1300, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1302 may include one or more processors 1320 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 1302 may include one or more modules to facilitate the interaction between the processing component 1302 and other components. For example, the processing component 1302 may include a multimedia module to facilitate the interaction between the multimedia component 1308 and the processing component 1302.
[0231] The memory 1304 is configured to store various types of data to support operations on the electronic device 1300. Examples of such data include instructions for any application or method operating on the electronic device 1300, contact data, phone book data, messages, pictures, videos, etc. The memory 1304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0232] The power supply component 1306 provides power to the various components of the electronic device 1300. The power supply component 1306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1300.
[0233] The multimedia component 1308 includes a touch display screen that provides an output interface between the electronic device 1300 and the user. In some embodiments, the touch display screen may include a liquid crystal display (LCD) and a touch panel (TP). The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1308 includes a front camera and / or a rear camera. When the electronic device 1300 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0234] The audio component 1310 is configured to output and / or input audio signals. For example, the audio component 1310 includes a microphone (MIC), and when the electronic device 1300 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1304 or sent via the communication component 1316. In some embodiments, the audio component 1310 also includes a speaker for outputting audio signals.
[0235] I / O interface 1312 provides an interface between processing component 1302 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0236] The sensor assembly 1314 includes one or more sensors for providing various aspects of status assessment for the electronic device 1300. For example, the sensor assembly 1314 can detect the open / closed state of the electronic device 1300, the relative positioning of components, such as the display and keypad of the electronic device 1300, and the sensor assembly 1314 can also detect the position change of the electronic device 1300 or a component of the electronic device 1300, the presence or absence of user contact with the electronic device 1300, the orientation or acceleration / deceleration of the electronic device 1300, and the temperature change of the electronic device 1300. The sensor assembly 1314 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1314 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1314 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0237] The communication component 1316 is configured to facilitate wired or wireless communication between the electronic device 1300 and other devices. The electronic device 1300 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1316 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0238] In an exemplary embodiment, the electronic device 1300 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.
[0239] Fig.14 FIG. 1 is a block diagram of a server 1400 according to an exemplary embodiment. Fig.14 , the server 1400 includes a processing component 1420, which further includes one or more processors, and a memory resource represented by a memory 1422 for storing instructions or computer programs, such as applications, that can be executed by the processing component 1420. The application stored in the memory 1422 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1420 is configured to execute the instructions to perform the above method.
[0240] The server 1400 may also include a power supply component 1424 configured to perform power management of the device 1400, a wired or wireless network interface 1426 configured to connect the device 1400 to a network, and an input / output (I / O) interface 1428. The server 1400 may operate based on an operating system stored in the memory 1422, such as Windows 14 14erverTM, Mac O14 XTM, UnixTM, LinuxTM, FreeB14DTM or the like.
[0241] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1304 including instructions, and the instructions can be executed by a processor 1320 of the electronic device 1300 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0242] In an exemplary embodiment, a storage medium including instructions is also provided, such as a memory 1422 including instructions, which can be executed by a processor of the server 1400 to perform the above method. The storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0243] In an exemplary embodiment, a computer program product is also provided, and when the computer program is executed by a processor, the above method can be implemented. The computer program product includes one or more computer instructions. When these computer instructions are loaded and executed on a computer, part or all of the above method can be implemented in whole or in part according to the process or function described in the embodiment of the present disclosure.
[0244] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the embodiments of the present disclosure can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0245] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0246] The above-described embodiments only express several implementation methods of the embodiments of the present disclosure, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the embodiments of the present disclosure, and these all belong to the protection scope of the embodiments of the present disclosure. Therefore, the protection scope of the patent of the embodiments of the present disclosure shall be subject to the attached claims.
Claims
1. A recognition method, It is characterized in that The method comprises: Acquire feature data of multiple dimensions of a target user, wherein the feature data of multiple dimensions are related to a target identification service; Acquire multiple data groups according to the feature data of the multiple dimensions, wherein the feature data in different data groups are different; Performing cross-attention processing on each of the data groups to obtain a plurality of attention output data; A recognition result of the target user corresponding to the target recognition service is obtained based on the multiple attention output data and the feature data of the multiple dimensions.
2. The method according to claim 1, It is characterized in that The target recognition service is an emotion recognition service, and the feature data of the multiple dimensions include at least one of image feature data, voice feature data, text feature data and physiological parameter feature data.
3. The method according to claim 1 or 2, It is characterized in that The step of obtaining characteristic data of multiple dimensions of the target user includes: Acquire raw data of multiple dimensions of the target user; Performing information extraction processing on the original data of the multiple dimensions respectively, and performing encoding processing on the original data of the multiple dimensions respectively; The feature data of the multiple dimensions are obtained according to the result of the information extraction process and the result of the encoding process.
4. The method according to claim 3, It is characterized in that The encoding processing of the original data of the multiple dimensions respectively includes: According to the dimension of each of the original data, a corresponding encoding algorithm is executed on each of the original data to perform encoding processing.
5. The method according to claim 4, It is characterized in that The performing a corresponding encoding algorithm on each of the original data according to the dimension of each of the original data comprises: For the first original data of the image dimension, the first original data is input into a pre-trained image feature extraction model to obtain the first encoded data output by the image feature extraction model.
6. The method according to claim 4, It is characterized in that The performing a corresponding encoding algorithm on each of the original data according to the dimension of each of the original data comprises: For the second original data of the target dimension, obtain a word vector corresponding to the second original data, obtain a sentence vector corresponding to the second original data, and obtain a sound vector of the second original data, and perform fusion processing on the word vector, the sentence vector, and the sound vector to obtain second encoded data; The target dimension includes at least one of a text dimension, a physiological parameter dimension and a voice dimension, and the sound vector includes a sound field vector or a sound range vector.
7. The method according to claim 3, It is characterized in that The obtaining of the feature data of the multiple dimensions according to the result of the information extraction process and the result of the encoding process includes: For each dimension, feature data of the dimension is acquired according to a result of information extraction processing corresponding to the dimension and a result of encoding processing corresponding to the dimension.
8. The method according to claim 1 or 2, It is characterized in that Each of the data groups includes two feature data of different dimensions, and the cross-attention processing is performed on each of the data groups to obtain multiple attention output data, including: For each of the data groups, one feature data in the data group is processed based on the first weight and the second weight to obtain the first data and the second data, another feature data in the data group is processed based on the third weight to obtain the third data, and the attention output data corresponding to the data group is calculated based on the first data, the second data and the third data.
9. The method according to claim 8, It is characterized in that The calculating the attention output data corresponding to the data group based on the first data, the second data and the third data comprises: calculating the similarity between the first data and the second data; Calculating an attention parameter according to the similarity and the third data; First attention data and second attention data are calculated as the attention output data according to the attention parameter, the first data and the second data.
10. The method according to claim 9, It is characterized in that The obtaining, based on the plurality of attention output data and the feature data of the plurality of dimensions, a recognition result of the target user corresponding to the target recognition service comprises: Inputting the plurality of attention output data and the feature data of the plurality of dimensions into an initial recognition model; The recognition result of the target user corresponding to the target recognition service is determined according to the output of the initial recognition model.
11. The method according to claim 10, It is characterized in that The initial recognition model includes a plurality of recognition networks corresponding to different dimensions respectively, and the inputting the plurality of attention output data and the feature data of the plurality of dimensions into the initial recognition model includes: For each of the recognition networks, the target attention output data among the multiple attention output data and the target feature data among the feature data of the multiple dimensions are input into the recognition network to obtain an initial recognition result output by the recognition network, wherein the dimensions of the feature data in the data group corresponding to the target attention output data are different from the dimensions corresponding to the recognition network, and the dimensions of the target feature data are the same as the dimensions of the recognition network.
12. The method according to claim 11, It is characterized in that The step of inputting target attention output data from the plurality of attention output data and target feature data from the feature data of the plurality of dimensions into the recognition network comprises: Processing the target feature data based on the fourth weight, the fifth weight, and the sixth weight respectively to obtain first feature data, second feature data, and third feature data; Fusing the first feature data with the first attention data in the target attention output data to obtain first fused data, and fusing the second feature data with the second attention data in the target attention output data to obtain second fused data; The first fused data, the second fused data and the third feature data are input into the recognition network.
13. The method according to claim 11, It is characterized in that The determining, according to the output of the initial recognition model, the recognition result of the target user corresponding to the target recognition service comprises: The initial recognition results output by each recognition network are multiplied by different weights and then input into the voting neural network to obtain the recognition result of the target user output by the voting neural network corresponding to the target recognition service.
14. The method according to claim 3, It is characterized in that The original data of each dimension includes currently collected data and historically collected data.
15. An identification device, It is characterized in that The device comprises: A first acquisition module is used to acquire feature data of multiple dimensions of a target user, wherein the feature data of multiple dimensions are related to a target identification service; A second acquisition module is used to acquire multiple data groups according to the feature data of the multiple dimensions, wherein the feature data in different data groups are different; A processing module, used for performing cross-attention processing on each of the data groups to obtain a plurality of attention output data; An identification module is used to obtain an identification result of the target user corresponding to the target identification service based on the multiple attention output data and the feature data of the multiple dimensions.
16. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 14 are implemented.
17. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 14 are implemented.
18. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 14 are implemented.
