Question and answer processing method and device based on memory query and medium

By constructing a triple-bound memory unit and combining facial recognition and scene features, the problem of inaccurate memory matching in dynamic conversation environments is solved, and highly accurate question-and-answer responses in multimodal interactions are achieved.

CN123178570APending Publication Date: 2026-11-27ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611493534.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-23
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In multimodal interaction scenarios, existing technologies cannot accurately identify scene boundaries in dynamic conversation environments, resulting in a mismatch between historical memory and the current interaction scenario, which affects the accuracy of question and answer output.

Method used

By constructing memory units based on a triple binding of 'person-scene-semantic fact', and combining facial recognition and scene feature extraction, memory units that match the current conversation scene and query object are selected to generate accurate question-and-answer responses.

Benefits of technology

It improves the accuracy of question-and-answer responses in dynamic conversational environments, avoids interference from irrelevant historical memories, and enhances the naturalness and personalization of interactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178570A_ABST
    Figure CN123178570A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a question and answer processing method and device based on memory query and a medium. The method comprises: obtaining a query intention of a user and target scene information of a current conversation scene; based on the query intention, obtaining an identity of a target query object; based on the identity of the target query object and the target scene information, determining a target memory unit from a plurality of pre-cached memory units; wherein each memory unit comprises historical scene information, an identity of a speaking object, and a semantic fact, and the historical scene information is scene information of a historical conversation scene when a memory corresponding to the memory unit occurs; and outputting a query result to the user according to the semantic fact in the target memory unit. The method is used to achieve the effect of accurately performing memory matching in a dynamic conversation environment, thereby improving the accuracy of problem answering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence interaction, and in particular to a question-answering method, device and medium based on memory query. Background Technology

[0002] With the rapid development of artificial intelligence technology, multimodal interaction has become the core human-computer interaction method for offline service robots and smart terminals. Among them, multimodal open interaction (also known as "multimodal chat") is widely used in offline interactive environments such as shopping mall guides, exhibition hall explanations, and community convenience services because it conforms to natural human-computer communication habits.

[0003] In such scenarios, devices typically acquire user input through cameras, microphones, and dialogue processing modules, and then combine this with the conversation context to complete question-and-answer responses and memory retrieval. Currently, when responding to user questions, most devices only use the questioner's identity as the basis for memory retrieval and generate answers based on matched associated memories.

[0004] However, in practical applications, multi-modal chat scenarios often involve switching between characters during conversations, leading to a mismatch between retrieved historical memories and the current interaction context. This significantly reduces the accuracy of question-and-answer output. Therefore, how to accurately perform memory matching in dynamic conversational environments to improve the accuracy of question answers has become a pressing technical problem. Summary of the Invention

[0005] This application provides a memory-based question-answering method, device, and medium to achieve accurate memory matching in a dynamic conversational environment, thereby improving the accuracy of question answers.

[0006] In a first aspect, embodiments of this application provide a question-answering processing method based on memory lookup, including:

[0007] Obtain the user's query intent and the target scenario information of the current session;

[0008] Based on the query intent, obtain the identity identifier of the target query object;

[0009] Based on the identity identifier of the target query object and the target scene information, a target memory unit is determined from multiple pre-cached memory units; wherein, each memory unit includes historical scene information, the identity identifier of the speaking object, and semantic facts, and the historical scene information is the scene information of the historical conversation scene when the memory corresponding to the memory unit occurred;

[0010] Based on the semantic facts in the target memory unit, the query results are output to the user.

[0011] In one possible implementation, obtaining the target scenario information of the current session scenario includes:

[0012] A first set of people present is obtained based on facial recognition technology; the first set of people present includes the identity identifier of each person present in the current session scenario;

[0013] And / or, acquire a target scene image of the current session scene, and extract target scene features of the current session scene based on the target scene image;

[0014] Accordingly, the target scene information includes the first set of people present and / or the target scene features.

[0015] In one possible implementation, determining the target memory unit from a plurality of pre-cached memory units based on the identity of the target query object and the target scene information includes:

[0016] Based on semantic relevance retrieval of the query intent, at least one candidate memory unit is determined from the plurality of memory units;

[0017] For each candidate memory unit, the validity of the candidate memory unit is verified based on the identity identifier of the target query object, the target scene information, the historical scene information in the candidate memory unit, and the identity identifier of the speaking object.

[0018] If the candidate memory unit passes the validity check, then the candidate memory unit is determined as the target memory unit.

[0019] In one possible implementation, determining at least one candidate memory unit from the plurality of memory units based on semantic relevance retrieval of the query intent includes:

[0020] Filter memory units whose identity identifiers differ from those of the target query object;

[0021] Based on the semantic facts of each memory unit after filtering, at least one candidate memory unit that is semantically related to the query intent is retrieved from the multiple memory units obtained after filtering.

[0022] In one possible implementation, the step of validating the candidate memory unit based on the identity identifier of the target query object, the target scene information, and the historical scene information and the identity identifier of the speaking object in the candidate memory unit includes:

[0023] By comparing the target scene information with the historical scene information, it is determined whether the candidate memory unit passes the scene consistency check;

[0024] If the identity identifier of the target query object is consistent with the identity identifier of the speaking object, then the candidate memory unit is determined to have passed the object consistency check; otherwise, the candidate memory unit is determined to have failed the object consistency check.

[0025] When the candidate memory unit passes both the scene consistency check and the object consistency check, it is determined that the candidate memory unit has passed the validity check.

[0026] In one possible implementation, the historical scene information of each memory unit includes a second set of people present; wherein, the second set of people present includes the identity identifier of each person present in the historical session scene when the memory corresponding to the memory unit occurred;

[0027] If the target scene information includes the first set of people present, then determining whether the candidate memory unit passes the scene consistency check by comparing the target scene information with the historical scene information includes:

[0028] If the second set of people present is a subset of the first set of people present, then the candidate memory unit is determined to have passed the first round of scene verification; otherwise, the candidate memory unit is determined to have failed the first round of scene verification.

[0029] Based on whether the candidate memory unit passes the first round of scenario verification, it is determined whether the candidate memory unit passes the scenario consistency verification.

[0030] In one possible implementation, the historical scene information of each memory unit further includes historical scene features; wherein, the historical scene features are scene features extracted from historical scene images, and the historical scene images are captured from the historical conversation scene when the memory corresponding to the memory unit occurred;

[0031] If the target scene information also includes the target scene features, then determining whether the candidate memory unit passes the scene consistency check based on whether the candidate memory unit passes the first round of scene verification includes:

[0032] If the feature similarity between the historical scene features and the target scene features is greater than or equal to a preset threshold, then the candidate memory unit is determined to have passed the second round of scene verification; otherwise, the candidate memory unit is determined to have failed the second round of scene verification.

[0033] When the candidate memory unit passes both the first round of scene verification and the second round of scene verification, the candidate memory unit is determined to have passed the scene consistency verification.

[0034] In one possible implementation, obtaining the first set of people present based on facial recognition technology includes:

[0035] Obtain the facial image of each person present in the current session scenario;

[0036] For each person present, facial recognition technology is used to extract the facial features of that person from their facial image.

[0037] By comparing the facial features with each facial feature in the pre-cached facial feature library, it is determined whether the person present is a cached user.

[0038] If it is determined that the person present is a cached user, then the identity identifier corresponding to the face feature with the highest similarity to the face feature of the person present in the face feature database is determined as the identity identifier of the person present.

[0039] If it is determined that the person present is not a cached user, then a globally unique identity identifier is assigned to the person present as the identity identifier of the person present;

[0040] The first set of attendees is constructed based on the identity of each attendee.

[0041] In one possible implementation, the method further includes:

