Dialogue generation method and device, electronic equipment and storage medium

By obtaining the conversation personality information and product demand information of the target user, and using the target model to generate matching conversation content, the problem of low quality dialogue content in the existing technology is solved, and the applicability and user satisfaction of the conversation content are improved.

CN119557389APending Publication Date: 2025-03-04北京中关村科金技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311036844.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-17
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

In the prior art, dialogue content editing lacks reference to other information of the target user, resulting in low applicability of dialogue content to the target user and low quality of dialogue content.

Method used

By obtaining the conversational personal information and product requirements information of the target user, prompt information is generated and inputted to the target model, and dialogue content matching the conversational personal information and product requirements information is generated.

Benefits of technology

The quality of conversation content is improved, making it more suitable for the personality and needs of the target users, and the applicability and user satisfaction of conversation content are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557389A_ABST
    Figure CN119557389A_ABST
Patent Text Reader

Abstract

The invention provides a dialogue generation method and device, electronic equipment and a storage medium, and relates to the technical field of data processing, and the method comprises the steps: obtaining dialogue personality information and product demand information of a first target user; first prompt information is generated according to the dialogue personality information and the product demand information, the first prompt information is used for prompting a target model to generate dialogue content matched with the dialogue personality information and the product demand information, and the target model is a model used for generating dialogue information; and inputting the first prompt information and the identification information of the first target user into the target model, and generating dialogue content matched with the dialogue personality information and the product demand information through the target model according to the first prompt information. The quality of the dialogue content 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 data processing technology, and in particular to a dialogue generation method, device, electronic device and storage medium. Background Art

[0002] Nowadays, Natural Language Processing (NLP) technology has been applied in many fields. In order to improve the sales effect of products, it is very important to design personalized conversation content.

[0003] In the prior art, the basic information of the first target user, such as age, gender, occupation, etc., as well as information such as the needs of the target user, is usually obtained first, and then the conversation content of the competitor is studied to determine the positioning and competitive strategy in the market. Then, based on the research results of the target audience and competitors, the topic and key information of the conversation content are determined, and finally, the conversation content is written based on the determined topic and key information. However, since the editing of the conversation content lacks reference to other information of the target user, the edited conversation content is less applicable to the target user.

[0004] Therefore, there is a problem of low quality of dialogue content in the prior art. Summary of the invention

[0005] The embodiments of the present invention provide a dialogue generation method, device, electronic device and readable storage medium to solve the problem of low dialogue content quality in the prior art.

[0006] To solve the above problems, the present invention is achieved as follows:

[0007] In a first aspect, an embodiment of the present invention provides a method for generating a dialogue, comprising:

[0008] Acquire conversation personality information and product demand information of the first target user, wherein the conversation personality information is used to represent the personality information of the first target user during the conversation, and the product demand information represents the purchase demand information of the first target user for the target product set;

[0009] Generate first prompt information according to the dialogue personality information and the product requirement information, wherein the first prompt information is used to prompt a target model to generate dialogue content matching the dialogue personality information and the product requirement information, wherein the target model is a model used to generate dialogue information;

[0010] The first prompt information and the identification information of the first target user are input into the target model, and the target model generates a dialogue content matching the dialogue personality information and the product demand information according to the first prompt information.

[0011] In a second aspect, an embodiment of the present invention further provides a dialogue generation device, including:

[0012] An acquisition module, used to acquire conversation personality information and product demand information of a first target user, wherein the conversation personality information is used to represent the personality information of the first target user during the conversation, and the product demand information represents the purchase demand information of the first target user for a target product set;

[0013] A generating module, configured to generate first prompt information according to the dialogue personality information and the product requirement information, wherein the first prompt information is used to prompt a target model to generate dialogue content matching the dialogue personality information and the product requirement information, wherein the target model is a model used to generate dialogue information;

[0014] The first processing module is used to input the first prompt information and the identification information of the first target user into the target model, and generate a dialogue content matching the dialogue personality information and the product demand information according to the first prompt information through the target model.

