Session processing method and apparatus, electronic device, and computer-readable storage medium

By identifying and controlling the user's inquiry intent in the human-computer dialogue system, the problem of infinite loops caused by repeated inquiries is solved, thereby improving conversation efficiency and user experience.

CN117076623BActive Publication Date: 2026-03-03VOICEAI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310891398.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-19
Publication Date
2026-03-03
Estimated Expiration
2043-07-19

AI Technical Summary

Technical Problem

In existing technologies, human-computer dialogue systems are prone to getting stuck in an infinite loop when users repeatedly ask the same questions, resulting in low conversation efficiency and an inability to effectively guide users.

Method used

By obtaining the query content from the conversation object, performing intent recognition processing, determining the response content, and controlling the conversation based on the number of response processing cycles, infinite loops can be avoided.

Benefits of technology

It improved conversation efficiency, reduced resource waste, effectively guided the dialogue process, and avoided infinite loops.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117076623B_ABST
    Figure CN117076623B_ABST
Patent Text Reader

Abstract

The application provides a conversation processing method and device, electronic equipment and a computer readable storage medium. The method comprises: obtaining inquiry content input by a conversation object in a conversation; performing intent recognition processing on the inquiry content to obtain an inquiry intent; determining corresponding response content according to the inquiry intent, and performing response processing in the conversation according to the response content; and performing control processing on the conversation according to the number of times of response processing in the conversation for the same inquiry intent. Through the application, the conversation efficiency can be improved, and the situation of falling into an infinite loop of dialogue can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a session processing method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. Human-machine conversation is an important branch of AI, referring to the technology that enables machines to understand and use natural language to achieve human-machine communication. It is now widely used in various scenarios such as customer service, navigation, and shopping guidance.

[0003] However, in related technologies, responses to user inquiries are usually provided according to a fixed process. If users repeatedly use similar phrases, the same content will be repeatedly fed back, and the entire process will fall into an infinite loop, resulting in low conversation efficiency. Summary of the Invention

[0004] This application provides a session processing method, apparatus, electronic device, and computer-readable storage medium that can accurately identify whether a user is repeatedly asking questions, thereby improving session efficiency.

[0005] The technical solution of this application embodiment is implemented as follows:

[0006] This application provides a session processing method, including:

[0007] Retrieves the query content entered by the session object in the session;

[0008] The inquiry content is processed by intent recognition to obtain the inquiry intent;

[0009] The corresponding response content is determined based on the inquiry intent, and the response is processed in the session based on the response content;

[0010] The session is controlled based on the number of times the same query intent is responded to in the session.

[0011] This application provides a session processing apparatus, including:

[0012] The retrieval module is used to retrieve the query content entered by the session object in the session;

[0013] The intent recognition module is used to perform intent recognition processing on the query content to obtain the query intent;

[0014] The response module is used to determine the corresponding response content based on the inquiry intent, and to perform response processing in the session based on the response content;

[0015] The control module is used to control the session based on the number of times the same query intent is responded to in the session.

[0016] This application provides an electronic device, including:

[0017] Memory, used to store executable instructions;

[0018] The processor, when executing executable instructions stored in the memory, implements the session processing method provided in the embodiments of this application.

[0019] This application provides a computer-readable storage medium storing executable instructions for inducing a processor to execute and implement the session processing method provided in this application.

[0020] This application provides a computer program product or computer program that includes executable instructions stored in a computer-readable storage medium. A processor of an electronic device reads the executable instructions from the computer-readable storage medium and executes the executable instructions, causing the electronic device to perform the session processing method described in this application.

[0021] The embodiments of this application have the following beneficial effects:

[0022] This application's embodiments are applied to a dialogue process. First, the query content input by the dialogue participant is obtained. Intent recognition processing is performed on the query content to obtain the query intent. Based on the query intent, the corresponding response content is determined, and response processing is performed within the dialogue based on the response content, thereby achieving feedback on the query content. By controlling the number of times the same query intent is responded to in the dialogue, and instead of allowing it to fall into an infinite dialogue loop, dialogue efficiency can be effectively improved. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a schematic diagram of the structure of the session processing system provided in an embodiment of this application;