[0042] For each person present who is not a cached user, their facial features and identity identifier are associated and cached in the facial feature database.

[0043] In one possible implementation, the method further includes:

[0044] If the person present is not a registered user, then after obtaining the facial features of the person present, delete the facial image of the person present.

[0045] After the preset session termination conditions are met, the cached facial features, identity identifiers, and memory units associated with the present persons are deleted.

[0046] In one possible implementation, obtaining the identity identifier of the target query object based on the query intent includes:

[0047] If the query intent includes user referential information, then the identity identifier of the target query object is determined based on the user referential information;

[0048] If the query intent does not include the user referential information, a clarifying question is issued to the user, which is used to guide the user to indicate the target query object;

[0049] Obtain the user's answer to the clarifying question;

[0050] The identity of the target query object is determined based on the answer.

[0051] Secondly, embodiments of this application provide a question-answering processing apparatus based on memory query, comprising:

[0052] The first acquisition module is used to acquire the user's query intent and the target scenario information of the current session scenario;

[0053] The second acquisition module is used to acquire the identity identifier of the target query object based on the query intent;

[0054] The determination module is used to determine the target memory unit from a plurality of pre-cached memory units based on the identity identifier of the target query object and the target scene information; wherein, each memory unit includes historical scene information, the identity identifier of the speaking object and semantic facts, and the historical scene information is the scene information of the historical conversation scene when the memory corresponding to the memory unit occurred;

[0055] The output module is used to output query results to the user based on the semantic facts in the target memory unit.

[0056] In one possible implementation, the first acquisition module is used for

[0057] A first set of people present is obtained based on facial recognition technology; the first set of people present includes the identity identifier of each person present in the current session scenario;

[0058] And / or, acquire a target scene image of the current session scene, and extract target scene features of the current session scene based on the target scene image;

[0059] Accordingly, the target scene information includes the first set of people present and / or the target scene features.

[0060] In one possible implementation, the determining module includes:

[0061] The retrieval unit is used to determine at least one candidate memory unit from the plurality of memory units based on semantic relevance retrieval of the query intent.

[0062] The verification unit is used to verify the validity of each candidate memory unit based on the identity identifier of the target query object, the target scene information, the historical scene information in the candidate memory unit, and the identity identifier of the speaking object.

[0063] A determining unit is configured to determine the candidate memory unit as the target memory unit if the candidate memory unit passes the validity check.

[0064] In one possible implementation, the retrieval unit is specifically used for:

[0065] Filter memory units whose identity identifiers differ from those of the target query object;

[0066] Based on the semantic facts of each memory unit after filtering, at least one candidate memory unit that is semantically related to the query intent is retrieved from the multiple memory units obtained after filtering.

[0067] In one possible implementation, the verification unit is specifically used for:

[0068] By comparing the target scene information with the historical scene information, it is determined whether the candidate memory unit passes the scene consistency check;

[0069] If the identity identifier of the target query object is consistent with the identity identifier of the speaking object, then the candidate memory unit is determined to have passed the object consistency check; otherwise, the candidate memory unit is determined to have failed the object consistency check.

[0070] When the candidate memory unit passes both the scene consistency check and the object consistency check, it is determined that the candidate memory unit has passed the validity check.

[0071] In one possible implementation, the historical scene information of each memory unit includes a second set of people present; wherein, the second set of people present includes the identity identifier of each person present in the historical session scene when the memory corresponding to the memory unit occurred;

[0072] If the target scene information also includes the first set of people present, then the verification unit is specifically used for:

[0073] If the second set of people present is a subset of the first set of people present, then the candidate memory unit is determined to have passed the first round of scene verification; otherwise, the candidate memory unit is determined to have failed the first round of scene verification.

[0074] Based on whether the candidate memory unit passes the first round of scenario verification, it is determined whether the candidate memory unit passes the scenario consistency verification.

[0075] In one possible implementation, the historical scene information of each memory unit further includes historical scene features; wherein, the historical scene features are scene features extracted from historical scene images, and the historical scene images are captured from the historical conversation scene when the memory corresponding to the memory unit occurred;

[0076] If the target scene information further includes the target scene features, then the verification unit is specifically used for:

[0077] If the feature similarity between the historical scene features and the target scene features is greater than or equal to a preset threshold, then the candidate memory unit is determined to have passed the second round of scene verification; otherwise, the candidate memory unit is determined to have failed the second round of scene verification.

[0078] When the candidate memory unit passes both the first round of scene verification and the second round of scene verification, the candidate memory unit is determined to have passed the scene consistency verification.

[0079] In one possible implementation, the first acquisition module is specifically used for:

[0080] Obtain the facial image of each person present in the current session scenario;

[0081] For each person present, facial recognition technology is used to extract the facial features of that person from their facial image.

[0082] By comparing the facial features with each facial feature in the pre-cached facial feature library, it is determined whether the person present is a cached user.

[0083] If it is determined that the person present is a cached user, then the identity identifier corresponding to the face feature with the highest similarity to the face feature of the person present in the face feature database is determined as the identity identifier of the person present.

[0084] If it is determined that the person present is not a cached user, then a globally unique identity identifier is assigned to the person present as the identity identifier of the person present;

[0085] The first set of attendees is constructed based on the identity of each attendee.

[0086] In one possible implementation, the device further includes:

[0087] The caching module is used to associate and cache the facial features and identity identifiers of each person present who is not a cached user with the facial feature database.

[0088] In one possible implementation, the device further includes:

[0089] The deletion module is used to delete the facial image of the person present if the person present is not a registered user, after obtaining the facial features of the person present.

[0090] After the preset session termination conditions are met, the cached facial features, identity identifiers, and memory units associated with the present persons are deleted.

[0091] In one possible implementation, the second acquisition module is specifically used for:

[0092] If the query intent includes user referential information, then the identity identifier of the target query object is determined based on the user referential information;

[0093] If the query intent does not include the user referential information, a clarifying question is issued to the user, which is used to guide the user to indicate the target query object;

[0094] Obtain the user's answer to the clarifying question;

[0095] The identity of the target query object is determined based on the answer.

[0096] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0097] The memory stores computer-executed instructions;

[0098] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0099] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0100] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0101] The question-answering processing method, device, and medium based on memory query provided in this application pre-caches multiple memory units covering three-dimensional binding information of scene, person, and semantic facts. After obtaining the user's query intent and the target scene information of the current session scene, and determining the identity of the target query object based on the query intent, the method of determining the target memory unit from the pre-cached multiple memory units based on the identity of the target query object and the target scene information can more accurately match historical memories related to the current query in dynamic interactive scenarios, thereby ensuring the accuracy of question-answering response. Attached Figure Description

[0102] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0103] Figure 1 A flowchart illustrating a question-answering method based on memory query provided in Embodiment 1 of this application;

[0104] Figure 2 A flowchart illustrating a specific memory-based question-answering method provided in Embodiment 3 of this application;

[0105] Figure 3 A schematic diagram of the structure of a question-answering processing device based on memory query provided in Embodiment 4 of this application;

[0106] Figure 4 A schematic diagram of a question-answering processing device based on memory query provided in Embodiment 5 of this application;

[0107] Figure 5 This is a schematic diagram of the structure of an electronic device provided in Embodiment Six of this application.

[0108] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0109] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0110] It should be noted that the collection, storage, use, processing, transmission, provision, and disclosure of user data and other information involved in the technical solution of this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals. Furthermore, the embodiments of this application may mention certain existing industry solutions such as software, components, and models. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.

[0111] To facilitate understanding of the technical content of this application, the background technology is described in detail below:

