Data processing method and device, electronic equipment and storage medium

By acquiring and merging the emotional expression data of the user input data, and combining the large language model and the data feature extraction unit, the target response data is generated, which solves the problem of failing to capture the user's emotional characteristics in the existing technology and achieves context-aware speech output. Improved human-computer interaction experience.

CN118711567APending Publication Date: 2024-09-27SHANG HAI JIE YUE XING CHEN ZHI NENG KE JI YOU XIAN GONG SI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410830742.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-12-29
Filing Date
2024-06-25
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

Existing large language models fail to effectively capture the user's emotional characteristics in speech synthesis, resulting in the inability to adjust intonation, speech speed, and emotional characteristics based on the conversation content, making it impossible to empathize with the user.

Method used

By obtaining the emotional expression data of the input data, combined with the large language model and data feature extraction unit, the target response data is generated to achieve context-aware speech output.

Benefits of technology

It improves the smoothness and user experience of human-computer interaction, allowing the machine to provide empathetic responses based on the current conversation situation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118711567A
    Figure CN118711567A
Patent Text Reader

Abstract

The invention discloses a data processing method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring input data; obtaining first form response data corresponding to the input data and corresponding emotion expression data according to the input data; and generating target response data corresponding to the input data according to the first form response data and the emotion expression data. Through application of the scheme, the emotion expression data of the input data of the user is acquired, and the acquired emotion expression data and the response data corresponding to the input data are fused to acquire the target response data, so that the target response data carries the emotion expression data of the current interaction situation, and the user is enabled to have the emotion expression data of the current interaction situation in the interaction process. According to the invention, the response data with common information and conforming to the current dialogue situation can be received, so that the man-machine interaction is smoother, and the user interaction experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a data processing method, device, electronic device and storage medium. Background Art

[0002] In recent years, a large number of studies have been exploring the use of various methods for speech synthesis to achieve human-computer speech interaction. Existing research on the combination of large language models and speech only adds a speech feature extraction module and a speech generation module before and after the large language model, but does not take into account the emotional characteristics of speech. It is impossible to obtain the emotions of the dialogue user based on the current conversation content, and it is impossible to adjust the tone, speed and emotional characteristics of the output speech according to the situation, and it is impossible to empathize with the person chatting. Summary of the invention

[0003] To this end, the present invention provides a data processing method, device, electronic device and storage medium, in an effort to solve or at least alleviate at least one of the above problems.

[0004] According to one aspect of the present invention, there is provided a data processing method suitable for execution in a computing device, comprising:

[0005] Get input data;

[0006] Acquire first form response data corresponding to the input data and corresponding emotion expression data according to the input data;

[0007] Generate target response data corresponding to the input data according to the first form response data and the emotion expression data.

[0008] Optionally, in the data processing method according to the present invention, generating target response data corresponding to the input data according to the first form response data and the emotion expression data includes:

[0009] converting the first form response data into a second form response data;

[0010] Obtaining a feature representation of emotion data corresponding to the emotion expression data;

[0011] The target response data is generated according to the emotion data feature representation and the second form response data.

[0012] Optionally, generating the target response data according to the emotion data feature representation and the second form response data comprises:

[0013] Encoding the second-form response data to obtain a response data feature representation corresponding to the second-form response data;

[0014] The target response data is generated according to the emotion data feature representation and the response data feature representation.

[0015] Optionally, the emotional expression data includes at least one of a first feature, a second feature and a third feature, wherein the first feature includes at least one of nasal voice, smoky voice, sharp, hoarse, and normal; the second feature includes at least one of fast speaking speed, slow speaking speed, high frequency sound, low frequency sound, loud sound, and soft sound; the third feature includes at least one of happy, calm, sad, and surprised.

[0016] Optionally, the first form of response data is text data, and the second form of response data is voice data.

[0017] Optionally, the obtaining, according to the input data, the first form response data corresponding to the input data and the corresponding emotion expression data is implemented by a large language model, and the large language model is obtained by the following steps:

[0018] Get a pre-trained large language model;

[0019] Acquire a first training data set, the first training data set comprising a text data sample and corresponding first label data, the first label data comprising answer data and emotion data corresponding to the text data sample;

[0020] The pre-trained large language model is fine-tuned using the first training data set until the pre-trained large language model converges to obtain a trained large language model.

