Dialogue generation method and device, equipment and storage medium

By identifying and predicting uninquired business points in the conversation and generating the following text of the conversation, the problem of uncontrollable dialogue in online consultation is solved, and the controlled development of dialogue and user screening is realized, and efficiency and quality are improved.

CN119088909APending Publication Date: 2024-12-06BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410458778.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-16
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

In the online consultation scenario, the existing neural network model cannot conduct controlled dialogues based on the needs of the product/service provider, resulting in the inability to effectively explore user needs, increase subsequent contact costs, and it is difficult to filter users who do not meet the business scope.

Method used

By identifying the inquired and uninquired business points in the above conversation, predicting the business points to be asked, and generating the following dialogue based on the business points, the controlled development of the dialogue is achieved to meet the needs of dialogue participants.

Benefits of technology

It realizes the controllable dialogue during the dialogue process, meets the needs of dialogue participants, improves the quality and efficiency of dialogue, saves customer service costs, and effectively screens target users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088909A_ABST
    Figure CN119088909A_ABST
Patent Text Reader

Abstract

The invention provides a dialogue generation method and device, equipment and a storage medium, and relates to the technical field of artificial intelligence, in particular to the technical field of neural network models, generation models, dialogue models and the like. According to the specific implementation scheme, the method comprises the following steps: identifying inquired service points and uninquired service points according to a dialogue text; predicting a service point to be inquired by using the service point which is not inquired and the text of the dialogue; and based on the business point to be inquired, generating a dialogue text. According to the method and the device, the subsequent dialogues can be controllably developed according to the generated dialogue content, and the requirements of dialogue participants are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to technical fields such as neural network models, generation models, and dialogue models. Background Art

[0002] In online consultation scenarios, neural network models can be used as artificial intelligence (AI) customer service; pre-trained neural network models can be used to communicate with users instead of product / service providers. This type of dialogue is uncontrollable and cannot be conducted based on the needs of product / service providers. Summary of the invention

[0003] The present disclosure provides a dialogue generation method, apparatus, device and storage medium.

[0004] According to one aspect of the present disclosure, a method for generating a dialogue is provided, comprising:

[0005] Based on the conversation context, identify the business points that have been asked and the business points that have not been asked;

[0006] Using the unasked business point and the conversation context, predicting the business point to be asked; and,

[0007] Based on the business point to be inquired, a dialogue context is generated.

[0008] According to another aspect of the present disclosure, a model training method is provided, comprising:

[0009] Acquire first training data, where the first training data includes a first conversation sample and a label corresponding to the first conversation sample, wherein the label corresponding to the first conversation sample includes a queried business point corresponding to the first conversation sample;

[0010] The first training data is used to train a business point recognition model, where the business point recognition model is used to determine the inquired business point by using the conversation context.

[0011] According to another aspect of the present disclosure, a model training method is provided, comprising:

[0012] Acquire second training data, the second training data including a second dialogue sample and a plurality of optional business points of the second dialogue sample, and also including a label corresponding to the second dialogue sample, wherein the label corresponding to the second dialogue sample includes a business point to be inquired corresponding to the second dialogue sample and a reply speech corresponding to the second dialogue sample, and the business point to be inquired is one or more of the optional business points of the second dialogue sample;

[0013] The second training data is used to train a dialogue generation model, where the dialogue generation model is used to determine the business point to be inquired about by using the dialogue context and to generate the dialogue context.

[0014] According to another aspect of the present disclosure, there is provided a dialogue generating device, comprising:

[0015] An identification module, used to identify the business points that have been asked and the business points that have not been asked according to the conversation context;

[0016] The dialogue generation module is used to predict the business point to be asked by using the unasked business point and the previous dialogue context; and to generate the next dialogue context based on the business point to be asked.

[0017] According to another aspect of the present disclosure, a model training device is provided, comprising:

[0018] A second acquisition module is used to acquire first training data, where the first training data includes a first conversation sample and a label corresponding to the first conversation sample, wherein the label corresponding to the first conversation sample includes a queried business point corresponding to the first conversation sample;

[0019] The first training module is used to train a business point recognition model using the first training data, and the business point recognition model is used to determine the inquired business point using the conversation context.

[0020] According to another aspect of the present disclosure, a model training device is provided, comprising:

[0021] a third acquisition module, configured to acquire second training data, wherein the second training data includes a second dialogue sample and a plurality of optional business points of the second dialogue sample, and also includes a label corresponding to the second dialogue sample, wherein the label corresponding to the second dialogue sample includes a business point to be inquired corresponding to the second dialogue sample, and a replying speech corresponding to the second dialogue sample, and the business point to be inquired is one or more of the optional business points of the second dialogue sample;

[0022] The second training module is used to train a dialogue generation model using the second training data, and the dialogue generation model is used to determine the business point to be inquired about using the previous dialogue context and generate the next dialogue context.

[0023] According to another aspect of the present disclosure, there is provided a dialogue generation system, comprising:

[0024] A business point identification model is used to identify the business points that have been asked and the business points that have not been asked according to the conversation context;

