Conversation processing method and device based on artificial intelligence

By constructing user data sets and optimizing dialogue models with emotion and intent classification, the method addresses inefficiencies in AI dialogue processing, enhancing efficiency and user experience.

CN120316248AActive Publication Date: 2025-07-15ENERGY RES INST OF JIANGXI ACAD OF SCI
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510780099.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-12
Publication Date
2025-07-15
Estimated Expiration
2045-06-12

AI Technical Summary

Technical Problem

When the prior art deals with complex Chinese contexts and semantics, artificial intelligence dialogue processing takes a long time and has low recognition accuracy and generalization capabilities, which affects the user experience.

Method used

By constructing a sentiment analysis network model, data recognition and text mapping are performed, word vectors are generated and attention distribution is calculated, and dialogue tensor sets are generated to optimize dialogue model to realize dialogue processing for new users.

Benefits of technology

It improves the efficiency and intelligence of artificial intelligence dialogue processing, improves the accuracy and generalization ability of dialogue intention recognition, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120316248A_ABST
    Figure CN120316248A_ABST
Patent Text Reader

Abstract

The invention provides a dialogue processing method and device based on artificial intelligence. The method comprises the following steps: constructing a user data set according to historical dialogue data of a plurality of users; performing data identification on the user data set by using the sentiment analysis network model to obtain an identification result; the word vectors are coded to obtain word vector codes, and attention distribution is calculated; performing data processing on attention distribution of the user data set according to the emotion label to obtain emotion data and scene data; and generating a dialogue tensor set according to an emotion data tensor, a scene data tensor and an intention classification tensor generated according to the emotion data, the scene data and the intention classification result, optimizing a preset dialogue model by using the dialogue tensor set, and realizing dialogue processing of the new user by using the obtained dialogue processing model. Effective decomposition of user dialogue data by artificial intelligence software is realized by fusing emotion data, scene data and intention classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and particularly relates to a dialogue processing method and device based on artificial intelligence. Background Art

[0002] With the rapid development of technology and the improvement of people's living standards, there have been many breakthroughs in artificial intelligence in dialogue systems.

[0003] Currently, for the dialogue processing of artificial intelligence in this field, it is usually based on rule or learning methods. By identifying, analyzing, and understanding the intentions expressed by users, corresponding decisions are generated using dialogue management. However, in the current methods, in dealing with complex Chinese contexts and semantics, the time consumed in the dialogue processing process of artificial intelligence is relatively long, and the accuracy and generalization ability of identifying users' dialogue intentions are relatively low, resulting in low dialogue processing efficiency and affecting the user experience. Summary of the Invention

[0004] Based on this, the purpose of the present invention is to provide a dialogue processing method and device based on artificial intelligence to at least solve the deficiencies in the above technologies.

[0005] The present invention proposes a dialogue processing method based on artificial intelligence, including: Obtain a number of historical dialogue data of users with artificial intelligence software, and construct user data sets for each of the users according to the historical dialogue data; Construct a sentiment analysis network model, and use the sentiment analysis network model to perform data recognition on the user data sets to obtain recognition results with different sentiment types; Perform text mapping on the user data sets to obtain corresponding word vectors, encode the word vectors, and calculate the attention distribution of the user data sets from the encoded word vectors; Construct sentiment labels, and perform data processing on the attention distribution of the user data sets according to the sentiment labels to obtain corresponding sentiment data and corresponding scenario data; Perform intention prediction on the recognition results, and perform intention classification based on the intention prediction results to obtain corresponding intention classification results. Generate corresponding sentiment data tensors, scenario data tensors, and intention classification tensors according to the sentiment data, the scenario data, and the intention classification results; Generate a dialogue tensor set using the sentiment data tensors, the scenario data tensors, and the intention classification tensors, optimize a preset dialogue model using the dialogue tensor set, and use the obtained dialogue processing model to implement dialogue processing for new users.

