Dialogue method and device
By utilizing user intention prediction and string accumulation technology in intelligent customer service, the problem of users being unable to input complete information at once is solved, achieving efficient information collection and a better user experience.
Patent Information
- Application Number
- CN202111100914.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-18
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-09-18
AI Technical Summary
When existing intelligent customer service collects user information, it is difficult for users to input complete information at once, resulting in complex operations and poor experience. Users need to try to input complete information multiple times before entering subsequent conversations.
By obtaining the user's specific user intention in the previous round of dialogue, predicting the initial string fragments, and accumulating them with the string fragments in the current round of dialogue, the next round of dialogue content is generated based on the accumulated strings and dialogue strategies, and the content of the next round of dialogue is efficiently passed through multiple rounds. Interactively collect complete information step by step.
It simplifies user operations and improves the conversation experience, allowing users to efficiently and gradually input strings that match specific user intentions through multiple rounds of interaction, reducing the need for repeated input.
Smart Images

Figure CN113918690B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of intelligent technology, and more particularly to a dialogue method. One or more embodiments of this specification also relate to a dialogue device, a computing device, and a computer-readable storage medium. Background Art
[0002] In many scenarios of human-computer dialogue, such as restaurant ordering, ticket purchase, information query, etc., intelligent customer service needs to inquire about the user's user account, participant name, mobile phone number, ID number, etc. In the process of asking for this information, the intelligent customer service will require the user to enter complete information at one time through keystrokes or voice, such as the complete user account, complete name, complete mobile phone number, complete ID number, etc., and only after collecting complete information can the subsequent dialogue be entered.
[0003] However, in some cases, it is difficult for users to enter complete information at one time. As a result, when the current industry dialogue system collects information, users often need to enter the complete information very carefully at one time, or even try to enter the complete information at one time many times before the intelligent customer service can collect the complete information and enter the subsequent dialogue, resulting in complicated user operations and poor experience. Summary of the invention
[0004] In view of this, the embodiments of this specification provide a conversation method. One or more embodiments of this specification also relate to a conversation device, a computing device, and a computer-readable storage medium to solve the technical defects existing in the prior art.
[0005] According to a first aspect of an embodiment of the present specification, a conversation method is provided, comprising: obtaining a specific user intention in a user's previous conversation; obtaining an initial predicted character string fragment consistent with the specific user intention in the previous conversation based on the specific user intention; accumulating the character string fragment corresponding to the specific user intention contained in the current conversation with the initial predicted character string fragment to obtain an accumulated character string; and generating content for the next conversation based on the accumulated character string and the conversation strategy of the current conversation.
[0006] Optionally, after obtaining the initial predicted character string fragment that matches the specific user intention in the previous round of conversation according to the specific user intention, the method further includes: determining a verification condition for the character string fragment according to the specific user intention; and judging whether the accumulated character string is a character string fragment that matches the specific user intention according to the verification condition.
[0007] Optionally, generating the content of the next round of dialogue based on the accumulated character string and the dialogue strategy of the current round of dialogue includes: generating reply information using a candidate reply set corresponding to the dialogue strategy of the current round of dialogue; and sending the accumulated character string as part or all of the reply information to the user.
[0008] Optionally, the candidate response set is obtained in the following manner: presetting a dialogue logic corresponding to the specific user intention; obtaining a dialogue segment to be trained from any dialogue that has occurred; and using the dialogue segment to be trained to implement the dialogue logic to obtain the candidate response set.
[0009] Optionally, the specific user intends to provide a digital number.
[0010] According to the second aspect of the embodiments of this specification, there is provided a conversation device, comprising: a user intention acquisition module, configured to obtain a specific user intention in a user's last conversation. A number fragment acquisition module, configured to obtain an initial predicted string fragment that matches the specific user intention in the last conversation according to the specific user intention. A string tracking module, configured to accumulate the string fragments corresponding to the specific user intention contained in the current conversation with the initial predicted string fragments to obtain an accumulated string. A conversation strategy module, configured to generate the content of the next conversation according to the accumulated string and the conversation strategy of the current conversation.
[0011] According to a third aspect of an embodiment of the present specification, a computing device is provided, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions: obtaining a specific user intention in a user's previous round of dialogue; obtaining an initial predicted string segment that matches the specific user intention in the previous round of dialogue based on the specific user intention; accumulating the string segment corresponding to the specific user intention contained in the current round of dialogue with the initial predicted string segment to obtain an accumulated string; and generating the content of the next round of dialogue based on the accumulated string and the dialogue strategy of the current round of dialogue.
[0012] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the dialogue method described in any embodiment of this specification are implemented.
[0013] An embodiment of the present specification provides a conversation method, which obtains a specific user intent in a user's previous conversation, obtains an initial predicted character string fragment that matches the specific user intent in the previous conversation based on the specific user intent, accumulates the character string fragment corresponding to the specific user intent contained in the current conversation with the initial predicted character string fragment to obtain an accumulated character string, generates content for the next conversation based on the accumulated character string and the conversation strategy of the current conversation, interacts with the collected character string fragments in the conversation, and efficiently collects character strings that match the specific user intent step by step through multiple rounds of interaction, which is simple for users to operate and provides a better experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 is a flow chart of a conversation method provided by an embodiment of this specification;
[0015] Figure 2 This is a diagram of a dialogue interface provided by an embodiment of this specification;
[0016] Figure 3 This is a schematic diagram of a data set construction link provided by an embodiment of this specification;
[0017] Figure 4 This is a schematic diagram of the meaning of semantic tags provided by an embodiment of this specification;
[0018] Figure 5 It is a schematic diagram of a system architecture provided by an embodiment of this specification;
[0019] Figure 6 It is a schematic diagram of a system workflow provided by an embodiment of this specification;
[0020] Figure 7 It is a structural schematic diagram of a dialogue device provided by an embodiment of this specification;
[0021] Figure 8 is a structural schematic diagram of a conversation device provided by another embodiment of the present specification;
[0022] Fig. 9 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0023] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0024] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0025] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0026] First, the terms involved in one or more embodiments of this specification are explained.
[0027] Sequence models are deep learning models that can perform sequence modeling (e.g., recurrent neural network models, transformers).
[0028] Recurrent Neural Network: A neural network model for time series modeling that can calculate inputs with time series characteristics to complete classification or regression tasks.
[0029] In this specification, a conversation method is provided. This specification also relates to a conversation device, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
[0030] Figure 1 A flowchart of a dialogue method provided according to an embodiment of the present specification is shown, including steps 102 to 108.
[0031] Step 102: Obtain the specific user intention in the user's previous round of conversation.
[0032] For example, the input information of the user's previous round of conversation can be regarded as a sequence, and each word in the input information is the input of each step of the sequence model, which is input into the first sequence model based on deep learning to predict the specific user intention.
[0033] The method provided in the embodiments of this specification is not limited to the specific content of the specific user intention. For example, the specific user intention can be the provision of a digital number. Such as an ID number, an instant messaging account, a bank account, and the like. In this embodiment, in order to obtain the specific user intention in the user's previous round of conversation, when training the first training model, the first sequence model can be trained using training data containing the following user intention labels: inform number, change number, approve number, prepare to provide number, affirmative reply, negative reply, wait, inquiry signal, bad signal, normal signal, tone of voice continuation, inconvenient and / or end of conversation. Based on the richness of labels, the first sequence model can accurately obtain specific user intentions in complex conversations.
[0034] Step 104: obtaining an initial predicted character string segment that matches the specific user intention in the previous round of conversation according to the specific user intention.
[0035] For example, when the input information of the user's last round of conversation is input into the first sequence model based on deep learning, the user's intention is predicted and the initial predicted string segment that matches the specific user's intention is predicted. According to different specific user intentions, the string segment can be a numeric number segment such as a phone number or ID number, or a string segment containing numbers and letters such as a user account number, etc.
[0036] Step 106: The character string segments corresponding to the specific user intention contained in the current round of dialogue are accumulated with the initial predicted character string segments to obtain an accumulated character string.
[0037] For example, the input information of the user's current round of dialogue can be input into the first sequence model based on deep learning to predict the string segment corresponding to the specific user intention, and the string segment is accumulated with the initial predicted string segment to obtain an accumulated string. For example, taking number accumulation as an example, the rules for number accumulation may include: if the newly added segment is exactly the same as the old segment, it will not be added. For example: old 1**, new 1##-> accumulated 1##; if the adjacent parts of the newly added segment and the old segment contain more than 3 identical characters, the identical characters are deduplicated. For example, old 1**, new 1####-> accumulated 1####; in other cases, simply superimpose, for example, old 1**, new 1###-> accumulated 1**1###.
[0038] Step 108: Generate the content of the next round of dialogue according to the accumulated character string and the dialogue strategy of the current round of dialogue.
[0039] Since the method obtains the specific user intention in the user's previous round of dialogue, an initial predicted character string fragment that matches the specific user intention is obtained in the previous round of dialogue according to the specific user intention, the character string fragment corresponding to the specific user intention contained in the current round of dialogue is accumulated with the initial predicted character string fragment to obtain an accumulated character string, and the content of the next round of dialogue is generated according to the accumulated character string and the dialogue strategy of the current round of dialogue, and interaction is performed in the dialogue for the collected character string fragments, and the character strings that match the specific user intention are efficiently collected step by step through multiple rounds of interaction, which is simple for users to operate and provides a better experience.
[0040] Considering that the accumulated character strings may have errors or have not met the needs of specific user intentions, for example, the accumulated numbers lack digits, have extra digits, or are not the numbers required by the scene, in order to make the conversation content more in line with user needs, in one or more embodiments of this specification, after obtaining the initial predicted character string fragment that matches the specific user intention in the previous round of conversation according to the specific user intention, it also includes: determining the verification condition of the character string fragment according to the specific user intention; judging whether the accumulated character string is a character string fragment that matches the specific user intention according to the verification condition. If it matches, it is accumulated; if it does not match, a conversation content such as asking the user to confirm or modify can be generated.
[0041] For example, taking the specific user intention of providing a mobile phone number as an example, the verification conditions may include: determining whether the first 3 digits are "1XX"; determining whether the number of digits collected up to the current time has X digits more; determining whether the number of digits collected up to the current time has X digits less; determining whether the format of the collected number is legal (true or false), etc.
[0042] To facilitate the user's understanding and confirmation of the character strings accumulated by the system, in one or more embodiments of the present specification, generating the content of the next round of dialogue based on the accumulated character strings and the dialogue strategy of the current round of dialogue may include: generating a reply message using a candidate reply set corresponding to the dialogue strategy of the current round of dialogue; and sending the accumulated character strings as part or all of the reply message to the user.
[0043] Among them, the candidate response set can be obtained in the following manner: presetting the dialogue logic corresponding to the specific user intention; obtaining the dialogue fragment to be trained from any dialogue that has occurred; using the dialogue fragment to be trained to implement the dialogue logic and obtain the candidate response set.
[0044] For example, the dialog logic implemented by the dialog segments to be trained can be implemented by a second sequence model based on a deep learning model. Specifically, the dialog segments to be trained can be annotated to form a training data set. In the training data set, the system actions and accumulated strings of the previous round of dialog are annotated as inputs, and the system actions of the next round of dialog are annotated as outputs. The second sequence model is trained using the annotated dialog segments so that the second sequence model forms the corresponding dialog logic. After training, the system actions and accumulated strings of the previous round of dialog can be used to predict the system actions of the next round of dialog, and the corresponding candidate response set is determined according to the system actions of the next round of dialog, and the corresponding response information is generated. For example, the system actions may include: asking for information, approving information, indicating to continue, repeating to confirm, verifying, continuing to ask, asking for signals, bad signals, normal signals, requesting to repeat, and / or ending the dialog.
[0045] In order to better train the model, in the embodiments of this specification, two methods can be used to solve the cold start problem of the model. Cold start refers to the situation where no data is available at the beginning. One way is to simulate the construction of conversation data: by designing a state transition automaton, a rule-based dialogue system is implemented to simulate the conversation logic of string collection. Since the dialogue generated by the rules is relatively rigid, the data can be modified by crowdsourcing to ensure the fluency of the conversation. The other is the construction of real person-to-person data: for example, in an actual scenario, there is a recording log of a conversation between people, from which appropriate fragments can be selected as conversation data, and the data can be finely labeled by crowdsourcing.
[0046] In order to make the prediction more accurate, after a preliminary sequence model is obtained through training with a certain training data set, the internal voice dialing method can be further used to collect the dialogue test data that is closest to the actual human-computer dialogue system, such as voice dialing data, to further train the model until a certain usable access condition is reached (such as a collection accuracy of 90%). Therefore, in one or more embodiments of this specification, the method may also include: collecting dialogue test data through dialogue test; training the trained first sequence model and second sequence model using the dialogue test data with a preset accuracy as the target, to obtain the first sequence model and second sequence model that meet the access standard.
[0047] The application scenarios of the method provided in the embodiments of this specification are not limited. For example, it can be applied in outbound call robots, government affairs, mobile, finance and many other scenarios. For example, when ordering food at a restaurant, booking tickets, etc., customer service needs to inquire about the user's mobile phone contact information, ID number and other digital number information. During the conversation process, according to the method provided in the embodiments of this specification, the human-computer dialogue for digital number interaction realizes interactive number collection modeling and multi-round interactive number collection by analyzing the number interaction mode. Through verification on simulated conversation data and real person-to-person conversation data, the experimental results show that the method provided in the embodiments of this specification can efficiently collect complete numbers step by step through multiple rounds of interaction, making the system more human-like, improving user experience, and can be applied to conversation products.
[0048] The multi-round dialogue system implemented according to the method provided in the embodiments of this specification can preset semantic labels such as user intentions, slot-value pairs, and system actions. The dialogue system can classify the semantic labels in each round through a neural network model and implement multi-round dialogues based on the classification results.
[0049] Next, the conversation method provided in this specification is further described by taking the application of the conversation method in the conversation of collecting digital numbers as an example. For example, Figure 2 FIG. 1 shows a schematic diagram of a dialogue interface provided by an embodiment of this specification. Figure 2 The dialogue interface of the human-computer dialogue system shown in the figure has the customer service (robot) on the left and the real user on the right. The conversation between the two parties is similar to that of real people, and the complete number is collected through multiple rounds.
[0050] To achieve Figure 2 The human-computer dialogue effect shown in the figure can be achieved by Figure 3 The dataset construction link shown in the figure is used to construct the dataset so as to construct a training dataset to train the model. Figure 3 As shown in the figure, the machine simulation dialogue is generated by the state machine program; the real human dialogue is obtained by the speech recognition of the real human voice; the dial test human-machine dialogue is obtained by the speech recognition of the internal human-machine dial test. The machine simulation dialogue, the real human dialogue, and the dial test human-machine dialogue together constitute the original training data set. In order to achieve more accurate predictions, the labeled dialogue data can be uniformly rewritten and annotated through crowdsourcing to make the input and output labels more accurate. For example, in order to achieve better training results, you can follow the following Figure 4The semantic label definitions shown are annotated so that the training data set contains corresponding labels. For example, the labels of user intentions in the first model training data set may include: inform number, change number, approve number, prepare to provide number, affirmative reply, negative reply, wait, ask for signal, bad signal, normal signal, tone of voice continuation, inconvenience and / or end of conversation. The labels of system actions in the second model training data set may include: ask for number, approve number, signal to continue, repeat to confirm, verify, continue to ask, ask for signal, bad signal, normal signal, request to repeat and / or end of conversation. Among them, Figure 4 Among the semantic tags shown, some are tags for user intent (such as "user end" in the table to show user intent, and a check mark indicates the existence of the tag), and some are tags for system actions (such as "system end" in the table to show system actions, and a check mark indicates the existence of the tag). The details of the semantic meaning corresponding to the tag include: Figure 4 As shown, whether to include number parameters, descriptions, examples, etc. can be implemented according to the needs of the implementation scenario and will not be described in detail here.
[0051] After obtaining the training data set, the machine-simulated dialogue and real human-to-human dialogue are input into the interactive digital number collection model containing the first sequence model and the second sequence model for preliminary training to obtain a preliminarily trained model. Then, the dial-test human-to-machine dialogue in the labeled dialogue data is input into the preliminarily trained model to further calibrate the model's prediction and make the prediction result more accurate.
[0052] According to the above embodiments, the following can be achieved: Figure 5 The system structure shown in Figure 1 is as follows. Figure 5 As shown in the system architecture diagram, it includes: user intention recognition module, number status tracking module, digital number executor, dialogue strategy module, and natural language response module.
[0053] The user intention recognition module is used to use the input information of the user's current round of dialogue to predict the user's intention and the string fragment of information that needs to be collected based on the first sequence model of deep learning. Each round of user dialogue is semantically parsed by the user intention recognition module to parse the current user's intention, such as "add / delete / modify" a number fragment. The first sequence model, for example, uses a recurrent neural network model (RNN). Based on this module, the specific user intention required by the scenario can be obtained.
[0054] The number status tracking module is used to accumulate the character string fragments corresponding to the specific user intention contained in the current round of dialogue and the initial predicted character string fragments to obtain an accumulated character string when the specific user intention is obtained in the previous round. The result output by the user intention recognition module enters the number status tracking module to complete an accumulation process of the digital number.
[0055] The digital number executor is used to determine whether the accumulated string is a string segment that meets the specific user's intention based on the verification conditions. For example, the accumulated result enters the digital number executor, performs logical processing, determines whether the number is legal, and obtains a digital legal result. For example, determine whether the accumulated mobile phone number is 11 digits and starts with "1XX", determine whether the accumulated ID number is 18 digits, and so on. The rules for determining whether it is legal can be set according to the needs of the implementation scenario.
[0056] The dialogue strategy module is used to input the string detection result, the system action of the previous round of dialogue and the accumulated string into the second sequence model to predict the system action of the next round of dialogue. For example, the number legality result and the accumulated string are sent to the dialogue strategy module to predict the system action of the next round of dialogue, such as: continue to ask, clarify the number, thank, end, etc. For example, this module can use a recurrent neural network model (RNN).
[0057] The natural language response module is used to generate response information using the candidate response set corresponding to the system action of the next round of dialogue, and send the response information to the user. The dialogue strategy module outputs the system action to the natural language response module, and the natural language response module selects or generates a reasonable natural language to the user.
[0058] according to Figure 5 The system architecture shown can be Figure 6 The system workflow diagram is shown in the figure. Figure 6 As shown: The user intention recognition module receives the current round of user statements and outputs the user intention label and number fragment. The number status tracking module receives the user intention label and number fragment, and if it is a number fragment that matches the specific user intention, it accumulates the number and outputs the accumulated number to the digital number executor. After the digital number executor verifies, it outputs the verification result to the dialogue strategy module. The dialogue strategy module uses the input system action of the previous round of dialogue, the digital verification result and the accumulated number to output the next round of system action to the natural language response module. The natural language response module outputs the next round of system response to the dialogue interface.
[0059] In order to make this embodiment easier to understand, combined with the above processing process, Figure 2 The processing process of the multi-round dialogue shown in FIG. 1 is described in detail. In the following, "S#" represents the system dialogue and "U#" represents the user dialogue:
[0060] S1: Hello, please provide your mobile phone number
[0061] U1: 1**
[0062] (The system inputs "1**" into the first sequence model for prediction and obtains: User intention label = Informing number, Predicted number segment = 1**. Since the specific user intention of providing a digital number is obtained, after number accumulation, it is obtained that: Cumulative number status = [1**]. Using the second sequence model for prediction, it is obtained that: Next system action = Repeat and confirm. The system calls the next system reply template = "X" (X is a placeholder used to identify the template and can be replaced with the corresponding template))
[0063] S2: 1**
[0064] U2: 1***
[0065] (The system inputs "1***" into the first sequence model for prediction and obtains: User intention label = Informing number, Predicted number segment = 1***. Since the specific user intention of providing a digital number is obtained, after number accumulation, it is obtained that: Cumulative number status = [1**, 1***]. Using the second sequence model for prediction, it is obtained that: Next system action = Repeat and confirm. The system generates the next system reply template = "嗯X")
[0066] S3: 嗯1***
[0067] U3: 对对对
[0068] (The system inputs "对对对" into the first sequence model for prediction and obtains: User intention label = Affirmative, Predicted number segment = None. Since the specific user intention of providing a digital number is not obtained, there is no need for accumulation, and the previously accumulated numbers are maintained: Cumulative number status = [1**, 1***]. Using the second sequence model for prediction, it is obtained that: Next system action = Continue to ask. The system calls the next system reply template = "还有呢")
[0069] S4: 还有呢
[0070] U4: 呃,9***
[0071] (The system inputs "呃,9***" into the first sequence model for prediction and obtains: User intention label = Informing number, Predicted number segment = 9***. Since the specific user intention of providing a digital number is obtained, after number accumulation, it is obtained that: Cumulative number status = [1**, 1***, 9***]. Using the second sequence model for prediction, it is obtained that: Next system action = Repeat and confirm. The system calls the next system reply template = "X")
[0072] S5: 9***
[0073] U5: 喂,9*1*, 不是9**
[0074] (The system inputs "Hello, 9*1*, not 9**" into the first sequence model for prediction, and obtains: user intention label = change number, predicted number fragment = 9*1*. Since the specific user intention of providing a digital number is obtained, after the number is accumulated, the accumulated number status is obtained = [1**, 1***, 9*1*]. Using the second sequence model for prediction, the next round of system action is obtained = repeat confirmation. The system calls the next round of system reply template = "X, OK, I understand, thank you")
[0075] S6: 9*1*, OK, I understand, thank you.
[0076] U6: Ok
[0077] (The system inputs "Hey, hello" into the first sequence model for prediction, and obtains: user intention label = approval, predicted number fragment = 9*1*. Since no specific user intention to provide digital numbers is obtained, there is no need to accumulate, and the previously accumulated numbers are kept: accumulated number status = [1**, 1***, 9*1*]. Using the second sequence model for prediction, it is obtained: the next round of system action = end broadcast. The system calls the next round of system reply template = "The collected number is XXX, thank you for your call, goodbye")
[0078] S7: The collected number is 1**1***9*1*, thank you for your call, goodbye.
[0079] From the above examples, it can be seen that the ability to collect numbers through multiple rounds of interaction makes the human-computer dialogue system more human-like, reduces user repetitive operations, and improves user experience.
[0080] Corresponding to the above method embodiment, this specification also provides a dialogue device embodiment, Figure 7 FIG. 1 shows a schematic diagram of the structure of a dialogue device provided by an embodiment of the present specification. Figure 7 As shown, the device includes: a user intention obtaining module 702 , a number fragment obtaining module 704 , a character string tracking module 706 and a dialogue strategy module 708 .
[0081] The user intention obtaining module 702 may be configured to obtain a specific user intention in a previous round of conversation of the user.
[0082] The number segment obtaining module 704 may be configured to obtain, according to the specific user intention, an initial predicted character string segment that matches the specific user intention in the previous round of conversation.
[0083] The string tracking module 706 may be configured to accumulate the string segments corresponding to the specific user intention contained in the current round of dialogue and the initial predicted string segments to obtain an accumulated string.
[0084] The dialogue strategy module 708 may be configured to generate the content of the next dialogue round according to the accumulated character string and the dialogue strategy of the current dialogue round.
[0085] Since the device obtains the specific user intention in the user's previous round of dialogue, an initial predicted character string fragment consistent with the specific user intention is obtained in the previous round of dialogue according to the specific user intention, the character string fragment corresponding to the specific user intention contained in the current round of dialogue is accumulated with the initial predicted character string fragment to obtain an accumulated character string, the content of the next round of dialogue is generated according to the accumulated character string and the dialogue strategy of the current round of dialogue, and interaction is performed in the dialogue for the collected character string fragments, and the character strings consistent with the specific user intention are gradually collected through multiple rounds of interaction in an efficient manner, which is simple for users to operate and provides a better experience.
[0086] Figure 8 FIG. 2 shows a schematic diagram of the structure of a dialogue device provided by another embodiment of the present specification. Figure 8 As shown, the device may further include: a verification module 710, which may be configured to determine a verification condition of the string segment according to the specific user intention, and determine whether the accumulated string is a string segment that meets the specific user intention according to the verification condition.
[0087] In addition, if Figure 8 As shown, the dialogue strategy module 708 may include: an information generation submodule 7082 and an information sending submodule 7084.
[0088] The information generation submodule 7082 may be configured to generate response information using a candidate response set corresponding to the dialogue strategy of the current dialogue round.
[0089] The information sending submodule 7084 may be configured to send the accumulated character string as part or all of the reply information to the user.
[0090] The candidate response set can be obtained in the following way:
[0091] Presetting a dialogue logic corresponding to the specific user intention;
[0092] Obtain the dialogue fragments to be trained from any dialogue that has occurred;
[0093] The dialogue logic is implemented using the dialogue segment to be trained to obtain a candidate response set.
[0094] The above is a schematic scheme of a dialogue device of this embodiment. It should be noted that the technical scheme of the dialogue device and the technical scheme of the dialogue method described above are of the same concept, and the details not described in detail in the technical scheme of the dialogue device can be referred to the description of the technical scheme of the dialogue method described above.
[0095] Fig. 9 The structure block diagram of a computing device 900 provided according to an embodiment of the present specification is shown. The components of the computing device 900 include but are not limited to a memory 910 and a processor 920. The processor 920 is connected to the memory 910 via a bus 930, and a database 950 is used to store data.
[0096] The computing device 900 also includes an access device 940 that enables the computing device 900 to communicate via one or more networks 960. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 940 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0097] In one embodiment of the present specification, the above components of the computing device 900 and Fig. 9 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig. 9 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0098] The computing device 900 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 900 may also be a mobile or stationary server.
[0099] The processor 920 is used to execute the following computer executable instructions:
[0100] Get the specific user intent in the user's previous conversation;
[0101] Obtaining, in the previous round of conversation, an initial predicted character string segment that matches the specific user intention according to the specific user intention;
[0102] The character string segment corresponding to the specific user intention contained in the current round of dialogue is accumulated with the initial predicted character string segment to obtain an accumulated character string;
[0103] The content of the next round of dialogue is generated according to the accumulated character string and the dialogue strategy of the current round of dialogue.
[0104] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned dialogue method belong to the same concept, and the details of the technical scheme of the computing device that are not described in detail can all be referred to the description of the technical scheme of the above-mentioned dialogue method.
[0105] An embodiment of the present specification further provides a computer-readable storage medium storing computer instructions, which are used when executed by a processor to:
[0106] Get the specific user intent in the user's previous conversation;
[0107] Obtaining, in the previous round of conversation, an initial predicted character string segment that matches the specific user intention according to the specific user intention;
[0108] The character string segment corresponding to the specific user intention contained in the current round of dialogue is accumulated with the initial predicted character string segment to obtain an accumulated character string;
[0109] The content of the next round of dialogue is generated according to the accumulated character string and the dialogue strategy of the current round of dialogue.
[0110] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned dialogue method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned dialogue method.
[0111] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0112] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0113] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0114] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0115] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can understand and use this specification well. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A conversational approach, include: Get the specific user intent in the user's previous conversation; Obtaining, in the previous round of conversation, an initial predicted character string segment that matches the specific user intention according to the specific user intention; The character string segment corresponding to the specific user intention contained in the current round of dialogue is accumulated with the initial predicted character string segment to obtain an accumulated character string; The content of the next round of dialogue is generated according to the accumulated character string and the dialogue strategy of the current round of dialogue.
2. The method according to claim 1, after obtaining the initial predicted string segment that matches the specific user intention in the previous round of conversation according to the specific user intention, further include: Determining a verification condition of the character string segment according to the specific user intention; It is determined whether the accumulated character string is a character string segment that meets the specific user intention according to the verification condition.
3. The method according to claim 1, wherein the content of the next round of dialogue is generated according to the accumulated character string and the dialogue strategy of the current round of dialogue, include: Generate reply information using the candidate reply set corresponding to the dialogue strategy of the current round of dialogue; The accumulated character string is sent to the user as part or all of the reply information.
4. According to the method of claim 3, the candidate response set is obtained by: Presetting a dialogue logic corresponding to the specific user intention; Obtain the dialogue fragments to be trained from any dialogue that has occurred; The dialogue logic is implemented using the dialogue segment to be trained to obtain a candidate response set.
5. The method according to any one of claims 1-4, wherein the specific user intention is to provide a digital number.
6. A conversation device, include: A user intention obtaining module, configured to obtain a specific user intention in a previous round of conversation of the user; A number segment obtaining module, configured to obtain an initial predicted character string segment that matches the specific user intention in the previous round of conversation according to the specific user intention; A string tracking module is configured to accumulate the string segments corresponding to the specific user intention contained in the current round of dialogue and the initial predicted string segments to obtain an accumulated string; The dialogue strategy module is configured to generate the content of the next round of dialogue according to the accumulated character string and the dialogue strategy of the current round of dialogue.
7. A computing device, include: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions: Get the specific user intent in the user's previous conversation; Obtaining, in the previous round of conversation, an initial predicted character string segment that matches the specific user intention according to the specific user intention; The character string segment corresponding to the specific user intention contained in the current round of dialogue is accumulated with the initial predicted character string segment to obtain an accumulated character string; The content of the next round of dialogue is generated according to the accumulated character string and the dialogue strategy of the current round of dialogue.
8. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the dialogue method described in any one of claims 1 to 5.