[0112] With the rapid development of artificial intelligence technology, multimodal interaction has become the core human-computer interaction method for offline service robots, smart terminals and other devices. Among them, multimodal open interaction (also known as "multimodal chat") is widely used in offline interactive environments such as shopping mall guides, exhibition hall explanations and community convenience services because it conforms to natural human-computer communication habits.

[0113] Specifically, one of the core requirements of multimodal casual conversation is to achieve "memory coherence," meaning that the device can remember key information mentioned by the user during the conversation (such as relationships, preferences, etc.) and accurately recall it in subsequent conversations, improving the naturalness and personalization of the interaction. In such scenarios, the device typically acquires user input through a camera, microphone, and dialogue processing module, and combines this with the conversation context to complete the question-and-answer response and memory retrieval. Currently, when responding to user questions, most devices only use the questioner's identity as the basis for memory retrieval and generate the answer content based on the matched associated memories.

[0114] However, multimodal chat scenarios are characterized by dynamic changes in the interactive context, often involving switching between characters in multi-person conversations. Existing technologies that rely solely on the questioner's identity for memory retrieval cannot identify scenario boundaries, which can easily lead to mismatches between retrieved historical memories and the current interactive context, resulting in mis-retrieval and incorrect answers, severely impacting the accuracy of the interaction.

[0115] As a concrete example, suppose user A first conversed with user B, and then begins a conversation with user C, asking the robot a question during this conversation. In this scenario, existing memory matching methods only identify the questioner as user A based on facial recognition results, retrieve all historical memories associated with user A's identity, and use them for the answer. Since this part of the memory contains a large amount of semantic information from the conversation between user A and user B, a large amount of irrelevant memory is involved in question-and-answer generation. Therefore, the robot's output response will contain content that does not match the current conversation partner and context, leading to a significant decrease in the accuracy of the question-and-answer process.

[0116] Existing solutions only bind memories to a single user identity, failing to differentiate between the dialogue interaction partner and the real-time dialogue scenario. When the same user changes their conversation partner, all retrieved memories are only associated with user A, making it impossible to distinguish the corresponding dialogue partner. A large number of irrelevant historical memories are mixed into the current conversation, causing a mismatch between the retrieved historical memories and the current real-time interaction context, resulting in a significant decrease in the accuracy of question-and-answer output. Therefore, how to achieve accurate memory matching and improve the accuracy of question-and-answer responses in a dynamically changing conversation environment is a pressing technical challenge that needs to be overcome in this field.

[0117] Therefore, how to accurately perform memory matching in a dynamic conversational environment, thereby improving the accuracy of question answers, has become an urgent technical problem to be solved.

[0118] To address the aforementioned technical issues, the inventors proposed constructing a memory unit with a triple binding of "person-scene-semantic facts" based on historical dialogues. When a user subsequently asks a question, the question text can be parsed to obtain the target query object. Memory units that simultaneously match the scene with the current conversation scene and the speaker's identity with the query object are selected, and the stored semantic facts are extracted to generate a targeted response. This method allows for the use of only effective memories adapted to the current dialogue environment and dialogue object, avoiding interference from irrelevant historical memories and significantly improving the accuracy of question-and-answer responses.

[0119] It should be noted that the memory-based question-answering method provided in this application can be executed by offline service robots, smart terminals, or other electronic devices with dialogue processing capabilities. This application does not impose specific restrictions on the specific entity that implements the solution.

[0120] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0121] Figure 1 This is a flowchart illustrating a question-answering method based on memory lookup, as provided in Embodiment 1 of this application. Figure 1 As shown, the method includes:

[0122] S101: Obtain the user's query intent and the target scenario information of the current session.

[0123] In this application, the query intent is used to characterize the user's goal and needs when initiating this question and answer session, and the executing entity determines the content that the user wants to query based on this information; the target scenario information is used to characterize the relevant scenario information when this question and answer session occurs.

[0124] In practice, during any conversation, if a user asks a question, audio data can be captured in real time using an audio acquisition device (such as a 16kHz microphone array). This audio data is then converted into text using Automatic Speech Recognition (ASR) technology to determine the user's query intent. Simultaneously, image acquisition devices (such as high-definition cameras with a resolution of at least 1080P and a frame rate of at least 15fps) can capture relevant images of the current conversation scene, and target scene information can be extracted based on these images. This target scene information can, for example, indicate two or more participants in the current conversation.

[0125] S102: Based on the query intent, obtain the identity identifier of the target query object.

[0126] In this application, the target query object refers to the session participant whose corresponding speech memory needs to be retrieved in the current query. In this step, the query intent needs to be parsed to determine the session participant whose speech memory should be retrieved to answer the user's query. Then, the identity of the session participant is determined based on facial recognition technology to provide a basis for subsequent matching of memory units.

[0127] S103: Based on the identity of the target query object and the target scene information, determine the target memory unit from multiple pre-cached memory units.

[0128] In this application, multiple pre-cached memory units are used to store multiple memory records formed and retained in historical interactions, which serve as the data foundation for calling historical semantic facts in this question-and-answer processing. Each memory unit includes historical scene information, the identity identifier of the speaking object, and semantic facts. The historical scene information is the scene information of the historical conversation scene at the time the memory corresponding to the memory unit occurred.

[0129] Specifically, the identity identifier of the speaker is used to indicate who generated the semantic fact; the semantic fact is used to store the semantic content extracted from historical speeches, such as in the form of attribute values, relation pairs, event descriptions, structured triples or slot sets; and the historical context information is used to describe the historical conversation context corresponding to when the semantic fact was formed.

[0130] In this step, when determining the target memory unit, it is necessary to combine the identity identifier of the target query object and the target scene information to select the target memory unit corresponding to the current query from multiple pre-cached memory units. In specific implementation, the identity identifier of the speaking object in the target memory unit should match the identity identifier of the target query object, the historical scene information should match the target scene information, and the semantic facts should be related to the semantic intent of the query.

[0131] It should be noted that the aforementioned multiple memory units may originate from the current session or a historical session, and this application does not impose specific restrictions on this.

[0132] S104: Output query results to the user based on the semantic facts in the target memory unit.

[0133] In this step, semantic facts need to be read from the target memory unit and query results corresponding to those semantic facts are generated based on the current query intent.

[0134] In one possible implementation, the semantic facts can be first processed by extracting answers and organizing results based on the query intent. If the user query corresponds completely to the semantic facts, the corresponding content is directly used as the core answer and organized into a response statement for output. If the user query has a partial correspondence with the semantic facts, the semantic facts can be reorganized and output after combining the target query object and the current dialogue context. If the semantic facts in the target memory unit are insufficient to form a complete answer, but some information can be determined, prompts based on the existing facts can be output.

[0135] In addition, if the target memory unit cannot be found in step S103, prompts such as "I haven't memorized it yet, can you tell me now" can be output to guide the user to provide relevant information to form a new memory unit.

[0136] In practical applications, the device can output the aforementioned content through at least one of the following methods: voice, on-screen text display, or other means, so that users can receive answers or guidance. For example, the query results can be read aloud through voice synthesis, and the query results can be displayed as text on the screen simultaneously.

[0137] Understandably, this step transforms the semantic facts in the target memory unit into query results that are perceptible to the user, with the output content having a clear source and corresponding to the current question. Since the answer is not extracted unconstrainedly from all historical posts, but rather from a defined target memory unit, the query results remain consistent with the queried object and the current session context in a multi-person dynamic conversation environment.

[0138] The question-answering processing method, device, and medium based on memory query provided in this application pre-caches multiple memory units covering three-dimensional binding information of scene, person, and semantic facts. After obtaining the user's query intent and the target scene information of the current session scene, and determining the identity of the target query object based on the query intent, the method of determining the target memory unit from the pre-cached multiple memory units based on the identity of the target query object and the target scene information can more accurately match historical memories related to the current query in dynamic interactive scenarios, thereby ensuring the accuracy of question-answering response.