[0006] Further, the steps of constructing the user data set of each user according to the historical dialogue data include: Perform data annotation on each piece of historical dialogue data to obtain corresponding data annotation results; Input the data annotation results into a preset intention classification model for processing to obtain the user data set corresponding to each user, and at least the corresponding user intention is included in the user data set.

[0007] Further, the steps of using the sentiment analysis network model to perform data recognition on the user data set to obtain recognition results of different sentiment types include: Define sentiment types, and perform simulated responses on the user data set based on the sentiment types and the sentiment analysis network model to obtain corresponding response results; Input the response results into a preset sentiment database for data recognition to obtain recognition results of different sentiment types.

[0008] Further, the steps of performing text mapping on the user data set to obtain corresponding word vectors, encoding the word vectors, and calculating the attention distribution of the user data set from the obtained word vector encodings include: Use a word vector model to perform text mapping on the user data set to obtain corresponding word vectors, and use a bidirectional recurrent neural network model to encode the word vectors to obtain corresponding forward word vector encodings and backward word vector encodings; Concatenate the forward word vector encoding and the backward word vector encoding, and project the concatenated output data into several different subspaces to obtain corresponding output weights, so as to calculate the attention distribution of the user data set.

[0009] Further, the calculation formulas for the forward word vector encoding and the backward word vector encoding are: ; ; In the formula, and are respectively the word vectors output at the previous moment at the th moment, and represents the input word vector at the th moment; The calculation formula for the attention distribution of the user data set is: ; ; ; ; In the formula, represents the output data obtained by concatenating the forward word vector encoding and the backward word vector encoding, represents the th moment when the activation function calculates the output data to obtain an output vector, which is used to characterize the influence degree of the input data on the final sentiment classification; represents the parameters of the activation function, represents the output data weight coefficient, represents the th moment of the output data projected onto different subspaces to obtain the output weights, , , represents the th projection matrix of the subspace, represents the th moment when the activation function output vector, represents the output data total quantity, represents the th moment of the output data attention weight, and the corresponding attention distribution is output according to the attention weight ; represents a preset gating parameter matrix, represents function.

[0010] Furthermore, the steps of performing intent prediction on the recognition result and performing intent classification based on the intent prediction result to obtain the corresponding intent classification result include: Performing intent prediction on the recognition result, capturing the context information of the recognition result through the attention mechanism, and obtaining the decoded semantic representation of the recognition result through the cross-fusion algorithm; Concatenating the context information and the semantic decoded representation to obtain the word decoded vector corresponding to the recognition result, and summarizing the word decoded vector to obtain the corresponding intent classification result.

[0011] The present invention also proposes an artificial intelligence-based dialogue processing device, including: A data acquisition module, configured to acquire historical dialogue data of a plurality of users with an artificial intelligence software, and construct a user data set of each user according to each piece of the historical dialogue data; A model construction module, configured to construct a sentiment analysis network model, and use the sentiment analysis network model to perform data recognition on the user dataset to obtain recognition results with different sentiment types; A text mapping module, configured to perform text mapping on the user dataset to obtain corresponding word vectors, encode the word vectors, and calculate the attention distribution of the user dataset based on the encoded word vectors; A data processing module, configured to construct sentiment labels, and perform data processing on the attention distribution of the user dataset according to the sentiment labels to obtain corresponding sentiment data and corresponding scenario data; An intention prediction module, configured to perform intention prediction on the recognition results, and perform intention classification based on the intention prediction results to obtain corresponding intention classification results, and generate corresponding sentiment data tensors, scenario data tensors, and intention classification tensors according to the sentiment data, the scenario data, and the intention classification results; A dialogue processing module, configured to generate a dialogue tensor set by using the sentiment data tensor, the scenario data tensor, and the intention classification tensor, optimize a preset dialogue model by using the dialogue tensor set, and implement dialogue processing for new users by using the obtained dialogue processing model.

[0012] Further, the data acquisition module includes: A data annotation unit, configured to perform data annotation on each of the historical dialogue data to obtain corresponding data annotation results; An annotation processing unit, configured to input the data annotation results into a preset intention classification model for processing to obtain user datasets corresponding to each user, where at least corresponding user intentions are included in the user datasets.