[0021] Optionally, fine-tuning the pre-trained large language model using the first training data set until the pre-trained large language model converges to obtain a trained large language model includes:

[0022] Constructing a fine-tuned large model based on the pre-trained large language model;

[0023] The fine-tuned large model is trained using the first training data set, and the newly added parameters of the fine-tuned large model relative to the pre-trained large language model are adjusted according to the loss between the predicted emotional features and the predicted response text output by the fine-tuned large model and the first label data, until the fine-tuned large model converges to obtain a trained large language model.

[0024] Optionally, the acquiring of the emotion data feature representation corresponding to the emotion expression data is implemented by a data feature extraction unit, the generating of the target response data by the target data generation unit according to the emotion data feature representation and the second form response data is implemented by a target data generation unit, the data feature extraction unit and the target data generation unit are jointly trained, the target data generation unit includes an encoding unit and a decoding unit, and the training process of the data feature extraction unit and the target data generation unit includes:

[0025] Constructing a joint training model according to the data feature extraction unit and the target data generation unit;

[0026] Acquire a second training data set, the second training data set including emotion sample data and speech sample data, and second label data corresponding to the emotion sample data and the speech sample data, the second label data being speech data including the emotion described by the emotion sample data and the content of the speech sample data;

[0027] The emotion sample data in the second training data set is input into the data feature extraction unit to obtain the corresponding emotion feature representation, the speech sample data is input into the encoding unit of the target data generation unit to obtain the speech data feature representation, the predicted speech data is obtained according to the emotion feature representation and the speech data feature representation through the decoding unit, and the data feature extraction unit and the target data generation unit are adjusted according to the loss between the predicted speech data and the second label speech data until the data feature extraction unit and the target data generation unit are adjusted and converged.

[0028] According to yet another aspect of the present invention, there is provided a data processing device, the device comprising:

[0029] A data acquisition unit, used for the acquisition unit to acquire input data;

[0030] A first data processing unit, configured to obtain first-form response data corresponding to the input data and emotion expression data according to the input data;

[0031] The second data processing unit is used to generate target response data corresponding to the input data according to the first form response data and the emotion expression data.

[0032] According to another aspect of the present invention, there is provided an electronic device, comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be suitable for execution by the at least one processor, and the program instructions include instructions for executing any one of the data processing methods described above.

[0033] According to another aspect of the present invention, a readable storage medium storing program instructions is provided. When the program instructions are read and executed by a computing device, the computing device executes any one of the methods described above.

[0034] According to the data processing method of the present invention, emotional expression data of user input data is obtained, and the obtained emotional expression data is merged with the response data corresponding to the input data to obtain target response data, so that the target response data contains emotional expression data of the current interaction context, so that the user can receive empathetic response data that conforms to the current dialogue context during the interaction process, making human-computer interaction smoother and improving the user interaction experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments recorded in the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings. The drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the drawings, the same reference numerals generally represent the same components or steps.

[0036] Figure 1 is a schematic block diagram of an electronic device according to an embodiment of the present invention;

[0037] Figure 2 is a schematic block diagram of a data processing device 200 according to an embodiment of the present invention;

[0038] Figure 3 is a schematic flow chart of a data processing method 300 according to an embodiment of the present invention;

[0039] Figure 4 is a schematic flow chart of a large language model generation method 400 according to an embodiment of the present invention;

[0040] Figure 5 is a schematic diagram of a fine-tuning macro model 500 according to an embodiment of the present invention;

[0041] Figure 6 is a schematic flow chart of a joint training method 600 according to an embodiment of the present invention;

[0042] Figure 7 is a schematic diagram of a joint training model 700 according to an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0044] The embodiments of the present application provide a data processing method, device, electronic device and storage medium, which can be applied to the fields of voice interaction. Among them, according to the data processing method of the present invention, the emotional expression data of the user input data is obtained, and the obtained emotional expression data is merged with the response data corresponding to the input data to obtain the target response data, so that the target response data contains the emotional expression data of the current interaction situation, so that the user can receive empathetic response data that conforms to the current dialogue situation during the interaction process, making the human-computer interaction smoother and improving the user interaction experience. This solves the problem that the existing large language model in the prior art cannot obtain the emotions of the dialogue user according to the current dialogue content, cannot adjust the tone, speech speed and emotional characteristics of the output voice according to the situation, and cannot empathize with the person chatting.