[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps in the dialog generation method described in the first aspect above.

[0016] In a fourth aspect, an embodiment of the present invention further provides a readable storage medium for storing a program, which, when executed by a processor, implements the steps in the dialog generation method described in the first aspect above.

[0017] In an embodiment of the present invention, conversation personality information and product demand information are first obtained, wherein the conversation personality information and product demand information correspond to a first target user, and then first prompt information is generated based on the conversation personality information and the product demand information, and the prompt information is input into a target model to obtain conversation content that matches the conversation personality information and the product demand information, and the conversation content is obtained based on the conversation personality information and the product demand information of the first target user, thereby improving the quality of the conversation content. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0019] Figure 1This is one of the flow charts of a method for generating a dialogue provided by an embodiment of the present invention;

[0020] Figure 2 This is the second flowchart of a method for generating a dialogue provided by an embodiment of the present invention;

[0021] Figure 3 is a structural diagram of a dialogue generation device provided by an embodiment of the present invention;

[0022] Figure 4 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

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

[0024] See also Figure 1 , Figure 1 is a flow chart of a method for generating a dialogue provided by an embodiment of the present invention. Figure 1 As shown, the following steps are included:

[0025] Step 101: Acquire conversation personality information and product demand information of a first target user, wherein the conversation personality information is used to represent the personality information of the first target user during the conversation, and the product demand information represents the purchase demand information of the first target user for a target product set.

[0026] The above-mentioned dialogue personality information can be understood as the personality information of the above-mentioned first target user during the dialogue process, which may include the interests, preferences and personality characteristics of the above-mentioned first target user, for example: whether the first target user prefers a soft tone, whether the first target user tends to be emotional or rational, whether the first target user is good at expressing, and whether the first target user is easy to accept new products, etc. Of course, the above-mentioned dialogue personality information may also include the emotions, attitudes and word usage habits of the above-mentioned first target user.

[0027] It should be noted that the above-mentioned conversation personality information and the above-mentioned product demand information can be obtained through a large language model (LLM) or other deep learning models trained with a large amount of text data, and natural language processing technology is used to extract information such as the interests, hobbies or personality characteristics of the above-mentioned first target user. Prior to this, it is necessary to input relevant data matching the above-mentioned first target user into the large language model, such as: user information, product information and conversation text matching the above-mentioned first target user, and pre-process the relevant data (data cleaning) to ensure the integrity of the data and the accuracy of the analysis results.

[0028] The above-mentioned product demand information can be understood as the information on the purchase demand of the above-mentioned first target user for the target product set. For example, the above-mentioned first target user is interested in products in the category of smart home appliances, among which smart home appliances can be understood as a product set, and products such as smart TVs and smart refrigerators can be understood as single units in the product set.

[0029] Step 102: Generate first prompt information based on the dialogue personality information and the product requirement information. The first prompt information is used to prompt a target model to generate dialogue content that matches the dialogue personality information and the product requirement information. The target model is a model for generating dialogue information.

[0030] The above-mentioned target model can be a deep learning model trained with a large amount of text data, such as a large language model LLM. The embodiment of the present invention does not limit the selection of the deep learning model. Then the above-mentioned first prompt information can be understood as a prompt word or a prompt template, which is used to be input into the above-mentioned target model to obtain better results. In the embodiment of the present invention, by generating the above-mentioned first prompt information, the above-mentioned target model can be prompted to generate dialogue content that matches the above-mentioned dialogue personality information and the above-mentioned product demand information, thereby obtaining better dialogue content.

[0031] It should be noted that the above-mentioned target model can also perform personality or emotion analysis on the above-mentioned first target user, that is, obtain the conversation personality information in step 101, wherein relevant data corresponding to the above-mentioned first target user is input into the above-mentioned target model, and when performing emotion analysis on the above-mentioned first target user, emotion-related keywords and emotion vocabulary are identified and associated through the above-mentioned target model to judge the emotional state and attitude tendency of the text.

[0032] In addition, when extracting personality traits, the target model will learn the target user's personal language style and expression habits from relevant data, such as whether the expression is clear and concise, and generate corresponding text content based on these characteristics. Using its powerful language generation capabilities, through multi-level feature extraction, association and matching mechanisms, it can accurately judge and express the target user's emotional state and attitude tendency to obtain the above-mentioned dialogue personality information.