[0013] Further, the model construction module includes: A simulation reply unit, configured to define sentiment types, and perform simulation reply on the user dataset based on the sentiment types and the sentiment analysis network model to obtain corresponding reply results; A data recognition unit, configured to input the reply results into a preset sentiment database for data recognition to obtain recognition results with different sentiment types.

[0014] Further, the text mapping module includes: A text mapping unit, configured to perform text mapping on the user dataset by using a word vector model to obtain corresponding word vectors, and encode the word vectors by using a bidirectional recurrent neural network model to obtain corresponding forward word vector encodings and backward word vector encodings; A data calculation unit is configured to splice the forward word vector encoding and the backward word vector encoding, project the spliced output data into a plurality of different subspaces to obtain corresponding output weights, and calculate the attention distribution of the user data set.

[0015] Further, the intention prediction module includes: An intention prediction unit is configured to perform intention prediction on the recognition result, capture the context information of the recognition result through an attention mechanism, and obtain the decoded semantic representation of the recognition result through a cross-fusion algorithm; An intention classification unit is configured to splice the context information and the semantic decoded representation to obtain a word decoded vector corresponding to the recognition result, and summarize the word decoded vectors to obtain a corresponding intention classification result.

[0016] The present invention also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned artificial intelligence-based dialogue processing method is implemented.

[0017] The present invention also provides a computer, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above-mentioned artificial intelligence-based dialogue processing method is implemented.

[0018] In the artificial intelligence-based dialogue processing method and device of the present invention, by constructing a data set from the historical dialogue data of several users, performing text mapping through the constructed data set, and calculating the attention distribution of the data set using sentiment labels, the separation of sentiment data and scenario data is achieved, so as to realize the model's perception ability of scenario data and sentiment data, enhance the function of dialogue processing. By performing intention prediction on the recognition result to construct a corresponding dialogue tensor set, and using the dialogue tensor set to optimize the dialogue model, the dialogue processing for new users is realized. By fusing sentiment data, scenario data, and the corresponding intention classification, the effective decomposition of the user's dialogue data by the artificial intelligence software is realized, thereby improving the communication efficiency and intelligence of the artificial intelligence software. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a flowchart of the artificial intelligence-based dialogue processing method in the first embodiment of the present invention; Figure 2 It is a structural block diagram of the artificial intelligence-based dialogue processing device in the second embodiment of the present invention; Figure 3 It is a structural block diagram of the computer in the third embodiment of the present invention.

[0020] The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings. Detailed implementation manners

[0021] To facilitate the understanding of the present invention, the present invention will be described more comprehensively below with reference to the relevant drawings. Several embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, these embodiments are provided to make the disclosure of the present invention more thorough and comprehensive.

[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0023] Embodiment 1 Please refer to Figure 1 , which shows the method for dialogue processing based on artificial intelligence in the first embodiment of the present invention. The method specifically includes steps S101 to S106: S101, obtaining historical dialogue data of several users with respect to an artificial intelligence software, and constructing user data sets of the users according to the historical dialogue data; Further, the step S101 specifically includes steps S1011 to S1012: S1011, performing data annotation on the historical dialogue data to obtain corresponding data annotation results; S1012, inputting the data annotation results into a preset intention classification model for processing to obtain user data sets corresponding to the users, and at least including corresponding user intentions in the user data sets.

[0024] In specific implementation, historical dialogue data of several users with respect to an artificial intelligence software is obtained. Among them, the artificial intelligence software can be software applied to a communication device and capable of implementing related functions such as data interaction and voice interaction. The historical dialogue data is generated by voice interaction and / or text interaction between the user and the artificial intelligence software and is stored in the cloud server of the artificial intelligence software; Performing data preprocessing on the collected historical dialogue data, removing irrelevant characters, punctuation marks, and word segmentation, etc., performing data annotation on the data after data preprocessing, and having professionals annotate it according to predefined data annotation rules and performing cross-validation during the annotation process to obtain corresponding data annotation results; Specifically, obtain a number of text information with user intentions, map according to the text information and the corresponding user intentions to construct a corresponding intention classification model, and input the data standard result into the preset intention classification model for processing to obtain the user dataset corresponding to each user. It can be understood that constructing the dataset corresponding to the user with the user intention and the result after data annotation can enable the model to more quickly identify the user intention information in the data, thereby improving the data processing accuracy and data processing efficiency of the model.

