Interaction methods, apparatuses, devices, and media
Patent Information
- Application Number
- CN202610713137.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-22
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2046-05-22
AI Technical Summary
然而,传统的交互方法无法有效利用用户的历史输入信息,进而影响了交互系统的回复质量
Smart Images

Figure CN122332547B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and more specifically to an interaction method, apparatus, device, and medium. Background Technology
[0002] With the rapid development of artificial intelligence technology, human-computer interaction scenarios are becoming increasingly diverse, and users are placing higher demands on the intelligence and personalization of interaction systems. However, traditional interaction methods cannot effectively utilize users' historical input information, thus affecting the quality of the interaction system's responses. Summary of the Invention
[0003] In view of the above problems, this application provides an improved interaction method, apparatus, device and medium.
[0004] According to a first aspect of this application, an interaction method is provided, comprising: responding to user input information; determining a processing priority for the input information based on features of the input information, the features including at least one of the following: intent information of the input information, domain information corresponding to the input information, and processing timeliness requirements information of the input information; determining a target retrieval scope for searching a memory bank based on the processing priority, wherein multiple memory modules of the memory bank respectively store memory information about the user, the memory information is obtained from the user's historical input information, each of the multiple memory modules has a hardware performance level and an importance level for storing the memory information, and the target retrieval scope includes at least one memory module; retrieving memory information within the target retrieval scope in the memory bank based on the input information to obtain target memory information matching the input information; and generating and outputting response information for the input information using the target memory information.
[0005] A second aspect of this application provides an interactive device, comprising: an evaluation module, configured to respond to user input information and determine a processing priority for the input information based on features of the input information, the features including at least one of the following: intent information of the input information, domain information corresponding to the input information, and processing timeliness requirements information of the input information; a determination module, configured to determine a target retrieval range for searching a memory bank based on the processing priority, wherein multiple memory modules of the memory bank store memory information about the user, the memory information being obtained from the user's historical input information, each of the multiple memory modules having a hardware performance level and an importance level for storing the memory information, and the target retrieval range including at least one memory module; a retrieval module, configured to retrieve memory information within the target retrieval range in the memory bank based on the input information to obtain target memory information matching the input information; and a generation module, configured to generate response information for the input information using the target memory information and output the response information.
[0006] A third aspect of this application provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.
[0007] A fourth aspect of this application also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.
[0008] The fifth aspect of this application also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method. Attached Figure Description
[0009] The above-mentioned contents, other objects, features and advantages of this application will become clearer from the following description of embodiments of this application with reference to the accompanying drawings.
[0010] Figure 1 The diagram illustrates application scenarios of the interaction method, apparatus, device, and medium according to embodiments of this application.
[0011] Figure 2 A flowchart of an interaction method according to an embodiment of this application is shown.
[0012] Figure 3 A flowchart illustrating the determination of the target retrieval range according to an embodiment of this application is shown.
[0013] Figure 4 A flowchart illustrating the retrieval of target memory information according to an embodiment of this application is shown.
[0014] Figure 5 A flowchart illustrating the operation performed on the memory bank according to an embodiment of this application is shown.
[0015] Figure 6 An architectural diagram of a memory system according to an embodiment of this application is shown.
[0016] Figure 7 A structural block diagram of an interactive device according to an embodiment of this application is shown.
[0017] Figure 8 A block diagram of an electronic device suitable for implementing an interactive method according to an embodiment of this application is shown. Detailed Implementation
[0018] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0019] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0020] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0021] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0022] In the technical solution of this application, the user information (including but not limited to user personal information, user image information, user device information, such as location information) and data (including but not limited to data used for analysis, stored data, and displayed data) involved are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with relevant laws, regulations, and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse.
[0023] In scenarios involving automated decision-making using personal information, the methods, devices, and apparatuses provided in this application all offer users corresponding entry points for choosing to agree to or reject the automated decision-making results; if the user chooses to reject, the process proceeds to expert decision-making. Here, "automated decision-making" refers to activities that automatically analyze and evaluate an individual's behavioral habits, interests, or economic, health, and credit status through computer programs, and then make decisions. Here, "expert decision-making" refers to activities where individuals specializing in a particular field, possessing specialized experience, knowledge, and skills, and reaching a certain level of professional expertise make decisions.
[0024] In related technologies, user input information is typically stored in a memory bank. However, as time goes on, the amount of information stored in the memory bank increases, making it inefficient to retrieve relevant information quickly and efficiently using a full-scale search method.
[0025] Embodiments of this application provide an interaction method, comprising: responding to user input information; determining the processing priority of the input information based on the characteristics of the input information, the characteristics including at least one of the following: intent information of the input information, domain information corresponding to the input information, and processing timeliness requirements information of the input information; determining a target retrieval scope for searching a memory bank based on the processing priority, wherein multiple memory modules of the memory bank respectively store memory information about the user, the memory information is obtained from the user's historical input information, each of the multiple memory modules has a hardware performance level and an importance level of the stored memory information, and the target retrieval scope includes at least one memory module; retrieving memory information within the target retrieval scope in the memory bank based on the input information to obtain target memory information matching the input information; and generating and outputting response information for the input information using the target memory information.
[0026] The embodiments of this application divide the memory bank into multiple memory modules with different retrieval performance and importance levels of stored memory information. Based on the processing priority obtained from the analysis, the retrieval scope for searching the memory bank can be determined, which can improve the accuracy of retrieval while ensuring retrieval efficiency, thereby improving the quality of response.
[0027] Figure 1 The diagram illustrates application scenarios of the interaction method, apparatus, device, and medium according to embodiments of this application.
[0028] like Figure 1As shown, the application scenario according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0029] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0030] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0031] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0032] It should be noted that the interaction method provided in this application embodiment can generally be executed by server 105. Correspondingly, the interaction device provided in this application embodiment can generally be located in server 105. The interaction method provided in this application embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the interaction device provided in this application embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0033] It should be understood that Figure 1The number of first terminal devices, second terminal devices, third terminal devices, networks, and servers shown in the diagram is merely illustrative. Depending on implementation needs, any number of first terminal devices, second terminal devices, third terminal devices, networks, and servers can be included.
[0034] Figure 2 A flowchart of an interaction method according to an embodiment of this application is shown.
[0035] like Figure 2 As shown, the interaction method of this embodiment includes operations S210 to S240.
[0036] In operation S210, in response to user input information, the processing priority of the input information is determined based on the characteristics of the input information.
[0037] In operation S220, the target retrieval range for searching the memory is determined based on processing priority.
[0038] In operation S230, based on the input information, the memory information within the target retrieval range in the memory bank is retrieved to obtain the target memory information that matches the input information.
[0039] In operation S240, the target memory information is used to generate response information for the input information, and the response information is output.
[0040] After a user inputs information, deep semantic analysis can be performed on the input to obtain its features. These features include at least one of the following: the user's intent, the domain information corresponding to the input, and the processing timeliness requirements for the input.
[0041] Since the characteristics of input information can characterize its importance and urgency, determining the processing priority of input information based on these characteristics allows for more rational allocation of computing resources and improves the processing efficiency of interactive systems. For example, if the input information involves urgent matters or important business operations, its processing priority will be higher, and this information can be processed first to ensure a timely response.
[0042] After determining the processing priorities, the target search scope for the memory can be determined based on these priorities. The memory is divided into multiple memory modules, each storing user-related information derived from the user's historical input. Each memory module has a hardware performance level and a importance level for the stored information. This division allows the memory system to flexibly select the search scope based on processing priorities, avoiding the performance overhead of a full search.
[0043] For example, for high-priority input information, modules with high hardware performance and important memory storage can be selected for retrieval to ensure retrieval efficiency and accuracy.
[0044] In embodiments of this application, user consent or authorization can be obtained before storing user input information as memory information in the memory bank. For example, after the user inputs information, a request to store the input information can be sent to the user. Only after the user consents or authorizes the storage of the input information can the user's input information be stored in the memory bank.
[0045] In the embodiments of this application, a corresponding operation entry point can be provided to the user, allowing the user to choose to agree to or reject the automated decision result. That is, before processing / making a decision to store the user's input information in the memory bank, the user's instruction to agree to or reject the processing / decision can be obtained through the corresponding operation entry point. If the user agrees to the processing / decision, the user's input information is stored in the memory bank. If the user refuses to process / make a decision, the expert decision-making process is initiated.
[0046] During the retrieval process, memory information within the target retrieval range can be matched based on the input information to find the target memory information most relevant to the input information. For example, the retrieval process can be implemented using natural language processing techniques and machine learning algorithms to improve the accuracy and efficiency of matching.
[0047] After obtaining the target memory information, a response can be generated based on the input information and output to the user. The response generation process considers the completeness and accuracy of the target memory information, as well as the user's personalized needs, to ensure that the response content meets the user's expectations.
[0048] According to embodiments of this application, by dividing the memory bank into multiple memory modules with varying retrieval performance and importance levels of stored memory information, it becomes possible to accurately select the appropriate target retrieval range based on the processing priority of the input information. This significantly improves retrieval accuracy while ensuring retrieval efficiency. It effectively avoids the inefficiency problem caused by the ever-growing size of the memory bank in traditional full-scale retrieval methods, enabling the rapid filtering of target memory information that highly matches the input information from massive amounts of memory data. Furthermore, this target memory information is used to generate high-quality response information, providing users with a more accurate and valuable interactive experience.
[0049] According to an embodiment of this application, the interaction method further includes: using preset prompts to guide a preset model, evaluating the degree of matching between the input information and each preset intent and each preset domain, as well as the processing timeliness requirement of the input information, to obtain a first matching score between the input information and each preset intent, a second matching score between the input information and each preset domain, and a processing timeliness requirement score for the input information; using the first matching score as intent information, the second matching score as domain information, and the processing timeliness requirement score as processing timeliness requirement information.
[0050] In the embodiments of this application, preset prompts can be used to guide a preset model to evaluate the input information and obtain its features. The preset model can be a large language model. A large model typically refers to a pre-trained large artificial intelligence model. The pre-training process involves unsupervised learning to endow the model with general language understanding capabilities. Training is conducted on large-scale unsupervised data to learn basic grammar, semantics, and structure.
[0051] Preset intentions can include information query intentions, memory update intentions, task execution intentions, and emotional communication intentions. Preset domains can include medical, technical, and daily life.
[0052] When determining features, a multi-dimensional scoring mechanism (0.0~1.0) can be used to quantify and define user input. In the embodiments of this application, the processing priority of input information can be quantified by the first matching score between input information and each preset intent, the second matching score with each preset domain, and the processing timeliness requirement score of input information.
[0053] In some embodiments, the first matching score, the second matching score, and the processing timeliness requirement score can be weighted and summed to obtain the processing priority. The weights can be set according to the actual application scenario and requirements. For example, for emergency transaction processing scenarios, the weight of the processing timeliness requirement score can be set higher, and for important business processing scenarios, the weights of intent information and domain information can be set higher.
[0054] After determining the processing priority, input information can be divided into different priority levels, such as high priority, medium priority, and low priority, based on preset priority thresholds or priority ranges. Input information of different priority levels will correspond to different retrieval strategies and resource allocation schemes.
[0055] Furthermore, priority thresholds or priority ranges can be dynamically adjusted based on actual conditions to adapt to processing needs in different scenarios. For example, when the system load is high, the priority threshold can be appropriately increased to reduce the number of high-priority input messages and thus reduce system pressure; when the system load is low, the priority threshold can be appropriately decreased to increase the number of high-priority input messages and thus improve processing efficiency.
[0056] According to embodiments of this application, this method for determining processing priorities based on input information features can allocate computing resources more rationally, improve the processing efficiency and response speed of input information, thereby enhancing user experience and satisfaction.
[0057] According to an embodiment of this application, determining the processing priority of input information based on the characteristics of the input information includes: determining the processing priority of input information based on a first matching score, a second matching score, and a processing timeliness requirement score.
[0058] Based on a multi-dimensional score including the first matching score, the second matching score, and the processing timeliness requirement score, the processing priority of input information can be quantified. The process of determining the processing priority can be shown in the following formula (1):
[0059] (1);
[0060] in, To handle priorities, The weights for the scores of the i-th dimension are given by n, where n represents the total number of dimensions. Let i be the score for the i-th dimension. This is a domain sensitivity adjustment coefficient (typically ranging from 0.2 to 0.5), used to forcibly increase priority in specific sensitive domains (such as medical and security fields). In this application, the value is set to 0.4. This represents the maximum score within a given domain; for example, a score of 0.9 for the medical field is the highest possible score.
[0061] After calculating the P value representing the processing priority, P is mapped to a specific priority level through a threshold range. When P ≥ 0.8, the input information is determined to be of high processing priority level; when 0.4 ≤ P < 0.8, the input information is determined to be of medium priority level; and when P < 0.4, the input information is determined to be of low priority level.
[0062] According to embodiments of this application, by quantifying the processing priority of input information based on the features of the input information, the processing priority can be accurately allocated according to the multi-dimensional features of the input information, thereby improving the accuracy of the target retrieval range determined based on the processing priority and improving the retrieval efficiency and response efficiency of the memory bank.
[0063] According to an embodiment of this application, the memory bank includes a working memory module. The hardware performance level of the working memory module is higher than that of other memory modules in the memory bank, and the importance level of the memory information stored in the working memory module is higher than that of the memory information stored in other memory modules. Based on the processing priority, the target retrieval range for searching the memory bank is determined, including: when the processing priority is less than a preset priority threshold, the target retrieval range is determined to be the working memory module.
[0064] Because the working memory module has a high level of hardware performance and a high level of importance for the stored memory information, it can quickly provide target memory information that matches low-priority input information, thus meeting basic interaction needs.
[0065] Therefore, if the processing priority is less than the preset priority threshold, it indicates that the input information has a low processing priority. In this case, only the working memory module can be retrieved to reduce resource consumption and latency in long text processing. In the embodiments of this application, the preset priority threshold can be 0.4.
[0066] When the processing priority is greater than or equal to the preset priority threshold, it indicates that the input information has a high processing priority. In this case, a more extensive search of the memory bank is needed to obtain more comprehensive and accurate target memory information, ensuring the correctness of the response. The target search scope can be determined as multiple memory modules in the memory bank, including working memory modules and other memory modules with different hardware performance levels and importance levels of stored memory information.
[0067] According to embodiments of this application, by flexibly adjusting the retrieval scope based on the processing priority of input information, a reasonable allocation of computing resources and an improvement in the processing efficiency of the interactive system can be achieved. Simultaneously, since the memory modules in the memory bank are obtained based on the user's historical input information, and each memory module has a specific hardware performance level and an importance level for storing memory information, the retrieval process can more effectively obtain target memory information related to the input information, thereby improving the accuracy of the response information.
[0068] According to embodiments of this application, the memory bank further includes a short-term memory module and a long-term memory module. The hardware performance level of the short-term memory module is higher than that of the long-term memory module, and the importance level of the memory information stored in the short-term memory module is higher than that of the memory information stored in the long-term memory module. The interaction method further includes: when the processing priority is greater than or equal to a preset priority threshold, determining that the target retrieval scope includes at least one of the short-term memory module and the long-term memory module as well as the working memory module, and determining a retrieval duration threshold for retrieving the memory bank. The retrieval duration threshold is used to limit the retrieval duration for retrieving the memory bank.
[0069] In the embodiments of this application, the physical storage medium of the working memory module can be memory or a high-performance cache, the physical medium of the short-term memory module can be a vector database driven by a high-performance solid-state drive, and the physical medium of the long-term memory module can be low-cost object storage or a distributed hard disk database.
[0070] For example, when the input information has a high processing priority, the target retrieval scope can include the working memory module, the short-term memory module, and the long-term memory module, that is, a full retrieval of the memory bank.
[0071] To ensure timely processing of high-priority input information, a corresponding retrieval time threshold can be determined. When the retrieval time reaches the threshold, the memory information that best matches the input information is returned as the target memory information. Furthermore, when retrieving multiple memory modules, a parallel retrieval method can be adopted.
[0072] According to embodiments of this application, by flexibly adjusting the retrieval scope and retrieval duration threshold based on the processing priority of input information, computing resources can be allocated more rationally, improving the processing efficiency and response speed of the interactive system, while ensuring the accuracy and comprehensiveness of the response information, thereby enhancing user experience and satisfaction.
[0073] Figure 3 A flowchart illustrating the determination of the target retrieval range according to an embodiment of this application is shown.
[0074] like Figure 3 As shown, determining the target retrieval range includes operations S310 to S340.
[0075] The S310 is used to receive user input information.
[0076] During operation of S320, the input information is evaluated in multiple dimensions to obtain the intent information, domain information, and processing timeliness requirements of the input information.
[0077] During operation S330, the processing priority of the input information is determined based on the intent information, domain information, and processing timeliness requirements of the input information.
[0078] In operation S340, the target retrieval range for searching the memory is determined based on the processing priority of the input information.
[0079] According to an embodiment of this application, based on input information, a search is performed on memory information within a target retrieval range in the memory bank to obtain target memory information that matches the input information. This includes: performing keyword matching between the input information and the memory information within the target retrieval range to obtain a keyword relevance score for the memory information; performing cosine similarity matching between the input information and the memory information within the target retrieval range to obtain a semantic relevance score for the memory information; determining a first ranking result for multiple memory information based on the weighted result of the keyword relevance score and the semantic relevance score of the memory information; and selecting at least one memory information as the target memory information from the multiple memory information based on the first ranking result.
[0080] In the embodiments of this application, when retrieving memory information in a certain memory module, a hybrid retrieval strategy combining full-text retrieval and semantic retrieval can be adopted. Keyword matching can be used for full-text retrieval, while cosine similarity matching can be used for semantic retrieval.
[0081] The process of determining keyword relevance scores can be shown in the following formula (2):
[0082] (2);
[0083] in, Keyword relevance score, Let N be the j-th word in the input information, and let N represent the total number of words in the input information. For words Inverse document frequency, For memorizing information, It is a word In memory information The frequency in It is the length of the information being remembered. The average length of all memory information in the memory bank. and It is an adjustable parameter. It is usually between 1.2 and 2. It is usually set to 0.75.
[0084] The process of determining the semantic relevance score can be shown in the following formula (3):
[0085] (3);
[0086] in, Score the semantic relevance. Enter information.
[0087] After obtaining the keyword relevance score and semantic relevance score, the keyword relevance score and semantic relevance score can be weighted to obtain a mixed relevance score. The multiple memory information is then sorted according to the mixed relevance score to obtain the first sorting result. The sorting of memory information in the first sorting result represents the relevance between the memory information and the input information.
[0088] When filtering target memory information based on the first sorting result, the top 5 memory information items in the sorting result can be selected as target memory information. The number of target memory information items selected can be determined according to actual needs and is not limited here.
[0089] According to embodiments of this application, by using a hybrid retrieval strategy combining comprehensive keyword matching and cosine similarity matching, the accuracy and comprehensiveness of memory information retrieval can be improved, thereby making the selected target memory information more precise and further improving the accuracy of the response information.
[0090] According to an embodiment of this application, selecting at least one memory information as target memory information from multiple memory information based on a first sorting result includes: performing cosine similarity matching between the context information of the input information and the memory information to obtain a context relevance score for the memory information; re-sorting the first sorting result based on the context relevance score to obtain a second sorting result for multiple memory information; and selecting at least one memory information as target memory information from multiple memory information based on the second sorting result.
[0091] To further ensure the relevance of the target memory information, contextual information of the input information can be introduced as reference information during retrieval. The first ranking result can be re-ranked so that the second ranking result can more accurately reflect the relevance between each memory information and the input information.
[0092] When using contextual information as a reference for retrieval, the cosine similarity between the contextual information and each memory information can be determined to obtain a contextual relevance score. The first ranking result can be optimized and adjusted in combination with the contextual relevance score to ensure that memory information that is directly related to the input information and highly matches the contextual information of the input information can be preferentially filtered out.
[0093] Based on the second ranking result, when further filtering target memory information from multiple memory information, a threshold can be set or a few of the top-ranked memory information can be selected as the final target memory information. This threshold or the number of selections can be flexibly set according to the needs of the actual application scenario and the performance of the interactive system. For example, in scenarios requiring highly accurate responses, a few of the top-ranked memory information can be selected; while in scenarios with higher requirements for comprehensive responses, the number of selected target memory information can be appropriately increased.
[0094] According to embodiments of this application, by introducing contextual information to reorder the search results, it is possible to more accurately capture the true intent of the user's input, improve the matching degree between the retrieved target memory information and the user's needs, and thus further improve the accuracy and relevance of the response information.
[0095] Figure 4 A flowchart illustrating the retrieval of target memory information according to an embodiment of this application is shown.
[0096] like Figure 4 As shown, retrieving target memory information includes operations S410 to S440.
[0097] In operation S410, the keyword relevance and semantic relevance between the input information and each memory information are determined.
[0098] In operation S420, the first ranking result of multiple memory information is determined based on the weighted fusion result of keyword relevance and semantic relevance.
[0099] In operation S430, based on the contextual relevance that represents the degree of matching between the contextual information of the input information and the memory information, the first sorting result is reordered to obtain the second sorting result.
[0100] In operation S440, based on the second sorting result, at least one memory information is selected from multiple memory information as the target memory information.
[0101] According to embodiments of this application, generating response information for input information using target memory information includes: extracting memory fragments associated with the intent information from the target memory information based on the intent information of the input information; adding the memory fragments as supplementary context information to the context information of the input information to obtain target context information; and generating response information that is semantically consistent with the target context information using a preset model constrained by the target context information.
[0102] When generating response information, a preset model can be used to process the input information and target memory information to obtain response information that is semantically consistent with the input information and target memory information. In some embodiments, the preset model can be a large language model.
[0103] When generating response information using a large language model, it is necessary to accurately extract memory fragments closely related to the intent information from the target memory information based on the intent information of the input information. These memory fragments may contain answers, explanations, suggestions, and other content directly related to the user's question.
[0104] After obtaining the memory fragments, these extracted memory fragments are added to the context information of the input information as supplementary context information, thereby constructing a more complete and richer target context information.
[0105] By leveraging a large language model and using pre-constructed target context information as constraints, we generate response information that is semantically consistent with the target context information. The generated response information not only accurately answers the user's question but also provides relevant extended information or suggestions based on the context, thereby improving user experience and satisfaction.
[0106] In practical applications, large language models can be fine-tuned or optimized according to specific needs to further improve the accuracy and relevance of their generated responses. For example, model performance can be improved by increasing training data, adjusting model parameters, and incorporating domain knowledge.
[0107] According to embodiments of this application, by utilizing a large language model to combine the intent of the input information with target memory information to generate a response, it is possible to ensure that the response content is both accurate and context-sensitive.
[0108] According to an embodiment of this application, the memory bank stores memory information of multiple users, and the memory information of different users in the memory module is partitioned and stored according to user identifiers; the method further includes: in response to receiving input information from multiple users within a predetermined time period, determining the processing order of the multiple input information according to the processing priority of each input information; accessing the partition corresponding to each user identifier in sequence according to the processing order, and generating response information for each input information.
[0109] In the embodiments of this application, for concurrent multi-user queries (user A, user B, ..., user N), the processing order of input information can be rearranged according to processing priority to ensure that core tasks are processed first.
[0110] During processing, the memory system accesses the corresponding partition in the memory bank based on the user identifier to which the input information belongs, retrieves the target memory information related to the input information, and uses the target memory information to generate response information for each input information, which is then returned to the corresponding user in sequence.
[0111] According to embodiments of this application, by determining the processing order of multiple input information based on the processing priority of the input information, concurrent multi-user queries can be processed efficiently, ensuring that each user can receive a timely and accurate response.
[0112] According to an embodiment of this application, the interaction method further includes: in response to determining that the input information meets the storage conditions, storing the input information as memory information in a memory bank, wherein the storage conditions include at least one of the following: there is no memory information in the memory bank that matches the input information, or the intent information of the input information represents a user instruction to store the input information.
[0113] After retrieving the target memory information that matches the input information from the memory bank, maintenance operations can be performed on the memory bank, such as adding, updating, merging, deleting, and so on. Adding can be understood as adding entirely new memory information to the memory bank; generally, it can be understood as adding the input information as memory information to the memory bank.
[0114] If there is no matching memory information or intent information in the memory bank that represents the user's instruction to store the input information, it can be determined that the input information can be stored in the memory bank as entirely new memory information.
[0115] For example, if the correlation between the memory information in the memory bank and the input information is less than a preset correlation threshold, it can be determined that there is no memory information in the memory bank that matches the input information; if the first matching score of the memory update intention is greater than a preset matching threshold, it can be determined that the user has instructed to store the input information.
[0116] According to embodiments of this application, by storing input information as memory information in a memory bank, the memory bank can be continuously enriched and updated, further improving the accuracy and intelligence of the interaction. Furthermore, this dynamic storage mechanism also enables the memory bank to better remember changes in user needs, further enhancing the personalization of response information.
[0117] According to embodiments of this application, the interaction method further includes: semantically encoding the input information and the target memory information respectively to obtain semantic features of the input information and the target memory information; identifying and extracting key features from the semantic features through a self-attention mechanism, wherein the key features include at least one of the following: time information, spatial information, entity information, and association information between entities; decoding the key features to obtain summary information containing the key features in the input information and the target memory information; and storing the summary information in a memory bank.
[0118] In the embodiments of this application, not only can input information be directly stored in the memory bank as memory information, but further reasoning and insight can be performed on the input information and target memory information to obtain summary information, which is then stored in the memory bank. Specifically, a large language model can be used to process the input information and target memory information to generate summary information.
[0119] When processing input information and target memory information, the semantic encoding technology of large language models can be used to transform the input information and target memory information into semantically representative feature vectors, i.e. semantic features, to capture the deeper meaning of the input information and target memory information and provide a rich semantic foundation for subsequent processing.
[0120] After obtaining semantic features, the self-attention mechanism of a large language model can be used to identify and focus on key parts of the semantic features, thus obtaining key features. These key features may involve temporal information, spatial information, entity information, and complex relationships between entities. The self-attention mechanism effectively extracts elements that are crucial to understanding information by calculating the interrelationships between features.
[0121] For example, when processing input information about meeting arrangements, the self-attention mechanism can identify key entity information such as the meeting's time, location, and attendees, as well as the relationships between these entities, such as the meeting's theme and purpose.
[0122] After extracting key features, the decoder in the large language model can be used to decode these features, transforming them into structured summary information. This summary information not only retains the core points from the original input and target memory information but also presents them in a more concise and easily understandable form.
[0123] The generated summary information is stored in a memory bank as reference information during subsequent interactions. It is understandable that before storing input information or summary information as memory information in the memory bank, the importance level of this information to be stored can be evaluated so that it can be stored in the corresponding memory module.
[0124] According to embodiments of this application, by performing insight processing on input information and target memory information, key features can be extracted and summary information can be generated and stored, enriching the content of the memory bank and further improving the accuracy of response information.
[0125] According to an embodiment of this application, the interaction method further includes: updating the target memory information using the input information when the spatiotemporal semantics or event logic of the input information and the target memory information are inconsistent.
[0126] While returning the target memory information, the encoder can also be used to compare the semantic consistency between the target memory information and the input information. Specifically, spatiotemporal semantics and event logic can be compared. If inconsistencies are found between the input information and the target memory information in spatiotemporal semantics or event logic, a conflict is determined to exist.
[0127] At this point, the target memory information can be updated using accurate and up-to-date content from the input information. This update mechanism ensures that the information in the memory bank is always up-to-date and consistent with the actual situation, thereby improving the accuracy and reliability of the interaction.
[0128] The update process may include replacing, correcting, or deleting conflicting fragments of memory information to ensure the integrity and consistency of the memory information. Through this conflict detection and update mechanism, the system can better adapt to changes in user needs and provide more accurate and personalized responses. Understandably, for memory information that updates over time, a periodic update approach can be adopted.
[0129] In the embodiments of this application, target memory information can be deleted when it is proven to be erroneous, when the user explicitly requests its deletion, or when it seriously contradicts other memory information. If the input information is substantially unchanged from the target memory information, maintenance operations on the memory bank may not be performed.
[0130] According to embodiments of this application, by updating the target memory information using input information, the memory information stored in the memory bank has higher timeliness and accuracy, thereby improving the accuracy of generating response information using the memory bank.
[0131] According to an embodiment of this application, the interaction method further includes: performing semantic analysis on the input information to determine the memory topic of the input information; and when the memory topic of the input information and the memory topic of the target memory information are the same, merging the input information as supplementary memory information of the target memory information and storing it in the memory bank.
[0132] In the embodiments of this application, there are also cases where the input information and the target memory information share the same memory topic. For example, a user may ask multiple related questions or input multiple pieces of related information on the same topic within the same time period. In this case, semantic analysis can be performed on the input information to accurately identify the memory topic of the input information, and then this memory topic can be compared with the memory topic of the previously retrieved target memory information.
[0133] If the memory theme and the target memory information are the same, the input information is determined to be a valid supplement to the target memory information. This input information is then merged with the original target memory information as supplementary memory information. The merged memory information not only includes the original key content and contextual information but also incorporates new input information, thus forming a more complete and richer memory content.
[0134] According to embodiments of this application, by identifying the memory topic of input information and the memory topic of target memory information, and when the memory topics of input information and target memory information are the same, the input information is used as supplementary memory information to the target memory information and merged with the target memory information into the memory bank, making the memory information in the memory bank more comprehensive and coherent, and improving the accuracy of generating response information.
[0135] Figure 5 A flowchart illustrating the operation performed on the memory bank according to an embodiment of this application is shown.
[0136] like Figure 5 As shown, the operations performed on the memory bank include operations S510 to S540.
[0137] When operating S510, it receives operation instructions for operating the memory bank.
[0138] In embodiments of this application, the operation instructions may include fields such as memory information identifier, memory information, memory operation type, and memory module to which the memory information is to be stored. The memory module to which the memory information is to be stored can be determined by evaluating the importance level of the memory information.
[0139] When operating the S520, the format of the operation instructions is validated.
[0140] When validating the format of operation instructions, you can perform field integrity verification on the operation instructions.
[0141] When operating S530, the operation of the operation instruction memory operation is executed.
[0142] When the memory operation is a write operation (including add, update, and merge), the write operation is performed in the corresponding memory module and the index of that memory module is updated. When the memory operation is a maintenance operation (including delete and archive), logical delete or migration is performed.
[0143] In operation S540, update the metadata of the memory information targeted by the memory operation.
[0144] Metadata can include the memory version identifier of the memory information and the time of the most recent update.
[0145] According to an embodiment of this application, the interaction method further includes: when generating response information using target memory information, increasing the value of the number of times the target memory information stored in the memory bank has been used; and in response to receiving user feedback information regarding the response information, updating the user feedback information of the target memory information stored in the memory bank based on the feedback information.
[0146] In the embodiments of this application, the memory bank also stores the usage count of each piece of memory information and user feedback information. Each time a response is generated using the target memory information, the usage count of the target memory information is automatically increased, reflecting its importance and practicality in the interaction process. Simultaneously, when user feedback is received regarding the response, the memory bank updates the user feedback information of the target memory information stored in the memory bank based on the feedback content. This feedback information may include user satisfaction with the response, accuracy evaluation, improvement suggestions, etc. By collecting and analyzing this feedback, the content of the memory bank can be continuously optimized, improving the accuracy of the interaction and user satisfaction.
[0147] According to embodiments of this application, by storing the number of times memory information is used and user feedback information in the memory bank, an importance level assessment basis can be provided for the memory information in the memory bank, thereby improving the quality of the memory information in the memory bank and thus improving the quality of the generated response information.
[0148] According to an embodiment of this application, the interaction method further includes: periodically evaluating the memory information stored in the memory bank in multiple dimensions to obtain evaluation results indicating the importance level of the memory information. The multiple dimensions include the timeliness, reliability, frequency of use, and user feedback of the memory information. The frequency of use is determined based on the number of times the memory information is used, and the user feedback is determined based on user feedback information of the memory information. Based on the evaluation results for each piece of memory information, the memory information is transferred to the memory module corresponding to the importance level represented by the evaluation results.
[0149] In the embodiments of this application, user feedback information may include both explicit feedback and behavioral feedback. Explicit feedback may include, for example, a user's like or dislike action. A like action increases the evaluation score, while a dislike action decreases the evaluation score. Behavioral feedback may include adopting suggestions, asking for details, correcting errors, and ignoring replies. Positive behavioral feedback increases the evaluation score, while negative feedback decreases the evaluation score. The evaluation result of the user feedback dimension can be determined by the following formula (4):
[0150] (4);
[0151] in, The evaluation results for the user feedback dimension. To display the feedback evaluation results, The results are behavioral feedback assessments.
[0152] When evaluating the frequency of use, the evaluation result can be determined by the following formula (5):
[0153] (5);
[0154] in, To use the evaluation results in the frequency dimension, The number of times information is accessed can be determined by a weighted sum of direct retrieval counts, indirect citation counts, and associated trigger counts. This represents the maximum number of times the information in the memory bank can be accessed. The weight is determined based on the time when the memory information was last accessed. For example, the weight is 1.0 when accessed in the last 7 days, and 0.7 when accessed between 7 and 30 days ago. The weight gradually decreases as the time increases.
[0155] When assessing the reliability dimension, one can evaluate the credibility of the memory source from the source reliability perspective, distinguishing between different sources such as direct user input and system inference. It can also include checking the consistency between the memory information and other memory information, and combining the confidence score and source verification results to conduct a quantitative assessment of accuracy.
[0156] When assessing the consistency dimension, the assessment result can be determined based on the severity of the conflict and its corresponding weight. For example, a conflict in core facts is classified as a serious conflict with a severity of 0.8 and a weight of 0.5; a conflict in minor information is classified as a moderate conflict with a severity of 0.5 and a weight of 0.3; a conflict in details is classified as a minor conflict with a severity of 0.2 and a weight of 0.2; and a conflict without conflict has a severity of 0 and a weight of 0. The assessment result of the consistency dimension can be determined based on the difference between the product of severity and weight and 1.
[0157] After evaluating multiple dimensions, the evaluation results of each dimension can be weighted and summed to obtain the evaluation results indicating the importance level of the memory information. In some embodiments, the evaluation results of each dimension can be normalized to unify all dimension evaluation results to the range of 0-1, and then weighted and synthesized to obtain the initial importance score of the memory. Then, time decay correction is performed to obtain the final importance level evaluation result, and upper and lower limits are truncated. Scores exceeding 1.0 are truncated to 1.0, and scores below 0.01 are retained as 0.01. The process of determining the importance level evaluation result can be shown in the following formula (6):
[0158] (6);
[0159] in, The assessment results are for the importance level. For the first The weights of each evaluation dimension, The evaluation result for the i-th evaluation dimension is... For time decay parameters, =0.05, The idle time can be determined based on the current time and the last access time.
[0160] When the importance level of the memory information is low, it has not been accessed for a long time, and the memory system has limited storage space, the memory information can be compressed and stored to reduce the amount of data.
[0161] According to embodiments of this application, by periodically evaluating the memory information in the memory bank in multiple dimensions, the importance and storage location of the memory information can be dynamically adjusted to ensure the quality of the memory information in the memory bank, thereby improving the quality of the response information.
[0162] According to embodiments of this application, the evaluation cycle for different memory modules can be different. The working memory module can be evaluated in real-time or hourly, primarily assessing the frequency and timeliness of the memory information, quickly removing inactive information to ensure memory does not overflow. The short-term memory module can be evaluated daily, primarily assessing semantic overlap and user feedback, performing a merging operation in cases of semantic overlap, and cleaning up redundant similar memories. The long-term memory module can be evaluated weekly or monthly, primarily assessing the value of the memory information, performing deletion or extreme compression when the memory information has expired.
[0163] For example, the short-term memory module can detect duplicate or redundant information using a cosine similarity algorithm. When memory information with semantic overlap exceeding a threshold is detected, a merging process is automatically triggered, preserving the core semantics and deleting derived information, while simultaneously updating the merged memory's version number and last update time. The long-term memory module can use a preset model to deeply understand the memory content and construct a multi-dimensional evaluation matrix based on user feedback data. For memories that have not been accessed for a long time and whose user satisfaction is below a threshold, a compression process can be initiated, employing an autoencoder for semantic compression to compress storage space while retaining key information.
[0164] According to embodiments of this application, by setting differentiated evaluation cycles for different memory modules, refined management and dynamic optimization of the memory bank can be achieved, thereby improving the quality of stored memory information in the memory bank and thus improving response quality.
[0165] According to an embodiment of this application, the timeliness of memory information is evaluated, including: determining the storage duration of the memory information based on the current time and the storage time of the memory information; and determining the timeliness evaluation result of the memory information based on the timeliness decay rate that matches the storage duration with the memory module storing the memory information.
[0166] In the embodiments of this application, the timeliness assessment result can be determined by the following formulas (7) to (8):
[0167] (7);
[0168] (8);
[0169] in, For the timeliness assessment results, To match the time-dependent decay rate of the memory module, Storage duration, in days. To match the half-life of the memory modules, the working memory module has a half-life of 7 days (rapid decay), the short-term memory module has a half-life of 30 days (moderate decay), and the long-term memory module has a half-life of 90 days (slow decay).
[0170] In some embodiments, memory information created within 24 hours can be directly assigned a timeliness assessment value of 1.0, while memory information older than 1 year can be assigned a minimum retention value of 0.1.
[0171] According to the embodiments of this application, by evaluating the timeliness of memory information, the timeliness of memory information can be accurately reflected, providing strong support for the dynamic management of memory information and thus improving the accuracy of response information.
[0172] According to an embodiment of this application, the reliability of memory information is evaluated, including: based on the information source of the memory information, using the mapping relationship between the information source and the confidence level, determining the confidence level of the memory information, and using the confidence level of the memory information as the reliability evaluation result of the memory information.
[0173] In the embodiments of this application, the information sources include at least: user input information and summary information obtained based on the user input information. The mapping relationship between information sources and confidence levels can be, for example: 0.9 confidence level when the source of the memory information is direct user input; 0.8 confidence level when the source of the memory information is a high-confidence inference from the system; 0.6 confidence level when the source of the memory information is a low-confidence inference from the system; 0.7 confidence level when the source of the memory information is reliable third-party data; 0.5 confidence level when the source of the memory information is general third-party data; and 0.3 confidence level when the source of the memory information is a low-quality external source.
[0174] In other embodiments, the confidence level can be corrected using a quality correction factor determined based on the number of correct memories and the number of incorrect memories, thus obtaining a reliability assessment result.
[0175] After obtaining the reliability assessment results of the memory information, the reliability assessment results and the consistency assessment results of the memory information can be weighted and summed to obtain the accuracy assessment results of the memory information.
[0176] According to embodiments of this application, by comprehensively evaluating the reliability of memory information, the accuracy of memory information can be judged more accurately, improving the accuracy of memory information stored in the memory bank, and thus improving the accuracy of generating response information.
[0177] Figure 6 An architectural diagram of a memory system according to an embodiment of this application is shown.
[0178] like Figure 6As shown, the memory system includes a memory router, a memory generator, a memory executor, and a memory bank.
[0179] After the input information is entered into the memory system, the memory router determines the target retrieval range and provides it to the memory generator. The memory generator retrieves the target memory information from the memory bank according to the target retrieval range and feeds it back to the preset model. The preset model generates response information based on the input information and the target memory information.
[0180] At the same time, the memory generator determines the memory type based on the input information and provides it to the memory executor, which then performs memory operations on the memory bank.
[0181] After receiving feedback from the user regarding the reply information, the user feedback information is used to update the target memory information stored in the memory bank.
[0182] For example, a user might input, "I have a regular group technical workshop every Tuesday afternoon at 2 PM, and I like to have an iced Americano without sugar at that time." The memory router parses the input to obtain the following features: Intent information: memory update (matching score: 0.95); Domain information: personal work, time-sensitive needs: urgent; Target retrieval scope: [working memory, short-term memory, long-term memory].
[0183] The memory generator calculates the importance level: reliability (user-declared): 1.0, timeliness (new information): 1.0, initial importance score representing the importance level: 0.92. It extracts the content from the input information: {"Schedule": "Tuesday 14:00 Technical Seminar", "Preference": "Iced Americano / No Sugar"} as the memory information to be stored, and performs conflict detection based on the memory information to be stored: if there is no conflict in the memory bank, it performs the addition operation.
[0184] The memory executor generates an identifier "pref_001" for the memory information. Since the initial importance score is greater than 0.8, the memory information to be stored is added to the working memory module according to the initial importance score, and the metadata is updated: memory version identifier: v1 and the most recent update time.
[0185] A week later, the user entered: "Due to project adjustments, the technical seminar has been moved to Friday morning at 10:00 AM." A search of the working memory module retrieved the memory information identified as "pref_001" (Tuesday 2:00 PM technical seminar). Conflict detection using a large model revealed a discrepancy between the user's input time attribute and the time attribute of the memory information "pref_001." A confidence assessment of the input was performed: user-input correction, confidence 1.0, decision action: update operation. The memory executor executed the update action, using the current input information to update the memory information, changing the time attribute of the memory information identified as "pref_001" from "Tuesday" to "Friday," and updating the memory version identifier to v2.
[0186] At 9:50 a.m. on Friday, the system proactively reminded users: "The seminar is about to start. Would you like to order an iced Americano without sugar for us?" The user responded: "Great job, you remembered perfectly" (clicking the like button). Because the user explicitly liked the post, the evaluation score for the user feedback dimension increased, and because the segment was just successfully invoked, the evaluation score for the usage frequency dimension also increased.
[0187] The project ended after three months; users no longer mentioned the seminar or purchased the coffee. The system periodically evaluates the memory information identified as "pref_001": Time statistics: Current time - storage time = 90 days. Due to time decay, the importance score drops to 0.35. Threshold judgment: 0.35 < 0.4, triggering a downgrade. The memory information identified as "pref_001" is migrated from the working memory module to the long-term memory module. The index is deleted in the working memory module, and a quantified index is created in the long-term memory module.
[0188] A year later, the user typed: "I really miss those days at the tech seminar last year. Do you remember what I liked to drink back then?" Since there was no relevant data in working memory or short-term memory, the memory router instructed a deep scan of the long-term memory module. The system retrieved pref_001 from the long-term memory module and found the content to be "Iced Americano / No Sugar". Due to the retrieval and the user's strong intention to recall, the importance score rose back to 0.85. This triggered a memory upgrade operation, migrating the memory information back to the working memory module for easy retrieval in subsequent conversations.
[0189] Based on the above-described interaction method, this application also provides an interaction device. The following will be combined with... Figure 7 The device is described in detail.
[0190] Figure 7 A structural block diagram of an interactive device according to an embodiment of this application is shown.
[0191] like Figure 7 As shown, the interactive device 700 in this embodiment includes an evaluation module 710, a determination module 720, a retrieval module 730, and a generation module 740.
[0192] The evaluation module 710 is used to respond to user input information and determine the processing priority of the input information based on the characteristics of the input information. These characteristics include at least one of the following: intent information of the input information, domain information corresponding to the input information, and processing timeliness requirements information of the input information. In one embodiment, the evaluation module 710 can be used to perform the operation S210 described above, which will not be repeated here.
[0193] The determining module 720 is used to determine the target retrieval range for searching the memory bank based on processing priority. Multiple memory modules in the memory bank store memory information about the user, which is obtained from the user's historical input information. Each memory module has a hardware performance level and an importance level for storing the memory information. The target retrieval range includes at least one memory module. In one embodiment, the determining module 720 can be used to perform the operation S220 described above, which will not be repeated here.
[0194] The retrieval module 730 is used to retrieve memory information within the target retrieval range in the memory bank based on the input information, and obtain target memory information that matches the input information. In one embodiment, the retrieval module 730 can be used to perform the operation S230 described above, which will not be repeated here.
[0195] The generation module 740 is used to generate response information for the input information using the target memory information, and outputs the response information. In one embodiment, the generation module 740 can be used to perform the operation S240 described above, which will not be repeated here.
[0196] According to an embodiment of this application, the memory bank includes a working memory module, the hardware performance level of the working memory module is higher than that of other memory modules in the memory bank, and the importance level of the memory information stored in the working memory module is higher than that of the memory information stored in other memory modules; the determination module 720 includes a first determination submodule.
[0197] The first determining submodule is used to determine the target retrieval range as the working memory module when the processing priority is less than the preset priority threshold.
[0198] According to an embodiment of this application, the memory bank further includes a short-term memory module and a long-term memory module. The hardware performance level of the short-term memory module is higher than that of the long-term memory module, and the importance level of the memory information stored in the short-term memory module is higher than that of the memory information stored in the long-term memory module. The determination module 720 further includes a second determination submodule.
[0199] The second determining submodule is used to determine, when the processing priority is greater than or equal to a preset priority threshold, that the target retrieval range includes at least one of the short-term memory module and the long-term memory module as well as the working memory module, and to determine a retrieval duration threshold for retrieving the memory bank. The retrieval duration threshold is used to limit the retrieval duration for retrieving the memory bank.
[0200] According to embodiments of this application, the interactive device 700 further includes an input evaluation module and a feature determination module.
[0201] The input evaluation module is used to guide the preset model with preset prompts to evaluate the degree of matching between the input information and each preset intent and each preset domain, as well as the processing time requirements of the input information, and to obtain the first matching score between the input information and each preset intent, the second matching score between the input information and each preset domain, and the processing time requirements score of the input information.
[0202] The feature determination module is used to take the first matching score as intent information, the second matching score as domain information, and the processing timeliness requirement score as processing timeliness requirement information.
[0203] According to an embodiment of this application, the evaluation module 710 includes an evaluation submodule.
[0204] The evaluation submodule is used to determine the processing priority of input information based on the first matching score, the second matching score, and the processing timeliness requirement score.
[0205] According to an embodiment of this application, the retrieval module 730 includes a keyword matching submodule, a cosine matching submodule, a sorting submodule, and a filtering submodule.
[0206] The keyword matching submodule is used to match the input information with the memory information within the target retrieval range to obtain the keyword relevance score of the memory information.
[0207] The cosine matching submodule is used to perform cosine similarity matching between the input information and the memory information within the target retrieval range to obtain the semantic relevance score of the memory information.
[0208] The sorting submodule is used to determine the first sorting result of multiple pieces of information based on the weighted result of the keyword relevance score and semantic relevance score of the information.
[0209] The filtering submodule is used to select at least one memory information as the target memory information from multiple memory information based on the first sorting result.
[0210] According to embodiments of this application, the filtering submodule includes a context matching unit, a reordering unit, and a filtering unit.
[0211] The context matching unit is used to perform cosine similarity matching between the context information of the input information and the memory information to obtain the context relevance score of the memory information.
[0212] The reordering unit is used to reorder the first sorting result based on the context relevance score to obtain a second sorting result of multiple memory information.
[0213] The filtering unit is used to select at least one memory information as the target memory information from multiple memory information based on the second sorting result.
[0214] According to an embodiment of this application, the generation module 740 includes a memory retrieval submodule, a context supplementation submodule, and a response generation submodule.
[0215] The memory retrieval submodule is used to extract memory fragments associated with the intent information from the target memory information based on the intent information of the input information.
[0216] The context supplementation submodule is used to add memory fragments as supplementary context information to the context information of the input information to obtain the target context information.
[0217] The response generation submodule is used to generate response information that is semantically consistent with the target context information by using a preset model and constraining the target context information.
[0218] According to an embodiment of this application, the memory bank stores the memory information of multiple users, and the memory information of different users in the memory module is partitioned and stored according to the user identifier; the interaction device 700 also includes an order determination module and a response generation module.
[0219] The sequence determination module is used to respond to input information received from multiple users within a predetermined time period and determine the processing order of the multiple input information according to the processing priority of each input information.
[0220] The response generation module is used to access the partitions corresponding to each user identifier in the order of processing and generate response information for each input.
[0221] According to an embodiment of this application, the interactive device 700 further includes a memory storage module.
[0222] The memory storage module is used to store the input information as memory information in the memory bank in response to determining that the input information meets the storage conditions. The storage conditions include at least one of the following: there is no memory information in the memory bank that matches the input information; or the intent information of the input information represents the user's instruction to store the input information.
[0223] According to an embodiment of this application, the interactive device 700 further includes a memory update module.
[0224] The memory update module is used to update the target memory information using the input information when the spatiotemporal semantics or event logic of the input information and the target memory information are inconsistent.
[0225] According to embodiments of this application, the interactive device 700 further includes a semantic extraction module, a feature extraction module, a summary generation module, and a summary storage module.
[0226] The semantic extraction module is used to perform semantic encoding on the input information and the target memory information respectively, so as to obtain the semantic features of the input information and the target memory information respectively;
[0227] The feature extraction module is used to identify and extract key features from semantic features through a self-attention mechanism. Key features include at least one of the following: temporal information, spatial information, entity information, and relationship information between entities.
[0228] The summary generation module is used to decode key features to obtain summary information containing key features from input information and target memory information;
[0229] The summary storage module is used to store summary information into the memory.
[0230] According to an embodiment of this application, the interactive device 700 includes a topic determination module and a supplementary storage module.
[0231] The topic determination module is used to perform semantic analysis on the input information and determine the memory topic of the input information.
[0232] The supplementary storage module is used to store the input information as supplementary memory information to the target memory information in the memory bank when the memory theme of the input information and the memory theme of the target memory information are the same.
[0233] According to embodiments of this application, the memory bank stores the number of times each memory information is used and user feedback information; the interactive device 700 also includes a usage update module and a feedback update module.
[0234] The update module is used to increase the number of times the target memory information stored in the memory bank has been used when generating response information using the target memory information.
[0235] The feedback update module is used to respond to user feedback information received regarding the reply information, and to update the user feedback information of the target memory information stored in the memory bank based on the feedback information.
[0236] According to embodiments of this application, the interactive device 700 further includes a periodic evaluation module and a memory transfer module.
[0237] The periodic evaluation module is used to periodically evaluate the memory information stored in the memory bank from multiple dimensions to obtain evaluation results that indicate the importance level of the memory information. The multiple dimensions include the timeliness, reliability, frequency of use, and user feedback of the memory information. The frequency of use is determined based on the number of times the memory information is used, and the user feedback is determined based on the user feedback information of the memory information.
[0238] The memory transfer module is used to transfer memory information to the memory module corresponding to the importance level represented by the evaluation results, based on the evaluation results for each memory information.
[0239] According to an embodiment of this application, the periodic assessment module includes a duration determination submodule and a timeliness assessment submodule.
[0240] The duration determination submodule is used to determine the storage duration of the memory information based on the current time and the storage time of the memory information.
[0241] The timeliness assessment submodule is used to determine the timeliness assessment result of the stored information based on the timeliness decay rate matched with the storage duration and the storage memory module.
[0242] According to an embodiment of this application, the periodic evaluation module includes a reliability evaluation submodule.
[0243] The reliability assessment submodule is used to determine the confidence level of the memory information based on the information source and the mapping relationship between the information source and the confidence level. The confidence level of the memory information is used as the reliability assessment result of the memory information. The information sources include: user input information and summary information obtained based on user input information.
[0244] According to embodiments of this application, any plurality of modules among the evaluation module 710, determination module 720, retrieval module 730, and generation module 740 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this application, at least one of the evaluation module 710, determination module 720, retrieval module 730, and generation module 740 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any appropriate combination of any of these three implementation methods. Alternatively, at least one of the evaluation module 710, determination module 720, retrieval module 730, and generation module 740 can be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.
[0245] Figure 8 A block diagram of an electronic device suitable for implementing an interactive method according to an embodiment of this application is shown.
[0246] like Figure 8 As shown, an electronic device 800 according to an embodiment of this application includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage portion 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.
[0247] RAM 803 stores various programs and data required for the operation of electronic device 800. Processor 801, ROM 802, and RAM 803 are interconnected via bus 804. Processor 801 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 802 and / or RAM 803. It should be noted that programs may also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in one or more memories.
[0248] According to embodiments of this application, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to a bus 804. The electronic device 800 may also include one or more of the following components connected to the input / output (I / O) interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.
[0249] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0250] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803 described above.
[0251] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of this application.
[0252] When the computer program is executed by the processor 801, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0253] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 809, and / or installed from a removable medium 811. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0254] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, it performs the functions defined in the system of this application embodiment. According to the embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0255] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0256] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0257] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
[0258] The embodiments of this application have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of this application. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Without departing from the scope of this application, those skilled in the art can make various substitutions and modifications, all of which should fall within the scope of this application.
Claims
1. An interaction method, characterized in that, The method includes: In response to user input information, the processing priority of the input information is determined based on the characteristics of the input information, wherein the characteristics include at least one of the following: intent information of the input information, domain information corresponding to the input information, and processing timeliness requirements of the input information; Based on the processing priority, a target retrieval range for searching the memory bank is determined. The memory bank has multiple memory modules that store memory information about the user. The memory information is obtained from the user's historical input information. Each of the multiple memory modules has a hardware performance level and an importance level for storing memory information. The target retrieval range includes at least one of the memory modules. Based on the input information, the memory information within the target retrieval range in the memory bank is retrieved to obtain the target memory information that matches the input information; Using the target memory information, generate response information for the input information, and output the response information; The memory bank includes a working memory module, the hardware performance level of which is higher than that of other memory modules in the memory bank, and the importance level of the memory information stored in the working memory module is higher than that of the memory information stored in other memory modules. The step of determining the target search range for searching the memory bank based on the processing priority includes: when the processing priority is less than a preset priority threshold, determining the target search range as the working memory module; The memory bank also includes a short-term memory module and a long-term memory module. The hardware performance level of the short-term memory module is higher than that of the long-term memory module, and the importance level of the memory information stored in the short-term memory module is higher than that of the memory information stored in the long-term memory module. The method further includes: when the processing priority is greater than or equal to the preset priority threshold, determining that the target retrieval range includes at least one of the short-term memory module and the long-term memory module as well as the working memory module, and determining a retrieval time threshold for retrieving the memory bank, wherein the retrieval time threshold is used to limit the retrieval time for retrieving the memory bank; The method further includes: using preset prompt words to guide a preset model, evaluating the degree of matching between the input information and each preset intent and each preset domain, as well as the processing timeliness requirement of the input information, to obtain a first matching score between the input information and each preset intent, a second matching score between the input information and each preset domain, and a processing timeliness requirement score for the input information; using the first matching score as the intent information, the second matching score as the domain information, and the processing timeliness requirement score as the processing timeliness requirement information.
2. The method according to claim 1, characterized in that, Determining the processing priority of the input information based on its features includes: Based on the first matching score, the second matching score, and the processing timeliness requirement score, the processing priority of the input information is determined.
3. The method according to claim 1, characterized in that, The step of retrieving memory information within the target retrieval range in the memory bank based on the input information to obtain target memory information matching the input information includes: The input information is matched with the memory information within the target retrieval range using keywords to obtain the keyword relevance score of the memory information; The input information is matched with the memory information within the target retrieval range using cosine similarity to obtain the semantic relevance score of the memory information. Based on the weighted results of the keyword relevance score and semantic relevance score of the memory information, a first ranking result of multiple memory information is determined; Based on the first sorting result, at least one piece of memory information is selected from the plurality of memory information as the target memory information.
4. The method according to claim 3, characterized in that, The step of selecting at least one piece of memory information as the target memory information from multiple pieces of memory information based on the first sorting result includes: The context information of the input information is matched with the memory information using cosine similarity to obtain the context relevance score of the memory information. Based on the context relevance score, the first sorting result is reordered to obtain a second sorting result for multiple memory information items; Based on the second sorting result, at least one piece of memory information is selected from the plurality of memory information as the target memory information.
5. The method according to claim 1, characterized in that, The step of generating response information for the input information using the target memory information includes: Based on the intent information of the input information, memory fragments associated with the intent information are extracted from the target memory information; The memory fragment is used as supplementary context information and added to the context information of the input information to obtain the target context information; Using a preset model and constrained by the target context information, a response message with semantic consistency with the target context information is generated.
6. The method according to claim 1, characterized in that, The memory bank stores memory information for multiple users, and the memory information of different users in the memory module is partitioned and stored according to user identifiers; the method further includes: In response to receiving input information from multiple users within a predetermined time period, the processing order of the multiple input information is determined according to the processing priority of each input information; The partitions corresponding to each user identifier are accessed sequentially according to the processing order, and response information is generated for each input information.
7. The method according to claim 1, characterized in that, The method further includes: In response to determining that the input information meets the storage conditions, the input information is stored as memory information in the memory bank, the storage conditions including at least one of the following: there is no memory information in the memory bank that matches the input information, or the intent information of the input information represents a user instruction to store the input information.
8. The method according to claim 1, characterized in that, The method further includes: If the input information is inconsistent with the spatiotemporal semantics or event logic of the target memory information, the target memory information is updated using the input information.
9. The method according to claim 1, characterized in that, The method further includes: Semantic encoding is performed on the input information and the target memory information respectively to obtain the semantic features of the input information and the target memory information. The key features in the semantic features are identified and extracted by a self-attention mechanism. The key features include at least one of the following: time information, spatial information, entity information, and association information between entities. Decode the key features to obtain summary information containing the key features in the input information and the target memory information; The summary information is stored in the memory.
10. The method according to claim 1, characterized in that, The method further includes: Perform semantic analysis on the input information to determine the memory topic of the input information; If the memory theme of the input information is the same as the memory theme of the target memory information, the input information is used as supplementary memory information to the target memory information and is merged and stored in the memory bank together with the target memory information.
11. The method according to claim 1, characterized in that, The memory bank stores the usage frequency of each memory item and user feedback information; the method further includes: When generating the response information using the target memory information, the number of times the target memory information has been used stored in the memory bank is increased; In response to receiving feedback from the user regarding the reply information, the user feedback information of the target memory information stored in the memory bank is updated based on the feedback information.
12. The method according to claim 11, characterized in that, The method further includes: The memory information stored in the memory bank is periodically evaluated in multiple dimensions to obtain evaluation results indicating the importance level of the memory information. The multiple dimensions include the timeliness, reliability, frequency of use, and user feedback of the memory information. The frequency of use is determined based on the number of times the memory information is used, and the user feedback is determined based on user feedback information of the memory information. Based on the evaluation results for each of the memory information, the memory information is transferred to a memory module corresponding to the importance level represented by the evaluation results.
13. The method according to claim 11, characterized in that, The timeliness of the memory information is evaluated, including: Based on the current time and the storage time of the memory information, determine the storage duration of the memory information; The timeliness assessment result of the memory information is determined based on the timeliness decay rate that matches the storage duration with the memory module storing the memory information.
14. The method according to claim 11, characterized in that, The reliability of the memory information is evaluated, including: Based on the information source of the memory information, the confidence level of the memory information is determined by using the mapping relationship between the information source and the confidence level, and the confidence level of the memory information is used as the reliability assessment result of the memory information. The information source includes: user input information and summary information obtained based on the user input information.
15. An interactive device, characterized in that, The apparatus is used to perform the steps of the method according to any one of claims 1 to 14, the apparatus comprising: An evaluation module is used to respond to user input information and determine the processing priority of the input information based on the characteristics of the input information, wherein the characteristics include at least one of the following: intent information of the input information, domain information corresponding to the input information, and processing timeliness requirements information of the input information; A determination module is used to determine the target retrieval range for searching the memory bank based on the processing priority. The memory bank has multiple memory modules that store memory information about the user. The memory information is obtained from the user's historical input information. Each of the multiple memory modules has a hardware performance level and an importance level for storing memory information. The target retrieval range includes at least one of the memory modules. The retrieval module is used to retrieve memory information within the target retrieval range in the memory bank based on the input information, and obtain target memory information that matches the input information; The generation module is used to generate response information for the input information using the target memory information, and output the response information.
16. An electronic device comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 14.
17. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Question query processing method and electronic equipment
CN120256587A
Information output method and electronic equipment
CN120256615A