[0025] Figure 2 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application;

[0026] Figure 3 This is a flowchart illustrating a session processing method provided in an embodiment of this application;

[0027] Figure 4 This is a flowchart illustrating a session processing method provided in an embodiment of this application;

[0028] Figure 5 This is a schematic diagram of an exception control process provided in an embodiment of this application;

[0029] Figure 6 This is a flowchart illustrating an exception control provided in an embodiment of this application. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0031] In the following description, references to "some embodiments" describe a subset of all possible embodiments; however, it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict. In the following description, the term "a plurality of" means at least two.

[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0033] In related technologies, responses to user inquiries are typically provided according to a fixed process. If users repeatedly use similar phrases, the same content will be repeatedly provided, and the entire process will fall into an infinite loop.

[0034] For example, in an intelligent voice training scenario, the system administrator pre-sets scripts and procedures, and trainees are required to perform voice training according to the system prompts. If a trainee discovers that the system will always produce the same response when they say a certain phrase, the trainee may repeatedly repeat the script, causing the process to repeat endlessly. This wastes time and puts the process into an infinite loop.

[0035] In summary, the solutions provided by these technologies result in low session efficiency and fail to effectively guide users.

[0036] This application provides a session processing method, apparatus, electronic device, and computer-readable storage medium, which can improve session efficiency, effectively guide session objects, and reduce resource waste. The following describes exemplary applications of the electronic device provided in this application. The electronic device provided in this application can be implemented as various types of terminal devices such as laptops, tablets, desktop computers, set-top boxes, and mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), or as a server.

[0037] See Figure 1 , Figure 1 This is a schematic diagram of the architecture of the session processing system 100 provided in the embodiment of this application. The terminal device 400 is connected to the server 200 through the network 300, and the server 200 is connected to the database 500. The network 300 can be a wide area network or a local area network, or a combination of the two.

[0038] In some embodiments, taking the electronic device as a terminal device as an example, the session processing method provided in this application embodiment can be implemented by the terminal device. Taking the user as the session object as an example, the user can start a human-computer dialogue in the client 410 of the terminal device 400. The terminal device 400 obtains the query content entered by the user in the session; performs intent recognition processing on the query content to obtain the query intent; determines the corresponding response content according to the query intent, and performs response processing in the session according to the response content; and performs session control processing according to the number of times the same query intent is responded to in the session. This scenario can support offline human-computer dialogue and is suitable for situations with no network, poor network conditions, or no network required.

[0039] In some embodiments, the session processing method provided in this application can also be implemented by a combination of a terminal device and a server. For example, a user can initiate a human-computer dialogue in the client 410 of the terminal device 400. The terminal device 400 obtains the query content entered by the user in the session and sends the query content to the server 200. The server 200 performs intent recognition processing on the query content to obtain the query intent; determines the corresponding response content according to the query intent, and sends the response content to the terminal device 400, which then performs response processing in the session based on the response content. The server 200 controls the session based on the number of times it processes responses for the same query intent in the session. The server 200 can send control information to the terminal device 400, and the terminal device 400 can perform corresponding operations. For example, the server 200 sends a prompt message to the terminal device 400, which then displays it in the session. This scenario can leverage the server's computing power to improve the efficiency of response and exception handling.

[0040] In some embodiments, the terminal device 400 and / or server 200 can implement the session processing method provided in this application embodiment by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APP), that is, a program that needs to be installed in the operating system to run, such as an application specifically for human-computer dialogue (corresponding to client 410 above); it can also be a small program, that is, a program that only needs to be downloaded into the browser environment to run; or it can be a small program or plugin that can be embedded in any APP, wherein the small program or plugin can be controlled by the user to run or close. In summary, the above-mentioned computer program can be any form of application, module or plugin.