[0025] S102. Construct a sentiment analysis network model, and use the sentiment analysis network model to perform data recognition on the user dataset to obtain recognition results with different sentiment types. Further, the step S102 specifically includes steps S1021 to S1022: S1021. Define sentiment types, and perform simulated responses on the user dataset based on the sentiment types and the sentiment analysis network model to obtain corresponding response results. S1022. Input the response results into a preset sentiment database for data recognition to obtain recognition results with different sentiment types.

[0026] In specific implementation, obtain the data with sentiment type annotation completed, input the data into a preset sentiment analysis sub-model (in this embodiment, the sentiment analysis sub-model selects the BERT model or the Word2Vec model), define the training network of the sub-model, and use the data for model training and model verification to obtain the corresponding sentiment analysis network model. Specifically, define sentiment types. Among them, in this embodiment, the sentiment types include but are not limited to types such as like, anger, sadness, happiness, disgust, etc. Perform simulated responses on the user dataset based on the sentiment types and the above sentiment analysis network model, and input the obtained response results into a preset sentiment database for data recognition to obtain recognition results with different sentiment types. It can be understood that when the sentiment type is the like type, the response results obtained by performing simulated responses on the user dataset through the sentiment analysis network model will contain the vocabulary or corresponding template information corresponding to the like type after data recognition by the sentiment database.

[0027] S103. Perform text mapping on the user dataset to obtain corresponding word vectors, encode the word vectors, and calculate the attention distribution of the user dataset from the encoded word vectors. Further, the step S103 specifically includes steps S1031 to S1032: S1031. Use a word vector model to perform text mapping on the user dataset to obtain corresponding word vectors, and use a bidirectional recurrent neural network model to encode the word vectors to obtain corresponding forward word vector encodings and backward word vector encodings; S1032. Concatenate the forward word vector encoding and the backward word vector encoding, and project the concatenated output data into several different subspaces to obtain corresponding output weights, so as to calculate the attention distribution of the user dataset.

[0028] In specific implementation, use a word vector model (in this embodiment, this word vector model includes the GloVe model, the ELMo model, and the FastText model) to perform text mapping on the user dataset to obtain corresponding word vectors, and use a bidirectional recurrent neural network model (in this embodiment, this model includes a bidirectional GRU model, a bidirectional LSTM model, and a stacked bidirectional GRU model) to encode the word vectors to obtain corresponding forward word vector encodings and backward word vector encodings, where the calculation formulas for the forward word vector encoding and the backward word vector encoding are: ; ; In the formula, and are respectively the word vectors output at the previous moment at the th moment, and represents the input word vector at the th moment; Furthermore, concatenate the obtained forward word vector encoding and backward word vector encoding: ; Project the concatenated output data into different subspaces to obtain corresponding output weights: ; In the formula, , , represent the projection matrices of the th subspace.

[0029] Calculate the attention distribution of the user dataset according to the calculated output weights and output data : ; ; In the formula, represents the th moment The activation function processes the output data to obtain an output vector, which is used to characterize the influence degree of the input data on the final sentiment classification; denotes the parameters of the activation function, denotes the output data weight coefficient, denotes the time output vector of the activation function, denotes the output data total quantity, denotes the output data at time attention weight; denotes a preset gating parameter matrix, denotes function; According to the above attention weights output the corresponding attention distribution .