[0025] The dialogue generation model is used to predict the business point to be asked by using the unasked business point and the previous dialogue context; and to generate the next dialogue context based on the business point to be asked.

[0026] According to another aspect of the present disclosure, there is provided an electronic device, comprising:

[0027] at least one processor; and

[0028] a memory communicatively connected to the at least one processor; wherein,

[0029] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any method in the embodiments of the present disclosure.

[0030] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any method according to the embodiments of the present disclosure.

[0031] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which implements any method according to the embodiments of the present disclosure when executed by a processor.

[0032] The conversation generation method proposed in the present disclosure identifies the business points that have been asked about in the conversation content (i.e., the conversation context) that has already taken place, determines the business points that have not been asked, predicts the business points that will be asked, that is, predicts the content that is suitable for asking in the subsequent conversation; and generates the conversation context based on the business points that will be asked. In this way, in the conversation process, the subsequent conversation can be carried out in a controlled manner according to the content of the conversation that has already taken place, so as to meet the needs of the conversation participants (such as the commodity / service provider in the online consultation scenario).

[0033] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0035] Figure 1 is a schematic diagram of an application scenario according to an embodiment of the present disclosure;

[0036] Figure 2 is a flow chart of an implementation of a method for generating a dialogue according to an embodiment of the present disclosure;

[0037] Figure 3 is a schematic diagram of a process of generating dialogue content according to a dialogue generating method according to an embodiment of the present disclosure;

[0038] Figure 4 is a flow chart of an implementation of a training method according to an embodiment of the present disclosure;

[0039] Figure 5 is a flow chart of an implementation of a training method according to another embodiment of the present disclosure;

[0040] Figure 6 is a schematic diagram of an overall implementation of a method for generating a dialogue according to an embodiment of the present disclosure;

[0041] Figure 7 is a structural diagram of a dialog generation device 700 according to an embodiment of the present disclosure;

[0042] Figure 8 is a structural schematic diagram of a conversation generating device 800 according to another embodiment of the present disclosure;

[0043] Fig. 9 is a structural schematic diagram of a model training device 900 according to an embodiment of the present disclosure;

[0044] Fig.10 is a structural schematic diagram of a model training device 1000 according to an embodiment of the present disclosure;

[0045] Fig.11 is a structural diagram of a dialogue generation system 1100 according to an embodiment of the present disclosure;

[0046] Fig.12 A schematic block diagram of an example electronic device 1200 is shown that can be used to implement embodiments of the present disclosure. DETAILED DESCRIPTION

[0047] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0048] The "and / or" in the embodiments of the present disclosure indicates that there may be three relationships. For example, A and / or B may indicate the following three situations: A exists alone, A and B exist at the same time, and B exists alone. The term "at least one" herein indicates any combination of at least two of any one or more of a plurality of types. For example, at least one of A, B, and C may indicate any one or more elements selected from the set consisting of A, B, and C. The terms "first" and "second" herein refer to and distinguish between multiple similar technical terms, and do not mean to limit the order or to limit the meaning to only two. For example, the first feature and the second feature refer to two types / two features. The first feature may be one or more, and the second feature may also be one or more.

[0049] In online consultation scenarios, a neural network model can be used as an AI customer service representative to communicate with users as a merchant or service provider. This type of communication is uncontrollable and cannot be based on the needs of the merchant or service provider.

[0050] For example, in a business marketing consultation scenario, a merchant / service provider has a conversation with a user. On the one hand, the conversation needs to meet the needs of the user, and on the other hand, it also needs to meet the conversion needs of the merchant / service provider. In the related art, a pre-trained conversation generation model is used to have a conversation with the user, and the merchant / service provider and the corresponding professional knowledge of the business are integrated into the conversation. Using a conversation generation model instead of manual customer service can reduce customer service costs and optimize marketing effects. However, during the conversation, the generated conversation content is uncontrollable, resulting in the inability to effectively and customizedly mine user needs according to the business characteristics of the merchant / service provider. In addition, the existing method cannot filter users who do not meet the business of the merchant / service provider, which increases the subsequent contact costs of the merchant / service provider; and the timing of merchant product / service recommendations and further contact with users is poor, which is easy to lose customer leads.

[0051] To this end, an embodiment of the present disclosure proposes a dialogue generation method to provide a solution to at least one of the above problems. Figure 1 is a schematic diagram of an application scenario according to an embodiment of the present disclosure, such as Figure 1 As shown, the application scenario diagram of the embodiment of the present disclosure may include a client 110 and a server 120, including multiple clients 110. Each client 110 and the server 120 can communicate through any type of wired or wireless network. The user sends the conversation content to the server 120 through the client 110, and the conversation content can be sent in multiple forms such as text or voice. The server 120 automatically conducts a conversation with the user; in the process of generating the conversation content, the server 120 adopts the conversation generation method proposed in the embodiment of the present disclosure.

[0052] Figure 2 is a flow chart of an implementation of a method for generating a dialogue according to an embodiment of the present disclosure, comprising:

[0053] S210, identifying the business points that have been asked and the business points that have not been asked according to the conversation context;

[0054] S220, predicting the business point to be inquired about by using the business point that has not been inquired about and the previous context of the conversation; and

[0055] S230: Generate a conversation context based on the business point to be inquired.

[0056] The dialogue generation method proposed in the embodiment of the present disclosure can be used in the fields of business, public services, etc., for automatically conducting dialogues with users. During the dialogue process, the questions, needs, suggestions, etc. raised by the user are answered, and the role of guiding the dialogue is played. Using the dialogue generation method proposed in the embodiment of the present disclosure, during the dialogue process, the business points that have been asked about the content of the dialogue that has already occurred (i.e., the context of the dialogue) are identified, and the business points that have not been asked are determined, and the content that is suitable for asking in the subsequent dialogue (i.e., the business points that will be asked) is predicted; and the context of the dialogue is generated based on the content that is suitable for asking in the subsequent dialogue, so as to realize the controlled development of the dialogue during the dialogue process and meet the needs of the dialogue participants. The "dialogue participants" here include at least the party that uses the dialogue generation method proposed in the embodiment of the present disclosure to conduct an automatic dialogue with the user.

[0057] The dialogue generation method proposed in the embodiment of the present disclosure can be applied to a variety of fields and scenarios. Taking the application in the commercial marketing consulting scenario as an example, in the commercial marketing consulting scenario, the product / service provider uses the dialogue generation method proposed in the embodiment of the present disclosure to automatically communicate with the user, thereby replacing manual customer service, saving labor costs, and guiding the direction and content of the dialogue based on the needs of the product / service provider.

[0058] In some implementations, a set of business points corresponding to the dialogue participants may be preset, and the set of business points may include a plurality of optional business points.

[0059] The business point set corresponding to the dialogue participant can be configured by the dialogue participant independently, or by the online service system according to the needs of the dialogue participant; wherein the online service system is a system that uses the dialogue generation method proposed in the embodiment of the present disclosure to automatically dialogue with the user and provide services to the user. The business point set includes multiple optional business points. Taking commercial marketing consultation as an example, the business point set includes the services that can be provided by the corresponding dialogue participant (i.e., the commodity / service provider), the dialogue direction guidance that the dialogue participant needs to conduct during the dialogue process, etc.

[0060] For example, an art training institution provides art training for children. The optional business points included in the business point set corresponding to the art training institution may include: asking the user about the intended course, asking the user about the purpose of learning, asking the user about the age, introducing the applicable age of the course, introducing the course content, asking the user about contact information, etc. The online service system pre-saves the business point set corresponding to one or more dialogue participants (i.e., commodity / service providers), and the users of each dialogue participant (i.e., commodity / service provider) respectively have a dialogue with the online service system. After receiving the user's dialogue content, the online service system automatically conducts a dialogue with the user based on the dialogue content and other necessary information of the online service (such as the identifier of the commodity / service provider, user ID, dialogue identifier, etc.). During the dialogue process, the business point set corresponding to the dialogue participant is used to determine the business points that have been asked and the business points that have not been asked from the dialogue context, and generate the dialogue context based on the business points that have not been asked.

[0061] In some implementations, a pre-trained business point recognition model may be used to recognize the business points that have been asked and the business points that have not been asked corresponding to the conversation context, that is, to perform the above step S210. Further, a pre-trained conversation generation model may be used to generate a conversation context based on the business points that have not been asked, that is, to perform the above steps S220 and S230. The business point recognition model or the conversation generation model may be implemented using a generation model.

[0062] Figure 3 FIG. 1 is a schematic diagram of a process of generating a conversation content according to a conversation generating method according to an embodiment of the present disclosure. Figure 3 As shown in Figure 1, the dialogue content generation process includes the following stages:

[0063] Phase 1:

[0064] The online service system receives the conversation content (i.e., the conversation context) input by the user, determines the conversation participants (e.g., the product / service provider that the user requests to have a conversation with), and obtains the business point set corresponding to the conversation participants, which includes multiple optional business points.

[0065] Taking the business marketing consulting scenario as an example, in this stage, the personalized business points configured by the product / service provider are loaded, which can be changed by the product / service provider independently to achieve the purpose of limiting the results of the reply script generation. For example, in the case of legal service merchants, the business points that need to be asked about the user may be "Is it a divorce by agreement or divorce by litigation", "Does it involve child support issues", "Does it involve property division issues", etc.

[0066] Phase 2:

[0067] The online service system identifies the inquired business points and the uninquired business points according to the conversation context and the business point set. The inquired business points and the uninquired business points may be optional business points in the business point set.

[0068] In some implementations, a pre-trained business point recognition model is used to identify the business points that have been asked and the business points that have not been asked. For example, the conversation context and the business point set are input into the pre-trained business point recognition model to obtain the business points that have been asked corresponding to the conversation context; when the business points that have been asked include one or more optional business points in the business point set, the other optional business points in the business point set except the business points that have been asked are regarded as the business points that have not been asked.

