Session processing method and device, intelligent equipment and computer program product
By obtaining and filtering multi-dimensional context information, conducting knowledge summary and dialogue recall, the computational burden and hallucination problems caused by excessive context information in open domain dialogue are solved, and more accurate and efficient dialogue generation is achieved, improving user experience.
Patent Information
- Application Number
- CN202411902447.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-04
AI Technical Summary
In the open domain dialogue scenario, excessive multi-dimensional context information is passed to the model analysis and processing without filtering, resulting in increased computational burden and hallucination problems. Inappropriate context screening may mistakenly delete key information, reducing the accuracy of generating replies and affecting user experience.
By obtaining multi-dimensional contexts, including the current session context and vehicle cockpit-aware context, filtering and knowledge summary, we obtain refined session context history and knowledge fragments, and dialogue recalls are performed based on this information to generate more accurate and relevant dialogue replies.
It effectively reduces the computational burden and hallucination of large models, improves the accuracy and response speed of dialogue generation, and improves the user experience.
Smart Images

Figure CN119761481A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of session processing, and in particular, relates to a session processing method, apparatus, intelligent device and computer program product. Background Art
[0002] In open-domain conversation scenarios, if too much multi-dimensional context information is passed to the model for analysis and processing without filtering, it will increase the computational burden and generate hallucinations. Therefore, it is necessary to filter the multi-dimensional context. However, improper context filtering may accidentally delete key information and reduce the accuracy of generated responses, affecting the user experience. Summary of the invention
[0003] The embodiments of the present application provide a conversation processing method, apparatus, intelligent device and computer program product, which can solve the technical problems of improper context screening in existing methods, which may accidentally delete key information, reduce the accuracy of generated replies, and affect user experience.
[0004] In a first aspect, an embodiment of the present application provides a session processing method, including:
[0005] Acquire a multi-dimensional context; wherein the multi-dimensional context includes a current session context and a vehicle cabin perception context;
[0006] Filtering the current session context to obtain a filtered first session context history;
[0007] Performing knowledge summarization on the multi-dimensional context to obtain knowledge fragments;
[0008] Based on the filtered first conversation context history and the knowledge fragment, a dialogue recall is performed on the filtered first conversation context history to obtain a target conversation context history.
[0009] In a possible implementation manner of the first aspect, the filtering the current session context to obtain a filtered first session context history includes:
[0010] Filtering the current session context based on a rule policy to obtain a filtered second session context history;
[0011] The second session context history is screened based on a large model to obtain the first session context history.
[0012] In a possible implementation manner of the first aspect, the filtering the second session context history based on the large model to obtain the first session context history includes:
[0013] Inputting the context history of the second conversation into the large model, and outputting a set of data identical to the conversation turn of the second conversation;
[0014] Filtering a set of data with the same conversation turn as the second conversation to obtain a third conversation context history;
[0015] A preset whitelist is recalled for the third session context history to obtain the first session context history.
[0016] In a possible implementation manner of the first aspect, the rule-based policy screening includes one or more of the following: keyword screening, intent screening, scenario screening, and time screening.
[0017] In a possible implementation manner of the first aspect, the current session context includes a current round of user request;
[0018] The step of performing a dialogue recall on the filtered first conversation context history based on the filtered first conversation context history and the knowledge fragment to obtain a target conversation context history includes:
[0019] Based on the current round of user request and the first conversation context history, performing multi-round history clustering recall based on dialogue intention and scenario, content prediction and intention association recall based on a large model, and recall based on semantic similarity on the filtered first conversation context history to obtain first context round information to be recalled;
[0020] Based on the current round user request, the first session context history and the knowledge fragment, recalling the filtered first session context history based on the history-aware summary content to obtain second context round information to be recalled;
[0021] The target session context history is determined based on the first context turn information and the second context turn information.
[0022] In a possible implementation manner of the first aspect, determining the target session context history based on the first context turn information and the second context turn information includes:
[0023] Analyzing the first context round information and the second context round information based on a voting mechanism to determine target context round information;
[0024] The dialogue corresponding to the target context turn information is determined as the target conversation context history.
[0025] In a possible implementation manner of the first aspect, the current session context includes a current round of user request;
[0026] The method further comprises:
[0027] Performing intent recognition and slot filling on the multi-dimensional context;
[0028] Selecting vehicle cabin perception information matching the current session context based on the identified intent and the filled slots;
[0029] The current round user request, the target conversation context history, the knowledge fragment and the vehicle cabin perception information are input into the dialogue big model to generate reply information corresponding to the current round user request.
[0030] In a second aspect, an embodiment of the present application provides a session processing device, including:
[0031] An acquisition module, used to acquire a multi-dimensional context; wherein the multi-dimensional context includes a current session context and a vehicle cabin perception context;
[0032] A screening module, configured to screen the current session context to obtain a screened first session context history;
[0033] A summarizing module, used for summarizing the multi-dimensional context to obtain knowledge fragments;
[0034] A recall module is used to perform a dialogue recall on the filtered first conversation context history based on the filtered first conversation context history and the knowledge fragment to obtain a target conversation context history.
[0035] In a third aspect, an embodiment of the present application provides an intelligent device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the session processing method described in any one of the first aspects above when executing the computer program.
[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the session processing method described in any one of the first aspects above is implemented.
[0037] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a smart device, the smart device executes the session processing method described in any one of the above-mentioned first aspects.
[0038] Compared with the prior art, the embodiments of the present application have the following beneficial effects: by acquiring multi-dimensional context, including the current conversation context and the vehicle cabin perception context, the user's interaction environment and needs can be understood more comprehensively. By filtering the current conversation context, irrelevant or redundant information can be removed, thereby obtaining a more refined and relevant first conversation context history. Through precise context filtering and knowledge summarization, key information is not easily overlooked when generating conversations, thereby reducing the possibility of generating content that does not match the real scene. Conversation recall based on the filtered first conversation context history and knowledge fragments can obtain a target conversation context history that is more in line with the current conversation situation, which helps to improve the relevance of the conversation. By providing more accurate, relevant and responsive conversations, the user experience is significantly improved.
[0039] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 It is a flowchart of a session processing method provided by an embodiment of the present application;
[0042] Figure 2 is a flow chart of the detailed steps of S102 in one embodiment of the present application;
[0043] Figure 3 It is a flowchart of a session processing method provided by an embodiment of the present application;
[0044] Figure 4 It is a structural diagram of a session processing device provided in an embodiment of the present application;
[0045] Figure 5 It is a schematic diagram of the structure of the smart device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0046] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0047] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0048] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0049] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0050] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0051] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0052] Figure 1A schematic flow chart of a session processing method provided by the present application is shown. As an example, the execution subject of the method provided by the embodiment of the present application can be a smart device or a device in the smart device.
[0053] For example, smart devices may include driving devices, smart cars, robots and other devices. "The driving device may be a vehicle, for example. Taking the smart device as a vehicle as an example, the method may also be applied to a smart cockpit in the vehicle. The vehicle includes a smart cockpit, and the method provided in the embodiment of the present application may also be implemented by the smart cockpit. The smart cockpit may be implemented by an independent server or a server cluster composed of multiple servers. The smart cockpit system refers to a vehicle-mounted device and service equipped with intelligent and networked technology, such as in-vehicle infotainment.
[0054] Systems, instrument panels, head-up displays (HUDs), streaming media rearview mirrors, voice interaction systems and other automotive electronic systems.
[0055] The electronic system of the smart cockpit can be a complete system consisting of a central control platform, full LCD instrument, central control display, entertainment system, smart speaker, car networking module, streaming media rearview mirror, telematics system, etc. The smart cockpit system can be centered on the cockpit area controller and realize the above on a unified software and hardware platform.
[0056] The functions of the smart cockpit electronic system are integrated into the system of intelligent interaction, intelligent scenes and personalized services. Smart cockpit system
[0057] It can form the basis for human-vehicle interaction and the connection between the vehicle and the outside world. The usage scenarios of the smart cockpit system can usually cover all scenarios in which users use the vehicle.
[0058] It includes time scenarios before the user uses the vehicle, during the user's use of the vehicle, and after the user uses the vehicle.
[0059] You can also include driving
[0060] The spatial scene of the driver, co-pilot, rear passengers, and related people or objects outside the car. Compared with the past command interaction, the human-computer interaction of the smart cockpit can be combined with the usage scenarios of the vehicle and the user, based on image recognition, voice recognition, environmental perception and other foundations. Achieve an intelligent effect that is more in line with user needs (such as the need to change voice when making and receiving calls). In other words, a smart cockpit refers to an automotive electronic system equipped with intelligent and networked on-board equipment and services, such as in-vehicle infotainment systems, instrument panels, head-up displays (HUDs), streaming media rearview mirrors, voice interaction systems, and other automotive systems. The vehicle cockpit in this embodiment refers to a smart cockpit.
[0061] S101, obtaining a multi-dimensional context; wherein the multi-dimensional context includes a current session context and a vehicle cabin perception context.
[0062] Among them, in the dialogue system of the in-vehicle voice assistant or smart cockpit, multidimensional context refers to contextual information from different sources and levels.
[0063] The multi-dimensional context includes: the current conversation context and the vehicle cabin perception context. It refers to the specific questions or requests raised by the user in the current conversation round.
[0064] The current session context includes: the current round of user request query and the current session context history. It refers to all interaction records since the start of the session, including the user's previous requests and the dialogue system's previous responses.
[0065] The vehicle cabin perception context includes:
[0066] 1) Intent corresponding to the conversation history: Each round of conversation is distributed through Natural Language Understanding (NLU), so the intent corresponding to the conversation is saved. During the conversation, every time the user communicates with the dialogue system, the dialogue system will analyze the user's input (whether text or voice) through the NLU module to determine the intention the user wants to express. This process of intent recognition is called "NLU intent distribution." Once the dialogue system recognizes the user's intent, the intent will be recorded and saved in the conversation history.
[0067] 2) Vehicle external perception information: including weather conditions, vehicle speed, geographic location, vehicle model and other information.
[0068] 3) Cabin interior perception information: passenger gestures, media content being watched or listened to, seat configuration, passenger identity (such as whether the passenger is a child), etc.
[0069] 4) Memory of conversation history: topics that users have paid attention to in the past and knowledge summaries of historical conversations, etc.
[0070] S102: Filter the current session context to obtain a filtered first session context history.
[0071] Among them, one or more sets of filtering rules or methods are defined according to the dialogue system design and user needs. These rules may include removing duplicate information, ignoring irrelevant content, retaining key information, etc. The defined filtering rules are applied to process the current conversation context to filter out the most helpful information for the current conversation. The filtered information is integrated to form a new and more refined first conversation context history. This history can reflect the core content of the current conversation and the user's intention.
[0072] In order to facilitate understanding, examples are given to illustrate how to filter out the information that is most helpful to the current conversation.
[0073] Assume that the user is talking to the dialogue system with the intention of obtaining navigation information.
[0074] The current session context may include:
[0075] User: "Hi, how are you?"
[0076] Dialogue system: "Hello, Master."
[0077] User: "Navigate to the nearest Starbucks."
[0078] Dialogue system: "I have found the nearest Starbucks for you. Do you want me to plan a route for you?"
[0079] User: "Yes, please plan a route."
[0080] Dialogue system: "The route has been planned and will arrive in 10 minutes."
[0081] User: "Play some relaxing music."
[0082] Dialogue System: "Okay, relaxing music is playing."
[0083] User: "This road is too congested, is there a faster route?"
[0084] Dialogue system: "I found an alternate route for you that will save you 5 minutes."
[0085] Obviously, the current conversation context includes some useless information, such as greetings, user requests for music, etc., because this is not directly related to the navigation problem. After filtering out the useless information, the most helpful information for the current conversation is:
[0086] User: "Navigate to the nearest Starbucks."
[0087] Dialogue system: "I have found the nearest Starbucks for you. Do you want me to plan a route for you?"
[0088] User: "Yes, please plan a route."
[0089] Dialogue system: "The route has been planned and will arrive in 10 minutes."
[0090] User: "This road is too congested, is there a faster route?"
[0091] Dialogue system: "I found an alternate route for you that will save you 5 minutes."
[0092] S103, performing knowledge summary on the multi-dimensional context to obtain knowledge fragments.
[0093] Among them, the large model can be used to analyze and summarize the current conversation context and vehicle cabin perception context to form knowledge fragments and retain key information.
[0094] In the field of dialogue systems and artificial intelligence, large models refer to machine learning models with large-scale parameters and complex computing structures, which are used to understand and generate natural language and provide a more intelligent and personalized interactive experience. Large models can be single-modal, such as processing only text data, or multi-modal, capable of simultaneously processing and integrating information from different sources, such as text, images, sounds, etc.
[0095] S104: Based on the filtered first conversation context history and the knowledge fragment, a dialogue recall is performed on the filtered first conversation context history to obtain a target conversation context history.
[0096] Among them, the first conversation context history and knowledge fragments are input into the dialogue model to generate reply information corresponding to the current round of user request, that is, the target conversation context history.
[0097] Among them, models such as big models and dialogue big models appear above, such as using a big model to analyze and summarize the current conversation context and the vehicle cockpit perception context to form knowledge fragments, input the first conversation context history and knowledge fragments into the dialogue big model, and generate reply information corresponding to the current round of user requests. Big models also appear below, such as conversation context history screening based on big models. These big models can be the same model, which may be used in multiple steps, such as analyzing and summarizing conversation contexts, forming knowledge fragments, conversation context history screening, and generating replies to user requests. They can also be different models, and different models may be used to handle specific tasks at different stages of the dialogue system. Here, the first conversation context history and knowledge fragments are input into the dialogue big model, and the reply information corresponding to the current round of user requests is described in the dialogue big model, which is limited to realizing the dialogue task of generating replies. Therefore, it is expressed as a dialogue big model, which can also be expressed as a big model.
[0098] Among them, conversation recall based on the filtered first conversation context history and knowledge fragments can obtain a target conversation context history that is more in line with the current conversation situation, which helps to improve the relevance of the conversation. By providing more accurate, relevant and responsive conversations, the user experience is significantly improved.
[0099] In the prior art, with the rapid development of in-vehicle voice assistant technology, users have put forward higher requirements for the natural language interaction experience in smart cockpits. In open domain dialogue scenarios, users expect the dialogue system to understand complex and changeable natural language inputs and respond accurately. However, a large amount of contextual information is involved in the in-vehicle environment, including the user's multi-round dialogue history, the vehicle's real-time perception status (such as weather, speed, geographic location, etc.), and the complex interaction status in the car (such as seat configuration, gestures, media playback status, etc.). This rich contextual information poses a challenge to the accuracy of the large dialogue model during the generation process, and sometimes leads to the "hallucination" phenomenon, that is, the model generates content that does not match the real scene. In addition, with the increase of contextual information, the computational complexity and resource usage of the large model when processing long contexts increase significantly, affecting the response speed of the dialogue system and user experience.
[0100] In order to solve the above problems, this application obtains a more accurate and concise conversation context history based on rule strategies and / or large model screening, thereby reducing the illusion phenomenon of large models, reducing the computational burden, and improving the accuracy and response speed of conversation generation. The specific implementation method is as follows Figure 2 , Figure 2 The detailed process of S102 filtering the current session context to obtain the filtered first session context history is shown.
[0101] S1021: Filter the current session context based on a rule policy to obtain a filtered second session context history.
[0102] The current session context is screened based on rule strategies, including any combination of the following: keyword screening, intent screening, scenario screening, and time screening.
[0103] The specific implementation process of rule-based screening is as follows:
[0104] Step a1: First analyze the current conversation context to determine whether this conversation is a single-round dialogue.
[0105] Step b1, if it is a single-round conversation, the current conversation context is analyzed to determine the user intent corresponding to the current round of user request query (such as request query 1), and the scene corresponding to the current round of user request query is judged based on the user intent. If the scene corresponding to the current round of user request query belongs to any of the car book, encyclopedia, and timeliness scenes, the original request query (i.e., the above-mentioned request query 1) is directly returned. If the scene corresponding to the current round of user request query does not belong to any of the car book, encyclopedia, and timeliness scenes, the request query with added perception information is returned. Afterwards, the returned request query can be filtered based on the conversation context history of the large model, or the returned request query can be input into the conversation large model to generate reply information corresponding to the returned request query.
[0106] Step c1, if it is not a single-round conversation (i.e., multiple-round conversation), it is also necessary to analyze the current conversation context, determine the user intent corresponding to the current round of user request query (such as request query 1), and judge the scenario corresponding to the current round of user request query based on the user intent. For example, the scenario corresponding to the current round of user request query belongs to one of the car book, encyclopedia, and timeliness scenarios. If it is a timeliness scenario, only the context information directly related to the current round of user request query is retained. If it is related to the encyclopedia, the context information related to the encyclopedia will be retained. If it is related to the car book, the context information related to the car book will be retained. Then enter the whitelist recall. For the relevant content of the whitelist recall, please refer to the following description, which will not be described here.
[0107] Step d1, if it is not a single-round dialogue (that is, it is a multi-round dialogue), and the scenario corresponding to the query requested by the current user does not belong to any of the car book, encyclopedia, and timeliness scenarios, then keyword screening is performed to filter out a certain round of dialogue containing preset keywords. Specifically: Based on the identified keywords, the dialogue rounds related to these keywords are screened out, which may include specific interaction modes or commands, including wake-up words (such as "hi nomi"), commands to end the dialogue (such as "exit"), and after determining the dialogue rounds related to these keywords, they are deleted and filtered, and the rounds that are often said by the user and are not related to the open domain and dialogue history are filtered out, thereby leaving the most relevant dialogue rounds, which can reduce unnecessary computing and resource consumption, and improve response speed and efficiency. In addition, keyword screening can also help the dialogue system provide more personalized services, allowing the dialogue system to customize responses based on the specific needs and preferences of users.
[0108] Step e1, filter the conversation through the intent filtering logic. Among them, the intent filtering logic is a key step in the dialogue system to improve the relevance and coherence of the conversation. In an open domain conversation, the user's input may contain multiple intentions, some of which may not be directly related to the current conversation topic, or the user may change the topic or perform a specific task during the conversation. Therefore, it is necessary to filter the conversation through the intent filtering logic. The specific implementation method includes: during the conversation, analyze each sentence of the user through NLU to determine the intention behind it, whether it is asking for information, performing tasks or other, and record the intention of each user request query in the conversation history. In an open domain conversation, the user may raise topics that are not related to the current conversation topic, or perform specific skill tasks in the conversation, such as vehicle control instructions. The intent filtering logic will identify these irrelevant intentions and remove their corresponding turns from the open domain context.
[0109] Intent filtering logic helps optimize the conversation context, ensures the focus and relevance of the conversation, helps the conversation system understand and respond to user needs more accurately, and makes the conversation more smooth and natural.
[0110] Step f1, determine whether the complete context is needed. Here, it will be determined whether each round of dialogue contains keywords for special scenarios. If it does, all context content will be retained. If it does not, further screening is required. Execute step g1.
[0111] Step g1: In order to determine whether further timestamp filtering is needed, it is necessary to determine whether the length of the conversation history round is greater than the preset length. If the length of the conversation history round exceeds the preset length, it will be filtered according to the timestamp to eliminate the rounds that are separated from the current round of user request query by a long time. This helps to maintain the timeliness and relevance of the conversation.
[0112] Step h1, further, after the timestamp screening, if the number of remaining dialogue rounds is less than or equal to the preset number of rounds (such as 10 rounds), these rounds will be directly returned as the result of the rule-based policy screening to obtain the filtered second conversation context history. If the number of dialogue rounds after screening is still greater than or equal to 10 rounds, the above dialogue will be screened using the historical sliding window method, following the first-in-first-out principle, retaining the most recent dialogue rounds while discarding earlier rounds to ensure the compactness and relevance of the dialogue history.
[0113] Step i1, after the sliding window processing, the final screening is performed through the whitelist logic. The whitelist may contain topics or keywords that are particularly important or frequently mentioned by the user, and these contents will be retained first.
[0114] Step j1, output the result obtained after screening in the above steps (ie, the second conversation context history). Through these screening steps, the quality of the conversation can be improved, and the compactness, relevance and timeliness of the conversation content can be ensured, thereby improving the user experience.
[0115] It should be noted that the above screening process can be performed in the order of steps a1 to j1, or not in the order of steps a1 to j1. For example, the screening of step e1 can be performed first and then the screening of step f1, or the screening of step f1 can be performed first and then the screening of step e1.
[0116] S1022: Filter the second session context history based on the large model to obtain the first session context history.
[0117] Among them, the second conversation context history is first input into the big model, a set of data with the same conversation round as the second conversation is output, the set of data with the same conversation round as the second conversation is screened to obtain the third conversation context history, and the third conversation context history is recalled according to a preset whitelist to obtain the first conversation context history.
[0118] In the embodiment of the present application, after obtaining the second session context history after filtering based on the rule strategy, the second session context history and the current round of user request query are input into the large model, and the large model outputs a set of data with the same conversation round as the second session, for example, if the conversation round of the second session is 4 rounds, then a set of data includes 4 values. The set of data with the same conversation round as the second session is filtered to obtain a third session context history, and optionally, the third session context history is recalled by the whitelist as described above to obtain the first session context history.
[0119] To facilitate understanding, an example is given here.
[0120] Let’s say a user is having a series of conversations with an in-car voice assistant to plan a weekend trip.
[0121] The second session context history may include:
[0122] User: "I want to go to the beach."
[0123] Dialogue System: "Okay, I can help you find nearby beaches."
[0124] User: "I need to book a hotel."
[0125] Dialogue system: "I see. Which beach do you want to book a hotel near?"
[0126] User: "I want one with a swimming pool."
[0127] Dialogue System: "I found a few hotels with swimming pools, would you like to see more details?"
[0128] When filtering, the above conversation history is input into the big model. The big model analyzes these conversations and outputs a set of data, such as true and false values, which can output "true false false true true false", or 0 and 1 values, which can output "100110". The data output by the big model is filtered to remove irrelevant or redundant information, such as removing the conversation turns corresponding to the false in "true false false true true true false", or removing the conversation turns corresponding to the 0 in "100110".
[0129] The third session context history may include:
[0130] User: "I want to go to the beach."
[0131] Dialogue system: "I see. Which beach do you want to book a hotel near?"
[0132] User: "I want one with a swimming pool."
[0133] Afterwards, a whitelist is recalled for the third session context history to ensure that key information such as "beach", "hotel", and "swimming pool" are retained.
[0134] The first session context history may include:
[0135] User: "I want to go to the beach."
[0136] Dialogue system: "I see. Which beach do you want to book a hotel near?"
[0137] User: "I want one with a swimming pool."
[0138] Through this process, the dialogue system can improve the quality of the conversation, remove irrelevant or redundant information, and recall relevant information to obtain a target conversation context history that is more in line with the current conversation situation, which helps to improve the relevance of the conversation. By providing more accurate, relevant and responsive conversations, the user experience is significantly improved.
[0139] In a possible implementation, S104 performs a dialogue recall on the filtered first conversation context history based on the filtered first conversation context history and the knowledge fragment to obtain a target conversation context history, including:
[0140] Step a2, based on the current round of user request and the first conversation context history, the filtered first conversation context history is subjected to multi-round history clustering recall based on dialogue intention and scenario, content prediction and intention association recall based on a large model, and recall based on semantic similarity to obtain the first context round information to be recalled.
[0141] Step b2: based on the current round user request, the first session context history and the knowledge fragment, the filtered first session context history is recalled based on the history-aware summary content to obtain the second context round information to be recalled.
[0142] Among them, multi-round historical clustering recall based on dialogue intent and scenario is: classify the dialogue history through a clustering algorithm, cluster semantically similar dialogues together, and the current dialogue intent can be matched to one or more clusters, from which the dialogue history most relevant to the current scenario is recalled.
[0143] The specific implementation method is: extract the semantic vectors of the conversation history, use the clustering algorithm based on these semantic vectors to semantically classify the conversation history. Then, perform semantic analysis on the current round of user request query, match the most relevant clusters, and recall relevant conversation turns from these clusters. Its input is: the current round of user request query and the first conversation context history. The output is: an array of conversation turns in the filtered conversation history that need to be recalled. Among them, the expression of the conversation turn array can be the same as the set of data above.
[0144] Among them, content prediction and intention association recall based on the big model is: the big model predicts the questions or needs that the user may ask next based on the current conversation context, and then recalls the historical context related to these predicted questions in advance. This recall can not only recall by looking back at the conversation history, but also has the ability to predict future conversation content.
[0145] The specific implementation method is: input the current round user request query and the first conversation context history into the model, use the model's inference ability to predict the questions or information needs that the user may ask soon, and actively recall the content related to the historical conversation based on these predictions. Its input is: the current round user request query and the first conversation context history. The output is: the conversation round array of whether the content predicted by the large model matches the historical conversation.
[0146] The recall based on semantic similarity is: generate the semantic representation of the conversation history through a large model, match it with the current user request query at the semantic level, and recall the historical fragments that are most similar to the current conversation semantics. This method goes beyond traditional word-to-word matching and can capture deep semantic similarity, ensuring that the recalled content is more accurate.
[0147] The specific implementation method is: the current round user request query and each round of the conversation history are represented by conversation embedding, and the similarity between the current round user request query and each round of conversation embedding (such as cosine similarity) is calculated, and the conversation history segments with high similarity are selected for recall. Its input is: the current round user request query and the first conversation context history. The output is: based on the semantic similarity calculation, an array of conversation rounds that need to be recalled is returned.
[0148] Among them, the recall based on historical perception summary content is: using knowledge fragments to perform targeted recall of the historical context of the conversation, effectively combining multi-dimensional perception information, and ensuring the accurate recovery of historical data.
[0149] The specific implementation method is: according to the current round of user requests, the first conversation context history and knowledge fragments, context screening is performed to recall the context turns that meet the current dialogue requirements.
[0150] The input is: the current user request query, the first conversation context history and the knowledge fragment. The output is: an array of conversation turns in the filtered conversation history that need to be recalled.
[0151] Among them, multiple rounds of historical clustering recall based on dialogue intentions and scenarios, content prediction and intention association recall based on large models, recall based on semantic similarity, and recall based on historical perception summary content are run in parallel to optimize recall efficiency and ensure that the historical context related to the current dialogue situation is restored as comprehensively as possible.
[0152] Step c2: determining the target session context history based on the first context turn information and the second context turn information.
[0153] In an embodiment of the present application, the first context round information and the second context round information are analyzed based on a voting mechanism to determine target context round information, and the conversation corresponding to the target context round information is determined as the target conversation context history.
[0154] Among them, each recall method (multi-round historical clustering recall based on dialogue intent and scenario, content prediction and intent association recall based on large models, recall based on semantic similarity, and recall based on historical perception and summary content) independently processes the conversation context and outputs an array of dialogue rounds that need to be recalled. A voting mechanism is used to jointly decide whether each dialogue round needs to be recalled. When a round receives recall suggestions from two or more recall methods, the dialogue of that round is recalled, otherwise the dialogue of that round will be ignored. Through the above means, not only the transmission of redundant information is significantly reduced, but also the historical context that is highly relevant to the current dialogue can be effectively restored, improving the accuracy of the dialogue and user experience.
[0155] In the embodiments of the present application, for ease of understanding, Figure 3 The session processing method is described by referring to the flowchart of FIG. Figure 3 As shown in the figure, when the user and the in-vehicle voice assistant have an open domain conversation, based on Figure 3 The conversation processing method shown processes the multi-dimensional context and finally outputs a more accurate conversation response. Specifically:
[0156] Three links will work simultaneously during the entire session processing.
[0157] Link 1, in a serial manner, the current session context is screened based on rule policies, the session context history is screened based on a large model, and the whitelist is recalled, and then the first session context history is obtained. Then, the first session context history is recalled to achieve context reconstruction.
[0158] Link 2: summarize the knowledge of multi-dimensional context, such as summarizing the vehicle status and conversation history, to obtain knowledge fragments, which will be used for recall based on historical perception summary content.
[0159] Link 3: Intent recognition and slot filling for multi-dimensional context, based on the recognized intent and filled slots, select the vehicle cockpit perception information that matches the current session context. Specifically: send the current session context and the vehicle cockpit perception context to the big model together, and let the big model select the vehicle cockpit perception information that is actually needed for the current session based on the current session context.
[0160] After going through link 1, the second conversation context history that has been initially screened is obtained. The second conversation context history, the current round of user request query, and the knowledge fragments summarized by the large model are sent to the recall module together to improve the accuracy of the screening and avoid poor experience caused by mistakenly deleting the context. The recall module contains a total of four parallel recall methods (see above for details). The four parallel recall methods can respectively output the array of conversation rounds that are considered to need to be recalled. Finally, for each round, a vote is held to determine the round that needs to be recalled, and the target conversation context history is obtained.
[0161] After that, the current user request, the target conversation context history, knowledge fragments, and vehicle cabin perception information are input into the dialogue model to generate the reply information corresponding to the current user request. Through the above means, not only the transmission of redundant information is significantly reduced, but also the historical context that is highly relevant to the current dialogue can be effectively restored, improving the accuracy of the dialogue and user experience.
[0162] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0163] Corresponding to the session processing method described in the above embodiment, Figure 4 A structural block diagram of a session processing device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0164] Reference Figure 4 , the session processing device comprises:
[0165] An acquisition module, used to acquire a multi-dimensional context; wherein the multi-dimensional context includes a current session context and a vehicle cabin perception context;
[0166] A screening module, configured to screen the current session context to obtain a screened first session context history;
[0167] A summarizing module, used for summarizing the multi-dimensional context to obtain knowledge fragments;
[0168] A recall module is used to perform a dialogue recall on the filtered first conversation context history based on the filtered first conversation context history and the knowledge fragment to obtain a target conversation context history.
[0169] In a possible implementation, the screening module is used to:
[0170] Filtering the current session context based on a rule policy to obtain a filtered second session context history;
[0171] The second session context history is screened based on a large model to obtain the first session context history.
[0172] In a possible implementation, the screening module is used to:
[0173] Inputting the context history of the second conversation into the large model, and outputting a set of data identical to the conversation turn of the second conversation;
[0174] Filtering a set of data with the same conversation turn as the second conversation to obtain a third conversation context history;
[0175] A preset whitelist is recalled for the third session context history to obtain the first session context history.
[0176] In a possible implementation, the rule-based policy screening includes one or more of the following: keyword screening, intent screening, scenario screening, and time screening.
[0177] In a possible implementation, the current session context includes a current round of user requests; a recall module is used to:
[0178] Based on the current round of user request and the first conversation context history, performing multi-round history clustering recall based on dialogue intention and scenario, content prediction and intention association recall based on a large model, and recall based on semantic similarity on the filtered first conversation context history to obtain first context round information to be recalled;
[0179] Based on the current round user request, the first session context history and the knowledge fragment, recalling the filtered first session context history based on the history-aware summary content to obtain second context round information to be recalled;
[0180] The target session context history is determined based on the first context turn information and the second context turn information.
[0181] In a possible implementation, the recall module is used to:
[0182] Analyzing the first context round information and the second context round information based on a voting mechanism to determine target context round information;
[0183] The dialogue corresponding to the target context turn information is determined as the target conversation context history.
[0184] In a possible implementation, the session processing device further includes:
[0185] A selection module, configured to perform intent recognition and slot filling on the multi-dimensional context; and select vehicle cabin perception information matching the current session context according to the recognized intent and the filled slots;
[0186] A generation module is used to input the current round user request, the target session context history, the knowledge fragment and the vehicle cabin perception information into the dialogue model to generate reply information corresponding to the current round user request.
[0187] It should be noted that the information interaction, execution process and other contents between the above-mentioned modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0188] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0189] An embodiment of the present application also provides an intelligent device, which network device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps in any of the above-mentioned method embodiments when executing the computer program.
[0190] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0191] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0192] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0193] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0194] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0195] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0196] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0197] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
[0198] Figure 5 This is a schematic diagram of the structure of a smart device provided in one embodiment of the present application. Figure 5 As shown, the smart device of this embodiment includes: at least one processor 20 ( Figure 5 Only one is shown in the figure), a memory 21, and a computer program 22 stored in the memory 21 and executable on the at least one processor 20, wherein the processor 20 implements the steps of any of the above-mentioned session processing method embodiments when executing the computer program 22.
[0199] The smart device may include, but is not limited to, a processor 20 and a memory 21. Those skilled in the art will appreciate that Figure 5 These are merely examples of smart devices and do not constitute limitations on smart devices. Smart devices may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. For example, they may also include input and output devices, network access devices, etc.
[0200] The processor 20 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0201] In some embodiments, the memory 21 may be an internal storage unit of the smart device, such as a hard disk or memory of the smart device. In other embodiments, the memory 21 may also be an external storage device of the smart device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the smart device. Further, the memory 21 may also include both an internal storage unit of the smart device and an external storage device. The memory 21 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 21 may also be used to temporarily store data that has been output or is to be output.
[0202] The relevant user personal information that may be involved in the various embodiments of this application is strictly in accordance with the requirements of laws and regulations, following the principles of legality, legitimacy and necessity, based on the reasonable purposes of business scenarios, to process the personal information that users actively provide during the use of products / services or generated due to the use of products / services, as well as the personal information obtained with the user's authorization.
[0203] The user personal information processed by the applicant will vary depending on the specific product / service scenario, and shall be based on the specific scenario in which the user uses the product / service, which may involve the user's account information, device information, driving information, vehicle information or other related information. The applicant will treat the user's personal information and its processing with a high degree of diligence.
[0204] The Applicant attaches great importance to the security of user personal information and has adopted reasonable and feasible security protection measures that comply with industry standards to protect user information and prevent personal information from being accessed, disclosed, used, modified, damaged or lost without authorization.
Claims
1. A session processing method, characterized in that: include: Acquire a multi-dimensional context; wherein the multi-dimensional context includes a current session context and a vehicle cabin perception context; Filtering the current session context to obtain a filtered first session context history; Performing knowledge summarization on the multi-dimensional context to obtain knowledge fragments; Based on the filtered first conversation context history and the knowledge fragment, a dialogue recall is performed on the filtered first conversation context history to obtain a target conversation context history.
2. The session processing method according to claim 1, wherein: The filtering the current session context to obtain a filtered first session context history includes: Filtering the current session context based on a rule policy to obtain a filtered second session context history; The second session context history is screened based on a large model to obtain the first session context history.
3. The session processing method according to claim 2, wherein: The filtering the second session context history based on the large model to obtain the first session context history includes: Inputting the context history of the second conversation into the large model, and outputting a set of data identical to the conversation turn of the second conversation; Filtering a set of data with the same conversation turn as the second conversation to obtain a third conversation context history; A preset whitelist is recalled for the third session context history to obtain the first session context history.
4. The session processing method according to claim 2, wherein: The rule-based strategy screening includes one or more of the following: keyword screening, intent screening, scenario screening, and time screening.
5. The session processing method according to any one of claims 1 to 4, characterized in that: The current session context includes the current round of user requests; The step of performing a dialogue recall on the filtered first conversation context history based on the filtered first conversation context history and the knowledge fragment to obtain a target conversation context history includes: Based on the current round of user request and the first conversation context history, performing multi-round history clustering recall based on dialogue intention and scenario, content prediction and intention association recall based on a large model, and recall based on semantic similarity on the filtered first conversation context history to obtain first context round information to be recalled; Based on the current round user request, the first session context history and the knowledge fragment, recalling the filtered first session context history based on the history-aware summary content to obtain second context round information to be recalled; The target session context history is determined based on the first context turn information and the second context turn information.
6. The session processing method according to claim 5, characterized in that: The determining the target session context history based on the first context turn information and the second context turn information includes: Analyzing the first context round information and the second context round information based on a voting mechanism to determine target context round information; The dialogue corresponding to the target context turn information is determined as the target conversation context history.
7. The session processing method according to any one of claims 1 to 4, characterized in that: The current session context includes the current round of user requests; The method further comprises: Performing intent recognition and slot filling on the multi-dimensional context; Selecting vehicle cabin perception information matching the current session context based on the identified intent and the filled slots; The current round user request, the target conversation context history, the knowledge fragment and the vehicle cabin perception information are input into the dialogue big model to generate reply information corresponding to the current round user request.
8. A conversation processing device, characterized in that: include: An acquisition module, used to acquire a multi-dimensional context; wherein the multi-dimensional context includes a current session context and a vehicle cabin perception context; A screening module, configured to screen the current session context to obtain a screened first session context history; A summarizing module, used for summarizing the multi-dimensional context to obtain knowledge fragments; A recall module is used to perform a dialogue recall on the filtered first conversation context history based on the filtered first conversation context history and the knowledge fragment to obtain a target conversation context history.
9. A smart device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer program product, characterized in that When the computer program product runs on a smart device, the smart device is enabled to execute the method according to any one of claims 1 to 7.
Citation Information
Cited By
Data processing method, electronic equipment and computer storage medium
CN120893560A