[0139] Furthermore, Embodiment 2 of this application provides a method for constructing the aforementioned plurality of memory units, including the following:

[0140] Step 1: Upon detecting any initiated session, real-time voice data is collected via microphone and real-time image data is collected via camera. The camera's field of view must cover the area where the speaker is located. The camera can be a fixed wide-angle camera or a webcam with a pan-tilt-zoom (PTZ) setup. The target face region of the speaker is selected from the image data, and the target face features within the target face region are extracted. If the cosine similarity between the target face feature and any cached face feature in memory is higher than a threshold (e.g., 0.7, 0.8, etc.), the identity identifier corresponding to the cached face feature is determined as the current speaker's identity identifier. Otherwise, a globally unique identity identifier is assigned to the current speaker, and their face feature is associated with and cached with that identity identifier.

[0141] As a specific example, "selecting the target facial region of the speaker from image data and extracting the target facial features within the target facial region" can be achieved in the following way:

[0142] First, the azimuth angle obtained from the sound source localization is matched with the spatial position of the face detection box to lock the target face region corresponding to the person currently speaking. Then, face recognition technology is used to extract the target face features in the target face region. For example, the target face region can be scaled to 112×112 pixels, and the face features in the target face region can be extracted using the ArcFace model or CosFace model to obtain a 512-dimensional feature vector, which is used as the target face feature.

[0143] Step Two: Extract current scene information from image data. It should be understood that this scene information will serve as the historical scene information corresponding to the current memory.

[0144] In one possible implementation, the scene information includes the set of people present and / or scene characteristics, which this application does not limit. Specific methods for obtaining the set of people present and / or scene characteristics will be described later.

[0145] Step 3: Use speech recognition technology to transcribe speech data into text data, and remove interjections and redundant punctuation from the text data to retain clean speech content; use the Bidirectional Encoder Representations from Transformers (BERT) model to perform semantic parsing on the current speech, extract structured facts, and during extraction, force the association of the identity identifier corresponding to the aforementioned speaker as the subject to which the facts belong.

[0146] For example, when a user with the identity "tmp_a1b2c3" says "My colleague's name is Xiaoming", the generated semantic fact is: {Attribution Subject ID: "tmp_a1b2c3", Relation: "Colleague", Object: "Xiaoming"}. Its natural language expression is "User tmp_a1b2c3's colleague is Xiaoming".

[0147] The speaker's identity, context information, and semantic facts can be collectively constructed into a memory unit to remember the relevant content presented by the speaker in this session and the context in which that content was presented. Optionally, the memory unit can also store the time the user spoke (also known as the time the memory occurred) and the context type. The context type could be, for example, a 4S store sales scenario or a showroom introduction scenario. Further, the context type can be further specified as two-person casual conversation or multi-person casual conversation. For example, the memory unit can be constructed in the following format: {semantic facts, context information, speaker's identity, timestamp, context type}.

[0148] It should be noted that the aforementioned memory unit construction process can occur throughout the entire lifecycle of any session; if multiple participants take turns speaking in a single session, a corresponding memory unit is constructed for each speaking action to achieve accurate storage of session memory.

[0149] Furthermore, Figure 2 This is a flowchart illustrating a specific memory-based question-answering method provided in Embodiment 3 of this application. Based on the above embodiments, this application provides a detailed description of the specific implementation of each step, such as... Figure 2 As shown, the method includes:

[0150] S201: Obtain the user's query intent and the target scenario information of the current session;

[0151] In one possible implementation, the target scene information includes a first set of people present and / or target scene features. That is, the composition of the target scene information can be flexibly configured; it can include only the set of people present, only the scene features, or both, to adapt to different application requirements.

[0152] However, it is worth noting that the data dimensions of the target scene information must be consistent with the data dimensions of the pre-cached historical scene information. This ensures that the scene matching process can be carried out in the same feature space, avoiding matching failure or decreased accuracy due to inconsistent dimensions, and achieving the technical effect of improving the accuracy and robustness of memory retrieval.

[0153] The first set of attendees includes the identity of each attendee in the current conversation scene. Specifically, attendees can be defined as a preset number (e.g., 3 or 4) of people who are close to the current speaker (i.e., the user in S201). The target scene features refer to the features obtained by extracting features from the images captured in the current conversation scene.

[0154] Accordingly, this step may specifically include the following:

[0155] 1) Obtain the first set of people present based on facial recognition technology.

[0156] As a specific implementation method, the first gathering of people present can be obtained using the following method, as shown in steps a to f:

[0157] Step a: Obtain the face image of each person present in the current session.

[0158] For example, a face detection algorithm (such as a face detection algorithm based on Multi-task Cascaded Convolutional Networks (MTCNN)) can be used to extract multiple face regions from the aforementioned image data; the multiple face regions are filtered to remove face regions that are blurry or severely occluded (e.g., occlusion area ≥ 30%); from the remaining face regions after filtering, a preset number of face regions adjacent to the speaker's position are selected to determine the face images of the people present.

[0159] Step b: For each person present, facial recognition technology is used to extract the facial features of the person present from their facial image.

[0160] In this step, the acquired face image can be input into a face recognition model to extract features. The model can use a convolutional neural network to generate a fixed-length feature vector.

[0161] For example, the face region of each person present can be scaled to 112×112 pixels, and the facial features in the face region can be extracted using the ArcFace model or the CosFace model to obtain the 512-dimensional feature vector corresponding to that person.

[0162] Step c: By comparing the similarity of the facial features with each facial feature in the pre-cached facial feature library, determine whether the person present is a cached user.

[0163] Step d: If it is determined that the person present is not a cached user, then assign a globally unique identity to the person present as their identity identifier;

[0164] Step e: If it is determined that the person present is a cached user, then the identity identifier corresponding to the face feature with the highest similarity to the face feature of the person present in the face feature database is determined as the identity identifier of the person present.

[0165] In steps c to e above, for each person present, the cosine similarity or Euclidean distance of the acquired feature vector is calculated one by one with the pre-cached face feature library, and it is determined whether the cached user is matched based on a preset threshold. When matched, the identity identifier corresponding to the face feature with the highest similarity is taken as the identity identifier of the person present. When not matched, a globally unique identifier can be generated according to the combination of timestamp, device identifier and random sequence, or the unified numbering service can be directly called to assign an identity identifier.

[0166] In practical applications, in order to ensure that the identity recognition results of the same person remain consistent in multiple temporary interactions, thereby improving the efficiency of subsequent retrieval and the accuracy of identity association, the facial features and identity identifiers of each person present who is not a cached user can be associated and cached in the facial feature database.

[0167] Specifically, after completing facial recognition of those present and determining cached users, uncached facial features can be added to the cache set and directly used for similarity retrieval and identity reuse in subsequent sessions. Thus, when the same person reappears, matching can be quickly completed based on historical features in the facial feature database, and the existing identity identifier can be reused, thereby reducing the overhead of repeated record creation and determination.

[0168] As a specific example, taking person A as an example, if the similarity between the extracted facial feature vector and any facial feature in the facial feature library is ≥0.8, then they are determined to be a cached user and their previously assigned identity identifier is retained; if the similarity between them and any facial feature in the facial feature library is <0.8, then a globally unique 8-bit identity identifier (such as "tmp_a1b2c3") is generated, and the feature vector and the identity identifier are stored in the memory cache.

[0169] Step f: Construct the first set of attendees based on the identity of each attendee.