[0041] In some embodiments, server 200 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms. The cloud service can be a session processing service, invoked by terminal device 400. Terminal device 400 can be a smartphone, tablet, laptop, desktop computer, smart TV, smartwatch, etc., but is not limited to these. Terminal devices and servers can be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment.

[0042] Taking the example of a terminal device provided in this application embodiment, it can be understood that in the case where the electronic device is a server, Figure 2 Some parts of the structure shown (such as the user interface, presentation module, and input processing module) can be omitted. See also Figure 2 , Figure 2 This is a schematic diagram of the structure of the terminal device 400 provided in the embodiments of this application. Figure 2 The terminal device 400 shown includes at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in the terminal device 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to implement communication between these components. In addition to a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 440.

[0043] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0044] User interface 430 includes one or more output devices 431 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0045] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 410.

[0046] The memory 450 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.

[0047] In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0048] Operating system 451 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;

[0049] The network communication module 452 is used to reach other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc.

[0050] Presentation module 453 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with user interface 430;

[0051] The input processing module 454 is used to detect and translate one or more user inputs or interactions from one or more input devices 432.

[0052] In some embodiments, the session processing apparatus provided in this application can be implemented in software. Figure 2 A session processing device 455 stored in memory 450 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: an acquisition module 4551, an intent recognition module 4552, a response module 4553, and a control module 4554. These modules are logically linked and can therefore be arbitrarily combined or further separated according to the functions they implement. The functions of each module will be described below.

[0053] The session processing method provided in this application will be described in conjunction with exemplary applications and implementations of the electronic devices provided in the embodiments of this application.

[0054] See Figure 3 , Figure 3 This is a flowchart illustrating a session processing method provided in an embodiment of this application, which will be combined with... Figure 3 The steps shown are explained.

[0055] In step 101, the query content entered by the session object in the session is obtained.

[0056] Here, a session is established with the session object, and the query content entered by the session object in the session is obtained.

[0057] The embodiments of this application do not limit the type of the session object; it can be a real user or a non-user, such as a script program.

[0058] This application does not limit the form of the query content; it can be in multimedia format, including at least one of text, images, and voice. The same applies to the response content described below. In some embodiments, the query content can be a plain text message entered by the user.

[0059] In step 102, the inquiry content is processed to identify the inquiry intent.

[0060] After obtaining the query content, intent recognition processing is performed on the query content to obtain the query intent. This application embodiment does not limit the method of intent recognition processing. For example, a keyword library corresponding to each query intent can be established (e.g., keywords corresponding to the query intent "greet" may include "hello," "hello," etc.), and keyword recognition processing is performed on the query content. If the identified keyword falls into a certain keyword library, the query intent corresponding to that keyword library is taken as the query intent corresponding to the query content. Alternatively, an intent recognition model can be pre-trained, and the trained intent recognition model can be used to perform intent recognition processing on the query content to obtain the query intent. The type of intent recognition model is not limited; for example, it can be a Convolutional Neural Network (CNN) model, etc.

[0061] In step 103, the corresponding response content is determined according to the query intent, and the response is processed in the session according to the response content.

[0062] After determining the intent behind the inquiry, the corresponding response is determined based on the intent, and the response is processed in the conversation based on the response, such as displaying the response in the conversation interface, to achieve human-computer dialogue.

[0063] In some embodiments, the above-mentioned determination of the corresponding response content based on the inquiry intent can be achieved by performing any of the following processes: generating response content corresponding to the inquiry intent through a response model; querying the script database according to the inquiry intent to obtain the response content; wherein the script database includes at least one inquiry intent and at least one response content corresponding to each inquiry intent.

[0064] Here, two methods are provided to determine the response content.

[0065] The first approach is to generate response content that corresponds to the query intent through a pre-trained response model. This approach can enhance the randomness of the response content and improve the user experience.

[0066] The second approach is to establish a pre-built script database. This database includes at least one inquiry intent and at least one corresponding response for each intent. For example, for the inquiry intent "to say hello," the corresponding responses in the database would include "Hello, how can I help you?" and "Hello, what can I do for you?" This method can improve response speed and achieve rapid response.