[0033] The first prompt information is generated based on the conversation personality information and the product demand information. For example, the conversation personality information and the product demand information may be integrated and then input into the target model to allow the target model to generate the first prompt information.

[0034] In addition, the first prompt information may be text content, and may include instructions for prompting the target model to generate a dialogue content that matches the dialogue personality information and the product requirement information.

[0035] For example, S1 = "target user A is more emotional, prefers smart appliances, has a calm attitude when communicating, and is easy to accept new things", plus his needs, such as S2 = "target user A's purchasing needs: smart speakers", take S1+S2 as a whole as input, and let the above target model automatically generate the above first prompt information.

[0036] Step 103: input the first prompt information and the identification information of the first target user into the target model, and generate a dialogue content matching the dialogue personality information and the product demand information according to the first prompt information through the target model.

[0037] Based on the first prompt information and the identification information of the first target user as input, the target model can generate corresponding dialogue content. For example, the dialogue content for emotional target users may focus more on the aesthetic appearance of the product, while the dialogue content for rational target users may focus more on performance parameters such as the economy and safety performance of the product.

[0038] The identification information of the first target user is used to distinguish individual users when a large amount of data is input, thereby reducing the possibility of mismatching between the user and the conversation content.

[0039] It should be noted that, during the training process of the target model, the target model can learn relevant corpus data including product sales, etc. These corpus data provide a large amount of information and knowledge reserves for the target model.

[0040] The above target model can be obtained through the following training method:

[0041] 1) Obtaining historical data of several users and generating prompt information based on the historical data, wherein the historical data includes product information, user information and historical conversation texts corresponding to the several users;

[0042] 2) The initial model is trained based on the prompt information to obtain the above-mentioned target model, where the initial model is a large language model (LLM) and the target model is a model used to generate dialogue content.

[0043] Of course, the target model may also be trained in other ways, which is not limited in this embodiment of the present invention.

[0044] In addition, when the above-mentioned first prompt information is input to the above-mentioned target model, the above-mentioned target model can also automatically generate corresponding text, and generate the output of the above-mentioned dialogue content according to the relevant text data in the training data. The generation process of the above-mentioned target model is similar to sentiment analysis. By extracting and matching the features of the text data, personalized text content that matches the needs and personality of the target user is generated. In the generation process, the above-mentioned target model first extracts features from the above-mentioned first prompt information input, and establishes a hidden representation that facilitates the relationship between input and output. Then, through the long dependency relationship learned from the corpus by the self-attention mechanism, the contextual information in the input and corpus is comprehensively considered, and finally the corresponding dialogue content output is generated. Through deep learning, neural networks and other technologies, the pre-trained large language model LLM can understand the meaning of the input prompt words, learn the language rules of text data, and generate various types of text content related to it to achieve text generation tasks.

[0045] In this implementation scheme, conversation personality information and product requirement information are first obtained, wherein the conversation personality information and product requirement information correspond to a first target user. Next, first prompt information is generated based on the conversation personality information and product requirement information, and the prompt information is input into a target model to obtain conversation content that matches the conversation personality information and the product requirement information. The conversation content is obtained based on the conversation personality information and product requirement information of the first target user, thereby improving the quality of the conversation content.

[0046] It should be noted that the above-mentioned dialogue content generated by the above-mentioned target model can be fed back to the user side, such as devices such as user terminals. High-quality dialogue content improves user satisfaction and thus improves the sales effect of the product.

[0047] Optionally, the dialog personality information is used to represent at least one of the following:

[0048] Communication attitude information of the first target user during the conversation;

[0049] Communication emotion information of the first target user during the conversation;

[0050] The personality information of the first target user.

[0051] It should be understood that the above-mentioned communication attitude information can be understood as the attitude of the above-mentioned first target user during the communication dialogue process, for example: the first target user has a calm attitude during the communication; or the first target user has an impatient attitude during the communication. The above-mentioned communication emotion information can be understood as whether the above-mentioned first target user is good at expressing himself or herself during the communication dialogue, or whether he is easy to accept, etc. The above-mentioned personality information specifically reflects the personal personality of the above-mentioned first target user, such as sensibility or rationality.