[0170] In this step, the identities of all present persons need to be written into the personnel set data structure corresponding to the current session to form the first set of present persons.

[0171] It is understandable that if obtaining target scene information requires performing the aforementioned step 1), then for each memory unit, the historical scene information will include a second set of people present; the second set of people present includes the identity of each person present in the historical conversation scene when the memory occurred corresponding to the memory unit. In practical applications, its specific construction method can be referred to as in step 1 above, and will not be elaborated further.

[0172] The methods described in steps a to f above can accurately generate a set of people present in a multi-person temporary interactive environment and ensure that each person present has a unique identity identifier, so that subsequent scene comparison and memory retrieval have a clear personnel benchmark, thereby improving the consistency of session object identification and the accuracy of memory matching.

[0173] 2) Collect the target scene image of the current session scene, and extract the target scene features of the current session scene based on the target scene image.

[0174] The target scene image must include the current speaker (i.e., the user asking the question) and the scene in which the speaker is located.

[0175] In practical implementation, for target scene features, the target scene image can be scaled, denoised and feature encoded, and scene vectors can be extracted through convolutional neural networks or visual Transformers to obtain target scene features.

[0176] It is understandable that if obtaining target scene information requires performing the aforementioned step 2), then for each memory unit, the historical scene information will include historical scene features. These historical scene features are scene features extracted from historical scene images, which are images captured of the historical conversation scene at the time the memory corresponding to the memory unit occurred. In practical applications, the specific extraction method can be referred to as in step 2 above, and will not be elaborated further.

[0177] It should be noted that the face recognition model and visual feature extraction model used in steps 1) and 2) above may be selected according to different algorithm versions depending on the deployment environment, and this application does not limit them.

[0178] In practical applications, the target scene information of the current session is input into the subsequent memory query module as the target scene information of the first set of people present and / or target scene features, and then jointly matched with the target query object to limit the retrieval scope of the target memory unit. Since the target scene information can cover the dimensions of personnel identity and / or scene visuals, it can accurately represent the current session state when multiple people take turns speaking or when the scene changes.

[0179] The method provided by the above implementation can fully reflect the current session scenario, thereby improving the matching accuracy of the target memory unit and ensuring that the subsequent output query results are consistent with the current attendees and the scenario context.

[0180] S202: Based on the query intent, obtain the identity identifier of the target query object.

[0181] In one possible implementation, this step includes steps 2.1 to 2.4 as follows:

[0182] Step 2.1: If the query intent includes user referential information, then determine the identity of the target query object based on the user referential information.

[0183] The user referential information may include first-person pronouns or other information that can clearly indicate the user's identity. For example, if the query intent (such as "What is my colleague's name?") includes first-person pronouns such as "I" or "my", then the query target is determined to be the current user asking the question. Thus, based on facial recognition technology and sound source localization technology, the user's identity identifier can be obtained and used as the identity identifier of the target query target. As another example, if the query intent includes a specific user name, and the device can clearly find an identity identifier that matches the user name, then that identity identifier is used as the identity identifier of the target query target.

[0184] Step 2.2: If the query intent does not include user-specific information, then a clarifying question is issued to the user. The clarifying question is used to guide the user to specify the target query object.

[0185] Step 2.3: Obtain the user's answers to the clarifying questions.

[0186] Step 2.4: Determine the identity of the target query object based on the answer.

[0187] Regarding the specific implementation of steps 2.2 to 2.4 above, if the parsing result of the query intent does not contain user referential information, for example, the query intent is "Who is he?", where "he" is ambiguous, and it is determined that the query intent does not contain user referential information; in this case, it is necessary to generate a clarifying question related to the semantics of the current dialogue, such as "Which user's content do you want to query?" or "The person who just spoke is another friend, do you want to ask about him?", and send the question to the voice interaction module or text interaction module; after obtaining the user's answer to the clarifying question, entity parsing, synonym unification, and context association will be performed on the answer. If the answer is an explicit object name, and the device can query the identity identifier corresponding to the name, then the identity identifier corresponding to the name will be directly determined as the identity identifier of the target query object; if the answer is relative descriptive information, then if the device can combine the first set of people present in the current conversation scenario, historical speaking records, or cached identity identifiers to map the descriptive information into a unique object, then the object will be determined as the target query object, and the identity identifier will be retrieved.

[0188] The output results for the target query object need to be used as input for subsequent memory unit filtering to ensure a stable correspondence between the query intent and the specific object.

[0189] In the aforementioned implementation of steps 2.1 to 2.4, by directly identifying the object when user referential information exists and supplementing the object information through clarifying questions when user referential information is lacking, the process of identifying the query object can be kept consistent with the user's expression, reducing object ambiguity and providing accurate input for subsequent object-based memory retrieval, thereby improving the accuracy of query matching and the continuity of interaction.

[0190] S203: Based on semantic relevance retrieval of the query intent, at least one candidate memory unit is identified from multiple memory units.

[0191] In this step, the query intent can be obtained by parsing the user input and encoding the query intent into a semantic vector. Then, the correlation between the query intent and the semantic facts of each memory unit is calculated in multiple pre-cached memory units, and the memory units whose correlation meets the threshold condition are selected as candidate memory units.

[0192] For example, when performing semantic retrieval, the similarity between the query intent and the semantic facts in the memory unit can be calculated using Sentence-BERT. When the similarity is greater than 0.7, the two are determined to be semantically similar and identified as candidate memory units.

[0193] In one possible implementation, this step may include:

[0194] Filter memory units where the identity of the speaking object differs from that of the target query object; based on the semantic facts of each filtered memory unit, retrieve at least one candidate memory unit that is semantically related to the query intent from the multiple filtered memory units.

[0195] In practical implementation, multiple memory units are first read from the memory storage, and the identity identifier of the speaking object within each memory unit is extracted and compared with the identity identifier of the target query object. For memory units with inconsistent identity identifiers, the system directly removes them from the retrieval set, retaining only memory units with the same identity identifiers as input for subsequent semantic retrieval. Subsequently, the semantic facts of each retained memory unit are parsed and vectorized, and then similarity is calculated with the semantic representation of the query intent. Based on the similarity threshold, ranking results, or matching scores, at least one candidate memory unit semantically related to the query intent is selected.

[0196] Understandably, this processing method first performs a coarse screening based on identity identifiers, and then a fine screening based on semantic facts. This limits the retrieval input from the source to a memory range consistent with the target query object, and further narrows down the memory content corresponding to the query intent, thus obtaining candidate memory units. Since memory units irrelevant to identity have been eliminated before semantic retrieval, the relevance judgment of subsequent candidate memory units is more focused.

[0197] By adopting this method, the retrieval process can reduce memory confusion between different speakers, lower the probability of mistaking others' historical semantic facts as the current query object, and avoid cross-subject memory mismatch from the source. At the same time, by filtering memory units in the memory recall stage, the matching range of subsequent verification can be reduced, thereby improving retrieval efficiency.

[0198] S204: For each candidate memory unit, the validity of the candidate memory unit is verified based on the identity of the target query object, the target scene information, the historical scene information in the candidate memory unit, and the identity of the speaking object.

[0199] In practice, for each candidate memory unit, the identity identifier of the target query object can be compared with the identity identifier of the speaking object in the candidate memory unit. At the same time, the consistency judgment between the target scene information and the historical scene information in the candidate memory unit can be made to complete the validity verification of the candidate memory unit.

[0200] In terms of working principle, the schemes in steps S203 and S204 mentioned above first narrow down the memory retrieval range using semantic relevance retrieval, and then exclude semantically relevant but currently inapplicable memory units through dual verification of identity identifiers and scene information, so that the selected target memory units simultaneously meet the requirements of object affiliation and scene matching. Adopting this method can reduce the probability of mismatches in temporary multi-person interaction environments, improve the accuracy of target memory unit determination, and ensure that the output results are consistent with the current conversation subject and scene.

