Question-answering conversation processing method, question-answering system, electronic device, and storage medium
By nesting multiple question-and-answer processes in the question-and-answer system, the problem of insufficient processing of complex user responses in the existing technology is solved, and more intelligent and flexible question-and-answer session processing is achieved.
Patent Information
- Application Number
- CN202010605483.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-29
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2040-06-29
AI Technical Summary
Existing question-answering systems lack flexibility and processing capabilities when faced with complex or mismatched user responses, and are unable to effectively respond to user messages.
A nested question-answering process is adopted. By calling multiple question-answering processes in the question-answering conversation knowledge base, different responses of users are matched, multi-round nested interactions are achieved, and the response range of the question-answering system is expanded.
The intelligence of the question-and-answer system and user experience have been improved, and it can better handle users' diverse question-and-answer requests and avoid invalid responses caused by a single process.
Smart Images

Figure CN113934826B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, system, electronic device, and storage medium for processing question-and-answer conversations. Background Art
[0002] With the development of science and technology, question-answering systems based on intelligent question-answering robots have appeared in people's lives.
[0003] In the prior art, the question-and-answer system conducts question-and-answer conversations based on a question-and-answer process. After receiving a message from a user, the question-and-answer system determines whether there is a corresponding wording for the message based on the question-and-answer logic preset in the question-and-answer process, and sends the corresponding wording to the user.
[0004] However, in actual question-and-answer sessions, the logic of the user's reply messages is not very strong. Once the reply message cannot be covered by the question-and-answer logic in the question-and-answer process, the question-and-answer system will not be able to respond well to the user message, and its flexibility and ability to handle complex messages are both low. Summary of the Invention
[0005] Embodiments of the present application provide a method for processing a question-and-answer session, a question-and-answer system, an electronic device, and a storage medium, so as to provide a question-and-answer session processing function for an intelligent question-and-answer system.
[0006] In one aspect, the present application provides a method for processing a question-and-answer session, comprising:
[0007] Calling the first question-and-answer process and sending a question-and-answer request of the first question-and-answer process to the terminal;
[0008] receiving a current question-and-answer reply from the terminal, and when the current question-and-answer reply does not match the pre-stored question-and-answer script of the first question-and-answer process, calling a second question-and-answer process that matches the current question-and-answer reply in the question-and-answer session knowledge base;
[0009] Determine the question and answer script that matches the current question and answer response in the second question and answer process, and send the question and answer script to the terminal.
[0010] In an optional embodiment, after receiving the current question and answer reply from the terminal, the method further includes:
[0011] When the current question and answer reply matches the pre-stored question and answer language of the first question and answer process, the question and answer language in the first question and answer process that matches the current question and answer reply is determined, and the question and answer language is sent to the terminal.
[0012] In an optional embodiment, after receiving the current question and answer reply from the terminal, the method further includes:
[0013] When the current question and answer response does not match the pre-stored question and answer language of the first question and answer process and there is no second question and answer process matching the current question and answer response in the question and answer session knowledge base, the first question and answer process is re-called and a question and answer request of the first question and answer process is sent to the terminal.
[0014] In an optional embodiment, after determining the question-and-answer script that matches the current question-and-answer response in the second question-and-answer process and sending the question-and-answer script to the terminal, the process further includes:
[0015] Recall the first question-and-answer process and send a question-and-answer request of the first question-and-answer process to the terminal;
[0016] The next question and answer reply returned by the receiving terminal is used as the current question and answer reply, and based on the matching relationship between the current question and answer reply and the first question and answer process, it is determined whether to call a third question and answer process matching the current question and answer reply in the question and answer session knowledge base.
[0017] In an optional embodiment, the third question-and-answer process is a question-and-answer process different from the first question-and-answer process and the second question-and-answer process.
[0018] In an optional embodiment, each question-and-answer process includes a plurality of process nodes; each process node is provided with a preset number of pullbacks;
[0019] The preset number of pull-backs is used to indicate the number of times the process node can be repeatedly executed when the process node of the question-and-answer process is called to conduct a question-and-answer session.
[0020] In an optional embodiment, when any question-and-answer process is called to conduct a question-and-answer session, the processing method further includes:
[0021] When the currently triggered process node in the question-and-answer process cannot flow to the next process node, determining whether the currently triggered process node can perform pull-back processing;
[0022] Among them, when the current pull back number of the currently triggered process node is less than or equal to its preset pull back number, the pull back processing of the currently triggered process node is executed; when the current pull back number of the currently triggered process node is greater than its preset pull back number, the currently triggered process node is jumped out.
[0023] In a second aspect, the present application provides a question-answering system, comprising:
[0024] A process calling module, configured to call the first question-and-answer process and send a question-and-answer request of the first question-and-answer process to the terminal through the communication module;
[0025] The communication module is used to receive the current question and answer reply of the terminal;
[0026] The process calling module is also used to call a second question and answer process that matches the current question and answer response in the question and answer session knowledge base when the current question and answer response does not match the question and answer language of the pre-stored first question and answer process; determine the question and answer language that matches the current question and answer response in the second question and answer process, and send the question and answer language to the terminal through the communication module.
[0027] In an optional embodiment, the process calling module is also used to determine the question and answer language in the first question and answer process that matches the current question and answer response when the current question and answer response matches the pre-stored question and answer language of the first question and answer process, and send the question and answer language to the terminal through the communication module.
[0028] In an optional embodiment, the process calling module is also used to re-call the first question and answer process when the current question and answer response does not match the pre-stored question and answer language of the first question and answer process and there is no second question and answer process matching the current question and answer response in the question and answer session knowledge base, and send a question and answer request of the first question and answer process to the terminal through the communication module.
[0029] In an optional embodiment, the process calling module is also used to re-call the first question and answer process and send a question and answer request of the first question and answer process to the terminal through the communication module; it is also used to use the next question and answer reply returned by the terminal received through the communication module as the current question and answer reply, and determine whether to call a third question and answer process that matches the current question and answer reply in the question and answer session knowledge base based on the matching relationship between the current question and answer reply and the first question and answer process.
[0030] In an optional embodiment, the third question-and-answer process is a question-and-answer process different from the first question-and-answer process and the second question-and-answer process.
[0031] In an optional embodiment, each question-and-answer process includes a plurality of process nodes; each process node is provided with a preset number of pullbacks;
[0032] The preset number of pull-backs is used to indicate the number of times the process node can be repeatedly executed when the process node of the question-and-answer process is called to conduct a question-and-answer session.
[0033] In an optional embodiment, the process calling module is further configured to, when calling any question-and-answer process to conduct a question-and-answer session, determine whether a currently triggered process node in the question-and-answer process can execute a pull-back process when the currently triggered process node in the question-and-answer process cannot flow to the next process node;
[0034] Among them, when the current pull back number of the currently triggered process node is less than or equal to its preset pull back number, the pull back processing of the currently triggered process node is executed; when the current pull back number of the currently triggered process node is greater than its preset pull back number, the currently triggered process node is jumped out.
[0035] In a third aspect, the present application provides an electronic device, comprising: at least one processor and a memory;
[0036] The memory stores computer-executable instructions;
[0037] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the processing method as described in the first aspect.
[0038] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the processing method of the first aspect is implemented.
[0039] The question-and-answer conversation processing method, question-and-answer system, electronic device and storage medium provided in the embodiments of the present application call a first question-and-answer process and send a question-and-answer request of the first question-and-answer process to a terminal; receive the current question-and-answer reply of the terminal, and when the current question-and-answer reply does not match the question-and-answer language of the pre-stored first question-and-answer process, call a second question-and-answer process that matches the current question-and-answer reply in the question-and-answer conversation knowledge base; determine the question-and-answer language that matches the current question-and-answer reply in the second question-and-answer process, and send the question-and-answer language to the terminal, thereby providing the question-and-answer system with a more effective question-and-answer conversation processing method and processing process, which can switch between different question-and-answer processes according to the various messages replied by the user, effectively solving the problem of the inability to effectively respond to any message initiated by the user due to the use of a single question-and-answer process in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0041] Figure 1 A schematic diagram of a network architecture on which the present disclosure is based;
[0042] Figure 2 This is a flowchart of a method for processing a question-and-answer session provided by this application;
[0043] Figure 3 A first schematic diagram of a question-and-answer session provided in an embodiment of the present application;
[0044] Figure 4A second schematic diagram of a question-and-answer session provided in an embodiment of the present application;
[0045] Figure 5 A schematic diagram of a question-answering session in the prior art;
[0046] Figure 6 A third schematic diagram of a question-and-answer session provided in an embodiment of the present application;
[0047] Figure 7 A fourth schematic diagram of a question-and-answer session provided in an embodiment of the present application;
[0048] Figure 8 A fifth schematic diagram of a question-and-answer session provided in an embodiment of the present application;
[0049] Figure 9 A sixth schematic diagram of a question-and-answer session provided in an embodiment of the present application;
[0050] Figure 10 A schematic diagram of the structure of a question-answering system provided in an embodiment of the present application;
[0051] Figure 11 This is a schematic structural diagram of an electronic device according to an embodiment of the present application.
[0052] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0053] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of systems and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0054] With the development of science and technology, question-answering systems based on intelligent question-answering robots have appeared in people's lives.
[0055] In the prior art, the question-and-answer system conducts question-and-answer conversations based on a question-and-answer process. After receiving a message from a user, the question-and-answer system determines whether there is a corresponding wording for the message based on the question-and-answer logic preset in the question-and-answer process, and sends the corresponding wording to the user.
[0056] However, in actual question-and-answer sessions, the logic of the user's reply messages is not very strong. Once the reply message cannot be covered by the question-and-answer logic in the question-and-answer process, the question-and-answer system will not be able to respond well to the user message, and its flexibility and ability to handle complex messages are both low.
[0057] In order to better illustrate the solution provided by the embodiments of the present application, the following terms will be explained first:
[0058] Question and answer process: Response logic designed according to business logic. This can be triggered and circulated through nodes such as interaction, query, and judgment. Based on the input information, the output information is based on the preset response logic. Generally speaking, this question and answer process can be pre-configured by the developer.
[0059] Process pull: For the question-and-answer process, when the user's answer cannot make the process node of the question-and-answer process proceed normally (that is, at the process node of the current process, the node cannot trigger and flow nodes such as interaction, query, and judgment based on the user's answer), the process node of the question-and-answer process will be restarted and executed. This process is a process pull.
[0060] Multi-round nesting: During the execution of an interaction in a Q&A process A, another Q&A process B can be triggered simultaneously. This execution method is called multi-round nesting. In multi-round nesting, when Q&A process A is suspended, the execution service of Q&A process B can be executed. When Q&A process B completes execution, it can return to Q&A process A.
[0061] refer to Figure 1 , Figure 1 This is a schematic diagram of a network architecture based on which this application is based. Figure 1 The network architecture shown may specifically include a terminal 1 and a server 2 .
[0062] Among them, terminal 1 can specifically be a hardware device including a user's mobile phone, desktop computer, smart home device, tablet computer, etc., and its terminal 1 can carry a client or hardware module for conducting question-and-answer conversations, wherein the client specifically includes but is not limited to a network communication client and a telephone voice interaction client; the hardware module includes but is not limited to a mobile communication module.
[0063] Server 2 can be hardware that hosts a question-and-answer system. This question-and-answer system uses the question-and-answer system provided by this application to process question-and-answer conversations. Server 2 can be located in a cloud server and interact with terminal 1 via a network. A user can establish a question-and-answer conversation with the question-and-answer system of server 2 through terminal 1. The question-and-answer system uses the corresponding question-and-answer conversation processing method to execute the question-and-answer conversation logic and provide the user with question-and-answer conversation service functions.
[0064] Example 1
[0065] Figure 2 This is a flowchart of a method for processing a question-and-answer session provided by this application. Figure 2 As shown, the method includes:
[0066] Step 101: Call the first question-answer process and send a question-answer request of the first question-answer process to the terminal.
[0067] Step 102: Receive the current question and answer reply from the terminal, and when the current question and answer reply does not match the pre-stored question and answer script of the first question and answer process, call a second question and answer process that matches the current question and answer reply in the question and answer conversation knowledge base.
[0068] Step 103: Determine the question-and-answer script that matches the current question-and-answer response in the second question-and-answer process, and send the question-and-answer script to the terminal.
[0069] It should be noted that the execution entity of the question-and-answer conversation processing method provided in this application is a question-and-answer system, which can be specifically set in the electronic device on which the aforementioned server is based.
[0070] The method for processing question-and-answer conversations provided in this application can be specifically applied to a question-and-answer system, wherein this application will not limit the conversation form of the question-and-answer conversation involved, that is, the question-and-answer conversation can be a voice question-and-answer conversation, such as an intelligent voice customer service based on a telephone to follow up on a certain service, or it can be a text question-and-answer conversation, such as an intelligent chat customer service based on a text communication box to provide information consultation on a certain product, etc.
[0071] In addition, this application does not limit the session type of the question-and-answer session involved, that is, the session can be an incoming type session, such as the user's terminal acts as the caller and actively initiates a question-and-answer session to the question-and-answer system; the session can be an outgoing type session, such as the question-and-answer system acts as the caller and initiates a question-and-answer session to the terminal.
[0072] Specifically, after establishing the question-and-answer session, the question-and-answer system will call the first question-and-answer process to send a question-and-answer request of the first question-and-answer process to the terminal. The first question-and-answer process can be specifically understood as the main question-and-answer process.
[0073] For example, Figure 3 The first schematic diagram of the question-and-answer session provided in the embodiment of the present application, when the question-and-answer system is used for outgoing calls to collect the terminal's evaluation information on a certain service, after the question-and-answer system establishes a question-and-answer session with the terminal, the question-and-answer system will call the question-and-answer process related to the service evaluation as the first question-and-answer process, and send the question-and-answer request according to the first question-and-answer process, such as "Dear user, you received a certain service on a certain platform on a certain day of a certain month of a certain year. Please rate the service."
[0074] Subsequently, the question-answering system will receive the current question-answering response from the user via the terminal.
[0075] In the aforementioned outgoing call scenario, the current Q&A response corresponds to the Q&A request in the first Q&A process, such as "full marks" or "unsatisfied, 1 point," etc. In this case, similar to the prior art, the Q&A system can find a Q&A script matching the current Q&A response in the first Q&A process and respond accordingly, such as "Thank you for your evaluation" or "Thank you for your cooperation, we will pass on your comments," etc., and then disconnect, thus completing the Q&A session.
[0076] For example, Figure 4 This is a second schematic diagram of a question-and-answer session provided in an embodiment of the present application. When the question-and-answer system is used for incoming calls and serves as a customer service system to respond to questions actively sent by the terminal, after the question-and-answer system establishes a question-and-answer session with the terminal, the question-and-answer system will call the customer service-related question-and-answer process as the first question-and-answer process, and send a question-and-answer request according to the first question-and-answer process, such as "Dear user, how can I help you?"
[0077] When the question-and-answer system is used for an incoming call, if the current question-and-answer reply is "no more questions" or "no service required", the question-and-answer system may disconnect, thereby completing a question-and-answer session.
[0078] That is to say, when the current question and answer reply matches the pre-stored question and answer language of the first question and answer process, the question and answer system can determine the question and answer language in the first question and answer process that matches the current question and answer reply, and send the question and answer language to the terminal.
[0079] In other cases, the question-and-answer system may not be able to find a speech in the first question-and-answer process that matches the current question-and-answer response to respond to the current question-and-answer response of the terminal.
[0080] Faced with this situation, Figure 5 This is a diagram of a question-and-answer session in the prior art. In this prior art, the question-and-answer request from the first question-and-answer process is resent to the terminal, specifically, the question-and-answer request "Dear user, you received a service on a certain platform on a certain date. Please rate this service." However, the user cannot receive a response to the current question and may end up hanging up the session. This approach is clearly overly simplistic and unintelligent, resulting in a poor user experience.
[0081] Therefore, in order to improve the intelligence of processing, Figure 6 The third schematic diagram of the question-and-answer session provided in the embodiment of the present application is as follows: Figure 6As shown, the present application adopts a nested question-and-answer process, that is, when the current question-and-answer reply does not match the question-and-answer language of the first pre-stored question-and-answer process, such as "Is there a limit on the service time of service B", the question-and-answer system will call the second question-and-answer process (such as the question-and-answer process related to service B) that matches the current question-and-answer reply in the question-and-answer session knowledge base, to determine the question-and-answer language that matches the current question-and-answer reply in the second question-and-answer process, and send the question-and-answer language to the terminal, such as determining in the second question-and-answer process that the question-and-answer language corresponding to the reply is "The service time of service B is 9:00-19:00 from Monday to Friday" and returning it to the terminal.
[0082] Specifically, the Q&A conversation knowledge base includes multiple preset Q&A processes, each of which corresponds to a different Q&A conversation knowledge service. For example, Q&A process A includes all information about service A, and Q&A process B includes all information about service B. When a user responds to a current Q&A reply, such as the aforementioned "Are there any restrictions on the service hours of service B?", the Q&A system will find a Q&A process B that matches the current Q&A reply from the Q&A conversation knowledge base as the second Q&A process. The system will then determine from this second Q&A process the Q&A script corresponding to the Q&A request, "Service B's service hours are 9:00-19:00, Monday to Friday," and return this Q&A script to the terminal.
[0083] In this way, when the question-and-answer system receives a question-and-answer reply from a user that cannot be processed by the first question-and-answer process, it can call other question-and-answer processes in the question-and-answer knowledge base to send the corresponding question-and-answer script to the question-and-answer reply, so that it can use a nested interaction method to realize question-and-answer interaction with the user, expand the range of question-and-answer replies that the question-and-answer system can respond to in a single question-and-answer session, and effectively improve the intelligence of the question-and-answer system.
[0084] In other optional embodiments, after the question-and-answer system determines the question-and-answer language that matches the current question-and-answer reply in the second question-and-answer process and sends the question-and-answer language to the terminal, it also includes: re-calling the first question-and-answer process and sending a question-and-answer request of the first question-and-answer process to the terminal; receiving the next question-and-answer reply returned by the terminal as the current question-and-answer reply, and determining whether to call a third question-and-answer process that matches the current question-and-answer reply in the question-and-answer session knowledge base based on the matching relationship between the current question-and-answer reply and the first question-and-answer process.
[0085] Among them, the third question and answer process is a question and answer process different from the first question and answer process and the second question and answer process.
[0086] That is to say, in this embodiment, after step 103, the following steps are further included:
[0087] Step 104: Re-call the first question-and-answer process and send a question-and-answer request of the first question-and-answer process to the terminal;
[0088] Step 105: Use the next question and answer reply returned by the receiving terminal as the current question and answer reply, and determine whether to call a third question and answer process matching the current question and answer reply in the question and answer conversation knowledge base based on the matching relationship between the current question and answer reply and the first question and answer process.
[0089] Specifically, using the outbound call scenario described above as an example, after the Q&A system returns the Q&A message "Service B's service hours are Monday to Friday, 9:00 AM - 7:00 PM" to the user's terminal, it will re-invoke the first Q&A process and resend the Q&A request to the terminal, stating "Dear user, you received a service on a certain platform on a certain date. Please rate it." The Q&A system will then receive the user's current Q&A response and process it accordingly.
[0090] Unlike the previous processing method, the Q&A system will once again check whether the current Q&A response matches the Q&A script of the first Q&A process. If it still does not match the Q&A script of the first Q&A process, it will search the Q&A knowledge base for a Q&A process that matches the new current Q&A response to respond. At this time, it should be noted that the Q&A process called this time should be different from both the first and second Q&A processes mentioned above. That is, the Q&A process that has already been called will not be called again to prevent the Q&A system from falling into a processing loop.
[0091] For example, Figure 7 The fourth schematic diagram of the question-and-answer session provided in the embodiment of the present application shows that when the user sends the question "Is there a limit on the service time of service B" again, the question-and-answer system will directly end the question-and-answer session without responding, or re-call the first question-and-answer process and re-send the question-and-answer request "Dear user, you received a certain service on a certain platform on a certain day of a certain month of a certain year. Please rate the service" to the terminal so that the user can reply again.
[0092] certainly, Figure 8 The fifth schematic diagram of the question-and-answer conversation provided in the embodiment of the present application shows that when the user sends a new question-and-answer reply and the new question-and-answer reply still cannot be covered by the question-and-answer language of the first question-and-answer process, such as "Is there any limit on the service time of service A?", at this time, the question-and-answer system can re-call the question-and-answer process related to service A as the third question-and-answer process, and make a corresponding reply, that is, send "There is no limit on the service time of service A" to the terminal.
[0093] Through this processing method, the question-answering system can use multiple question-answering processes to process different questions and answers of users. This multi-round nested processing method can further improve the intelligence of the question-answering system and bring users a better question-answering experience.
[0094] In other optional embodiments, after the question-and-answer system receives the current question-and-answer reply from the terminal, it further includes: when the current question-and-answer reply does not match the pre-stored question-and-answer language of the first question-and-answer process and there is no second question-and-answer process matching the current question-and-answer reply in the question-and-answer session knowledge base, re-calling the first question-and-answer process and sending a question-and-answer request of the first question-and-answer process to the terminal.
[0095] Specifically, when no question-and-answer process that matches the current question-and-answer response is found in the question-and-answer session knowledge base, the question-and-answer system will resend the question-and-answer request.
[0096] For example, if the Q&A system sends a message to the user according to the first Q&A process, "Dear user, you received a service on a certain platform on a certain date in a certain month in a certain year. Please rate the service." The user's current Q&A reply is "What is the difference between the services of other platforms and the services of your platform?", and for this reply, if no Q&A script of any Q&A process in the Q&A session knowledge base can match it, then the Q&A system will pull back to the first Q&A process, that is, re-call the first Q&A process to re-send "Dear user, you received a service on a certain platform on a certain date in a certain month in a certain year. Please rate the service." to the user so that the user can re-reply to the Q&A.
[0097] In order to avoid the question-answering system from falling into a loop when it fails to obtain a question-answer response that matches its speech. In other optional embodiments,
[0098] Each question-and-answer process includes multiple process nodes; each process node is set with a preset number of pullbacks;
[0099] The preset number of pull-backs is used to indicate the number of times the process node can be repeatedly executed when the process node of the question-and-answer process is called to conduct a question-and-answer session.
[0100] Therefore, when any question-and-answer process is called to conduct a question-and-answer session, the processing method further includes:
[0101] When the currently triggered process node in the question-and-answer process cannot flow to the next process node, determining whether the currently triggered process node can perform pull-back processing;
[0102] Among them, when the current pull back number of the currently triggered process node is less than or equal to its preset pull back number, the pull back processing of the currently triggered process node is executed; when the current pull back number of the currently triggered process node is greater than its preset pull back number, the currently triggered process node is jumped out.
[0103] Still taking the aforementioned scenario where the question-answering system is used for outbound calls to collect terminal evaluation information on a certain service as an example, Figure 9 This is the sixth schematic diagram of the question-and-answer session provided in an embodiment of the present application. After the question-and-answer system establishes a question-and-answer session with the terminal, each interaction, query, and judgment performed by the question-and-answer system can be regarded as a process node.
[0104] like Figure 9 As shown, without considering jumping out of the question-and-answer process and jumping into other question-and-answer processes, the question-and-answer system will first send a message to the terminal according to its interaction node: "Dear user, you received a certain service on a certain platform on a certain day of a certain month of a certain year. Please rate the service." If the terminal does not give any reply at this time, the interaction node will not be able to continue. At this time, the interaction node of the question-and-answer system will begin to determine whether to trigger the pull-back processing of the interaction node.
[0105] Assume that the preset pull-back number of the interactive node is 3. Since the interactive node has not performed a pull-back process before this judgment, the current pull-back number of the interactive node is 0, which meets the execution conditions of the pull-back process. At this time, the interactive node will perform a pull-back process, that is, send "Dear user, you received a certain service on a certain platform on a certain day of a certain month of a certain year, please rate the service" again, and add 1 to the current pull-back number.
[0106] If the terminal still does not respond, the interactive node will trigger the judgment again, that is, perform the operation of judging the size relationship between the current pull-back number and the preset pull-back number, and determine the subsequent processing based on the judgment result.
[0107] The current number of pullbacks (such as 4 times) is greater than the preset number of pullbacks (such as 3 times). Figure 9 As shown, the interactive node will no longer perform the pull-back process. At this time, the question-answering process of the question-answering system will jump out of the interactive node. Jumping out of the interactive node may include directly disconnecting the question-answering dialogue with the terminal (such as Figure 9 You can also jump out and enter other upper-level question-and-answer processes.
[0108] The above implementation only takes the calling of the first question-and-answer process based on the number of pull-backs as an example to illustrate. For other question-and-answer processes, the principles are similar and will not be elaborated on in this implementation.
[0109] The method for processing question-and-answer conversations provided in an embodiment of the present application calls a first question-and-answer process and sends a question-and-answer request of the first question-and-answer process to a terminal; receives a current question-and-answer reply from the terminal, and when the current question-and-answer reply does not match the question-and-answer language of the pre-stored first question-and-answer process, calls a second question-and-answer process that matches the current question-and-answer reply in a question-and-answer conversation knowledge base; determines the question-and-answer language that matches the current question-and-answer reply in the second question-and-answer process, and sends the question-and-answer language to the terminal, thereby providing a more effective method and process for processing question-and-answer conversations for the question-and-answer system, which can switch between different question-and-answer processes according to the various messages replied by the user, effectively solving the problem in the prior art of adopting a single question-and-answer process and being unable to effectively respond to any message initiated by the user.
[0110] Example 2
[0111] Corresponding to the method for processing the question-answer session in the above embodiment, Figure 10 A structural diagram of a question-answering system provided in an embodiment of the present application is shown in FIG. Figure 10 As shown, the question-answering system includes: a process calling module 10 and a communication module 20 .
[0112] The process calling module 10 is used to call the first question-answering process and send a question-answering request of the first question-answering process to the terminal through the communication module 20;
[0113] The communication module 20 is used to receive the current question and answer reply of the terminal;
[0114] The process calling module 10 is also used to call a second question and answer process that matches the current question and answer response in the question and answer session knowledge base when the current question and answer response does not match the question and answer language of the pre-stored first question and answer process; determine the question and answer language that matches the current question and answer response in the second question and answer process, and send the question and answer language to the terminal through the communication module 20.
[0115] In an optional embodiment, the process calling module 10 is also used to determine the question and answer language in the first question and answer process that matches the current question and answer response when the current question and answer response matches the pre-stored question and answer language of the first question and answer process, and send the question and answer language to the terminal through the communication module 20.
[0116] In an optional embodiment, the process calling module 10 is also used to re-call the first question and answer process when the current question and answer response does not match the pre-stored question and answer language of the first question and answer process and there is no second question and answer process matching the current question and answer response in the question and answer session knowledge base, and send a question and answer request of the first question and answer process to the terminal through the communication module 20.
[0117] In an optional embodiment, the process calling module 10 is also used to re-call the first question and answer process and send a question and answer request of the first question and answer process to the terminal through the communication module 20; it is also used to use the next question and answer reply returned by the terminal received through the communication module 20 as the current question and answer reply, and determine whether to call a third question and answer process that matches the current question and answer reply in the question and answer session knowledge base based on the matching relationship between the current question and answer reply and the first question and answer process.
[0118] In an optional embodiment, the third question-and-answer process is a question-and-answer process different from the first question-and-answer process and the second question-and-answer process.
[0119] In an optional embodiment,
[0120] Each question-and-answer process includes multiple process nodes; each process node is set with a preset number of pullbacks;
[0121] The preset number of pull-backs is used to indicate the number of times the process node can be repeatedly executed when the process node of the question-and-answer process is called to conduct a question-and-answer session.
[0122] In an optional embodiment, the process calling module 10 is further configured to, when calling any question-and-answer process to conduct a question-and-answer session, determine whether a currently triggered process node in the question-and-answer process can execute a pull-back process when the currently triggered process node in the question-and-answer process cannot flow to the next process node;
[0123] Among them, when the current pull back number of the currently triggered process node is less than or equal to its preset pull back number, the pull back processing of the currently triggered process node is executed; when the current pull back number of the currently triggered process node is greater than its preset pull back number, the currently triggered process node is jumped out.
[0124] The question-and-answer system provided in the embodiment of the present application calls a first question-and-answer process and sends a question-and-answer request of the first question-and-answer process to a terminal; receives a current question-and-answer reply from the terminal, and when the current question-and-answer reply does not match the question-and-answer language of the pre-stored first question-and-answer process, calls a second question-and-answer process that matches the current question-and-answer reply in a question-and-answer session knowledge base; determines the question-and-answer language that matches the current question-and-answer reply in the second question-and-answer process, and sends the question-and-answer language to the terminal, thereby providing the question-and-answer system with a more effective question-and-answer session processing method and processing process, which can switch between different question-and-answer processes according to the various messages replied by the user, effectively solving the problem of the inability to effectively respond to any message initiated by the user due to the use of a single question-and-answer process in the prior art.
[0125] Example 3
[0126] Figure 11A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 11 As shown, an embodiment of the present invention further provides an electronic device 1400, including: a memory 1401, a processor 1402 and a computer program.
[0127] The computer program is stored in memory 1401 and is configured to be executed by processor 1402 to implement the method for processing a question-and-answer session provided by any embodiment of the present invention. For related explanations, reference can be made to the corresponding descriptions and effects of the steps in the accompanying drawings, and detailed descriptions are omitted here.
[0128] In this embodiment, the memory 1401 and the processor 1402 are connected via a bus.
[0129] Example 4
[0130] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. The computer program is executed by a processor to implement the method for processing a question-and-answer conversation provided in any embodiment of the present invention.
[0131] In the several embodiments provided herein, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the module division is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of the system or module, and can be electrical, mechanical or other forms.
[0132] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of these modules may be selected to achieve the purpose of this embodiment based on actual needs.
[0133] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing module, each module may exist physically separately, or two or more modules may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or hardware plus software functional modules.
[0134] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. Such program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable question-answering system, such that when the program code is executed by the processor or controller, the functions / operations specified in the flow charts and / or block diagrams are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0135] In the context of the present invention, machine-readable media can be tangible media that can contain or store a program for use by an instruction execution system, system or device or used in combination with an instruction execution system, system or device. Machine-readable media can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, systems or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0136] In addition, although adopting specific order to describe each operation, this should be understood as requiring such operation to be carried out in the specific order shown or in sequential order, or requiring that all illustrated operations should be carried out to obtain desired results. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although comprising some specific implementation details in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of separate embodiment can also be implemented in a single implementation in combination. On the contrary, the various features described in the context of a single implementation also can be implemented in a plurality of implementations individually or in the mode of any suitable subcombination.
[0137] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A method for processing a question-answer conversation, characterized in that: include: Calling the first question-and-answer process and sending a question-and-answer request of the first question-and-answer process to the terminal; receiving a current question-and-answer reply from the terminal, and when the current question-and-answer reply does not match the pre-stored question-and-answer script of the first question-and-answer process, calling a second question-and-answer process that matches the current question-and-answer reply in the question-and-answer session knowledge base; The second question-and-answer process is a question-and-answer process different from the first question-and-answer process; Determining a question-and-answer script in the second question-and-answer process that matches the current question-and-answer response, and sending the question-and-answer script to the terminal; Recall the first question-and-answer process and send a question-and-answer request of the first question-and-answer process to the terminal; Using the next question-and-answer reply returned by the receiving terminal as the current question-and-answer reply, and determining whether to call a third question-and-answer process matching the current question-and-answer reply in the question-and-answer session knowledge base based on a matching relationship between the current question-and-answer reply and the first question-and-answer process; The third question-and-answer process is a question-and-answer process different from the first question-and-answer process and the second question-and-answer process; After the current question and answer reply of the receiving terminal, it also includes: when the current question and answer reply does not match the pre-stored question and answer language of the first question and answer process and there is no second question and answer process matching the current question and answer reply in the question and answer session knowledge base, the first question and answer process is re-called and a question and answer request of the first question and answer process is sent to the terminal.
2. The method for processing a question-and-answer conversation according to claim 1, wherein: After receiving the current question and answer reply from the terminal, the method further includes: When the current question and answer reply matches the pre-stored question and answer language of the first question and answer process, the question and answer language in the first question and answer process that matches the current question and answer reply is determined, and the question and answer language is sent to the terminal.
3. The method for processing a question-and-answer conversation according to claim 1 or 2, wherein: Each question-and-answer process includes multiple process nodes; each process node is set with a preset number of pullbacks; The preset number of pull-backs is used to indicate the number of times the process node can be repeatedly executed when the process node of the question-and-answer process is called to conduct a question-and-answer session.
4. The method for processing a question-and-answer session according to claim 3, wherein: When any question-and-answer process is called to conduct a question-and-answer session, the processing method further includes: When the currently triggered process node in the question-and-answer process cannot flow to the next process node, determining whether the currently triggered process node can perform pull-back processing; Among them, when the current pull back number of the currently triggered process node is less than or equal to its preset pull back number, the pull back processing of the currently triggered process node is executed; when the current pull back number of the currently triggered process node is greater than its preset pull back number, the currently triggered process node is jumped out.
5. A question-answering system, characterized in that: include: A process calling module, configured to call the first question-and-answer process and send a question-and-answer request of the first question-and-answer process to the terminal through the communication module; The communication module is used to receive the current question and answer reply of the terminal; The process calling module is further configured to call a second question-and-answer process that matches the current question-and-answer response in the question-and-answer session knowledge base when the current question-and-answer response does not match the pre-stored question-and-answer script of the first question-and-answer process; determining a question-and-answer script in the second question-and-answer process that matches the current question-and-answer response, and sending the question-and-answer script to the terminal through the communication module; the second question-and-answer process is a question-and-answer process different from the first question-and-answer process; The process calling module is further configured to, after the communication module receives the current question and answer reply from the terminal, if the current question and answer reply does not match the pre-stored question and answer script of the first question and answer process and no second question and answer process matching the current question and answer reply exists in the question and answer session knowledge base, re-call the first question and answer process and send a question and answer request of the first question and answer process to the terminal through the communication module; The process calling module is also used to re-call the first question and answer process and send a question and answer request of the first question and answer process to the terminal through the communication module; it is also used to use the next question and answer reply returned by the terminal received through the communication module as the current question and answer reply, and determine whether to call a third question and answer process matching the current question and answer reply in the question and answer session knowledge base based on the matching relationship between the current question and answer reply and the first question and answer process; the third question and answer process is a question and answer process different from the first question and answer process and the second question and answer process.
6. The question-answering system according to claim 5, characterized in that: The process calling module is also used to determine the question and answer language in the first question and answer process that matches the current question and answer response after the communication module receives the current question and answer response of the terminal, and send the question and answer language to the terminal through the communication module when the current question and answer response matches the pre-stored question and answer language of the first question and answer process.
7. The question-answering system according to claim 5 or 6, characterized in that: Each question-and-answer process includes multiple process nodes; each process node is set with a preset number of pullbacks; The preset number of pull-backs is used to indicate the number of times the process node can be repeatedly executed when the process node of the question-and-answer process is called to conduct a question-and-answer session.
8. The question-answering system according to claim 7, wherein: The process calling module is further configured to, when calling any question-and-answer process to conduct a question-and-answer session, determine whether a pull-back process can be executed on the currently triggered process node in the question-and-answer process if the currently triggered process node cannot flow to the next process node; Among them, when the current pull back number of the currently triggered process node is less than or equal to its preset pull back number, the pull back processing of the currently triggered process node is executed; when the current pull back number of the currently triggered process node is greater than its preset pull back number, the currently triggered process node is jumped out.
9. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the processing method according to any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the processing method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Information question and answer interaction method and system, storage medium, terminal, and intelligent knowledge base
CN108509591A