[0052] In this implementation scheme, by collecting one or more of the above-mentioned communication attitude information, the above-mentioned communication emotion information and the above-mentioned personality information, the accuracy of the judgment on the conversation personality of the above-mentioned first target user is improved, and personalized conversation content can be provided to the user, thereby improving the quality of the conversation content and also improving the user satisfaction.

[0053] The following is an example of providing personalized conversation content to users:

[0054] User A has purchased smart electronic devices on a certain platform many times. According to the historical conversation records and the above target model analysis, it is found that user A is a sentimental person and pays more attention to the appearance of the product. Therefore, the following conversation content can be generated based on the personality characteristics of user A using the above target model:

[0055] 1) Emphasize some unique features of the product: "Our smart speakers are available in a variety of colors and materials to suit your tastes and needs. If you like a specific color or design, we can customize it for you."

[0056] 2) Provide customized services: "We pay great attention to the personalized needs of target users, so we provide customized services for smart speakers. If you have any special functions or design requirements, we can make your unique smart speaker according to your requirements to truly meet your needs.";

[0057] 3) Emphasize word-of-mouth and brand image: "Our smart speakers are manufactured by top brands with many years of history and technological accumulation, and quality assurance. The positive reviews from many users also prove the quality and performance of our speakers. We have always been committed to providing target users with a perfect music enjoyment experience, and are deeply loved and supported by the majority of users."

[0058] Optionally, the obtaining of the conversation personality information and product demand information of the first target user includes:

[0059] Collecting historical data of the first target user, the historical data including: product information and historical conversation texts;

[0060] Determining the product demand information according to the product information;

[0061] The historical conversation text is input into the target model, and the personality of the first target user is analyzed based on the historical conversation text by the target model to obtain the conversation personality information.

[0062] It should be understood that the above historical conversation text may be a chat record between the first target user and the product customer service, or other text information matching the first target user, which is not limited in the embodiment of the present invention. The above product information may be understood as a product keyword that appears once or multiple times in the above historical conversation text, or may be directly calling relevant data from a database that stores the names of products required by users within a preset time period.

[0063] The above product demand information can be expressed in the following ways: First target user purchasing demand: Product A.

[0064] It should be noted that when collecting the historical data of the first target user, the historical data needs to be cleaned and processed to remove junk information in the historical data to ensure the integrity and quality of the historical data.

[0065] In this implementation scheme, the historical data of the first target user is firstly collected, and then the needs of the first target user are determined according to the product information in the historical data, that is, the product demand information is determined, and then the personality of the first target user is analyzed based on the historical conversation text analysis using the target model, that is, the conversation personality information is obtained. Both the product demand information and the conversation personality information are based on the historical data of the first target user, which increases the accuracy of the conversation personality information and the product demand information. On the other hand, the use of the target model to determine the conversation personality information improves the overall efficiency, thereby improving the quality and accuracy of the conversation content.

[0066] As an alternative implementation, see Figure 2 , Figure 2 FIG. 2 is a flow chart of a method for generating a dialogue according to an embodiment of the present invention. Figure 2 As shown, firstly, the historical data is collected and preprocessed, that is, the historical data is cleaned to ensure the integrity and quality of the historical data. Then, the target model is used to complete the character analysis of the target user, and then the target model is used to generate the prompt information based on the character analysis results of the target user. Finally, the prompt information is input into the target model to obtain the conversation content that matches the target user.

[0067] As another optional implementation, the specific implementation steps are as follows:

[0068] 1) Collection and preprocessing of historical data: Collect historical data of target users, including product information, user information, and conversation texts, and clean the data;

[0069] 2) Target user personality analysis: Use the target model to analyze historical data and structure the target user information, including interests, preferences, and personality traits, such as whether they prefer a soft tone, whether they are emotional or rational, whether they are good at expressing themselves, whether they are easy to accept, etc.

[0070] 3) Prompt information generation: Based on the target model extraction results, the target model is used to generate different prompt information for different target users. For example, prompt information = "I am a rational consumer who pays attention to quality and personalized customization. I hope to find a smart speaker with excellent sound quality and unique design. I like bright audio colors and my usage scenario is home use. These are all important. Please recommend a smart speaker with rich functions that meets my appearance design and personalized needs.";