[0045] The data processing method provided in the embodiments of the present application can be applied to electronic devices with computing and processing capabilities, and the electronic devices can be mobile phones, tablet computers, desktop computers, laptop computers, servers, vehicle-mounted devices, netbooks, and augmented reality (AR) devices, virtual reality (VR) devices, smart speakers, artificial intelligence robots, etc. The embodiments of the present application do not impose any special restrictions on the specific form of the electronic devices.

[0046] Figure 1 FIG. 1 is a schematic diagram showing the structure of an electronic device 100 according to an embodiment of the present invention. The electronic device can be used to implement the methods of various embodiments of the present invention. Figure 1 As shown, in a basic configuration 102, the electronic device 100 typically includes a memory 106 and one or more processors 104. A memory bus 108 may be used for communication between the processor 104 and the memory 106.

[0047] Depending on the desired configuration, the processor 104 may be any type of processor, including but not limited to: a microprocessor, a microcontroller, a digital signal processor (DSP), or any combination thereof. The processor 104 may include one or more levels of cache, such as a primary cache 110 and a secondary cache 112, a processor core 114, and registers 116. An example processor core 114 may include an arithmetic logic unit (ALU), a floating point unit (FPU), a digital signal processing core, or any combination thereof. In some implementations, the memory controller 118 may be a separate component used with the processor 104; in some other implementations, the memory controller 118 may be an internal component of the processor 104.

[0048] Depending on the desired configuration, the memory 106 can be any type of memory, including but not limited to: volatile memory (such as RAM, etc.), non-volatile memory (such as ROM, flash memory, etc.) or any combination thereof. The physical memory in the electronic device generally refers to the volatile memory RAM, and the data in the disk needs to be loaded into the physical memory before it can be read by the processor 104. The memory 106 can store an operating system 120 and one or more applications 122. In some embodiments, the application 122 can be arranged to execute instructions on the operating system by one or more processors 104. The operating system 120 can be, for example, Linux, Windows, Android, Hongmeng, Apple iOS, etc., which includes program instructions for processing basic system services and performing hardware-dependent tasks. The application 122 includes program instructions for implementing various user-desired functions. The application 122 can be, for example, a browser, game software, business software, office software, instant messaging software, software development tools (such as integrated development environment IDE, compiler, etc.), etc., but is not limited thereto. When the application 122 is installed in the electronic device 100, a driver module can be added to the operating system 120 if necessary.

[0049] When the electronic device 100 starts running, the processor 104 reads and executes the program instructions of the operating system 120 from the memory 106. The application 122 runs on the operating system 120 and uses the interface provided by the operating system 120 and the underlying hardware to implement various functions desired by the user. When the user starts the application 122, the processor 104 reads and executes the program instructions of the application 122 from the memory 106.

[0050] The electronic device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus / interface controller 130. Example output devices 142 include a graphics processing unit 148 and an audio processing unit 150. They can be configured to facilitate communication with various external devices such as a display or speakers via one or more A / V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboards, mice, voice input devices, touch input devices, handwriting input devices, etc.) or other peripherals (e.g., printers, scanners, etc.) via one or more I / O ports 158. Example communication devices 146 may include a network controller 160, which may be configured to facilitate communication with one or more other electronic devices via a network communication link via one or more communication ports 164.

[0051] A network communication link can be an example of a communication medium. Communication media can generally be embodied as computer-readable instructions, data structures, program modules in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium. As a non-limiting example, communication media can include wired media such as a wired network or a dedicated line network, and various wireless media such as sound, radio frequency (RF), microwave, infrared (IR) or other wireless media. The term computer-readable medium used herein can include both storage media and communication media.

[0052] In the electronic device 100 according to the present invention, the application 122 includes instructions for executing the data processing method of the present invention, and the instructions can instruct the processor 104 to execute the data processing method of the present invention.

[0053] It is to be understood that the structure shown in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include: Figure 1 More or fewer components are shown, or some components are combined, or some components are separated, or there are different component arrangements. The components shown can be implemented in hardware, software, firmware, or any combination of the three.

[0054] Below, based on the above-mentioned hardware involved in the embodiments of the present application, other embodiments of the present application will be described in detail in conjunction with the accompanying drawings.