[0067] In step 104, the session is controlled based on the number of times the same query intent is responded to in the session.

[0068] Steps 101 to 103 above may be executed multiple times. That is, the electronic device and the conversation object engage in interactive dialogue in the conversation. Each time the conversation object inputs a query, the electronic device performs a response process.

[0069] However, in some cases, repetitive conversations may occur in a session, such as when a session participant repeatedly enters similar questions. Therefore, in this embodiment, the number of times the same question is answered in the session is determined. Based on this number, it can be determined whether the session participant is suspected of repeatedly asking questions based on the same question intent. Consequently, the session is subject to corresponding control processing, which may include closing the session, providing a prompt, and continuing to execute at least one of step 101.

[0070] It is worth noting that the timing of the statistical analysis of "the number of times the same query intent is processed in the session" is not limited in this application embodiment. For example, the electronic device can perform the statistical analysis every time a response is processed, or it can perform the statistical analysis every preset period (such as one minute).

[0071] In some embodiments, the number of times a response is processed for the same query intent in a session includes any one of the following: the number of consecutive responses to the same query intent; the number of cumulative responses to the same query intent.

[0072] Here, the number of times a response is processed for the same query intent can be either the number of consecutive response processes or the number of cumulative response processes, which will be explained separately below.

[0073] The first type is the number of consecutive response processing, which requires that responses to the same query intent must occur consecutively. For example, if the conversation subject inputs three consecutive queries all corresponding to query intent A, the electronic device, after responding to the last query, determines that the number of consecutive response processing for query intent A is 3. As another example, if the conversation subject inputs two consecutive queries all corresponding to query intent A, and then inputs one query corresponding to query intent B, the electronic device, after responding to the last query, resets the number of consecutive response processing for query intent A to zero. Subsequently, if the conversation subject inputs another query corresponding to query intent B, the electronic device, after responding accordingly, determines that the number of consecutive response processing for query intent B is 2. Continuous response processing has high continuity requirements and is suitable for scenarios with high requirements for monitoring repetitive dialogues.

[0074] The second method is to accumulate the number of responses. This doesn't require responses to the same query intent to appear consecutively; they can be consecutive or discontinuous. For example, if a user inputs two queries, both corresponding to query intent A, then inputs one query corresponding to query intent B, and then inputs another query corresponding to query intent A, the electronic device, after responding to the last query, determines that the cumulative number of responses to query intent A is 3, and the cumulative number of responses to query intent B is 1. As another example, if a user inputs two queries, both corresponding to query intent A, then inputs two queries corresponding to query intent B, the electronic device, after responding to the last query, determines that the cumulative number of responses to query intent A is 2, and the cumulative number of responses to query intent B is 2. This is suitable for scenarios with broader requirements for monitoring repeated dialogues.

[0075] In some embodiments, when responding to a question in a session based on the response content, the method further includes: counting the intent tags corresponding to the question intent; wherein different question intents correspond to different intent tags; and determining the number of times the response is processed for the question intent corresponding to the intent tag in the session based on the value recorded in the intent tag.

[0076] To facilitate the counting of response processing times, a corresponding intent label can be pre-established for each query intent. The intent label is in numerical form, which is equivalent to a counter. It can be initialized to zero, and different query intents correspond to different intent labels.

[0077] When an electronic device identifies a query as belonging to a specific query intent (e.g., query intent A) and responds, it counts the intent tag corresponding to query intent A, such as by incrementing it by one. Thus, for query intent A, the number of times a response is processed in a session can be determined by the value recorded in the corresponding intent tag. Of course, in some cases, it may be necessary to reset the intent tag to zero, such as when limiting the number of consecutive responses. This method improves the convenience and real-time performance of counting response responses.

[0078] In some embodiments, step 104 can be further constrained. For example, it can be constrained to count the number of times the same query intent is responded to in a session within a specific time period (such as the most recent minute) or within the most recent L response processes, where L is an integer greater than 1.