[0071] 4) Dialogue content generation: Based on the corresponding prompt information, the target model outputs the corresponding dialogue content.

[0072] The following is the text output of the target model combined with the XC21 smart speaker recommendation solution:

[0073] "Thank you very much for your interest in our smart speaker products. For target users like you who value quality and personalized customization, we recommend our company's XC21 smart speaker. This speaker has high-quality sound performance, clear and delicate, pure and natural. The power supply adopts high-fidelity amplifiers, new DSP digital processing chips and other high-end configurations to bring you real music enjoyment.

[0074] In terms of design, the XC21 smart speaker adopts a unique top mirror design with a variety of color schemes. You can choose your favorite color and shape according to your preferences. In addition, this speaker also supports multiple command controls and smart home linkage, which is convenient for you to use in multiple scenarios at home. Whether you prefer sound quality or focus on personalized customization, the XC21 smart speaker can meet your needs. I hope this product can bring you an excellent music experience. "

[0075] It can be seen from the above embodiments that the input prompt information contains the personalized needs of the target user, including quality, personalized customization, cool sound color and shape. Through the deep learning algorithm of the large language model LLM, the recommendations made for this type of target user in the text data are mastered, such as sound quality performance, mirror design, support for multiple command controls and smart home linkage, etc. Finally, the large language model LLM accurately generates a text output of the smart speaker recommendation solution that meets the needs and tastes of the target user according to the mapping of the prompt information and the relevant information of the corpus.

[0076] Optionally, generating the first prompt information according to the dialogue personality information and the product demand information includes:

[0077] generating first text information based on the conversation personality information, wherein the first text information represents a text describing the personality of the first target user;

[0078] generating second text information based on the product demand information, wherein the second text information represents a text describing the purchase demand of the first target user for the target product set;

[0079] The first text information and the second text information are merged to obtain the first prompt information.

[0080] It should be understood that the above-mentioned dialogue personality information can be input into the above-mentioned target model in the form of text, for example: I am a rational consumer who pays attention to quality and personalized customization. Similarly, the above-mentioned product demand information can also be input into the above-mentioned target model in the form of text, for example: I hope to find a smart speaker with excellent sound quality and unique design. I like cool audio colors and shapes, and my usage scenario is home use.

[0081] Exemplarily, take the merged style of the first text message and the second text message as an example: the first prompt message = "I am a rational consumer who pays attention to quality and personalized customization. I hope to find a smart speaker with excellent sound quality and unique design. I like cool audio colors and shapes. My usage scenario is home use, and these are all very important. Please recommend me a smart speaker that is rich in functions and meets my appearance design and personalized needs."

[0082] It should be noted that the first prompt information can be obtained in the following two ways:

[0083] 1. After obtaining the above-mentioned dialogue personality information and the above-mentioned product demand information, directly extract the text information of the two, and edit them to obtain the first prompt information;

[0084] 2. After obtaining the above-mentioned dialogue personality information and the above-mentioned product demand information, the first prompt information is directly generated using the above-mentioned target model.

[0085] In this implementation scheme, the first prompt information is obtained by merging the first text information and the second text information. The first prompt information can be understood as a prompt word or a prompt template, which is used to be input into the target model to obtain better results. In an embodiment of the present invention, by generating the first prompt information, dialogue content that matches the dialogue personality information and the product demand information can be generated, thereby obtaining dialogue content with better effects and higher applicability.

[0086] Optionally, inputting the first prompt information and the identification information of the first target user into the target model, and generating, through the target model and according to the first prompt information, a dialogue content matching the dialogue personality information and the product requirement information, includes:

[0087] inputting the first prompt information and the identification information of the first target user into the target model;

[0088] The target model determines the language style type and the target product based on the text content of the first prompt information, and generates a dialogue content matching the dialogue personality information and the product demand information based on the language style type and the product information of the target product, wherein the target product is a product in the target product set.

[0089] It should be understood that the most appropriate language style type needs to be used for users with different personalities in order to improve user satisfaction. Therefore, in an embodiment of the present invention, the above-mentioned target model is used to generate the above-mentioned dialogue personality information based on the language style type and the product information of the above-mentioned target product, as well as dialogue content that matches the product demand information.