[0030] S104. Construct sentiment labels, and perform data processing on the attention distribution of the user dataset according to the sentiment labels to obtain corresponding sentiment data and corresponding scenario data; In specific implementation, corresponding sentiment labels are constructed according to the above sentiment types, and the attention distribution of the user dataset is processed by combining the word vector model and the inverse document frequency model to generate corresponding scenario data. The attention distribution of the user dataset is processed according to the sentiment labels, and matching search is performed in the corresponding sentiment expression library to form corresponding sentiment data. In this embodiment, by setting a user threshold, after processing the attention distribution of the user dataset, the calculated values greater than the threshold are marked as sentiment data, and the values less than the threshold are marked as scenario data. Through this method, the scenario data and sentiment data in the user dataset can be separated more accurately, so as to realize the model's perception ability of scenario data and sentiment data and improve the function of dialogue processing.

[0031] S105. Perform intent prediction on the recognition result, and perform intent classification based on the intent prediction result to obtain a corresponding intent classification result. Generate corresponding sentiment data tensors, scenario data tensors, and intent classification tensors according to the sentiment data, the scenario data, and the intent classification result; Furthermore, the step S105 specifically includes steps S1051~S1052: S1051. Perform intent prediction on the recognition result, capture the context information of the recognition result through the attention mechanism, and obtain the decoded semantic representation of the recognition result through the cross-fusion algorithm; S1052. Concatenate the context information and the semantic decoded representation to obtain the word decoding vector corresponding to the recognition result, and summarize the word decoding vectors to obtain the corresponding intent classification result.

[0032] In specific implementation, define the recognition result as , where each input word is mapped to a distributed word vector through the embedding layer, and the vocabulary each word in corresponds to a -dimensional vector, stored in the word vector matrix , represents the vocabulary size, and each word is represented as the word vector . Therefore, the composed recognition result is finally encoded as a word vector sequence , , where is the sentence length.

[0033] Furthermore, in the encoding stage, the encoder based on the bidirectional LSTM receives the word vector sequence of the sentence, and the output hidden state sequence is defined as , that is, the context vector corresponding to the context information of the recognition result; In the decoding process, calculate the weight distribution of the encoding state from the output of the encoding process to generate the semantic attention vector and the intent recognition attention vector , where the intent recognition attention vector is the decoded semantic representation of the recognition result. At the same time, introduce a gating mechanism to interact and fuse the semantic attention vector and the intent recognition attention vector to generate complementary vectors and . Finally, the decoding process is defined as and , where is the decoding vector corresponding to the recognition result. Use the fully connected layer to output this decoding process to obtain the word-level intent recognition result, and summarize the intent classifications of each word to obtain the final intent classification result.

[0034] Furthermore, perform tensor processing on the obtained sentiment data, scenario data, and intent classification result to generate the corresponding sentiment data tensor, scenario data tensor, and intent classification tensor.

[0035] S106. Generate a set of dialogue tensors using the emotion data tensor, the scenario data tensor, and the intent classification tensor, optimize a preset dialogue model using the set of dialogue tensors, and implement dialogue processing for new users using the obtained dialogue processing model.

[0036] In specific implementation, tensor fusion is performed on the emotion data tensor, the scenario data tensor, and the intent classification tensor to obtain the corresponding set of dialogue tensors, and the preset dialogue model is optimized using the set of dialogue tensors. Specifically, a preset dialogue model is selected. In this embodiment, the Hybrid model is taken as an example. It can be understood that in other alternative embodiments, other basic models can also be selected for this model, such as: the RNN model, the self-attention training model, etc. Using the spatio-temporal features and multi-modal information of the set of dialogue tensors, stage training is performed on the Hybrid model. LAMB is selected as the optimizer, the initial learning rate is set to 3e-5, and the cosine annealing is used to gradually increase the learning rate in the first 10% of the training steps and then gradually decay. At the same time, the intent recognition and the corresponding emotional response of the model are optimized to obtain the dialogue processing model, and the dialogue processing model is used to implement the dialogue processing for new users.