[0079] pass Figure 3 The illustrated embodiment counts the number of times a response is processed for the same query intent during a session and performs corresponding control processing, which can effectively prevent the dialogue from getting stuck in an infinite loop, improve session efficiency, and at the same time improve the actual utilization rate of the computing resources consumed by the electronic device during the session.

[0080] In some embodiments, see Figure 4 , Figure 4 This is a flowchart illustrating a session processing method provided in an embodiment of this application. Figure 3 Step 104 shown can be achieved through steps 201 and 202.

[0081] In step 201, when the number of times the same query intent is responded to in the session exceeds a threshold, the session is subjected to abnormal control.

[0082] Here, when the number of times the same query intent is responded to in a session exceeds a threshold, it is determined that the session object is suspected of repeatedly querying, and anomaly control is implemented for the session. Anomaly control may include at least one of providing a prompt (anomaly prompt or a guidance prompt) or closing the session. After providing a prompt, the session may be closed, or the session object's query content may continue to be retrieved.

[0083] In step 202, when the number of times each query intent is responded to in the session is less than or equal to the number threshold, the step of obtaining the query content entered by the session object in the session continues.

[0084] Here, when the number of times each query intent is responded to in the session is less than or equal to the number of times threshold is set, it is determined that the session object does not have the suspicion of repeated queries, and the normal dialogue can continue, that is, continue to execute step 101.

[0085] pass Figure 4 The illustrated embodiment uses differentiated processing based on the relationship between the number of response processing attempts and the threshold number of attempts, which can improve the targeting of session processing.

[0086] In some embodiments, see Figure 5 , Figure 5 This is a schematic diagram of an exception control process provided in an embodiment of this application. Figure 4 Step 201 shown can be implemented through steps 301 to 303.

[0087] In step 301, when the number of times the same query intent is responded to in the session is greater than a threshold, the query similarity between multiple target query contents is determined; wherein, the target query content represents the query content responded to in response to the same query intent.

[0088] When the number of times a response is processed for the same query intent in a session exceeds a threshold, it indicates that the session object may be suspected of repeatedly querying. In this embodiment, further confirmation can be made from the perspective of the session object. First, the query similarity between multiple target query contents is calculated. This query similarity represents the degree of similarity between the multiple target query contents, wherein the target query contents represent the query contents responded to in response to the aforementioned same query intent.

[0089] In step 302, when the query similarity is greater than the first similarity threshold, an abnormal prompt is given to the conversation object to prompt them to stop entering query content corresponding to the same query intent.

[0090] Here, when the similarity of the queries exceeds the first similarity threshold, it is confirmed that a duplicate query has been made. At this time, an error message is given to the conversation object to prompt them to stop entering query content corresponding to the same query intent.

[0091] It is worth noting that the embodiments of this application do not limit the method of prompting. For example, relevant prompts can be displayed in the conversation interface, or prompts can be given to the conversation object through other means (such as email).

[0092] In step 303, when the query similarity is less than or equal to the second similarity threshold, the conversation object is prompted to enter query content corresponding to other query intentions; wherein, other query intentions are different from the same query intention; the first similarity threshold is greater than or equal to the second similarity threshold.

[0093] When the query similarity is less than or equal to the second similarity threshold, it is confirmed that there is no situation of repeated query. It may be due to the intention recognition error or other reasons that the number of response processing is too many. At this time, the conversation object is guided to enter the query content corresponding to other query intentions. Among them, other query intentions are different from the same query intention mentioned above.

[0094] The first similarity threshold is greater than or equal to the second similarity threshold, which can be set according to the actual situation. For example, the first similarity threshold can be set to be equal to the second similarity threshold.

[0095] In some embodiments, the determination of query similarity between multiple target query contents can be achieved by performing any of the following processes: determining the similarity between adjacent target query contents as query similarity; determining the similarity between adjacent target query contents and fusing multiple similarities to obtain query similarity.

[0096] Here, when there are only two target queries, the similarity between these two target queries can be directly used as the query similarity.