[0069] Taking the business marketing consultation scenario as an example, when it is identified that the business points that have been asked include the optional business points of the dialogue participants (such as the product / service provider), it means that the user is the target user of the product / service provider, that is, the product / service asked by the user belongs to the business scope of the product / service provider; therefore, the optional business points that have not appeared in the conversation can be regarded as unasked business points, and the subsequent conversation can be continued based on the unasked business points. By determining the business points that have been asked and the business points that have not been asked based on the business point set, the accuracy of identifying business points can be improved.

[0070] Furthermore, the business point set may also include prohibited business points. When it is identified that the inquired business points include prohibited business points in the business point set, a preset conversation context is output. For example, in a commercial marketing consulting scenario, a prohibited business point may be a business scope that is not provided by the commodity / service provider. If it is identified that the inquired business point belongs to the business scope that is not provided by the commodity / service provider, it means that the user is not the target user of the commodity / service provider. At this time, a preset conversation context may be generated, such as a catch-all conversation content, to end the current conversation, thereby screening target users and improving the effect and efficiency of the conversation.

[0071] For example, in a business marketing consulting scenario, the business points that have been asked and those that have not been asked can be identified online based on the context of the conversation and all the business points of the product / service provider, and it can be determined whether the business points that have been asked are in line with the business scope of the merchant. For example, if the merchant's business is overseas study services, but the user's purpose of going abroad is tourism, then the bottom-line script will be directly returned for filtering to save subsequent customer service costs.

[0072] It can be seen that this process can not only effectively screen target users, but also conduct conversations in a controlled manner, making the entire conversation process more efficient.

[0073] Phase 3:

[0074] The online service system predicts the business point to be inquired based on the previous conversation and the business point not inquired, and generates the following conversation based on the previous conversation and the business point to be inquired. The business point to be inquired may include one or more business points among the business points not inquired.

[0075] In some implementations, a pre-trained dialogue generation model is used to predict the business point to be asked and generate the dialogue context. For example, the business point that has not been asked and the previous dialogue context are input into the pre-trained dialogue generation model, and the dialogue generation model predicts the business point to be asked. It can be seen that the business point to be asked belongs to the optional business point in the business point set of the dialogue participants; then the dialogue generation model generates the corresponding dialogue context based on the previous dialogue context and the business point to be asked.

[0076] After the conversation context is generated, the conversation context is sent to the client used by the user, and the new conversation content sent by the user through the client is further received; at this time, the original conversation context is expanded into a new conversation context, that is, the new conversation context contains the original conversation context, the newly generated conversation context, and the received conversation content. After the conversation context is expanded, the second stage is returned to the expanded conversation context, that is, the business point is re-identified based on the expanded conversation context, and a new conversation context is generated. In the specific implementation process, the business point identification and the generation of the conversation context can be based on all the content in the expanded conversation context, or the business point identification and the generation of the conversation context can be based on the newly added content in the expanded conversation context.

[0077] In summary, the dialogue generation method proposed in the embodiment of the present disclosure can add a business point recognition model to the dialogue in the online service system, identify the business points that have appeared in the dialogue, and preliminarily screen users that meet the business scope based on the business points that have appeared, and filter out customers that do not meet the business scope, saving customer service costs. In addition, the embodiment of the present disclosure adds behavior and business prediction functions to the dialogue generation model, which can predict the best behavior that should be performed at present (i.e., predict the business point to be inquired about), so as to more reasonably perform business point inquiries, product recommendations, and contact information requests. The function of generating reply words based on behavior and business is added to the dialogue generation model, which realizes the function of generating controllable words based on reasonable behavior, and can better and faster mine user needs that are useful to the commodity / service provider, and improve the quality of the dialogue. In other fields besides commercial marketing consulting, similar effects can also be achieved, so as to achieve controlled automatic dialogue and improve dialogue efficiency and effect.

[0078] The disclosed embodiment also proposes a model training method, which is used to train the above-mentioned business point recognition model. The purpose of the business point recognition model is to identify which business points have appeared in the conversation context based on the business points provided by the commodity / service provider. If the user's needs do not meet the business points of the commodity / service provider, they can be filtered; if the user's needs meet the business points of the commodity / service provider, the unasked business points are determined and used as the input content of the conversation generation model, so that the conversation generation model can limit the generation of reply words according to the business scope.

[0079] Figure 4 : is a flowchart of an implementation of a training method according to an embodiment of the present disclosure. The training method can be used to train a service point recognition model. The training method includes the following steps:

[0080] S410, obtaining first training data, where the first training data includes a first conversation sample and a label corresponding to the first conversation sample, wherein the label corresponding to the first conversation sample includes a queried business point corresponding to the first conversation sample;

[0081] S420: Use the first training data to train a business point recognition model, where the business point recognition model is used to determine the inquired business point using the conversation context.

[0082] In some implementations, a generative big model may be used to extract corresponding business points from a merchant's conversation history records, the conversation history records may be used as a first conversation sample, and the business points extracted by the generative big model may be used as labels corresponding to the first conversation sample.