[0037] In summary, the dialogue processing method based on artificial intelligence in the above embodiments of the present invention constructs a data set through the historical dialogue data of several users, performs text mapping through the constructed data set, calculates the attention distribution of the data set using emotion labels, so as to separate the emotion data and the scenario data, realize the perception ability of the model for the scenario data and the emotion data, improve the function of dialogue processing, predict the intent through the recognition result to construct the corresponding set of dialogue tensors, optimize the dialogue model using the set of dialogue tensors, so as to implement the dialogue processing for new users, and effectively decompose the user dialogue data by integrating the emotion data, the scenario data, and the corresponding intent classification, thereby improving the communication efficiency and intelligence of the artificial intelligence software.

[0038] Embodiment Two On the other hand, the present invention also proposes a dialogue processing device based on artificial intelligence. Please refer to Figure 2 , which shows the dialogue processing device based on artificial intelligence in the second embodiment of the present invention. The system includes: A data acquisition module 11, configured to acquire historical dialogue data of several users with respect to an artificial intelligence software, and construct a user data set for each of the users according to the historical dialogue data; Further, the data acquisition module 11 includes: A data annotation unit, configured to perform data annotation on each of the historical dialogue data to obtain a corresponding data annotation result; An annotation processing unit, configured to input the data annotation result into a preset intention classification model for processing, so as to obtain a user data set corresponding to each user, and at least the corresponding user intention is included in the user data set.

[0039] A model construction module 12, configured to construct a sentiment analysis network model, and use the sentiment analysis network model to perform data recognition on the user data set, so as to obtain recognition results with different sentiment types; Further, the model construction module 12 includes: A simulation reply unit, configured to define sentiment types, and perform simulation replies on the user data set based on the sentiment types and the sentiment analysis network model, so as to obtain corresponding reply results; A data recognition unit, configured to input the reply result into a preset sentiment database for data recognition, so as to obtain recognition results with different sentiment types.

[0040] A text mapping module 13, configured to perform text mapping on the user data set to obtain corresponding word vectors, encode the word vectors, and calculate the attention distribution of the user data set based on the encoded word vectors obtained; Further, the text mapping module 13 includes: A text mapping unit, configured to perform text mapping on the user data set by using a word vector model to obtain corresponding word vectors, and encode the word vectors by using a bidirectional recurrent neural network model to obtain corresponding forward word vector encodings and backward word vector encodings; A data calculation unit, configured to splice the forward word vector encoding and the backward word vector encoding, project the spliced output data into a plurality of different subspaces to obtain corresponding output weights, and calculate the attention distribution of the user data set.

[0041] A data processing module 14, configured to construct sentiment labels, and perform data processing on the attention distribution of the user data set according to the sentiment labels, so as to obtain corresponding sentiment data and corresponding scenario data; An intention prediction module 15, configured to perform intention prediction on the recognition result, and perform intention classification based on the intention prediction result to obtain a corresponding intention classification result, and generate corresponding sentiment data tensors, scenario data tensors, and intention classification tensors according to the sentiment data, the scenario data, and the intention classification result; Further, the intention prediction module 15 includes: An intention prediction unit, configured to perform intention prediction on the recognition result, capture the context information of the recognition result through an attention mechanism, and obtain the decoded semantic representation of the recognition result through a cross-fusion algorithm; An intent classification unit for concatenating the context information and the semantic decoding representation to obtain a word decoding vector corresponding to the recognition result, and summarizing the word decoding vectors to obtain a corresponding intent classification result.

[0042] The dialogue processing module 16 is configured to generate a set of dialogue tensors by using the emotion data tensor, the scenario data tensor, and the intent classification tensor, optimize a preset dialogue model by using the set of dialogue tensors, and implement dialogue processing for new users by using the obtained dialogue processing model.

[0043] The functions or operation steps implemented when the above-mentioned modules and units are executed are substantially the same as those in the above method embodiment, and will not be described in detail here.

[0044] The dialogue processing device based on artificial intelligence provided in the embodiment of the present invention has the same implementation principle and technical effects as those in the foregoing method embodiment. For a brief description, for the parts not mentioned in the system embodiment, reference may be made to the corresponding content in the foregoing method embodiment.