[0055] Figure 2A schematic block diagram of a data processing device 200 according to an embodiment of the present invention is shown. As shown in the figure, the data processing device 200 includes a data acquisition unit 210, a first data processing unit 220 and a second data processing unit 230, wherein the second data processing unit 230 includes a data feature extraction unit 231, a data form conversion unit 232, and a target data generation unit 233.

[0056] The data acquisition unit 210 is used to acquire input data.

[0057] The first data processing unit 220 is used to obtain corresponding first form response data and emotion expression data according to the input data, wherein the emotion expression data is the current emotion data of the corresponding user obtained according to the input data.

[0058] In a specific example, the emotion expression data includes at least one of a first feature, a second feature and a third feature, wherein the first feature is the timbre of the voice, which may be at least one of nasal, smoky, sharp, hoarse, normal, etc.; the second feature is the speaking speed and audio of the voice, which may be at least one of fast, slow, high frequency, low frequency, loud, soft, etc.; the third feature is the tone of the voice, which may be at least one of happy, calm, sad, surprised, etc.

[0059] According to one embodiment of the present application, the first data processing unit is implemented based on a trained large language model. The large language model is obtained by training a large-scale text data set. The large language model is a deep learning model that is trained with a large amount of text data and has a large number of parameters (for example, hundreds of millions of scale) and a deep neural network model that can process natural language (for example: generate natural language text or understand the meaning of language text, etc.). The large language model can process data such as text, images, and sounds. The training text data used in the training of the large language model usually corresponds to at least one natural language task. Therefore, the trained large language model has good natural language processing capabilities and can realize functions such as generating natural language text or understanding language text. The large language model has a wide range of application scenarios, including but not limited to chatbots, language translation, content creation, etc.

[0060] The second data processing unit 220 is used to generate target response data corresponding to the input data according to the first form response data and the emotion expression data.

[0061] According to one embodiment of the present invention, the second data processing unit 220 includes a data feature extraction unit 231, a data form conversion unit 232 and a target data generation unit 233. The data feature extraction unit 231 is used to obtain the emotion data feature representation corresponding to the emotion expression data. In a specific example, the data feature extraction unit can be implemented based on the Bert model.

[0062] According to another embodiment of the present invention, the data form conversion unit 232 is used to convert the first form response data into the second form response data. In a specific example, the first form response data is text data, and the second form response data is voice data.

[0063] Further, the target data generating unit 233 is used to generate the target response data according to the emotion data feature representation and the second form response data. In a specific example, the target data generating unit includes an encoding unit and a decoding unit, the encoding unit is used to encode the second form response data to obtain the response data feature representation corresponding to the second form response data, and the decoding unit is used to generate the target response data according to the emotion data feature representation and the response data feature representation.

[0064] Figure 3 A schematic flow chart of a data processing method 300 according to an embodiment of the present invention is shown.

[0065] As shown in the figure, the data processing method may include:

[0066] Step S310: Obtain input data.

[0067] Step S320: Obtain corresponding first-form response data and corresponding emotion expression data according to the input data.

[0068] According to one embodiment of the present invention, this step can be implemented by a trained large language model, which processes the user's input data and outputs response data corresponding to the input data, as well as emotion data (i.e., emotion expression data) expressed by the input data obtained based on the input data.

[0069] In a specific example, the user's input data is "Hello, I am very happy today". The large language model obtains the user's input data and generates the first form of response data "Yes, today is a really good day. Is there anything happy you want to talk about?" The first form of response data here is in text form. Furthermore, the large language model will also extract the user's emotional expression data from the user's input data, including the timbre, audio, speaking speed and intonation expressed in the voice. In this example, the extracted user emotional expression data is "happy".

[0070] By extracting the user's emotions here, the data processing method of the present invention can be applied in human-computer dialogue to enable the machine to better understand the user's emotions and empathize with the user, thereby responding with response data of the corresponding emotions, allowing the user to have a better experience.

[0071] According to an embodiment of the present invention, after obtaining the first form response data and the emotion expression data, generating the target response data corresponding to the input data according to the first form response data and the emotion expression data can be achieved by the following steps:

[0072] Step S330: Convert the first-format response data into the second-format response data.

[0073] According to one embodiment of the present invention, the first form of response data is text data, and the second form of response data is voice data. For example, in the above example, the text response data "Yes, today is a really good day, is there anything happy you want to talk about?" generated by the large language model is converted into voice data. In a specific example, this can be achieved through text to speech (TTS) technology.