[0097] When there are three or more target queries, the similarity between two adjacent target queries can be determined first, resulting in multiple similarity scores. Each similarity score is then used as the query similarity score. Since there are multiple query similarities, "query similarity greater than the first similarity threshold" in step 302 can mean that all query similarities are greater than the first similarity threshold, or it can mean that a preset number / preset proportion of query similarities are greater than the first similarity threshold. The preset number / preset proportion can be set according to the actual application scenario. Similarly, this also applies to steps 303 and... Figure 6 Step 304 in the process.

[0098] When there are three or more target queries, you can first determine the similarity between two adjacent target queries, resulting in multiple similarity scores. These multiple similarity scores are then fused together, and the result is used as the query similarity score. The fusion process can be an arithmetic average or a weighted average, etc., and there are no restrictions on which one is used. In this way, you only need to compare one query similarity score with a first similarity threshold and a second similarity threshold.

[0099] The above methods improve the flexibility of threshold comparison, allowing for the selection of the similarity calculation method based on the needs of the actual scenario.

[0100] pass Figure 5The illustrated embodiment can further confirm whether a situation constitutes repeated questioning, clarify the root cause of repeated dialogue, and then carry out targeted processing to improve the accuracy and flexibility of processing.

[0101] In some embodiments, see Figure 6 , Figure 6 This is a schematic diagram of an exception control process provided in an embodiment of this application. Figure 5 After step 301, in step 304, when the query similarity is less than or equal to the first similarity threshold and greater than the second similarity threshold, the step of obtaining the query content input by the session object in the session can continue.

[0102] Here, when the first similarity threshold is greater than the second similarity threshold, a third scenario can be extended, namely, the query similarity is less than or equal to the first similarity threshold and greater than the second similarity threshold. In this case, it is determined that the conversation object may need to confirm through multiple queries for various reasons (such as not being able to hear or understand the response content). Therefore, the conversation object is not interfered with (no prompts are given), but the normal dialogue continues, that is, the new query content input by the conversation object in the conversation continues to be obtained.

[0103] pass Figure 6 The illustrated embodiment further expands the new scenarios of dialogue and enhances the flexibility of session processing.

[0104] The following describes an exemplary application of the embodiments of this application in a real-world scenario, namely, an electronic device uses a human-computer dialogue system to achieve human-computer interaction, thereby answering user questions and guiding the user. For ease of understanding, the description will be presented in the form of steps.

[0105] 1) Map the corresponding dialogue in the system in a unified manner.

[0106] In a conversation, the dialogue content of the human-computer dialogue system (corresponding to the response content above) corresponds to the user's intent (the intent to ask). Although the dialogue content of the response may not be completely consistent, it is always intelligently generated or obtained by calling the dialogue library based on the user's intent.

[0107] In this embodiment, regardless of how the human-computer dialogue system obtains the response script, the scripts returned for the same intent can be labeled. For example, when a user says "Hello" in a conversation (corresponding to the inquiry above), the human-computer dialogue system will reply with "Hello, how can I help you?" or "Hello, what do you need me to do?". Both replies express the same meaning: responding to the intention of greeting "Hello". Therefore, replies for the same intent can be labeled with a common tag (corresponding to the intent tag above), and this common tag is the script mapping. In the example above, the user's intention in inputting "Hello" is to greet, so all replies from the system for this intent will have a common tag: "greeting".

[0108] 2) Detection of the order and frequency of system response content.

[0109] During human-computer interaction, each system response can be recorded sequentially. Statistics begin from the second system response. If the label of the current system response matches the label of the previous response, the count of that label is incremented by one; if the label of the current system response does not match the label of the previous response, the count of that label is cleared.

[0110] Each time the count of a tag's occurrences increments by one, the human-computer dialogue system checks whether the number of times the tag appears (corresponding to the number of consecutive responses to the same query intent mentioned above) has reached a threshold N (corresponding to the count threshold mentioned above). If the threshold N is reached, it is considered that the user may be making duplicate queries, triggering an exception process (corresponding to the exception control mentioned above); if the threshold N is not reached, the exception process is not triggered. Here, N is an integer greater than 1.