[0083] In other implementations, the business points corresponding to the merchant's conversation history records may be manually annotated, and the conversation history records may be used as the first conversation sample, and the manually annotated business points may be used as labels corresponding to the first conversation sample.

[0084] In some examples, the first conversation sample input to the business point recognition model includes conversation content and related questions, such as:

[0085] (I) Content of the dialogue:

[0086] User: Apply for postgraduate study at a university in the province.

[0087] Customer Service: OK, what year are we in now?

[0088] User: I have graduated from university and am preparing for the exam for the second time. I am now in my hometown.

[0089] (II) Questions:

[0090] 1. Whether to apply to schools in this province - Candidate answers: "Yes, No, Other, Unknown"

[0091] 2. Are you applying for an art major? - Answer options: "Yes, No, Other, Unknown"

[0092] 3. Intended education - Candidate answers: "Secondary school, Bachelor's degree, Master's degree, Doctorate, Other, Unknown"

[0093] 4. Intended major - no restrictions on candidate answers, answer "unknown" if no results are found

[0094] The tags corresponding to the first dialogue sample include:

[0095] 1. "Are you applying for a school in this province?": "Yes"

[0096] 2. "Are you applying for an art major?": "Unknown"

[0097] 3. "Intended Education": "Master's Degree",

[0098] 4. “Intended major”: “Unknown”

[0099] The first conversation sample is input into the business point recognition model to be trained, and the business point recognition model to be trained outputs the business point corresponding to the first conversation sample predicted by it, and the business point output by the business point recognition model is compared with the label of the first conversation sample, and the parameters of the business point recognition model to be trained are adjusted according to the comparison result to realize the training of the business point recognition model.

[0100] The disclosed embodiment also proposes a model training method, which is used to train the above-mentioned dialogue generation model. The dialogue generation model incorporates the ability to predict the business points that should be asked to the user and generate a speech reply based on the business points that should be asked, thereby solving the problem that the generation result is uncontrollable and cannot be controlled according to the business points customized by the product / service provider.

[0101] Figure 5 is a flowchart of an implementation of a training method according to another embodiment of the present disclosure. The training method can be used to train a dialogue generation model. The training method includes the following steps:

[0102] S510, obtaining second training data, the second training data including a second dialogue sample and a plurality of optional business points of the second dialogue sample, and also including a label corresponding to the second dialogue sample, wherein the label corresponding to the second dialogue sample includes a business point to be inquired corresponding to the second dialogue sample, and a reply script corresponding to the second dialogue sample, and the business point to be inquired is one or more of the optional business points of the second dialogue sample;

[0103] S520: Use the second training data to train a dialogue generation model, where the dialogue generation model is used to use the previous dialogue context to determine the business point to be inquired about and generate the next dialogue context.

[0104] The overall workflow of the dialogue generation model includes: the dialogue generation model receives the dialogue context and the unasked business points (i.e. the aforementioned "optional business points", i.e. all business points that need to be asked) identified by the business point recognition model, predicts the business point that should be asked at present (i.e. the aforementioned "business point to be asked") based on the dialogue context and the unasked business points; and generates the dialogue context based on the business point to be asked. The application of this process achieves the purpose of generating controllable dialogue content according to the user's business points.

[0105] As can be seen from the above workflow, the dialogue generation model mainly incorporates two functions. The first function is business point prediction, and the second function is to generate response words based on the business point that should be asked at the moment.

[0106] In some implementations, a generative big model can be used to determine the business point that should be asked about currently and the conversation context based on the merchant's conversation history records and the business points that have not been asked about. The conversation history records are used as the second conversation sample, and the business point that should be asked about currently and the conversation context are used as the labels corresponding to the second conversation sample.

[0107] In other implementations, the business point that should be asked and the conversation context can be determined manually based on the merchant's conversation history records and the business points that have not been asked. The conversation history records are used as the second conversation sample, and the manually determined business point that should be asked and the conversation context are used as the label corresponding to the second conversation sample.

[0108] In some examples, when training a dialogue generation model, for a business point prediction function, the input to the dialogue generation model includes the dialogue content and all business points that need to be asked, for example:

[0109] (I) Content of the dialogue:

[0110] User: What schools or majors are there in this city’s three-plus-two technical secondary schools?

[0111] Customer Service: Hello, I am a teacher from the Admissions Office. Do you want to know more about the school or major? If you want to know more quickly or it is inconvenient to type, you can leave your contact information and we will contact you as soon as possible. If you want to consult about any issues, you can ask me directly.

[0112] User: I want to know about the school’s majors.

[0113] Customer Service: Are you studying for yourself, or are you consulting for someone else?

[0114] User: My girl.

[0115] Customer Service: OK, then how old is your girl now? What is her educational level?

[0116] User: Junior high school.

[0117] (II) All business points that require inquiry

[0118] Confirm whether it is the real person;

[0119] Ask the user about their intended major;

[0120] Ask users about their learning goals;

[0121] Ask about age;

[0122] Introduce the major;

[0123] Introduce the course.

[0124] The tags corresponding to the above input content include: recommending majors based on age and asking about intended majors.