[0201] Specifically, in one possible implementation, this step includes steps 4.1 to 4.3 as follows:

[0202] Step 4.1: For each candidate memory unit, determine whether the candidate memory unit passes the scene consistency check by comparing the target scene information with the historical scene information.

[0203] As a specific implementation method, if the target scene information includes a first set of people present, and the historical scene information of each memory unit includes a second set of people present, then step 4.1 may include the following steps 4.1.1 and 4.1.2:

[0204] Step 4.1.1: If the second set of people present is a subset of the first set of people present, then the candidate memory unit is determined to have passed the first round of scenario verification; otherwise, the candidate memory unit is determined to have failed the first round of scenario verification.

[0205] In the specific implementation, for each candidate memory unit, its historical scene information is read, and the first set of people present in the current target scene information is obtained. Then, the set relationship between the two is determined. When all the identities in the second set of people present exist in the first set of people present, it indicates that the current session scene includes at least all the people present when the memory occurred. In this case, the candidate memory unit is determined to have passed the first round of scene verification. When the second set of people present is not a subset of the first set of people present, it indicates that the current scene has changed compared to the scene when the memory occurred, such as some people leaving midway or the entire on-site personnel being replaced. In this case, the candidate memory unit is determined to have failed the first round of scene verification.

[0206] Step 4.1.2: Based on whether the candidate memory unit passes the first round of scenario verification, determine whether the candidate memory unit passes the scenario consistency verification.

[0207] In this step, if the target scene information consists only of the first set of people present, then if the memory unit passes the first round of scene verification, it can be directly determined that the candidate memory unit has passed the scene consistency verification. If the target scene information contains other scene information besides the first set of people present, then whether the candidate memory unit has passed the scene consistency verification is determined based on whether that scene information has passed the verification. Regardless of whether the target scene information consists only of the first set of people present, if the memory unit fails the first round of scene verification, it is directly determined that the candidate memory unit has failed the scene consistency verification, in order to reduce the probability of cross-scene memory retrieval and thus improve the accuracy of subsequent question answers.

[0208] Understandably, this verification mechanism filters the boundaries of the people present before memory retrieval, ensuring that the target memory unit only enters subsequent matching if the composition of the people in the current session scenario meets the scenario constraints at the time the memory occurred. This ensures that the scenario selection of candidate memory units remains consistent with the current multi-person session state, thereby improving the accuracy of matching memory retrieval with the current session scenario and reducing the probability of erroneous cross-scenario retrieval. Furthermore, using set inclusion relationships to perform scenario consistency verification also has the advantage of reducing the comparison overhead caused by duplicate person identifiers.

[0209] Optionally, if the target scene information also includes target scene features, and the historical scene information of each memory unit also includes historical scene features, then step 4.1.2 can be refined into the following steps A and B:

[0210] Step A: If the feature similarity between the historical scene features and the target scene features is greater than or equal to the preset threshold, then the candidate memory unit is determined to have passed the second round of scene verification; otherwise, the candidate memory unit is determined to have failed the second round of scene verification.

[0211] Step B: When a candidate memory cell passes both the first and second rounds of scenario verification, the candidate memory cell is determined to have passed the scenario consistency verification.

[0212] In the specific implementation, after completing the first round of scene verification, the historical scene features corresponding to the initially screened candidate memory units are compared with the current target scene features using cosine similarity, Euclidean distance inverse mapping, or normalized dot product to output feature similarity. This similarity is then compared with a preset threshold (e.g., 0.6). When the similarity reaches or exceeds the threshold, the candidate memory unit is determined to have passed the second round of scene verification; when the similarity is below the threshold, the candidate memory unit is determined to have failed the second round of scene verification.

[0213] During operation, the first round of scene verification is used to initially screen the personnel set or basic scene relationships. The second round of scene verification further verifies the visual consistency between historical scene features and target scene features. Only when both conditions are met does the system recognize that the candidate memory unit is consistent with the current session scene and retain it as a valid object for subsequent memory queries.

[0214] It is understandable that by introducing historical scene features and setting up a second round of scene verification based on feature similarity, the aforementioned steps A and B can enable candidate memory units to meet consistency requirements at both the personnel and visual scene levels. This can improve the accuracy of scene consistency determination, enhance the robustness of the verification mechanism, and thus further reduce the probability of cross-scene mismatch.

[0215] In another possible implementation, if the target scene information includes target scene features and the historical scene information of each memory unit only includes historical scene features, then the aforementioned step 4.1 can also be implemented by the following steps: for each candidate memory unit, if the feature similarity between the historical scene features and the target scene features of the memory unit is greater than or equal to a preset threshold, then the candidate memory unit is determined to pass the scene consistency check.

[0216] In other words, in the specific implementation of the solution, the verification of scenario consistency can be performed based on either the set of personnel present or the scenario characteristics, or it can be performed based on both. The specific implementation plan is selected according to the actual accuracy requirements and computing power support, etc., and this application does not impose any restrictions on it.

[0217] Step 4.2: If the identity identifier of the target query object is consistent with the identity identifier of the speaking object, then the candidate memory unit is determined to have passed the object consistency check; otherwise, the candidate memory unit is determined to have failed the object consistency check.

[0218] In this step, it is necessary to check the consistency between the identity identifier of the target query object and the identity identifier of the speaking object recorded in the candidate memory unit. When the two are the same or correspond to the same identity, the candidate memory unit is determined to pass the object consistency check. When the two are different or do not correspond to the same identity, the candidate memory unit is determined to fail the object consistency check.

[0219] It is understandable that, in some implementations, although the memory recall stage has already preliminarily filtered out memory units with mismatched identity identifiers, the re-verification of the identity identifier of the memory unit in this step can form a catch-all interception for memory units with mismatched identity identifiers, further accurately constrain the ownership of the memory, and ensure the accuracy of the response logic.

[0220] Step 4.3: When a candidate memory cell passes both the scenario consistency check and the object consistency check, the candidate memory cell is determined to have passed the validity check.

[0221] In this step, after obtaining the two verification results of step 4.1 and step 4.2 above, the candidate memory cell is confirmed as a memory cell that has passed the validity verification only if both of them pass.

[0222] The methods in steps 4.1 to 4.3 of the aforementioned implementation, by associating and comparing the current conversation scenario with historical conversation scenarios and matching the current query object with the historical speaking objects, can form a dual constraint judgment on candidate memory units. This ensures that only memory content with the same scenario and the same object is retained for subsequent retrieval, thereby ensuring that the selection results of memory units are consistent with the current conversation context. Therefore, the validity judgment of candidate memory units is highly accurate, and it allows subsequent query results output based on the memory unit to match the current interaction subject and scenario.

[0223] S205: If the candidate memory cell passes the validity check, the candidate memory cell will be determined as the target memory cell.

[0224] In this step, for each candidate memory unit, if the candidate memory unit passes the validity check, it is determined as the target memory unit and then used for subsequent semantic fact output. There can be one or more candidate memory units that pass the check; this application does not impose specific restrictions on this.

[0225] Optionally, if there are multiple candidate memory units obtained from semantic retrieval, the verification process can be performed on each memory unit in order of timestamp from newest to oldest until the first memory unit that passes the verification appears. Then, the memory unit that passes the verification is taken as the target memory unit in this step.

[0226] Optionally, if there are multiple candidate memory units obtained from semantic retrieval, the aforementioned verification process can be performed only on the candidate memory unit with the latest timestamp, and when the candidate memory unit passes the verification, it can be identified as the target memory unit.

