A human-computer conversation method, device, equipment and readable storage medium
By using a deep reinforcement learning model to automatically identify and generate response strategies, the problem of cumbersome rule settings in human-computer dialogue systems under complex scenarios is solved, and efficient dialogue processing is achieved.
Patent Information
- Application Number
- CN202011178749.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-29
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2040-10-29
AI Technical Summary
Existing human-computer dialogue systems require the manual setting of a large number of rules in complex scenarios, resulting in high consumption of human and material resources and increased complexity.
By employing a deep reinforcement learning model, key information in the language is identified by determining the call type and dialogue pattern, generating a response strategy, and returning the response language information, thus reducing the need for rule settings for different scenarios.
It reduces the complexity of human-computer dialogue, saves human and material costs, and improves dialogue efficiency.
Smart Images

Figure CN114428841B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a human-computer dialogue method, apparatus, device, and readable storage medium. Background Technology
[0002] With the development of artificial intelligence technology, intelligent human-computer dialogue, as an important manifestation of artificial intelligence, has been increasingly widely used. Currently, human-computer dialogue is mostly implemented using methods based on manually setting rules. In actual dialogue scenarios, for a simple dialogue scenario, setting rules can quickly and effectively establish a dialogue logic. However, in complex scenarios, there is too much dialogue information to extract. To cover all possible scenarios, rules for each situation must be manually set. This consumes a lot of human and material resources, making human-computer dialogue highly complex. Summary of the Invention
[0003] This invention provides a human-computer dialogue method, apparatus, device, and readable storage medium to solve the problem of high complexity in existing human-computer dialogue methods.
[0004] To solve the above-mentioned technical problems, the present invention is implemented as follows:
[0005] In a first aspect, embodiments of the present invention provide a human-computer dialogue method, including:
[0006] Determine the type of call;
[0007] Determine the dialogue mode corresponding to the type of incoming call;
[0008] Obtain the language information of the incoming caller in the dialogue mode, and identify the first key information of the language information;
[0009] The response strategy is determined based on the first key information and the preset deep reinforcement learning model;
[0010] Based on the response strategy, response language information corresponding to the first key information is generated, and the response language information is returned to the caller.
[0011] In a second aspect, embodiments of the present invention provide a human-computer dialogue device, comprising:
[0012] The first determining module is used to determine the type of incoming call;
[0013] The second determining module is used to determine the dialogue mode corresponding to the category of the incoming call;
[0014] The acquisition module is used to acquire the language information of the incoming caller in the dialogue mode and identify the first key information of the language information;
[0015] The third determining module is used to determine the response strategy based on the first key information and the preset deep reinforcement learning model;
[0016] The response module is used to generate response language information corresponding to the first key information based on the response strategy, and return the response language information to the caller.
[0017] Thirdly, embodiments of the present invention provide an electronic device, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the human-computer dialogue method as described in the first aspect.
[0018] Fourthly, embodiments of the present invention provide a readable storage medium on which a program or instructions are stored, and when the program or instructions are executed by a processor, the steps of the human-computer dialogue method as described in the first aspect are implemented.
[0019] In this embodiment of the invention, first key information is determined based on the language information of the incoming caller. Then, a response strategy is determined based on the first key information and a preset deep reinforcement learning model. The response language information corresponding to the first key information is then generated based on the response strategy and returned to the incoming caller. In this way, there is no need to manually set corresponding rules for different dialogue scenarios, which can save human and material resources in human-computer dialogue and reduce the complexity of human-computer dialogue. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart of a human-computer dialogue method provided in an embodiment of the present invention;
[0022] Figure 2 This is a framework diagram of the DQN algorithm used in a human-computer dialogue method provided in an embodiment of the present invention;
[0023] Figure 3 This is a block diagram of a human-computer dialogue device provided in an embodiment of the present invention;
[0024] Figure 4 This is a schematic diagram of the module structure of an electronic device provided in an embodiment of the present invention;
[0025] Figure 5This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0026] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0027] See Figure 1 , Figure 1 This is a flowchart of a human-computer dialogue method provided in an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:
[0028] In this embodiment, the principle of the human-computer dialogue method, taking answering a phone call as an example, is explained as follows.
[0029] Step 101: Determine the type of incoming call;
[0030] In this implementation, the category of incoming calls refers to the relationship between the caller and the phone owner, including but not limited to harassing calls, calls from friends and family, important calls, or other types of calls. For example, calls marked as advertising, sales, or fraudulent are considered harassing calls; calls matched with the phone owner's contacts that indicate a casual chat or date call are considered calls from friends and family; calls matched with the phone owner's contacts that indicate a work or business call are considered important calls; and calls marked as delivery, takeout, or merchant service calls are considered other types of calls.
[0031] Step 102: Determine the dialogue mode corresponding to the type of incoming call;
[0032] Determining the corresponding dialogue mode based on the type of incoming call further narrows down the specific scenarios for human-computer interaction, facilitating more targeted generation of response language information corresponding to the caller's language information in subsequent steps. For example, when the incoming call is determined to be a nuisance call, the current call can be terminated directly, saving the user time by manual intervention. As another example, when the incoming call is determined to be an important call, the corresponding dialogue mode is entered. In this mode, all conversations revolve around relevant work or business, and the subsequent generation of response language information is based on information related to that work or business.
[0033] Step 103: Obtain the caller's language information in the dialogue mode and identify the first key information in the language.
[0034] Among them, the first key information can reflect the key purpose of the caller's language information in the dialogue mode. For example, if the language information is "a meeting is needed today", then the first key information can be "a meeting".
[0035] Step 104: Determine the response strategy based on the first key information and the preset deep reinforcement learning model;
[0036] Furthermore, the first key information is input into a preset deep reinforcement learning model, and the corresponding response strategy is output. For example, when the first key information is "meeting", the determined response strategy can be "determine the meeting time".
[0037] Step 105: Generate the response language information corresponding to the first key information based on the response strategy, and return the response language information to the caller.
[0038] For example, when the response strategy is "determine the meeting time", the response language information generated based on this response strategy corresponding to the first key information includes, but is not limited to, "what time is the meeting".
[0039] The above-described human-computer dialogue method determines the first key information based on the caller's language information, then determines the response strategy based on the first key information and a preset deep reinforcement learning model, and then generates the response language information corresponding to the first key information based on the response strategy and returns the response language information to the caller. In this way, there is no need to manually set corresponding rules for different dialogue scenarios, which can save human and material resources in human-computer dialogue and reduce the complexity of human-computer dialogue.
[0040] Optionally, the category of the incoming call can be determined, including:
[0041] When there are multiple categories of incoming calls, obtain the language information of the caller and identify the first key information in the language information;
[0042] Calculate the caller's score for each category based on the primary key information;
[0043] The category with the highest rating is selected as the category for incoming calls.
[0044] Specifically, in this implementation, when classifying incoming call types, the user's desired and unwanted call types are first determined. Desired call types are recorded as positive samples, and unwanted call types as negative samples. Then, the probability values of each call type belonging to a positive sample and a negative sample are calculated. If only one probability value is higher than a preset threshold, the call type is determined as the category corresponding to that probability value. If multiple probability values are higher than the preset threshold, the categories corresponding to those multiple probability values are retained.
[0045] Next, the caller ID classification steps are performed as follows: The caller's language information is obtained and identified. For example, named entity recognition can be used to identify the language information. This allows the acquisition of the caller's entity content. For instance, based on probability values, the caller ID types include three categories: friends and family, important calls, and other calls. Then, the caller ID language information is further obtained. When the language information is "A meeting is needed today," the entity is "Meeting." The entity's score is then calculated under the friends and family, important, or other caller ID categories. For example, if the entity's score is 5 under friends and family, 7 under important calls, and 3 under other calls, then the final caller ID type is confirmed as important.
[0046] In this embodiment, the above-described two-stage classification method is used to determine the category of the incoming call, which can more accurately determine the category of the incoming call.
[0047] Optionally, the caller's language information in the dialogue mode is obtained, and the first key information of the language information is identified, including:
[0048] Obtain the language information of the incoming caller in conversation mode;
[0049] The first key information is obtained by performing entity recognition processing on the language information.
[0050] Specifically, upon entering a dialogue, entity recognition processing is performed on the current dialogue. For example, slot filling is performed on the current dialogue, where each slot represents the position of an entity's word within the sentence, and each slot corresponds to a slot value, which represents the word of the entity in that slot. Furthermore, for personalized or data-scarce dialogues—that is, language information rarely used in daily life, such as specialized terms in a particular field—words of entities identified from the language information can be retrieved from the relevant knowledge base, and then slot filling can be performed on those words. Further, to improve the accuracy of slot filling, a combination of retrieval and sequence labeling can be used, thus accurately obtaining the first key information of the language input by the caller in the dialogue.
[0051] Optionally, a response strategy is determined based on key information from language and a pre-defined deep reinforcement learning model, including:
[0052] Determine the second key information corresponding to the dialogue pattern;
[0053] The response strategy is determined based on the first key information, the second key information, and the pre-set deep reinforcement learning model.
[0054] As a preferred implementation, in this embodiment, the second key information corresponding to the dialogue mode is first determined, and then a response strategy is determined based on the first key information, the second key information, and a preset deep reinforcement learning model. This allows for a faster determination of the response strategy corresponding to the first key information. Specifically, for example, if the currently executed dialogue mode corresponds to an important call type, it should be noted that in an important conversation, time, location, and event information can roughly describe the key factors of an important event. Therefore, the second key information in this dialogue mode includes, but is not limited to, time information, location information, and event information. In this case, the first key information obtained from the language information input by the caller includes time information. By inputting this time information and the second key information into the preset deep reinforcement learning model, the response strategy can be determined as either determining the location information or determining the event information.
[0055] It is worth noting that the deep reinforcement learning model in this embodiment specifically uses the Deep Q Network (DQN) algorithm, and its algorithm framework is as follows: Figure 2 As shown, the specific steps are as follows. First, the system needs to provide configurable slots. The configuration includes the slot type (interface, knowledge), slot priority, slot attributes (mandatory), slot clarification language, slot clarification order, and slot parallelism and dependency relationships. This configuration information serves as an important feature for subsequent state representation. Then, a memory D with a capacity of N is initialized. The Q network is initialized, and weights ω are generated randomly. The target Q network is initialized. The DQN algorithm introduces a target Q network on top of the original Q network, which is used to calculate the target. It has the same structure as the Q network and the same initial weights, except that the Q network is updated in each iteration, while the target Q network is updated only at intervals. Then, M iterations are performed. Every C iterations, the weights of the target Q network are updated. In each iteration, the current state s is initialized. t The process iterates through each time step t(1, T). At each time step, the system randomly selects action a with probability e. t There is a probability of (1-e) that the target Q network will select the optimal action a. t =max a Q(St,a; ω). Here, the action a... t This refers to the type of feedback provided by the current system, i.e., the response strategy, including whether to clarify the needs, guide the user, ask questions, confirm, close the conversation, and use action A. t This also includes slot values related to the current feedback.
[0056] Optionally, response language information corresponding to the first key information is generated based on the response strategy, including:
[0057] Select the appropriate response template from the preset response templates to match the response strategy;
[0058] Reply language information corresponding to the first key information is generated based on the reply template.
[0059] Furthermore, based on the action a output by the DQN algorithm t (Response Strategy) Generate response language information corresponding to the first key information. For example, if the response strategy is "determine location information", then the generated response language information includes, but is not limited to, "Where is the location?" and is returned to the caller. In this way, one cycle of human-computer dialogue is completed.
[0060] Furthermore, in practice, after receiving the aforementioned response language information, the caller will continue to input a new round of language information. Then, based on the above method, a new round of response language information is determined, and this process is iterated. In this way, by continuously communicating and conversing with the caller, the information the caller wants to express is obtained, and the complete dialogue information is conveyed to the user, reducing the complexity of human-computer interaction.
[0061] As a preferred implementation, after returning response language information to the caller, the above-described human-computer dialogue method further includes:
[0062] To obtain the emotional state of the caller after receiving a response message;
[0063] Optimize reply templates based on emotional state.
[0064] In this implementation, corresponding emotional states are set for different dialogue categories, represented by the emotion parameter "emotion". For example, in the case of harassing calls, the emotion parameter "emotion" has a value of 0; in the case of calls from friends and family, the emotion parameter "emotion" has values of 1 (positive emotional state), 0 (neutral emotional state), and -1 (negative emotional state); in the case of important calls, the emotion parameter "emotion" has values of 1 (positive emotional state), 0 (neutral emotional state), -2 (annoyed emotional state), and -5 (angry emotional state); and in the case of other calls, the emotion parameter "emotion" has values of 0.5 (positive emotional state), 0 (neutral emotional state), and -1 (negative emotional state).
[0065] It should be noted that the emotional parameters can reflect the caller's emotional changes during the human-computer dialogue process. These emotional changes, to a certain extent, reflect the caller's evaluation of the response language information, or whether the caller believes that the response language information is related to the language information they input.
[0066] In existing technologies, it is usually necessary for the caller to manually reply with evaluation information to obtain the caller's evaluation of the reply language information. In this embodiment, the emotional parameters are determined by obtaining the caller's emotional state after receiving the reply language information, and then the action reward information corresponding to the reply language information is calculated based on the emotional parameters. The specific calculation steps are as follows.
[0067] Here, we'll use the example of whether the caller considers the response language information relevant to their input language information to illustrate the point. First, we define the correlation between the response language information and the input language information as "correlation." A correlation value of 1 indicates correlation, while a value of -1 indicates irrelevance. Specifically, when action a is executed... t Calculate the reward r for performing this action. t and the next state s t+1 Among them, the action a is executed. t Indicates that action a t The corresponding response strategy and corresponding response language information are returned to the caller. The calculation formula satisfies the following relationship.
[0068] r t =-1+β e *emotion+β c *correlation;
[0069] In the formula, r t Indicates the execution of action a t Action reward information, β e β represents the weight corresponding to the sentiment parameter. c This represents the weight corresponding to the correlation.
[0070] Wherein, state s t s t+1 The information included includes slot-related information, slot value-related information, feedback type information, and user emotion-related information. It's worth emphasizing that the emotional state here will affect the final generated response language information. Then, (s) t a t r t s t+1 Store y in memory bank D. Calculate y. j y j This represents the predicted value for each iteration. If the endpoint is reached in step j+1, i.e., y j =r j r j This represents the reward value at step j; otherwise, y j =r j +γmax a′Q(S t+1 ,a′;ω). (y j -Q(s t ,a j ;ω)) 2 Regarding the update of ω using gradient descent, where a′ represents the possible next action, a j Let represent the action at step j, γ be a constant, and ω represent the gradient. In this way, we can calculate the action a taken by the incoming caller. t The action feedback information is used to optimize the response language information in the next round.
[0071] Optionally, the response template can be optimized based on the emotional state, including:
[0072] Determine the extended language information corresponding to the response language information;
[0073] The system obtains the emotional state of the caller based on extended language information. If the emotional value corresponding to the emotional state exceeds a preset threshold, the system optimizes the response template based on the extended language information.
[0074] Specifically, in this implementation, minimum values n and k are set for the number of conversions of extended language information and the ratio of positive to negative sentiment, respectively. n represents the minimum number of conversions a given extended language information output can undergo. k represents the minimum frequency ratio of positive to negative sentiment type in the user's next input after each system feedback of the extended sentence. When the number of times an extended language information is output reaches n, if the frequency ratio of positive to negative sentiment type in the user's next input is greater than k, then this extended language information is considered usable as a template, and the extended language information is converted into a template.
[0075] See Figure 3 , Figure 3 This embodiment provides a human-computer interaction device 300, comprising:
[0076] The first determining module 301 is used to determine the type of incoming call;
[0077] The second determining module 302 is used to determine the dialogue mode corresponding to the type of incoming call;
[0078] The acquisition module 303 is used to acquire the language information of the incoming caller in the dialogue mode and identify the first key information of the language information;
[0079] The third determining module 304 is used to determine the response strategy based on the first key information and the preset deep reinforcement learning model;
[0080] The response module 305 is used to generate response language information corresponding to the first key information based on the response strategy, and return the response language information to the caller.
[0081] Optionally, the first determining module 301 is specifically used for:
[0082] When the number of incoming call categories includes multiple categories, the language information of the incoming caller is obtained, and the first key information in the language information is identified;
[0083] Calculate the score of the incoming call in each category based on the first key information;
[0084] The category with the highest score is selected as the category of the incoming call.
[0085] Optionally, the acquisition module 303 is specifically used for:
[0086] Obtain the language information of the incoming caller in the dialogue mode;
[0087] The first key information is obtained by performing entity recognition processing on the language information.
[0088] Optionally, the third determining module 304 is specifically used for:
[0089] Determine the second key information corresponding to the dialogue mode;
[0090] The response strategy is determined based on the first key information, the second key information, and the preset deep reinforcement learning model.
[0091] Optionally, the response module 305 is specifically used for:
[0092] Determine the response template corresponding to the response strategy from the preset response templates;
[0093] Based on the reply template, generate reply language information corresponding to the first key information.
[0094] Optionally, the device further includes an emotion state acquisition module, used for:
[0095] Obtain the emotional state of the caller after receiving the response language information;
[0096] The response template is optimized based on the emotional state.
[0097] Optionally, the emotion state acquisition module is specifically used for:
[0098] Determine the extended language information corresponding to the response language information;
[0099] The caller's emotional state under the extended language information is obtained. If the emotional value corresponding to the emotional state exceeds a preset threshold, the response template is optimized based on the extended language information.
[0100] The human-computer interaction device 300 in this embodiment can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, mobile electronic devices can be mobile phones, tablets, laptops, PDAs, in-vehicle electronic devices, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, or personal digital assistants (PDAs), etc., while non-mobile electronic devices can be servers, network-attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, or self-service machines, etc. This embodiment does not impose specific limitations.
[0101] The simulation testing device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.
[0102] The human-computer dialogue device 300 provided in this application embodiment can achieve Figures 1 to 2 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0103] Optional, such as Figure 4 As shown, this application embodiment also provides an electronic device 400, including a processor 401, a memory 402, and a program or instructions stored in the memory 402 and executable on the processor 401. When the program or instructions are executed by the processor 401, they implement the various processes of the above method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.
[0104] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0105] Figure 5 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0106] The electronic device 500 includes, but is not limited to, components such as: radio frequency unit 501, network module 502, audio output unit 503, input unit 504, sensor 505, display unit 506, user input unit 507, interface unit 508, memory 509, and processor 510.
[0107] Those skilled in the art will understand that the electronic device 500 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 510 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 5 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0108] The processor 510 is used for:
[0109] Determine the type of call;
[0110] Determine the dialogue mode corresponding to the type of incoming call;
[0111] The input unit 504 is used to acquire the language information of the caller in the dialogue mode and identify the first key information of the language information;
[0112] The processor 510 is also used to determine a response strategy based on the first key information and a preset deep reinforcement learning model;
[0113] Based on the response strategy, response language information corresponding to the first key information is generated, and the response language information is returned to the caller.
[0114] Optionally, the processor 510 is also used for:
[0115] When the number of incoming call categories includes multiple categories, the language information of the incoming caller is obtained, and the first key information in the language information is identified;
[0116] Calculate the score of the incoming call in each category based on the first key information;
[0117] The category with the highest score is selected as the category of the incoming call.
[0118] Optionally, the processor 510 is also used for:
[0119] Obtain the language information of the incoming caller in the dialogue mode;
[0120] The first key information is obtained by performing entity recognition processing on the language information.
[0121] Optionally, the processor 510 is also used for:
[0122] Determine the second key information corresponding to the dialogue mode;
[0123] The response strategy is determined based on the first key information, the second key information, and the preset deep reinforcement learning model.
[0124] Optionally, the processor 510 is also used for:
[0125] Determine the response template corresponding to the response strategy from the preset response templates;
[0126] Based on the reply template, generate reply language information corresponding to the first key information.
[0127] Optionally, the processor 510 is also used for:
[0128] Obtain the emotional state of the caller after receiving the response language information;
[0129] The response template is optimized based on the emotional state.
[0130] Optionally, the processor 510 is also used for:
[0131] Determine the extended language information corresponding to the response language information;
[0132] The caller's emotional state under the extended language information is obtained. If the emotional value corresponding to the emotional state exceeds a preset threshold, the response template is optimized based on the extended language information.
[0133] In this embodiment, the electronic device 500 determines first key information based on the language information of the incoming caller, then determines a response strategy based on the first key information and a preset deep reinforcement learning model, generates response language information corresponding to the first key information based on the response strategy, and returns the response language information to the incoming caller. In this way, there is no need to manually set corresponding rules for different dialogue scenarios, which can save human and material resources in human-computer dialogue and reduce the complexity of human-computer dialogue.
[0134] It should be understood that, in this embodiment, the input unit 504 may include a graphics processing unit (GPU) 5041 and a microphone 5042. The GPU 5041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 506 may include a display panel 5061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 507 includes a touch panel 5071 and other input devices 5072. The touch panel 5071 is also called a touch screen. The touch panel 5071 may include a touch detection device and a touch controller. Other input devices 5072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, joysticks, etc., which will not be described in detail here. The memory 509 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 510 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understandable that the aforementioned modem processor may not be integrated into processor 510.
[0135] This application embodiment also provides a readable storage medium storing a program or instructions that, when executed by a processor, implement the above-described functionality. Figures 1 to 2 The various processes in the method embodiments can achieve the same technical effect, and will not be described again here to avoid repetition.
[0136] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0137] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.
Claims
1. A human-computer dialogue method, characterized in that, include: Determine the type of call; Determining the category of an incoming call includes: when there are multiple categories of incoming calls, acquiring the language information of the caller and identifying first key information in the language information; calculating a score for the incoming call in each category based on the first key information; and selecting the category with the highest score as the category of the incoming call. Determine the dialogue mode corresponding to the type of incoming call; The caller's language information in the dialogue mode is obtained, and the first key information of the language information is identified; the first key information can reflect the key purpose of the caller's language information in the dialogue mode. The response strategy is determined based on the first key information and the preset deep reinforcement learning model; Based on the response strategy, response language information corresponding to the first key information is generated, and the response language information is returned to the caller. The process of determining a response strategy based on key information from the language information and a pre-defined deep reinforcement learning model includes: Determine the second key information corresponding to the dialogue mode; the second key information includes at least one of the time information, location information, and event information in the dialogue mode. The response strategy is determined based on the first key information, the second key information, and the preset deep reinforcement learning model.
2. The human-computer dialogue method according to claim 1, characterized in that, The step of acquiring the caller's language information in the dialogue mode and identifying the first key information of the language information includes: Obtain the language information of the incoming caller in the dialogue mode; The first key information is obtained by performing entity recognition processing on the language information.
3. The human-computer dialogue method according to claim 1, characterized in that, The step of generating response language information corresponding to the first key information based on the response strategy includes: Determine the response template corresponding to the response strategy from the preset response templates; Based on the reply template, generate reply language information corresponding to the first key information.
4. The human-computer dialogue method according to claim 3, characterized in that, After returning the response language information to the caller, the method further includes: Obtain the emotional state of the caller after receiving the response language information; The response template is optimized based on the emotional state.
5. The human-computer dialogue method according to claim 4, characterized in that, The optimization of the response template based on the emotional state includes: Determine the extended language information corresponding to the response language information; The caller's emotional state under the extended language information is obtained. If the emotional value corresponding to the emotional state exceeds a preset threshold, the response template is optimized based on the extended language information.
6. A human-computer dialogue device, characterized in that, include: The first determining module is used to determine the type of incoming call; The first determining module is configured to: when the number of incoming call categories includes multiple categories, acquire the language information of the incoming caller and identify the first key information in the language information; and calculate the score of the incoming call in each category based on the first key information. The category with the highest score is selected as the category of the incoming call; The second determining module is used to determine the dialogue mode corresponding to the category of the incoming call; The acquisition module is used to acquire the language information of the incoming caller in the dialogue mode and identify the first key information of the language information; The first key information can reflect the key purpose of the caller's language information in the dialogue mode; The third determining module is used to determine the response strategy based on the first key information and the preset deep reinforcement learning model; The response module is used to generate response language information corresponding to the first key information based on the response strategy, and return the response language information to the caller. The third determining module is used for: Determine the second key information corresponding to the dialogue mode; the second key information includes at least one of the time information, location information, and event information in the dialogue mode. The response strategy is determined based on the first key information, the second key information, and the preset deep reinforcement learning model.
7. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the human-computer dialogue method as described in any one of claims 1-5.
8. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the human-computer dialogue method as described in any one of claims 1-5.
Citation Information
Patent Citations
Method and device for processing information
CN105631022A
Intelligent chat voice control method and device, computer equipment and storage medium
CN110086946A
Software crowdsourcing task type dialogue system and method
CN111078844A
Automatic incoming call answering method and device, equipment and storage medium
CN111683175A