[0090] In this implementation scheme, after the first prompt information is input into the target model, the target model is used to extract the text content of the first prompt information, so as to determine the type of language style adopted by the finally generated dialogue content. Similarly, the target product is determined by the target model, and the product information of the target product can be obtained in any way, and finally the dialogue content is obtained. The product information can be understood as a detailed introduction to the target product. Through this method, in terms of language style, the target model is used to generate the dialogue content that is most suitable for the first target user, and the dialogue content includes a detailed introduction to the target product, which improves user satisfaction and improves the quality of the dialogue content as a whole.

[0091] Optionally, after inputting the first prompt information and the identification information of the first target user into the target model, and generating, by the target model and according to the first prompt information, a dialogue content matching the dialogue personality information and the product requirement information, the method further comprises:

[0092] Creating a conversation set, the conversation set including a plurality of prompt messages and a plurality of conversation contents, wherein the prompt messages and the conversation contents in the created conversation set correspond one to one;

[0093] Acquire the conversation personality information and product demand information of the second target user, and generate second prompt information;

[0094] In the case where the second prompt information meets a preset condition, calling a dialog content in the dialog set that matches the second prompt information;

[0095] Among them, the preset condition is that there is prompt information matching the second prompt information in the conversation set.

[0096] It should be understood that the above-mentioned conversation set can be stored in any form, for example, storing the above-mentioned conversation set in a database. In addition, the above-mentioned conversation set is mainly divided into two categories, one is prompt information, which includes the user's conversation personality information and product demand information, and the other is conversation content, wherein the prompt information and the conversation content are in a one-to-one correspondence.

[0097] It should be noted that, in some special cases, one prompt message may correspond to multiple conversation contents, that is, users matching the prompt message may send multiple conversation contents. Of course, multiple prompt messages may correspond to one conversation content, that is, users matching multiple prompt messages may use the same conversation content.

[0098] In this implementation scheme, a conversation set is first created. Each time the target model generates conversation content, the conversation content and the corresponding prompt information can be sent to the conversation set. In the subsequent process of generating conversation content, if there is prompt information in the conversation set that matches the current prompt information, it can be called directly from the conversation set, which reduces the process of conversation content generation and improves the efficiency of conversation content generation.

[0099] See also Figure 3 , Figure 3 is a structural diagram of a dialogue generation device provided by an embodiment of the present invention, such as Figure 3 As shown, the dialogue generating device 300 includes:

[0100] An acquisition module 301 is used to acquire conversation personality information and product demand information of a first target user, wherein the conversation personality information is used to represent the personality information of the first target user during the conversation, and the product demand information represents the purchase demand information of the first target user for a target product set;

[0101] A generating module 302, configured to generate first prompt information according to the dialogue personality information and the product requirement information, wherein the first prompt information is used to prompt a target model to generate dialogue content matching the dialogue personality information and the product requirement information, wherein the target model is a model used to generate dialogue information;

[0102] The first processing module 303 is used to input the first prompt information and the identification information of the first target user into the target model, and generate a dialogue content matching the dialogue personality information and the product demand information according to the first prompt information through the target model.

[0103] Optionally, the dialog personality information is used to represent at least one of the following:

[0104] Communication attitude information of the first target user during the conversation;

[0105] Communication emotion information of the first target user during the conversation;

[0106] The personality information of the first target user.

[0107] Optionally, the acquisition module 301 includes:

[0108] A collection unit, configured to collect historical data of the first target user, wherein the historical data includes: product information and historical conversation texts;

[0109] A determination unit, configured to determine the product demand information according to the product information;

[0110] The first processing unit is used to input the historical conversation text into the target model, and analyze the personality of the first target user based on the historical conversation text through the target model to obtain the conversation personality information.

[0111] Optionally, the generating module 302 includes:

[0112] generating first text information based on the conversation personality information, wherein the first text information represents a text describing the personality of the first target user;

[0113] generating second text information based on the product demand information, wherein the second text information represents a text describing the purchase demand of the first target user for the target product set;