[0227] S206: Output query results to the user based on the semantic facts in the target memory unit.

[0228] In practical applications, if no candidate memory unit is found, or no candidate memory unit passes the verification, it can be directly determined that there is no relevant memory. Instead of forcing an answer, a guiding prompt can be output, such as "I haven't remembered it yet, can you tell me now?", to ensure the smoothness of the conversation.

[0229] This implementation provides a memory-based question-answering method that first narrows the memory retrieval scope using semantic relevance retrieval, and then excludes semantically relevant but currently inapplicable memory units through dual verification of identity and scene information. This ensures that the selected target memory unit simultaneously meets the requirements of object attribution and scene matching. Adopting this method reduces the probability of mismatches in temporary multi-person interaction environments, improves the accuracy of target memory unit determination, and ensures that the output results are consistent with the current conversation subject and scene.

[0230] Furthermore, in one possible implementation, considering that users are highly mobile in actual offline casual chat scenarios and most of the conversations initiated are temporary interactions, the vast majority of users are unregistered and unlogged-in strangers. To further improve the privacy protection of strangers, the aforementioned embodiments may also include the following steps g and h:

[0231] Step g: If the person present is not a registered user, then after obtaining the facial features of the person present, delete the facial image of the person present.

[0232] In practical applications, if the identities of all persons present cannot be obtained, it is necessary to acquire images of the persons present in the current session scene through the camera. If the feature extraction detects that the person present does not belong to the registered user, the corresponding face image can be deleted locally, and only the face features are retained for identity matching and memory retrieval in subsequent sessions.

[0233] Step h: After the preset session termination conditions are met, delete the cached facial features, identity identifiers, and memory units associated with the attendees.

[0234] It should be noted that, to further enhance privacy protection for unfamiliar users, a cleanup command can be executed when preset session termination conditions such as current session timeout, user-initiated termination, or robot restart are met. This command simultaneously deletes the cached facial features, identity information, and associated memory units of the unfamiliar user, along with the corresponding index relationships. In this way, the device retains no user privacy data, achieving a closed-loop data security process.

[0235] The method provided in this implementation deletes the original face image immediately after obtaining the face features of an unregistered user, and deletes the cached face features, identity identifiers, and associated memory units at the end of the session. This allows the device to retain only the minimum necessary data during the session's validity period, reducing the privacy risks caused by the long-term retention of image data and associated memories, while maintaining the continuity of multimodal recognition and memory retrieval within the session.

[0236] Based on the detailed descriptions of the foregoing embodiments, it can be seen that this application achieves accurate memory matching in scenarios with dynamic character switching, such as multi-person casual conversations, through a three-dimensional binding mechanism of "semantic fact-scene-person" and a scene consistency verification mechanism, fundamentally avoiding mis-answers due to memory errors. Simultaneously, it employs a memory-cached temporary face identification scheme, which perfectly adapts to the temporary interaction needs of unregistered strangers without storing the original face image and automatically clearing it after the session ends, balancing privacy and practicality. Furthermore, this application designs a clarifying answer strategy for multimodal casual conversation scenarios, guiding users to clearly identify the query target rather than bluntly rejecting or providing mis-answers when verification fails, significantly improving the naturalness of interaction and user experience. Therefore, this solution has significant advantages in scene adaptability, memory accuracy, privacy protection, and interactive experience, and can be widely applied in temporary multimodal interaction scenarios such as shopping malls, exhibition halls, and communities, providing solid technical support for personalized and privacy-secure interaction of service robots.

[0237] Figure 3 This is a schematic diagram of the structure of a question-answering processing device based on memory query, provided in Embodiment 4 of this application. Figure 3 As shown, the memory-based question-answering processing device 30 provided in this embodiment includes:

[0238] The first acquisition module 301 is used to acquire the user's query intent and the target scenario information of the current session scenario;

[0239] The second acquisition module 302 is used to acquire the identity identifier of the target query object based on the query intent;

[0240] The determination module 303 is used to determine the target memory unit from multiple pre-cached memory units based on the identity identifier of the target query object and the target scene information; wherein, each memory unit includes historical scene information, the identity identifier of the speaking object and semantic facts, and the historical scene information is the scene information of the historical conversation scene when the memory corresponding to the memory unit occurred;

[0241] Output module 304 is used to output query results to the user based on the semantic facts in the target memory unit.

[0242] The memory-based question-and-answer processing device 30 provided in this embodiment can execute the method provided in the above-described method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0243] Figure 4 This is a schematic diagram of the structure of a question-answering processing device based on memory query provided in Embodiment 5 of this application, as shown below. Figure 4 As shown, based on the above embodiments, the memory-based question-answering processing device 30 provided in this embodiment further includes:

[0244] The caching module 305 is used to associate and cache the facial features and identity identifiers of each person present who is not a cached user with the facial feature database.

[0245] The deletion module 306 is used to delete the facial images of people present if they are not registered users after obtaining their facial features.

[0246] Once the preset session termination conditions are met, the cached facial features, identity identifiers, and memory units associated with the attendees are deleted.

[0247] In one possible implementation, the first acquisition module 301 is configured to:

[0248] The first set of people present is obtained based on facial recognition technology; the first set of people present includes the identity identifier of each person present in the current session scenario;

[0249] And / or, acquire the target scene image of the current session scene, and extract the target scene features of the current session scene based on the target scene image;

[0250] Accordingly, the target scene information includes the first set of people present and / or the characteristics of the target scene.

[0251] In one possible implementation, the determining module 303 includes:

[0252] The retrieval unit is used to identify at least one candidate memory unit from multiple memory units based on semantic relevance retrieval of query intent.

[0253] The verification unit is used to verify the validity of each candidate memory unit based on the identity of the target query object, the target scene information, the historical scene information in the candidate memory unit, and the identity of the speaking object.

[0254] The determination unit is used to determine the candidate memory unit as the target memory unit if the candidate memory unit passes the validity check.

[0255] In one possible implementation, the retrieval unit is specifically used for:

[0256] Filter memory units whose identity identifiers differ from the identity identifier of the target query object;

[0257] Based on the semantic facts of each memory unit after filtering, at least one candidate memory unit that is semantically related to the query intent is retrieved from the multiple memory units obtained after filtering.

[0258] In one possible implementation, if the target scene information includes a first set of people present, then the verification unit is specifically used for:

[0259] By comparing the target scene information with historical scene information, it is determined whether the candidate memory unit passes the scene consistency check.

[0260] If the identity identifier of the target query object matches the identity identifier of the speaking object, then the candidate memory unit is determined to have passed the object consistency check; otherwise, the candidate memory unit is determined to have failed the object consistency check.

[0261] When a candidate memory unit passes both the scenario consistency check and the object consistency check, the candidate memory unit is determined to have passed the validity check.

[0262] In one possible implementation, the historical scene information of each memory unit includes a second set of people present; wherein, the second set of people present includes the identity identifier of each person present in the historical session scene when the memory corresponding to the memory unit occurred;

[0263] If the target scene information also includes target scene features, then the verification unit is specifically used for:

[0264] If the second set of people present is a subset of the first set of people present, then the candidate memory unit is determined to have passed the first round of scenario verification; otherwise, the candidate memory unit is determined to have failed the first round of scenario verification.

[0265] Based on whether the candidate memory unit passes the first round of scenario verification, it is determined whether the candidate memory unit passes the scenario consistency verification.

[0266] In one possible implementation, the historical scene information of each memory unit further includes historical scene features; wherein, the historical scene features are scene features extracted from historical scene images, and the historical scene images are captured from the historical conversation scene when the memory corresponding to the memory unit occurred.