[0074] Step 340, obtaining the feature representation of the emotion data corresponding to the emotion expression data. As in the above example, the emotion of the current user obtained by the large language model is "happy", and this step will extract the feature representation of the emotion data corresponding to the emotion expression data of "happy". In a specific example, the extraction of the feature representation of the emotion data is implemented based on the Bert model.

[0075] Further, the target response data is generated according to the emotional data feature representation and the second form response data by using the real-time voice cloning (RVC) technology. In a specific example, the following steps may be included:

[0076] Step 350: Encode the second form response data to obtain a response data feature representation corresponding to the second form response data.

[0077] In a specific example, the second form of response data is audio data, and feature extraction is performed on the second form of response data based on the Mel spectrum. As in the above example, feature extraction is performed on the second form of response data "Yes, today is a really beautiful day, is there anything happy you want to talk about?"

[0078] Step S360, generating target response data according to the emotion data feature representation and the response data feature representation.

[0079] According to some embodiments of the present invention, this step is implemented through a WaveGlow or WaveRNN model, and the target response data is converted into speech form according to the feature representation of the emotion data and the feature representation of the response data. Because the feature representation of the emotion data is added, the output target response data has the emotion expressed by the emotion data, thereby generating empathy with the corresponding user and improving the user experience.

[0080] Figure 4 The schematic flow chart of a method 400 for generating a large language model according to an embodiment of the present invention is shown, and includes the following steps:

[0081] Step S410, obtaining a pre-trained large language model. The pre-trained large language model is a large language model trained by a large-scale corpus, which has language understanding and generation skills. In this embodiment, the pre-trained large language model is directly used, and subsequent fine-tuning steps are performed on this basis to train the model to adapt to specific tasks with less time and less data.

[0082] According to another embodiment of the present invention, a pre-trained large language model can also be obtained through training. First, an initial large language model is created, and a large-scale corpus is obtained. The initial large language model is then trained with the large-scale corpus until the large language model converges, thereby obtaining a pre-trained large language model, and then the fine-tuning process of subsequent steps is performed on this basis.

[0083] Step S420, obtaining a first training data set, the first training data set includes text data samples and corresponding first label data, the first label data includes response data and emotion expression data corresponding to the text data samples.

[0084] The pre-trained large language model is fine-tuned using the first training data set until the pre-trained large language model converges to obtain a trained large language model.

[0085] According to one embodiment of the present invention, the fine-tuning process of the pre-trained large language model is implemented by a low-rank adaptation method (Low-Rank Adaptation, LoRA), which may include the following steps:

[0086] Step S430, constructing a fine-tuned large model based on the pre-trained large language model.

[0087] Figure 5A schematic diagram of a fine-tuning large model 500 according to an embodiment of the present invention is shown. W on the left side of the figure is the pre-trained large language model parameter matrix, and A and B on the right side are parameter matrices of the newly added structure when constructing the fine-tuning large model, where the input dimension of A and the output dimension of B are respectively the same as the input and output dimensions of the pre-trained large language model, while the output dimension of A and the input dimension of B are a value much smaller than the input and output dimensions of the pre-trained large language model, which is a manifestation of low rank.

[0088] Step S440, training the fine-tuned large model using the first training data set, adjusting the newly added parameters of the fine-tuned large model relative to the pre-trained large language model according to the predicted emotional features output by the fine-tuned large model and the loss between the predicted response text and the first label data, until the fine-tuned large model converges to obtain a trained large language model.

[0089] As in the above embodiment, during the fine-tuning process, only the newly added parameters A and B need to be retrained based on the pre-trained model, which greatly reduces the parameters to be trained in the fine-tuning process and speeds up the training process of the large language model.

[0090] Figure 6 A schematic flow chart of a joint training method 600 according to an embodiment of the present invention is shown, namely, joint training of a data feature extraction unit and a target data generation unit. Figure 7 A schematic diagram of a joint training model 700 according to an embodiment of the present invention is shown. Figure 6 and Figure 7 The method 600 is described, and the method 600 includes the following steps:

[0091] Step S610, constructing a joint training model based on the data feature extraction unit and the target data generation unit.