[0114] The first text information and the second text information are merged to obtain the first prompt information.

[0115] Optionally, the first processing module 303 includes:

[0116] a second processing unit, configured to input the first prompt information and the identification information of the first target user into the target model;

[0117] The third processing unit is used to determine the language style type and the target product based on the text content of the first prompt information through the target model, and to generate a dialogue content matching the dialogue personality information and the product demand information based on the language style type and the product information of the target product, wherein the target product is a product in the target product set.

[0118] The dialogue generating device 300 further includes:

[0119] A creation module, used to create a conversation set, wherein the conversation set includes a plurality of prompt information and a plurality of conversation contents, wherein the prompt information and the conversation contents in the created conversation set correspond one to one;

[0120] A second processing module is used to obtain the conversation personality information and product demand information of the second target user and generate second prompt information;

[0121] A calling module, configured to call a dialog content in the dialog set that matches the second prompt information when the second prompt information meets a preset condition;

[0122] Among them, the preset condition is that there is prompt information matching the second prompt information in the conversation set.

[0123] The dialogue generation device provided in the embodiment of the present invention is capable of implementing each process of each embodiment of the above-mentioned dialogue generation method. The technical features correspond one to one and can achieve the same technical effect. To avoid repetition, they will not be described here.

[0124] It should be noted that the dialogue generating device in the embodiment of the present invention may be a device, or a component, an integrated circuit, or a chip in an electronic device.

[0125] The embodiment of the present invention further provides an electronic device, see Figure 4 , Figure 4 4 is a schematic diagram of a structure of an electronic device provided by the present invention, the electronic device includes a memory 401, a processor 402 and a program or instruction stored in the memory 401 and running thereon, and when the program or instruction is executed by the processor 402, it can be realized Figure 1Any steps in the corresponding method embodiments and achieving the same beneficial effects will not be repeated here.

[0126] The processor 402 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a graphics processing unit (GPU).

[0127] Those skilled in the art will appreciate that all or part of the steps of implementing the above-mentioned embodiment method can be completed by hardware associated with program instructions, and the program can be stored in a readable medium.

[0128] The embodiment of the present invention further provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above Figure 1 Any steps in the corresponding dialogue generation method embodiment can achieve the same technical effect, and will not be repeated here to avoid repetition. The storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0129] The terms "first", "second" etc. in the embodiments of the present invention are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. In addition, the terms "include" and "have" and any variation thereof are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment. In addition, "and / or" is used in the present application to represent at least one of the connected objects, such as A and / or B and / or C, indicating that A alone, B alone, C alone, and A and B all exist, B and C all exist, A and C all exist, and 7 situations in which A, B and C all exist.

[0130] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0131] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a second terminal device, etc.) to execute the methods of each embodiment of the present application.

[0132] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for generating a dialogue, characterized in that: include: Acquire conversation personality information and product demand information of the first target user, wherein the conversation personality information is used to represent the personality information of the first target user during the conversation, and the product demand information represents the purchase demand information of the first target user for the target product set; Generate first prompt information according to the dialogue personality information and the product requirement information, wherein the first prompt information is used to prompt a target model to generate dialogue content matching the dialogue personality information and the product requirement information, wherein the target model is a model used to generate dialogue information; The first prompt information and the identification information of the first target user are input into the target model, and the target model generates a dialogue content matching the dialogue personality information and the product demand information according to the first prompt information.

2. The method for generating a dialogue according to claim 1, characterized in that: The dialogue personality information is used to represent at least one of the following: Communication attitude information of the first target user during the conversation; Communication emotion information of the first target user during the conversation; The personality information of the first target user.

3. The method for generating a dialogue according to claim 1, characterized in that: The obtaining of the conversation personality information and product demand information of the first target user includes: Collecting historical data of the first target user, the historical data including: product information and historical conversation texts; Determining the product demand information according to the product information; The historical conversation text is input into the target model, and the personality of the first target user is analyzed based on the historical conversation text by the target model to obtain the conversation personality information.