[0125] When training the business point prediction function of the dialogue generation model, the above dialogue content and all business points that need to be inquired are input into the dialogue generation model to be trained, and the dialogue generation model to be trained outputs its predicted business point that should be currently inquired, and the business point that should currently be inquired output by the dialogue generation model is compared with the label of the dialogue content, and the parameters of the dialogue generation model to be trained are adjusted according to the comparison result to realize the training of the business point prediction function of the dialogue generation model.

[0126] The above describes the training method for the business point prediction function of the dialogue generation model. When performing business point prediction, you can also incorporate prediction capabilities such as product / service recommendations and recording contact information.

[0127] In some examples, when training a dialogue generation model, for the function of generating a reply based on the business point that should be asked at the moment, the input to the dialogue generation model includes the dialogue content and the business point that should be asked at the moment, for example:

[0128] (I) Content of the dialogue:

[0129] User: Check the admission brochure of vocational and technical schools.

[0130] Customer Service: Hello classmate, are you a junior high school student or a technical secondary school / high school graduate?

[0131] User: Junior high school.

[0132] (II) Business points that should be inquired at present: Inquiry about the intended profession

[0133] The labels corresponding to the above input content include:

[0134] A: OK, then which major are you interested in? We can provide you with more information and help.

[0135] When training the function of the dialogue generation model to generate reply words according to the business point that should be currently asked, the above dialogue content and the business point that should be currently asked are input into the dialogue generation model to be trained, and the dialogue generation model to be trained outputs its predicted reply words, and the reply words output by the dialogue generation model are compared with the label corresponding to the input content, and the parameters of the dialogue generation model to be trained are adjusted according to the comparison result to realize the training of the function of generating reply words according to the business point that should be currently asked.

[0136] Figure 6 It is a schematic diagram of the overall implementation of the dialogue generation method according to an embodiment of the present disclosure. The left side of the schematic diagram is the offline training process of the dialogue generation model and the business point recognition model, and the right side is the online dialogue process. Figure 6 The example shown applies to a commercial marketing consulting business.

[0137] exist Figure 6 In the example shown, the business points in the conversation are identified based on the big model, and the conversation and the business points are used as the training model of the business point identification model to train the business point identification model. Multiple tasks are integrated into the conversation generation model, such as the reply speech generation task, the merchant behavior prediction generation task (such as predicting the business point to be asked), and the controllable reply speech generation task based on the merchant behavior (such as generating the conversation text based on the business point to be asked). When training the conversation generation model, the merchant marketing conversation data is used to train the reply speech generation task of the conversation generation model; based on the big model, the merchant behavior (such as business points, etc.) is generated according to the historical conversation, including predicting the next merchant behavior according to the conversation, and generating the next reply speech according to the behavior; and the data of predicting the next merchant text according to the conversation is used as training data for training the merchant behavior prediction function of the conversation generation model; and the data of generating the next reply speech according to the behavior is used as training data for training the controllable reply speech generation function based on the merchant behavior of the conversation generation model.

[0138] After the training of the business point recognition model and the dialogue generation model is completed, the business point recognition model and the dialogue generation model realize automatic dialogue with the user. Figure 6As shown in the process on the right, in the online dialogue process, user dialogue input is received to obtain the merchant's optional business points. After that, the pre-trained business point recognition model is used to determine the business points that have been asked and the business points that have not been asked based on the dialogue context and the merchant's optional business points. Invalid user judgment is performed based on the business points that have been asked. For example, if the business point that has been asked belongs to the merchant's invalid business point, the user is judged as an invalid user, a fixed script is returned, and the dialogue ends; if the business point that has been asked does not belong to the merchant's invalid business point, the pre-trained dialogue generation model is used to predict the merchant's next behavior based on the unasked business point, and a reply script is generated based on the behavior.

[0139] It can be seen that the dialogue generation method proposed in the embodiment of the present disclosure can use a system composed of a business point recognition model and a dialogue generation model to conduct automatic dialogue with users. In this solution, the generative dialogue is innovated, and a new prediction function is added based on the above prediction of the behavior that the dialogue generation model should currently perform (asking about business points, replying to users, using the original speech ability, etc.). In addition, the generative dialogue process is innovated, and a new function is added to limit the current speech reply generation content based on behavior. In the automatic dialogue process, the business point recognition model is introduced, which can identify the business points that have been asked, and judge invalid users based on the business points that have been asked.

[0140] The disclosed embodiment also provides a dialogue generation device, Figure 7 is a structural diagram of a dialog generation device 700 according to an embodiment of the present disclosure, comprising:

[0141] An identification module 710, for identifying the service points that have been asked and the service points that have not been asked according to the conversation context;

[0142] The dialogue generation module 720 is used to predict the business point to be asked by using the unasked business point and the previous dialogue context; and to generate the next dialogue context based on the business point to be asked.

[0143] Figure 8 is a structural diagram of a dialog generation device 800 according to another embodiment of the present disclosure. Figure 8 As shown, the dialog generation device 800 includes a recognition module 710 and a dialog generation module 720, and in some embodiments, further includes:

[0144] The first acquisition module 830 is used to acquire a service point set, where the service point set includes multiple optional service points.

[0145] In some implementations, the identification module 710 is used to:

[0146] Inputting the conversation context and the business point set into a pre-trained business point recognition model to obtain the queried business points corresponding to the conversation context;

[0147] In the case that the inquired service point includes one or more optional service points in the service point set, the other optional service points in the service point set except the inquired service point are used as the uninquired service points.

[0148] In some implementations, the service point set also includes prohibited service points;

[0149] The dialog generation module 720 is used to output a preset dialog context when the inquired service point includes a prohibited service point in the service point set.

[0150] In some implementations, the dialog generation module 720 is used to:

[0151] The unasked business point and the conversation context are input into a pre-trained conversation generation model, the conversation generation model predicts the business point to be asked, and the conversation generation model generates a corresponding conversation context based on the conversation context and the business point to be asked.

[0152] In some implementations, the first acquisition module 830 is used to:

[0153] Identify the dialogue participants;

[0154] Get the business point set corresponding to the conversation participant.

[0155] Fig. 9 is a schematic diagram of the structure of a model training device 900 according to an embodiment of the present disclosure, such as Fig. 9 As shown, in some embodiments, it also includes:

[0156] A second acquisition module 910 is used to acquire first training data, where the first training data includes a first conversation sample and a label corresponding to the first conversation sample, wherein the label corresponding to the first conversation sample includes a queried business point corresponding to the first conversation sample;

[0157] The first training module 920 is used to train a business point recognition model using the first training data, and the business point recognition model is used to determine the queried business point using the conversation context.

[0158] Fig.10 is a schematic diagram of the structure of a model training device 1000 according to an embodiment of the present disclosure, such as Fig.10 As shown, in some embodiments, it also includes:

[0159] The third acquisition module 1010 is used to acquire second training data, wherein the second training data includes a second dialogue sample and a plurality of optional business points of the second dialogue sample, and also includes a label corresponding to the second dialogue sample, wherein the label corresponding to the second dialogue sample includes a business point to be inquired corresponding to the second dialogue sample and a replying speech corresponding to the second dialogue sample, and the business point to be inquired is one or more of the optional business points of the second dialogue sample;

[0160] The second training module 1020 is used to train a dialogue generation model using the second training data, where the dialogue generation model is used to determine the business point to be inquired about using the previous dialogue context and generate the next dialogue context.

[0161] Fig.11 is a structural diagram of a dialogue generation system 1100 according to an embodiment of the present disclosure, such as Fig.11 As shown, in some embodiments, it also includes:

[0162] A service point identification model 1110 is used to identify the service points that have been asked and the service points that have not been asked according to the conversation context;

[0163] The dialogue generation model 1120 is used to predict the business point to be asked by using the unasked business point and the previous dialogue context; and to generate the next dialogue context based on the business point to be asked.

[0164] In some implementations, the business point recognition model or the dialogue generation model is trained using the above-mentioned model training method.

[0165] For the description of specific functions and examples of each module and submodule of the device in the embodiment of the present disclosure, reference can be made to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.

[0166] In the technical solution disclosed in the present invention, the acquisition, storage and application of personal information of users involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0167] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0168] Fig.12A schematic block diagram of an example electronic device 1200 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0169] like Fig.12 As shown, the device 1200 includes a computing unit 1201, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1202 or a computer program loaded from a storage unit 1208 into a random access memory (RAM) 1203. In the RAM 1203, various programs and data required for the operation of the device 1200 can also be stored. The computing unit 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0170] A number of components in the device 1200 are connected to the I / O interface 1205, including: an input unit 1206, such as a keyboard, a mouse, etc.; an output unit 1207, such as various types of displays, speakers, etc.; a storage unit 1208, such as a disk, an optical disk, etc.; and a communication unit 1209, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1209 allows the device 1200 to exchange data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0171] The computing unit 1201 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1201 performs the various methods and processes described above, such as the dialogue generation method. For example, in some embodiments, the dialogue generation method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1208. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1200 via the ROM 1202 and / or the communication unit 1209. When the computer program is loaded into the RAM 1203 and executed by the computing unit 1201, one or more steps of the dialogue generation method described above may be performed. Alternatively, in other embodiments, the computing unit 1201 may be configured to perform the dialogue generation method in any other appropriate manner (e.g., by means of firmware).

[0172] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0173] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0174] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0175] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0176] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0177] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0178] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0179] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for generating a dialogue, include: Based on the conversation context, identify the business points that have been asked and the business points that have not been asked; using the unasked business points and the conversation context to predict the business points to be asked; and, Based on the business point to be inquired, a dialogue context is generated.

2. The method according to claim 1, before identifying the service points that have been asked and the service points that have not been asked according to the conversation context, include: A business point set is obtained, where the business point set includes multiple optional business points.