[0092] According to one embodiment of the present invention (such as Figure 7 ), the target data generating unit 233 includes an encoding unit 233-1 and a decoding unit 233-2, and the output end 231 of the data feature extraction unit and the output end of the encoding unit 233-1 of the target data generating unit 233 are connected to the input end of the decoding unit 233-2 of the target data generating unit 233.

[0093] Step S620, obtaining a second training data set, wherein the second training data set includes emotion sample data and speech sample data, and second label data corresponding to the emotion sample data and the speech sample data, wherein the second label data is speech data containing the emotion described by the emotion sample data and the content of the speech sample data.

[0094] Step S630: training the joint training model using the second training data set.

[0095] According to one embodiment of the present invention, the training process of the joint training model is as follows: the emotion sample data in the second training data set is input into the data feature extraction unit 231 to obtain the corresponding emotion feature representation, the speech sample data is input into the encoding unit 233-1 of the target data generation unit 233 to obtain the speech data feature representation, the predicted speech data is obtained according to the emotion feature representation and the speech data feature representation through the decoding unit 233-2, and the data feature extraction unit and the target data generation unit are adjusted according to the loss between the predicted speech data and the second label speech data until the joint training model (i.e., the feature extraction unit and the target data generation unit) converges to obtain the trained data feature extraction unit and the target data generation unit.

[0096] The data processing device 200 of the embodiment of the present invention can be composed of Figure 1 The electronic device 100 shown runs program instructions to implement and execute various steps in the data processing method according to the embodiment of the present invention.

[0097] According to an exemplary embodiment of the present invention, an electronic device is provided. The electronic device may include at least one processor and at least one memory. The memory stores program codes for implementing the corresponding steps in the data processing method according to the embodiment of the present invention. The processor is used to run the program codes stored in the memory to execute the corresponding steps of the data processing method according to the embodiment of the present invention, and to implement the various modules in the data processing device according to the embodiment of the present invention. The electronic device may adopt the aforementioned Figure 1 The electronic devices in the illustrated embodiments and any other suitable electronic devices.

[0098] In one embodiment, when the program code is executed by a processor, the following steps are performed:

[0099] Get input data;

[0100] Acquire first form response data corresponding to the input data and corresponding emotion expression data according to the input data;

[0101] Generate target response data corresponding to the input data according to the first form response data and the emotion expression data.

[0102] In addition, when the program code is executed by the processor, other steps of the above-mentioned data processing method are also executed, which will not be repeated here.

[0103] In addition, according to another embodiment of the present invention, a computer-readable storage medium is also provided, on which program instructions are stored, and when the program instructions are run by a computer or a processor, they are used to perform the corresponding steps of the data processing method of the embodiment of the present invention, and are used to implement the corresponding modules in the data processing device according to the embodiment of the present invention. The storage medium may include, for example, a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, or any combination of the above storage media. The computer-readable storage medium may be any combination of one or more computer-readable storage media.

[0104] In one embodiment, the computer program instructions can implement various functional modules of the data processing device according to the embodiment of the present invention when executed by a computer, and / or can execute the data processing method according to the embodiment of the present invention.

[0105] In one embodiment, the computer program instructions, when executed by a computer, perform the following steps:

[0106] Get input data;

[0107] Acquire first form response data corresponding to the input data and corresponding emotion expression data according to the input data;

[0108] Generate target response data corresponding to the input data according to the first form response data and the emotion expression data.

[0109] In addition, when the computer program instructions are executed by the computer, other steps of the above-mentioned data processing method are also executed, which will not be repeated here.

[0110] Each module of the data processing device according to an embodiment of the present invention can be implemented by a processor of an electronic device according to an embodiment of the present invention running computer program instructions stored in a memory, or can be implemented when computer instructions stored in a computer-readable storage medium according to an embodiment of the present invention are executed by a computer.

[0111] According to the data processing method and device, electronic device and storage medium of the embodiments of the present invention, the emotional expression data of the user input data is obtained, and the obtained emotional expression data is merged with the response data corresponding to the input data to obtain the target response data, so that the target response data contains the emotional expression data of the current interaction situation, so that the user can receive empathetic response data that conforms to the current dialogue situation during the interaction process, making the human-computer interaction smoother and improving the user interaction experience.

[0112] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely exemplary and are not intended to limit the scope of the present invention thereto. Various changes and modifications may be made therein by one of ordinary skill in the art without departing from the scope and spirit of the present invention. All such changes and modifications are intended to be included within the scope of the present invention as required by the appended claims.