[0111] 3) Abnormal processes.

[0112] Since the user appears to be asking repeated questions, this step involves further verification from the user's input perspective. The human-computer dialogue system performs similarity detection on the N most recent inputs from the user. For example, it calculates the similarity between every two adjacent inputs. If all similarities are greater than a threshold K (corresponding to the first similarity threshold mentioned above; to prevent users from repeating almost identical phrases, the K value needs to be set relatively high), it is considered that the user is intentionally repeating the same phrases. In this case, the human-computer dialogue system will provide an error message to the user, such as "Please do not repeat similar phrases continuously." If all similarities are less than or equal to a threshold M (corresponding to the second similarity threshold mentioned above; to prevent the human-computer dialogue system from repeatedly returning the same content due to misidentification of user intent, the M value needs to be set relatively low), it is considered that the user's intent has been misidentified. In this case, the human-computer dialogue system will guide the user to input content with other intents, thus starting a new dialogue process, such as "Oh, the system is tired of replying; let's talk about something else." In other cases, considering that in real-world scenarios, users may repeatedly ask questions due to unclear hearing or misunderstanding, the human-computer dialogue system will not provide any prompts.

[0113] The above examples significantly reduce the probability of repeated dialogue processes, improve the user experience of human-computer dialogue, and effectively guide users through erroneous processes.

[0114] The following continues to describe an exemplary structure of the session processing device 455 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the software modules stored in the session processing device 455 in the memory 450 may include: an acquisition module 4551, used to acquire the query content input by the session object in the session; an intent recognition module 4552, used to perform intent recognition processing on the query content to obtain the query intent; a response module 4553, used to determine the corresponding response content according to the query intent, and perform response processing in the session according to the response content; and a control module 4554, used to control the session according to the number of times the same query intent is responded to in the session.

[0115] In some embodiments, the control module 4554 is further configured to: perform abnormal control on the session when the number of times the same query intent is responded to in the session is greater than a number threshold; and continue to execute the step of obtaining the query content entered by the session object in the session when the number of times the response intent is responded to in the session is less than or equal to the number threshold.

[0116] In some embodiments, the control module 4554 is further configured to: determine the query similarity among multiple target query contents; wherein the target query contents represent the query contents responded to by the response processing for the same query intent; when the query similarity is greater than a first similarity threshold, provide an abnormal prompt to the session object to prompt it to stop inputting query contents corresponding to the same query intent; when the query similarity is less than or equal to a second similarity threshold, provide a guiding prompt to the session object to prompt it to input query contents corresponding to other query intents; wherein the other query intents are different from the same query intent; wherein the first similarity threshold is greater than or equal to the second similarity threshold.

[0117] In some embodiments, the first similarity threshold is greater than the second similarity threshold; the control module 4554 is further configured to: when the query similarity is less than or equal to the first similarity threshold and greater than the second similarity threshold, continue to execute the step of obtaining the query content input by the session object in the session.

[0118] In some embodiments, the control module 4554 is further configured to: perform any one of the following processes: determine the similarity between adjacent target query contents as query similarity; determine the similarity between adjacent target query contents and perform a fusion process on multiple similarities to obtain query similarity.

[0119] In some embodiments, the session processing device 455 further includes a tag counting module, configured to: count the intent tags corresponding to the query intent when the session is processed according to the response content; wherein different query intents correspond to different intent tags; and determine the number of times the session is processed to respond to the query intent corresponding to the intent tag according to the value recorded in the intent tag.

[0120] In some embodiments, the number of times a response is processed for the same query intent in a session includes any one of the following: the number of consecutive responses to the same query intent; the number of cumulative responses to the same query intent.

[0121] This application provides a computer program product or computer program that includes executable instructions stored in a computer-readable storage medium. A processor of an electronic device reads the executable instructions from the computer-readable storage medium and executes the executable instructions, causing the electronic device to perform the session processing method described in this application.

[0122] This application provides a computer-readable storage medium storing executable instructions. When these executable instructions are executed by a processor, they cause the processor to perform the method provided in this application, for example... Figure 3 The session handling method is shown.