[0045] Embodiment III The present invention also proposes a computer. Please refer to Figure 3 , which shows the computer in the third embodiment of the present invention, including a memory 10, a processor 20, and a computer program 30 stored on the memory 10 and executable on the processor 20. When the processor 20 executes the computer program 30, the above-mentioned dialogue processing method based on artificial intelligence is implemented.

[0046] Among them, the memory 10 includes at least one type of storage medium, and the storage medium includes flash memory, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 10 may be an internal storage unit of the computer in some embodiments, such as the hard disk of the computer. The memory 10 may also be an external storage device in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory 10 may also include both an internal storage unit and an external storage device of the computer. The memory 10 can be used not only to store application software and various types of data installed on the computer, but also to temporarily store data that has been output or will be output.

[0047] Among them, in some embodiments, the processor 20 may be an Electronic Control Unit (ECU, also known as the vehicle computer), a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips, and is used to run the program code stored in the memory 10 or process data, such as executing an access restriction program, etc.

[0048] It should be noted that Figure 3 the structure shown does not constitute a limitation on the computer. In other embodiments, the computer may include fewer or more components than shown in the figure, or combine certain components, or have a different component arrangement.

[0049] An embodiment of the present invention also provides a storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the above-mentioned artificial intelligence-based dialogue processing method.

[0050] Those skilled in the art can understand that the logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a predefined sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or used in combination with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.

[0051] More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection part (electronic device) having one or more wirings, a portable computer disk cartridge (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or other appropriate processing as necessary, and then stored in a computer memory.

[0052] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0053] The technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered as within the scope described in this specification.

[0054] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.

Claims

1. A dialogue processing method based on artificial intelligence, characterized in that Including: Obtain historical conversation data of several users regarding an artificial intelligence software, and construct user data sets for each of the users based on the respective historical conversation data; Construct a sentiment analysis network model, and use the sentiment analysis network model to perform data recognition on the user data sets to obtain recognition results with different sentiment types; Perform text mapping on the user data sets to obtain corresponding word vectors, encode the word vectors, and calculate the attention distribution of the user data sets based on the encoded word vectors obtained; Construct sentiment labels, and perform data processing on the attention distribution of the user data sets according to the sentiment labels to obtain corresponding sentiment data and corresponding scenario data; Perform intent prediction on the recognition results, and perform intent classification based on the intent prediction results to obtain corresponding intent classification results. Generate corresponding sentiment data tensors, scenario data tensors, and intent classification tensors according to the sentiment data, the scenario data, and the intent classification results; Generate a dialogue tensor set using the sentiment data tensors, the scenario data tensors, and the intent classification tensors, use the dialogue tensor set to optimize a preset dialogue model, and use the obtained dialogue processing model to implement dialogue processing for new users.

2. The method for dialogue processing based on artificial intelligence according to claim 1, wherein, The steps of constructing user data sets for each of the users based on the respective historical conversation data include: Perform data annotation on each of the historical conversation data to obtain corresponding data annotation results; Input the data annotation results into a preset intent classification model for processing to obtain the user data sets corresponding to each of the users, where at least the corresponding user intents are included in the user data sets.

3. The method for dialogue processing based on artificial intelligence according to claim 1, wherein The steps of using the sentiment analysis network model to perform data recognition on the user data sets to obtain recognition results with different sentiment types include: Define sentiment types, and perform simulated responses on the user data sets based on the sentiment types and the sentiment analysis network model to obtain corresponding response results; Input the response results into a preset sentiment database for data recognition to obtain recognition results with different sentiment types.

4. The method for dialogue processing based on artificial intelligence according to claim 1, wherein The steps of performing text mapping on the user data sets to obtain corresponding word vectors, encoding the word vectors, and calculating the attention distribution of the user data sets based on the encoded word vectors obtained include: Use a word vector model to perform text mapping on the user data sets to obtain corresponding word vectors, and use a bidirectional recurrent neural network model to encode the word vectors to obtain corresponding forward word vector encodings and backward word vector encodings; Concatenate the forward word vector encodings and the backward word vector encodings, and project the concatenated output data into several different subspaces to obtain corresponding output weights, so as to calculate the attention distribution of the user data sets.