[0113] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0114] The various techniques described herein may be implemented in combination with hardware or software, or a combination thereof. Thus, the method, apparatus, and device of the present invention, or some aspects or portions of the method, apparatus, and device of the present invention may be in the form of program codes (i.e., instructions) embedded in a tangible medium, such as a removable hard disk, a USB flash drive, a floppy disk, a CD-ROM, or any other machine-readable storage medium, wherein when the program is loaded into a machine such as a computer and executed by the machine, the machine becomes a device for practicing the present invention.

[0115] In the case where the program code is executed on a programmable computer, the electronic device generally includes a processor, a storage medium readable by the processor (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device. The memory is configured to store the program code; the processor is configured to execute the remote assistance method of the present invention according to the instructions in the program code stored in the memory.

[0116] By way of example and not limitation, readable media include readable storage media and communication media. Readable storage media stores information such as computer-readable instructions, data structures, program modules or other data. Communication media generally embody computer-readable instructions, data structures, program modules or other data in modulated data signals such as carrier waves or other transmission mechanisms, and include any information transmission medium. Any combination of the above is also included in the scope of readable media. In the specification of the present application, algorithms and displays are not inherently related to any specific computer, virtual system or other device. Various general systems can also be used with the examples of the present invention. According to the above description, it is obvious to construct the structure required for such systems. In addition, the present invention is not directed to any specific programming language. It should be understood that various programming languages ​​can be used to implement the software and algorithm-related content of the present invention described herein, and the description of the specific language above is only to disclose some specific embodiments of the present invention, but not to limit the use of the specific language.

[0117] In the specification of the application, a lot of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this specification.

[0118] In the several embodiments provided in this application, it should be understood that the disclosed devices, equipment and methods can be implemented in other ways. For example, the above-described device and equipment embodiments are only illustrative, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.

[0119] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0120] Similarly, it should be understood that in order to streamline the present invention and help understand one or more of the various inventive aspects, in the description of the exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, the method of the present invention should not be interpreted as reflecting the following intention: the claimed invention requires more features than the features explicitly stated in each claim. More specifically, as reflected in the corresponding claims, the inventive point is that the corresponding technical problem can be solved with less than all the features of a single disclosed embodiment. Therefore, the claims following the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present invention.

[0121] It will be understood by those skilled in the art that, except for mutually exclusive features, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this specification may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature that provides the same, equivalent or similar purpose.

[0122] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims, any one of the claimed embodiments may be used in any combination.

[0123] The components in the various embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that computers, servers, microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some modules in the equipment and devices according to embodiments of the present invention. The present invention can also be implemented as a device program (e.g., computer program and computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0124] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets should not be constructed as a limitation to the claims. Nouns such as "comprise", "include", "have" do not exclude the presence of elements or steps not listed in the claims. The quantifier "one" or "a" preceding an element does not exclude the presence of multiple such elements. The present invention can be implemented by means of hardware including several different elements and by means of appropriately programmed computers. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order, and these words may be interpreted as names.

[0125] In addition, in the embodiments of the present application, the expression "and / or" includes any and all combinations of the associated listed words. For example, the expression "A and / or B" may include A, may include B, or may include both A and B. Words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more.

[0126] In the description of the embodiments of the present application, when a component is referred to as being "connected" or "accessed" to other components, it should be understood that: the component is not only directly connected to or accessed to other components, but also another component may exist between the component and the other components. On the other hand, when a component is referred to as being "directly connected" or "directly accessed" to other components, it should be understood that there is no component between them. When a component is referred to as being "movably connected" to other components, it means that the positional relationship between the component and the other components is changeable, such as the relationship between a slide rail and a slider, the slider can slide on the slide rail, and the slide rail and the track are movably connected. When a component is referred to as being "fixedly connected" to other components, it means that the positional relationship between the component and the other components after being assembled together is relatively fixed.