[0123] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0124] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0125] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., files that store one or more modules, subroutines, or code sections).

[0126] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0127] The above are merely embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A method of session handling, characterized by, The method comprises the following steps: acquiring inquiry content input by a conversation object in a conversation; performing intent recognition processing on the inquiry content to obtain an inquiry intent; determining corresponding response content according to the inquiry intent, and performing response processing in the conversation according to the response content; controlling the conversation according to the number of times of performing response processing in the conversation for the same inquiry intent: when the number of times of continuously performing response processing in the conversation for the same inquiry intent is greater than a number threshold, determining inquiry similarity between adjacent target inquiry content; wherein the target inquiry content represents inquiry content to which response processing for the same inquiry intent is performed; when the inquiry similarity is greater than a first similarity threshold, abnormally prompting the conversation object to stop inputting inquiry content corresponding to the same inquiry intent; when the inquiry similarity is less than or equal to a second similarity threshold, guiding the conversation object to input inquiry content corresponding to other inquiry intents; wherein the other inquiry intents are different from the same inquiry intent; wherein the first similarity threshold is greater than or equal to the second similarity threshold.

2. The method of claim 1, wherein, The controlling the conversation according to the number of times of performing response processing in the conversation for the same inquiry intent comprises: when the number of times of performing response processing in the conversation for each inquiry intent is less than or equal to the number threshold, continuing to perform the step of acquiring inquiry content input by the conversation object in the conversation.

3. The method of claim 1, wherein, The first similarity threshold is greater than the second similarity threshold; after determining the inquiry similarity between the target inquiry content, the method further comprises: when the inquiry similarity is less than or equal to the first similarity threshold and greater than the second similarity threshold, continuing to perform the step of acquiring inquiry content input by the conversation object in the conversation.

4. The method of claim 1, wherein, The determining the inquiry similarity between the adjacent target inquiry content comprises: performing any one of the following processing: determining the similarity between the adjacent target inquiry content as the inquiry similarity; determining the similarity between the adjacent target inquiry content, and performing fusion processing on a plurality of similarities to obtain the inquiry similarity.

5. The method according to any one of claims 1 to 4, characterized in that, When performing response processing in the conversation according to the response content, the method further comprises: counting an intent label corresponding to the inquiry intent; wherein different inquiry intents correspond to different intent labels; determining the number of times of performing response processing in the conversation for the inquiry intent corresponding to the intent label according to the value recorded by the intent label.

6. A session processing apparatus characterized by comprising: The method comprises the following steps: an acquisition module, configured to acquire inquiry content input by a conversation object in a conversation; an intent recognition module, configured to perform intent recognition processing on the inquiry content to obtain an inquiry intent; a response module, configured to determine corresponding response content according to the inquiry intent, and perform response processing in the conversation according to the response content; The control module is configured to control the session according to a number of times of response processing for a same inquiry intent in the session: when the number of times of continuous response processing for the same inquiry intent in the session is greater than a number threshold, determining an inquiry similarity between adjacent target inquiry contents; the target inquiry content represents inquiry content to be responded in the response processing for the same inquiry intent; when the inquiry similarity is greater than a first similarity threshold, performing an abnormal prompt on the session object to prompt to stop inputting inquiry content corresponding to the same inquiry intent; when the inquiry similarity is less than or equal to a second similarity threshold, performing a guidance prompt on the session object to prompt to input inquiry content corresponding to another inquiry intent; the other inquiry intent is different from the same inquiry intent; the first similarity threshold is greater than or equal to the second similarity threshold.

7. An electronic device, comprising: The method comprises: a memory configured to store executable instructions; a processor configured to execute the executable instructions stored in the memory to implement the session processing method in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, executable instructions stored in the memory, and configured to be executed by the processor to implement the session processing method in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method for interrupting scene intentions of multiple rounds of talks

    CN108197191A

  • Intelligent customer service switching method, device and system and medium

    CN113079263A