4. The method for generating a dialogue according to claim 3, characterized in that: The generating the first prompt information according to the dialogue personality information and the product demand information includes: generating first text information based on the conversation personality information, wherein the first text information represents a text describing the personality of the first target user; generating second text information based on the product demand information, wherein the second text information represents a text describing the purchase demand of the first target user for the target product set; The first text information and the second text information are merged to obtain the first prompt information.

5. The method for generating a dialogue according to claim 4, characterized in that: The step of inputting the first prompt information and the identification information of the first target user into the target model, and generating a dialog content matching the dialog personality information and the product requirement information according to the first prompt information through the target model, includes: inputting the first prompt information and the identification information of the first target user into the target model; The target model determines the language style type and the target product based on the text content of the first prompt information, and generates a dialogue content matching the dialogue personality information and the product demand information based on the language style type and the product information of the target product, wherein the target product is a product in the target product set.

6. The method for generating a dialogue according to claim 5, characterized in that: After inputting the first prompt information and the identification information of the first target user into the target model, and generating the dialogue content matching the dialogue personality information and the product requirement information according to the first prompt information through the target model, the method further includes: Creating a conversation set, the conversation set including a plurality of prompt messages and a plurality of conversation contents, wherein the prompt messages and the conversation contents in the created conversation set correspond one to one; Acquire the conversation personality information and product demand information of the second target user, and generate second prompt information; In the case where the second prompt information meets a preset condition, calling a dialog content in the dialog set that matches the second prompt information; Among them, the preset condition is that there is prompt information matching the second prompt information in the conversation set.

7. A dialogue generation device, characterized in that: include: An acquisition module, used to acquire conversation personality information and product demand information of a first target user, wherein the conversation personality information is used to represent the personality information of the first target user during the conversation, and the product demand information represents the purchase demand information of the first target user for a target product set; A generating module, configured to generate first prompt information according to the dialogue personality information and the product requirement information, wherein the first prompt information is used to prompt a target model to generate dialogue content matching the dialogue personality information and the product requirement information, wherein the target model is a model used to generate dialogue information; The first processing module is used to input the first prompt information and the identification information of the first target user into the target model, and generate a dialogue content matching the dialogue personality information and the product demand information according to the first prompt information through the target model.

8. The dialog generation device according to claim 7, characterized in that: The dialogue personality information is used to represent at least one of the following: Communication attitude information of the first target user during the conversation; Communication emotion information of the first target user during the conversation; The personality information of the first target user.

9. The dialog generation device according to claim 7, characterized in that: The acquisition module comprises: A collection unit, configured to collect historical data of the first target user, wherein the historical data includes: product information and historical conversation texts; A determination unit, configured to determine the product demand information according to the product information; The first processing unit is used to input the historical conversation text into the target model, and analyze the personality of the first target user based on the historical conversation text through the target model to obtain the conversation personality information.

10. The dialog generation device according to claim 9, characterized in that: The generation module comprises: generating first text information based on the conversation personality information, wherein the first text information represents a text describing the personality of the first target user; generating second text information based on the product demand information, wherein the second text information represents a text describing the purchase demand of the first target user for the target product set; The first text information and the second text information are merged to obtain the first prompt information.

11. The dialog generation device according to claim 10, characterized in that: The processing module comprises: a second processing unit, configured to input the first prompt information and the identification information of the first target user into the target model; The third processing unit is used to determine the language style type and the target product based on the text content of the first prompt information through the target model, and to generate a dialogue content matching the dialogue personality information and the product demand information based on the language style type and the product information of the target product, wherein the target product is a product in the target product set.

12. The dialog generation device according to claim 11, characterized in that: The dialogue generating device further comprises: A creation module, used to create a conversation set, wherein the conversation set includes a plurality of prompt information and a plurality of conversation contents, wherein the prompt information and the conversation contents in the created conversation set correspond one to one; A second processing module is used to obtain the conversation personality information and product demand information of the second target user and generate second prompt information; A calling module, configured to call a dialog content in the dialog set that matches the second prompt information when the second prompt information meets a preset condition; Among them, the preset condition is that there is prompt information matching the second prompt information in the conversation set.

13. An electronic device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps in the dialog generation method as claimed in any one of claims 1 to 6.

14. A readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps in the dialog generation method according to any one of claims 1 to 6 are implemented.