5. The method for dialogue processing based on artificial intelligence according to claim 4, wherein The calculation formulas for the forward word vector encodings and the backward word vector encodings are: ; ; In the formula, and are respectively the word vectors output at the previous moment of the th moment, represents the input word vector at the th moment; The calculation formula for the attention distribution of the user data sets is: ; ; ; ; Wherein, represents the output data obtained by concatenating the forward word vector encoding and the backward word vector encoding, represents the output vector obtained by calculating the output data at the time by the activation function, which is used to characterize the influence degree of the input data on the final sentiment classification; represents the parameter of the activation function, represents the weight coefficient of the output data represents the output weights obtained by projecting the output data at the time onto , , represents the projection matrix of the th subspace, represents the output vector of the activation function at the time, represents the total number of the output data represents the attention weight of the output data at the time, and the corresponding attention distribution is output according to the attention weight; represents the preset gating parameter matrix, represents function.

6. The method for dialogue processing based on artificial intelligence according to claim 1, characterized in that, The steps of performing intent prediction on the recognition results, and performing intent classification based on the intent prediction results to obtain corresponding intent classification results include: Perform intent prediction on the recognition result, capture the context information of the recognition result through the attention mechanism, and obtain the decoded semantic representation of the recognition result through the cross-fusion algorithm; Concatenate the context information and the semantic decoded representation to obtain the word decoding vector corresponding to the recognition result, and summarize the word decoding vectors to obtain the corresponding intent classification result.

7. A dialogue processing device based on artificial intelligence, characterized in that, It includes: A data acquisition module, configured to acquire historical conversation data of several users with an artificial intelligence software, and construct a user dataset for each of the users according to the historical conversation data; A model construction module, configured to construct a sentiment analysis network model, and use the sentiment analysis network model to perform data recognition on the user dataset to obtain recognition results with different sentiment types; A text mapping module, configured to perform text mapping on the user dataset to obtain corresponding word vectors, encode the word vectors, and calculate the attention distribution of the user dataset from the encoded word vectors; A data processing module, configured to construct sentiment labels, and perform data processing on the attention distribution of the user dataset according to the sentiment labels to obtain corresponding sentiment data and corresponding scenario data; An intent prediction module, configured to perform intent prediction on the recognition result, perform intent classification based on the intent prediction result to obtain the corresponding intent classification result, and generate corresponding sentiment data tensors, scenario data tensors, and intent classification tensors according to the sentiment data, the scenario data, and the intent classification result; A conversation processing module, configured to generate a conversation tensor set using the sentiment data tensor, the scenario data tensor, and the intent classification tensor, optimize a preset conversation model using the conversation tensor set, and implement conversation processing for new users using the obtained conversation processing model.

8. The artificial intelligence-based dialogue processing device according to claim 7, wherein The data acquisition module includes: A data annotation unit, configured to perform data annotation on each of the historical conversation data to obtain corresponding data annotation results; An annotation processing unit, configured to input the data annotation results into a preset intent classification model for processing to obtain the user dataset corresponding to each of the users, where at least the corresponding user intent is included in the user dataset.

9. A storage medium, on which a computer program is stored, characterized in that, When the program is executed by a processor, it implements the artificial intelligence-based conversation processing method according to any one of claims 1 to 6.

10. A computer, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the artificial intelligence-based conversation processing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Intelligent emotion recognition method and device and computer readable storage medium

    CN111241828A

  • Emotion polarity classification method for specific target

    CN112131383A

  • Virtual reality scene emotion recognition method based on view angle weight and feature fusion

    CN113011504A

  • Method and system for generating common-situation dialogue with attention mechanism and external knowledge base, and electronic equipment

    CN118261249A

  • Response method and device

    CN119003710A