[0127] The above is only a specific embodiment of the present invention or an explanation of a specific embodiment. The protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Although the present application is described according to a limited number of embodiments, it is understood by the technicians in the technical field that other embodiments can be envisioned within the scope of the present application described thereby, thanks to the above description. In addition, it should be noted that the language used in this specification is mainly selected for the purpose of readability and teaching, rather than for explaining or limiting the subject matter of the present application. Therefore, without departing from the scope and spirit of the attached claims, many modifications and changes are obvious to ordinary technicians in the technical field. For the scope of the present application, the disclosure made in the present application is illustrative, not restrictive, and the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A data processing method, characterized in that: Get input data; Acquire first form response data corresponding to the input data and corresponding emotion expression data according to the input data; Generate target response data corresponding to the input data according to the first form response data and the emotion expression data.

2. The method according to claim 1, characterized in that The step of generating target response data corresponding to the input data according to the first form response data and the emotion expression data includes: converting the first form response data into a second form response data; Obtaining a feature representation of emotion data corresponding to the emotion expression data; The target response data is generated according to the emotion data feature representation and the second form response data.

3. The method according to claim 2, characterized in that The step of generating the target response data according to the emotion data feature representation and the second form response data comprises: Encoding the second-form response data to obtain a response data feature representation corresponding to the second-form response data; The target response data is generated according to the emotion data feature representation and the response data feature representation.

4. The method according to claim 1, characterized in that The emotion expression data includes at least one of a first feature, a second feature and a third feature, wherein the first feature includes at least one of nasal voice, smoky voice, sharp voice, hoarse voice and normal voice; the second feature includes at least one of fast speech speed, slow speech speed, high frequency voice, low frequency voice, loud voice and soft voice; the third feature includes at least one of happy, calm, sad and surprised; and / or, The first form response data is text data, and the second form response data is voice data.

5. The method according to any one of claims 1 to 4, characterized in that: The step of obtaining the first form response data corresponding to the input data and the corresponding emotion expression data according to the input data is implemented by a large language model, and the large language model is obtained by the following steps: Get a pre-trained large language model; Acquire a first training data set, the first training data set comprising a text data sample and corresponding first label data, the first label data comprising answer data and emotion data corresponding to the text data sample; The pre-trained large language model is fine-tuned using the first training data set until the pre-trained large language model converges to obtain a trained large language model.

6. The method according to claim 5, characterized in that The fine-tuning training of the pre-trained large language model by using the first training data set until the pre-trained large language model converges to obtain a trained large language model includes: Constructing a fine-tuned large model based on the pre-trained large language model; The fine-tuned large model is trained using the first training data set, and the newly added parameters of the fine-tuned large model relative to the pre-trained large language model are adjusted according to the loss between the predicted emotional features and the predicted response text output by the fine-tuned large model and the first label data, until the fine-tuned large model converges to obtain a trained large language model.

7. The method according to any one of claims 1 to 4, characterized in that: The acquisition of the emotion data feature representation corresponding to the emotion expression data is implemented by a data feature extraction unit, the generation of the target response data by the target data generation unit according to the emotion data feature representation and the second form response data is implemented by a target data generation unit, the data feature extraction unit and the target data generation unit are jointly trained, the target data generation unit includes an encoding unit and a decoding unit, and the training process of the data feature extraction unit and the target data generation unit includes: Constructing a joint training model according to the data feature extraction unit and the target data generation unit; Acquire a second training data set, the second training data set including emotion sample data and speech sample data, and second label data corresponding to the emotion sample data and the speech sample data, the second label data being speech data including the emotion described by the emotion sample data and the content of the speech sample data; The emotion sample data in the second training data set is input into the data feature extraction unit to obtain the corresponding emotion feature representation, the speech sample data is input into the encoding unit of the target data generation unit to obtain the speech data feature representation, the predicted speech data is obtained according to the emotion feature representation and the speech data feature representation through the decoding unit, and the data feature extraction unit and the target data generation unit are adjusted according to the loss between the predicted speech data and the second label speech data until the data feature extraction unit and the target data generation unit are adjusted and converged.

8. A data processing device, characterized in that: The device comprises: A data acquisition unit, used for the acquisition unit to acquire input data; A first data processing unit, configured to obtain first-form response data corresponding to the input data and emotion expression data according to the input data; The second data processing unit is used to generate target response data corresponding to the input data according to the first form response data and the emotion expression data.

9. An electronic device, comprising: at least one processor; as well as A memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, and the program instructions include instructions for executing the method according to any one of claims 1 to 7.

10. A readable storage medium storing program instructions, when the program instructions are read and executed by a computing device, the computing device executes the method according to any one of claims 1 to 7.