[0267] The verification unit is specifically used for:

[0268] If the feature similarity between the historical scene features and the target scene features is greater than or equal to a preset threshold, then the candidate memory unit is determined to have passed the second round of scene verification; otherwise, the candidate memory unit is determined to have failed the second round of scene verification.

[0269] When a candidate memory cell passes both the first and second rounds of scenario verification, it is determined that the candidate memory cell has passed the scenario consistency verification.

[0270] In one possible implementation, the first acquisition module 301 is specifically used for:

[0271] Obtain the facial images of each person present in the current session;

[0272] For each person present, facial recognition technology is used to extract facial features from their facial images.

[0273] By comparing the similarity of facial features with each facial feature in the pre-cached facial feature database, it can be determined whether the people present are cached users.

[0274] If it is determined that the person present is a cached user, then the identity identifier corresponding to the face feature with the highest similarity to the face feature of the person present in the face feature database is determined as the identity identifier of the person present.

[0275] If it is determined that the person present is not a cached user, then a globally unique identity is assigned to the person present as their identity.

[0276] The first set of attendees is constructed based on the identity of each attendee.

[0277] In one possible implementation, the second acquisition module 302 is specifically used for:

[0278] If the query intent includes user referential information, the identity of the target query object is determined based on the user referential information.

[0279] If the query intent does not include user-identifying information, a clarifying question is asked to guide the user to indicate the target query object.

[0280] Obtain user responses to clarifying questions;

[0281] The identity of the target query object is determined based on the answer.

[0282] The memory-based question-and-answer processing device 30 provided in this embodiment can execute the method provided in the above-described method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0283] Figure 5 This is a schematic diagram of the structure of an electronic device provided in Embodiment Six of this application. Figure 5 As shown, the electronic device 40 provided in this embodiment includes at least one processor 401 and a memory 402. Optionally, the electronic device 40 further includes a communication component 403. The processor 401, memory 402, and communication component 403 are connected via a bus 404.

[0284] In a specific implementation, at least one processor 401 executes computer execution instructions stored in memory 402, causing at least one processor 401 to perform the above-described method.

[0285] The specific implementation process of processor 401 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0286] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0287] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0288] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0289] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0290] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0291] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0292] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0293] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0294] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0295] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0296] If a function is implemented as 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 technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0297] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0298] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A question-answering method based on memory retrieval, characterized in that, include: Obtain the user's query intent and the target scenario information of the current session; Based on the query intent, obtain the identity identifier of the target query object; Based on the identity identifier of the target query object and the target scene information, a target memory unit is determined from multiple pre-cached memory units; wherein, each memory unit includes historical scene information, the identity identifier of the speaking object, and semantic facts, and the historical scene information is the scene information of the historical conversation scene when the memory corresponding to the memory unit occurred; Based on the semantic facts in the target memory unit, the query results are output to the user.

2. The method according to claim 1, characterized in that, Obtain target scenario information for the current session, including: A first set of people present is obtained based on facial recognition technology; the first set of people present includes the identity identifier of each person present in the current session scenario; And / or, acquire a target scene image of the current session scene, and extract target scene features of the current session scene based on the target scene image; Accordingly, the target scene information includes the first set of people present and / or the target scene features.

3. The method according to claim 2, characterized in that, The step of determining the target memory unit from multiple pre-cached memory units based on the identity identifier of the target query object and the target scene information includes: Based on semantic relevance retrieval of the query intent, at least one candidate memory unit is determined from the plurality of memory units; For each candidate memory unit, the validity of the candidate memory unit is verified based on the identity identifier of the target query object, the target scene information, the historical scene information in the candidate memory unit, and the identity identifier of the speaking object. If the candidate memory unit passes the validity check, then the candidate memory unit is determined as the target memory unit.

4. The method according to claim 3, characterized in that, The semantic relevance retrieval based on the query intent, determining at least one candidate memory unit from the plurality of memory units, includes: Filter memory units whose identity identifiers differ from those of the target query object; Based on the semantic facts of each memory unit after filtering, at least one candidate memory unit that is semantically related to the query intent is retrieved from the multiple memory units obtained after filtering.

5. The method according to claim 3, characterized in that, The validity verification of the candidate memory unit based on the identity identifier of the target query object, the target scene information, and the historical scene information and the identity identifier of the speaking object in the candidate memory unit includes: By comparing the target scene information with the historical scene information, it is determined whether the candidate memory unit passes the scene consistency check; If the identity identifier of the target query object is consistent with the identity identifier of the speaking object, then the candidate memory unit is determined to have passed the object consistency check; otherwise, the candidate memory unit is determined to have failed the object consistency check. When the candidate memory unit passes both the scene consistency check and the object consistency check, it is determined that the candidate memory unit has passed the validity check.

6. The method according to claim 5, characterized in that, The historical scene information of each memory unit includes a second set of people present; wherein, the second set of people present includes the identity identifier of each person present in the historical conversation scene when the memory corresponding to the memory unit occurred; If the target scene information includes the first set of people present, then determining whether the candidate memory unit passes the scene consistency check by comparing the target scene information with the historical scene information includes: If the second set of people present is a subset of the first set of people present, then the candidate memory unit is determined to have passed the first round of scene verification; otherwise, the candidate memory unit is determined to have failed the first round of scene verification. Based on whether the candidate memory unit passes the first round of scenario verification, it is determined whether the candidate memory unit passes the scenario consistency verification.

7. The method according to claim 6, characterized in that, The historical scene information of each memory unit also includes historical scene features; wherein, the historical scene features are scene features extracted from historical scene images, and the historical scene images are captured from the historical conversation scene when the memory corresponding to the memory unit occurred; If the target scene information also includes the target scene features, then determining whether the candidate memory unit passes the scene consistency check based on whether the candidate memory unit passes the first round of scene verification includes: If the feature similarity between the historical scene features and the target scene features is greater than or equal to a preset threshold, then the candidate memory unit is determined to have passed the second round of scene verification; otherwise, the candidate memory unit is determined to have failed the second round of scene verification. When the candidate memory unit passes both the first round of scene verification and the second round of scene verification, the candidate memory unit is determined to have passed the scene consistency verification.

8. The method according to any one of claims 2 to 7, characterized in that, The process of obtaining the first set of people present based on facial recognition technology includes: Obtain the facial image of each person present in the current session scenario; For each person present, facial recognition technology is used to extract the facial features of that person from their facial image. By comparing the facial features with each facial feature in the pre-cached facial feature library, it is determined whether the person present is a cached user. If it is determined that the person present is a cached user, then the identity identifier corresponding to the face feature with the highest similarity to the face feature of the person present in the face feature database is determined as the identity identifier of the person present. If it is determined that the person present is not a cached user, then a globally unique identity identifier is assigned to the person present as the identity identifier of the person present; The first set of attendees is constructed based on the identity of each attendee.

9. The method according to claim 8, characterized in that, The method further includes: For each person present who is not a cached user, their facial features and identity identifier are associated and cached in the facial feature database.

10. The method according to claim 9, characterized in that, The method further includes: If the person present is not a registered user, then after obtaining the facial features of the person present, delete the facial image of the person present. After the preset session termination conditions are met, the cached facial features, identity identifiers, and memory units associated with the present persons are deleted.

11. The method according to any one of claims 1 to 7, characterized in that, The step of obtaining the identity identifier of the target query object based on the query intent includes: If the query intent includes user referential information, then the identity identifier of the target query object is determined based on the user referential information; If the query intent does not include the user referential information, a clarifying question is issued to the user, which is used to guide the user to indicate the target query object; Obtain the user's answer to the clarifying question; The identity of the target query object is determined based on the answer.

12. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-11.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-11.