3. The method according to claim 2, in, The step of identifying the inquired service points and the uninquired service points according to the conversation context includes: Inputting the conversation context and the business point set into a pre-trained business point recognition model to obtain the queried business point corresponding to the conversation context; In the case that the inquired service points include one or more optional service points in the service point set, other optional service points in the service point set except the inquired service points are used as the uninquired service points.

4. The method according to claim 3, in, The service point set also includes prohibited service points; The method further comprises: In the case that the inquired service points include prohibited service points in the service point set, a preset dialog context is output.

5. The method according to any one of claims 1 to 4, in, The method uses the unasked business points and the conversation context to predict the business points to be asked; Based on the business point to be inquired, generate the following dialogue context, including: The unasked business point and the conversation context are input into a pre-trained conversation generation model, the conversation generation model predicts the business point to be asked, and the conversation generation model generates a corresponding conversation context based on the conversation context and the business point to be asked.

6. The method according to claim 2, in, The obtaining of the service point set includes: Identify the dialogue participants; Obtain the business point set corresponding to the conversation participant.

7. A model training method, include: Acquire first training data, where the first training data includes a first conversation sample and a label corresponding to the first conversation sample, wherein the label corresponding to the first conversation sample includes a queried business point corresponding to the first conversation sample; The first training data is used to train a business point recognition model, where the business point recognition model is used to determine the inquired business point by using the conversation context.

8. A model training method, include: Acquire second training data, the second training data including a second dialogue sample and a plurality of optional business points of the second dialogue sample, and also including a label corresponding to the second dialogue sample, wherein the label corresponding to the second dialogue sample includes a business point to be inquired corresponding to the second dialogue sample, and a reply speech corresponding to the second dialogue sample, and the business point to be inquired is one or more of the optional business points of the second dialogue sample; The second training data is used to train a dialogue generation model, where the dialogue generation model is used to determine the business point to be inquired about by using the previous dialogue context and generate the next dialogue context.

9. A dialogue generating device, include: An identification module, used to identify the business points that have been asked and the business points that have not been asked according to the conversation context; The dialogue generation module is used to predict the business point to be asked by using the unasked business point and the previous dialogue context; and to generate the next dialogue context based on the business point to be asked.

10. The device according to claim 9, further comprising: include: The first acquisition module is used to acquire a service point set, where the service point set includes a plurality of optional service points.

11. The device according to claim 10, in, The identification module is used for: Inputting the conversation context and the business point set into a pre-trained business point recognition model to obtain the queried business point corresponding to the conversation context; In the case that the inquired service points include one or more optional service points in the service point set, other optional service points in the service point set except the inquired service points are used as the uninquired service points.

12. The device according to claim 11, in, The service point set also includes prohibited service points; The dialogue generation module is used to output a preset dialogue context when the inquired service point includes a prohibited service point in the service point set.

13. The device according to any one of claims 9 to 12, in, The dialogue generation module is used for: The unasked business point and the conversation context are input into a pre-trained conversation generation model, the conversation generation model predicts the business point to be asked, and the conversation generation model generates a corresponding conversation context based on the conversation context and the business point to be asked.

14. The device according to claim 9, in, The first acquisition module is used for: Identify the dialogue participants; Obtain the business point set corresponding to the conversation participant.

15. A model training device, include: A second acquisition module is used to acquire first training data, where the first training data includes a first conversation sample and a label corresponding to the first conversation sample, wherein the label corresponding to the first conversation sample includes a queried business point corresponding to the first conversation sample; The first training module is used to train a business point recognition model using the first training data, and the business point recognition model is used to determine the inquired business point using the conversation context.

16. A model training device, include: A third acquisition module is used to acquire second training data, wherein the second training data includes a second dialogue sample and a plurality of optional business points of the second dialogue sample, and also includes a label corresponding to the second dialogue sample, wherein the label corresponding to the second dialogue sample includes a business point to be inquired corresponding to the second dialogue sample, and a reply speech corresponding to the second dialogue sample, and the business point to be inquired is one or more of the optional business points of the second dialogue sample; The second training module is used to train a dialogue generation model using the second training data, wherein the dialogue generation model is used to determine the business point to be inquired about using the previous dialogue context and generate the next dialogue context.

17. A dialogue generation system, include: A business point identification model is used to identify the business points that have been asked and the business points that have not been asked according to the conversation context; The dialogue generation model is used to predict the business point to be asked by using the unasked business point and the previous dialogue context; and to generate the next dialogue context based on the business point to be asked.

18. The system according to claim 17, in, The business point recognition model is trained using the training method described in claim 7.

19. The system according to claim 17, in, The dialogue generation model is trained using the training method described in claim 8.

20. An electronic device, include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.

21. A non-transitory computer-readable storage medium storing computer instructions, in, The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.

22. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Telephone robot active inquiry system with process

    CN110069605A

  • Psychological scale recommendation method and device based on artificial intelligence, and storage medium

    CN114944219A

  • Human-computer interaction method, device, equipment and medium

    CN115082093A

  • Dialogue data generation method and device, model training method and device, equipment and medium

    CN115905496A

  • Multi-round dialogue method and device, electronic equipment, storage medium and program product

    CN116467421A