Artificial intelligence memory data processing method and device
Patent Information
- Application Number
- CN202610977179.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-01
- Publication Date
- 2026-09-29
AI Technical Summary
[0003]但是,目前的记忆机制往往倾向于使得对话模型记住关键内容,而忽视这个关键内容所对应的主体,从而易导致关键内容主体归属错误
[0011]本说明书一个实施例可以获取对话信息,并提取所述对话信息中的至少一个关键内容和至少一个候选主体;根据预设归属判定规则、各关键内容以及各候选主体,确定记忆归属信息,其中,所述记忆归属信息包括各关键内容对应的目标候选主体和置信度,所述置信度表征关键内容归属于目标候选主体的概率;存储所述记忆归属信息,以在下一轮对话中基于所述记忆归属信息按照主体和置信度召回关键内容。该人工智能的记忆数据的处理方法通过将关键内容和主体、置信度绑定以设置为记忆归属信息,从而在召回关键内容的情况下可以按照置信度和主体执行,避免将关键内容归属到错误主体上,提高对话中主体归属的准确度。
Smart Images

Figure CN122838543A_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification relate to the field of artificial intelligence technology, and in particular to a method and apparatus for processing memory data in artificial intelligence. Background Technology
[0002] With the rapid development of artificial intelligence technology, various machine learning models have emerged. Among them, dialogue models can be used to engage in conversations with users in various intelligent dialogue scenarios. Since dialogues are multi-turn and have contextual continuity, they usually need to be analyzed and processed using memory mechanisms. Memory mechanisms can be understood as a technology that enables dialogue models to store, manage, and retrieve dialogue-related information in a manner similar to humans.
[0003] However, current memory mechanisms often tend to make dialogue models remember key content while ignoring the subject to which that key content belongs, thus easily leading to incorrect subject attribution. In such cases, subsequent reasoning and decisions may deviate from the user's actual needs, or even be completely wrong. Summary of the Invention
[0004] In view of this, embodiments of this specification provide a method for processing memory data of artificial intelligence. One or more embodiments of this specification also relate to a method for processing memory data of artificial intelligence applied to cloud-side devices, an apparatus for processing memory data of artificial intelligence, a computing device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.
[0005] According to a first aspect of the embodiments of this specification, a method for processing memory data of artificial intelligence is provided, comprising: Obtain dialogue information and extract at least one key content and at least one candidate subject from the dialogue information; Based on the preset attribution determination rules, each key content, and each candidate subject, memory attribution information is determined. The memory attribution information includes the target candidate subject and confidence level corresponding to each key content. The confidence level represents the probability that the key content belongs to the target candidate subject. The memory attribution information is stored so that key content can be recalled in the next round of dialogue based on the memory attribution information according to the subject and confidence level.
[0006] According to a second aspect of the embodiments of this specification, a method for processing memory data of artificial intelligence is provided, applied to a cloud-side device, comprising: Obtain a data processing request sent by the end device, wherein the data processing request carries dialogue information; Extract at least one key content and at least one candidate subject from the dialogue information, and determine memory attribution information according to the preset attribution determination rules, each key content and each candidate subject. The memory attribution information includes the target candidate subject and confidence level corresponding to each key content. The confidence level represents the probability that the key content belongs to the target candidate subject. The memory attribution information is sent to the terminal device and stored so that key content can be recalled in the next round of dialogue based on the memory attribution information according to the subject and confidence level.
[0007] According to a third aspect of the embodiments of this specification, an apparatus for processing memory data of artificial intelligence is provided, comprising: The first acquisition module is configured to acquire dialogue information and extract at least one key content and at least one candidate subject from the dialogue information; The first determining module is configured to determine memory attribution information based on preset attribution determination rules, key content, and candidate subjects. The memory attribution information includes the target candidate subject and confidence level corresponding to each key content, and the confidence level represents the probability that the key content belongs to the target candidate subject. The first storage module is configured to store the memory ownership information so that key content can be recalled in the next round of dialogue based on the memory ownership information according to the subject and confidence level.
[0008] According to a fourth aspect of the embodiments of this specification, a computing device is provided, comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the above method.
[0009] According to a fifth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores a computer program / instructions that, when executed by a processor, implement the steps of the above-described method.
[0010] According to a sixth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described method.
[0011] One embodiment of this specification can acquire dialogue information and extract at least one key content and at least one candidate subject from the dialogue information; determine memory attribution information according to preset attribution determination rules, each key content, and each candidate subject, wherein the memory attribution information includes the target candidate subject and confidence level corresponding to each key content, and the confidence level represents the probability that the key content belongs to the target candidate subject; store the memory attribution information so that in the next round of dialogue, key content can be recalled based on the memory attribution information according to the subject and confidence level. This artificial intelligence memory data processing method binds key content, subject, and confidence level to set as memory attribution information, so that when recalling key content, it can be executed according to confidence level and subject, avoiding attributing key content to the wrong subject and improving the accuracy of subject attribution in the dialogue. Attached Figure Description
[0012] Figure 1 This is a flowchart illustrating a method for processing memory data in artificial intelligence, as provided in one embodiment of this specification. Figure 2 This is a flowchart illustrating a method for processing memory data of artificial intelligence applied to cloud-side devices, provided in one embodiment of this specification. Figure 3 This is a schematic diagram of the structure of an artificial intelligence memory data processing device provided in one embodiment of this specification; Figure 4 This is a schematic diagram of the structure of a device for processing memory data of artificial intelligence applied to cloud-side devices, according to one embodiment of this specification. Figure 5 This is an architecture diagram of an artificial intelligence memory data processing system provided in one embodiment of this specification; Figure 6 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0013] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0014] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0015] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0016] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0017] In one or more embodiments of this specification, a large model refers to a deep learning model with a large number of model parameters, typically containing hundreds of millions, tens of billions, hundreds of billions, trillions, or even tens of trillions of model parameters. A large model can also be called a foundation model. It is pre-trained using large-scale unlabeled corpora to produce a pre-trained model with hundreds of millions of parameters. Such models can adapt to a wide range of downstream tasks and have good generalization ability. Examples include Large Language Models (LLMs) and multi-modal pre-training models.
[0018] In practical applications, large models only require a small number of samples to fine-tune the pre-trained model before they can be applied to different tasks. Large models can be widely used in fields such as Natural Language Processing (NLP) and Computer Vision. Specifically, they can be applied to computer vision tasks such as Visual Question Answering (VQA), Image Captioning (IC), and Image Generation, as well as NLP tasks such as text-based sentiment classification, text summarization, and machine translation. The main application scenarios for large models include digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design.
[0019] First, the terms and concepts used in one or more embodiments of this specification will be explained.
[0020] Subject: In one or more embodiments of this specification, the subject can be understood as the subject of a sentence in the dialogue information, and can be any personal pronoun, such as oneself, friend, colleague, etc.
[0021] Key content: In one or more embodiments of this specification, key content can be understood as keywords, key sentences, key events, etc., extracted from dialogue information.
[0022] Subject attribution: In one or more embodiments of this specification, subject attribution can be understood as determining which one or more key contents the subject corresponds to, or in other words, which one or more subjects the key contents belong to.
[0023] As described in the background section, current dialogue models suffer from memory confusion, specifically in their inability to optimize the correspondence between key content and the subject. For example, if a user inputs "My mom likes spicy food," the dialogue model's memory table can add the key content "likes spicy food," but it doesn't explicitly identify "my mom" as the subject of this key content. Consequently, in subsequent dialogues or other tasks where this key content is used, "likes spicy food" is easily mistakenly attributed to "my" habit.
[0024] Based on this, the artificial intelligence memory data processing method provided in this specification can acquire dialogue information and extract at least one key content and at least one candidate subject from the dialogue information; determine memory attribution information according to preset attribution determination rules, each key content and each candidate subject, wherein the memory attribution information includes the target candidate subject and confidence level corresponding to each key content, and the confidence level represents the probability that the key content belongs to the target candidate subject; store the memory attribution information so as to recall key content according to subject and confidence level based on the memory attribution information in the next round of dialogue.
[0025] The aforementioned AI memory data processing method binds key content, subject, and confidence level to set memory attribution information. This allows the system to execute based on confidence level and subject when recalling key content, avoiding attributing key content to the wrong subject and improving the accuracy of subject attribution in dialogue.
[0026] This specification provides a method for processing memory data of artificial intelligence. It also relates to a method for processing memory data of artificial intelligence applied to cloud-side devices, an apparatus for processing memory data of artificial intelligence, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.
[0027] See Figure 1 , Figure 1 A flowchart is shown of a method for processing memory data of artificial intelligence according to an embodiment of this specification, specifically including the following steps.
[0028] Step 102: Obtain dialogue information and extract at least one key content and at least one candidate subject from the dialogue information.
[0029] As mentioned earlier, a memory mechanism can be understood as a technology that enables dialogue models to store, manage, and retrieve dialogue-related information in a manner similar to that of humans. In one or more embodiments of this specification, the memory data of artificial intelligence may include user input information and response information generated by the artificial intelligence model, such as the dialogue model, during the dialogue process; it can also be referred to as dialogue information. To reduce the storage space occupied by memory data, some key information can be extracted from the dialogue information as memory data.
[0030] It should be noted that the executing entity for the artificial intelligence memory data processing method in this manual can be any computing device with computing capabilities, such as a server, terminal, etc. This manual does not impose specific restrictions, and the subject can be determined based on actual needs.
[0031] In one or more embodiments of this specification, a dialogue model may be deployed in the computing device or invoked. This dialogue model is used to engage in dialogue with a user or other parties, and can specifically be any pre-trained language model, such as a large language model. In practical applications, users can send dialogue information to the computing device through electronic devices (such as tablets or personal computers).
[0032] The dialogue information may include, but is not limited to, text dialogue information, voice dialogue information, and image dialogue information. In one or more embodiments of this specification, dialogue information entered by the user at one time may be used as dialogue information, or dialogue information entered by the user multiple times may be used as dialogue information. The specific dialogue information may include several rounds of user input, which may be determined based on the actual situation, and this specification does not impose specific limitations.
[0033] It should be noted that the dialogue information can be any one or more rounds of dialogue information from the historical dialogue information, or it can be the dialogue information currently entered by the user in real time.
[0034] In practical applications, dialogue models need to memorize dialogue context information, especially key information, to avoid deviating from the user's actual intention during the dialogue, thus achieving accurate dialogue and improving user experience. In one or more embodiments of this specification, the dialogue model may first extract at least one key content and at least one candidate subject from the dialogue information.
[0035] It should be noted that key content and candidate subjects can be set based on actual needs. The dialogue model can then extract at least one key piece of content and at least one candidate subject from the dialogue information that is identical to or related to the preset key content and candidate subjects. Alternatively, the dialogue model can automatically extract at least one key piece of content and at least one candidate subject from the dialogue information based on its internal parsing and understanding of the dialogue information.
[0036] As mentioned earlier, the subject can be understood as the main body of a sentence in the dialogue information, and can be any personal pronoun, such as oneself, friend, colleague, etc. Key content can be understood as keywords, key sentences, key events, etc., extracted from the dialogue information. For example, in the dialogue information "After I finished lunch, I went for a walk in the park. Then, my mother called me to come home," the key content can include "finished lunch," "walked in the park," and "called," and the candidate subjects can include "I" and "my mother."
[0037] The extraction of key content and candidate subjects from the dialogue information described above can provide a data foundation for the subsequent generation of memory attribution information.
[0038] Step 104: Determine the memory attribution information according to the preset attribution determination rules, each key content and each candidate subject, wherein the memory attribution information includes the target candidate subject and confidence level corresponding to each key content, and the confidence level represents the probability that the key content belongs to the target candidate subject.
[0039] Among them, the preset attribution determination rules can be understood as rules used to determine the attribution or correspondence relationship and confidence level between key content and candidate subjects. Specifically, they can be preset based on actual needs.
[0040] To improve the accuracy of the attribution relationship between key content and candidate subjects, in one or more embodiments of this specification, the initial correspondence between each key content and each candidate subject can be determined based on the dialogue information, and then memory attribution information with confidence can be generated based on the preset attribution determination rules.
[0041] Specifically, based on the preset attribution determination rules, key content, and candidate subjects, memory attribution information is determined, including: Based on the dialogue information, determine the initial correspondence between each key content and each candidate subject; Based on the initial correspondence and the preset attribution determination rules, memory attribution information is determined, wherein the memory attribution information includes the target candidate subject and confidence level corresponding to each key content, and the confidence level represents the probability that the key content belongs to the target candidate subject.
[0042] In practical applications, the initial correspondence between key content and candidate subjects can be determined based on the logical coherence and context of the dialogue information. This initial correspondence includes the initial correspondence between each key content and each candidate subject.
[0043] In one or more embodiments of this specification, the initial correspondence between key content and candidate subjects can be determined by the dialogue model itself. That is, dialogue information can be input into the dialogue model, which can parse and process the logical coherence of the dialogue information to determine the initial correspondence between key content and candidate subjects. For example, if the dialogue model determines that the key content to be processed and the candidate subject to be processed are in the same sentence in the dialogue information, it determines that an initial correspondence exists between the key content to be processed and the candidate subject to be processed, wherein the key content to be processed can be any key content, and the candidate subject to be processed can be any candidate subject.
[0044] For example, if the dialogue information is "I like spicy food", then the candidate subject "I" and the key content "I like spicy food" are in the same sentence, and an initial correspondence can be established between the candidate subject "I" and the key content "I like spicy food".
[0045] It should be noted that the specific form of the initial correspondence can be set based on actual needs, such as a table, structured data, or a graph.
[0046] In one or more embodiments of this specification, the initial correspondence can also be determined in other ways. For example, determining the initial correspondence between each key content and each candidate subject based on the dialogue information includes: The dialogue information is input into a preset natural language inference model to obtain the initial correspondence between each key content and each candidate subject output by the preset natural language inference model. The natural language inference model is used to detect the logical relationship between the key content and the candidate subjects in the dialogue information.
[0047] In practical applications, dialogue information can be input into a preset natural language inference model. The preset natural language inference model can be used to detect the logical relationship between key content and candidate subjects in the dialogue information. This logical relationship can include implication, contradiction, neutrality, etc. If the logical relationship between key content and candidate subjects is determined to be an implication relationship, an initial correspondence between key content and candidate subjects can be constructed.
[0048] For example, the dialogue information is "Xiaohong is my sister, and she also likes to eat spicy food". The natural language reasoning model can infer that there is an implication relationship between "she" and "my sister", thus constructing an initial correspondence between "likes to eat spicy food" and "she / my sister".
[0049] For example, in one or more embodiments of this specification, determining the initial correspondence between key content and candidate subjects based on the dialogue information includes: The current subject relationship knowledge graph is updated based on the dialogue information and each candidate subject, wherein the current subject relationship knowledge graph is constructed with subjects as nodes and the relationships between subjects as edges; Based on the current subject relationship knowledge graph, the initial correspondence between each key content and each candidate subject is determined.
[0050] It should be noted that the subject relationship knowledge graph is constructed based on dialogue information, specifically with subjects as nodes and the relationships between subjects as edges. As the dialogue progresses, in one or more embodiments of this specification, the current subject relationship knowledge graph can be continuously updated based on the dialogue information of each round.
[0051] In one or more embodiments of this specification, candidate subjects and their relationships can be extracted from dialogue information, thereby enabling the construction of a subject relationship graph based on these relationships. For example, if the dialogue information is "Xiaohong is my sister, and she also likes spicy food," then two subject nodes, "I" and "Xiaohong," can be constructed, with the relationship "Xiaohong is my sister." The edge between these two subject nodes indicates that subject node "Xiaohong" is the sister of subject node "I." This edge can be directed, pointing from subject node "Xiaohong" to subject node "I," or it can be undirected, and the relationship corresponding to the edge can be "sister relationship" or "sibling relationship."
[0052] In one or more embodiments of this specification, when determining the initial correspondence between each key content and each candidate subject based on the current subject relationship knowledge graph, for each candidate subject, associated candidate subjects that have an association relationship with the candidate subject can be determined from the current subject relationship knowledge graph, thereby determining the key content corresponding to the candidate subject based on the key content corresponding to the associated candidate subject.
[0053] It should be noted that the Natural Language Inference Model (NLIModel) can be configured based on actual needs, such as a large language model.
[0054] The above method generates initial correspondences based on natural language reasoning models and subject-relationship knowledge graphs before generating memory attribution information, which can improve the accuracy of the generated memory attribution information.
[0055] In one or more embodiments of this specification, it is also possible to detect whether the dialogue information contains kinship terms. If it does, the system queries the current subject relationship knowledge graph to see if a corresponding kinship entity exists. If it does not exist, the kinship entity is added to the current subject relationship knowledge graph. This means that a node and edge corresponding to the kinship entity can be created, and a unique entity identifier can be assigned to the kinship entity. In other words, a directed relationship edge between the user entity and the kinship entity can be established in the current subject relationship knowledge graph, and the kinship relationship type can be marked.
[0056] In practical applications, kinship terminology chains in dialogue information can also be parsed to create kinship entities layer by layer in the current subject relationship knowledge graph based on these chains. A kinship terminology chain can be understood as a subject chain that includes multi-level kinship relationships. For example, the kinship terminology chain corresponding to "my brother-in-law's mother" could be a chain relationship of "me → brother-in-law → mother".
[0057] Furthermore, privacy levels can be set for each node in the subject relationship knowledge graph, and these privacy levels can be used for subsequent retrieval of key content corresponding to that subject.
[0058] In one or more embodiments of this specification, the preset attribution determination rule includes a first rule, a second rule, a third rule, and a fourth rule; Based on the initial correspondence and the preset attribution determination rules, the memory attribution information is determined, including: For each key content, based on the first rule, if the type of the candidate subject in the initial correspondence corresponding to the key content is determined to be a first specified type, the candidate subject in the initial correspondence corresponding to the key content is determined to be the target candidate subject corresponding to the key content, and the confidence level corresponding to the key content is determined to be the first confidence level, wherein the first specified type includes explicit type; Based on the second rule, when the type of the candidate subject in the initial correspondence corresponding to the key content is determined to be the second specified type, the candidate subject in the initial correspondence corresponding to the key content is determined to be the target candidate subject corresponding to the key content, and the confidence level corresponding to the key content is determined to be the second confidence level, wherein the second specified type includes the association type, and the first confidence level is greater than the second confidence level; Based on the third rule, when the type of the candidate subject in the initial correspondence corresponding to the key content is determined to be the third specified type, the candidate subject in the initial correspondence corresponding to the key content is determined to be the target candidate subject corresponding to the key content, and the confidence level corresponding to the key content is determined to be the third confidence level, wherein the third specified type includes the unrelated type, and the second confidence level is greater than the third confidence level; Based on the fourth rule, when the type of the candidate subject in the initial correspondence corresponding to the key content is determined to be the fourth specified type, the target candidate subject corresponding to the key content is determined to be the preset subject, and the confidence level corresponding to the key content is determined to be the fourth confidence level. The fourth specified type includes ambiguous subjects and no subject, and the third confidence level is greater than the fourth confidence level. Based on the target candidate subjects and confidence levels corresponding to each key content, memory attribution information is obtained.
[0059] In one or more embodiments of this specification, memory ownership information can be determined using four pre-set rules.
[0060] The first rule can be understood as a rule used to identify explicit subject types in dialogue information. An explicit subject type represents the subject of the sentence containing key content as a first-person pronoun. Specifically, when a first-person pronoun is found in the sentence containing key content, the first rule can be triggered, thus making that first-person pronoun the target candidate subject corresponding to the key content. For example, if the dialogue information is "I like spicy food," meaning the initial correspondence is between "likes spicy food" and "I," then based on the first rule, the target candidate subject can be determined to be the user themselves, i.e., the explicit first-person pronoun "I," and the confidence level can be set to the first confidence level.
[0061] The second rule can be understood as a rule used to identify subjects of a second specified type in dialogue information. This second specified type can be an association type, which represents a type related to the aforementioned explicit type. For example, the association type can be a kinship relationship, specifically a subject that has a kinship relationship with the aforementioned first-person pronoun. That is, the subject of the second specified type can be a kinship term subject. Specifically, if it is determined that there is a kinship term subject in the sentence containing the key content that has an association relationship with the explicit type subject, i.e., a kinship relationship, the second rule can be triggered, thereby making the kinship term subject that has an association relationship with the explicit type subject as the target candidate subject corresponding to the key content. For example, if the dialogue information is "I like spicy food, and my sister also likes spicy food," then in the initial correspondence, "my sister" corresponds to "likes spicy food." "My sister" has a kinship relationship with the explicit type subject "I" in the sentence containing the key content, i.e., "Xiaohong is my sister." The confidence level can be set to the second confidence level.
[0062] Furthermore, if the candidate subject corresponding to the key content is of the second specified type, the system can check whether the candidate subject exists in the current relationship graph. If it does not exist, the current relationship graph is updated based on the candidate subject and the key content, i.e., the candidate subject and the key content are added to the current relationship graph. Since the second specified type can be a kinship term subject, in practical applications, directed relationship edges between user entities and kinship entities can be established in the relationship graph, and the kinship relationship type can be marked. When a new kinship relationship appears, it can be updated in the relationship graph, and the key content corresponding to the new kinship entity can be added to the information corresponding to the kinship entity.
[0063] The third rule can be understood as a rule used to identify unrelated types of subjects or contextual referential relationships in dialogue information. Specifically, if the sentence containing the key content does not contain the aforementioned explicit or related types of subjects, but contains a pronoun, and this pronoun has a corresponding candidate subject in the dialogue information, then the third rule can be triggered. This pronoun will be used as the target candidate subject corresponding to the key content, and the confidence level will be set to the third confidence level. In other words, the third specified type includes unrelated types that are distinct from explicit and related types. This can be understood as the candidate subject in the initial correspondence corresponding to the key content being a pronoun in the sentence containing the key content, where there is no explicit or related type of subject, and a subject exists in the preceding dialogue information of the sentence containing the key content. The pronoun can be he, she, it, old person, child, etc. For example, if the dialogue information is "She also likes spicy food", and the preceding dialogue information is "My mother likes hot pot", then although there is a non-related type pronoun in the dialogue information, that is, it is unrelated to the explicit type subject, but the subject "my mother" exists in the preceding dialogue information, then it can be determined that "she" refers to "my mother".
[0064] The fourth rule can be understood as a rule used to identify ambiguous expressions in dialogue information where the subject attribution cannot be determined. Specifically, when it is determined that there is no candidate subject in the initial correspondence corresponding to the key content, or when it is determined that the type of candidate subject in the initial correspondence corresponding to the key content is an ambiguous subject, the fourth rule can be triggered. This allows the target candidate subject corresponding to the key content to be set as a preset subject. This preset subject can be identified using UNKNOWN, indicating that the target candidate subject corresponding to the key content does not exist or cannot be determined. In other words, the expression of the subject corresponding to the key content in the dialogue information is too ambiguous, making it impossible to determine the target candidate subject, or the expression of the subject corresponding to the key content in the dialogue information is ambiguous, making it impossible to determine the target candidate subject. For example, in the dialogue information "likes spicy food," no candidate subject appears in this sentence. Therefore, "likes spicy food" does not correspond to any candidate subject in the initial correspondence. Based on the fourth rule, the target candidate subject of "likes spicy food" can be set as the preset subject UNKNOWN, and the confidence level can be set to the fourth confidence level.
[0065] The first designated type includes explicit types, namely first-person pronouns, such as "I," "myself," "myself," etc. The second designated type includes related types, which can be kinship terms, such as "sister," "mother," "father," etc. The third designated type includes non-related types, which can be understood as sentences containing key content that lack a subject but contain referential pronouns. The fourth designated type includes ambiguous subjects and types without a subject.
[0066] It should be noted that the confidence level can be set from 0 to 1. The first confidence level can be 1 to indicate that the target candidate subject corresponding to the key content is definite. The second confidence level can be 0.9, the third confidence level can be 0.9, and the fourth confidence level can be 0 to indicate that the target candidate subject corresponding to the key content is fuzzy and cannot be determined.
[0067] It should be understood that other rules for determining ownership can be set, and this manual does not impose specific restrictions.
[0068] Therefore, by executing the above-mentioned preset attribution determination rules, the target candidate subjects and confidence levels corresponding to each key content can be obtained, and the target candidate subjects and confidence levels corresponding to each key content can be used as memory attribution information.
[0069] In the above method, by setting different confidence levels for different types of subjects, the accuracy of subsequent subject-based recall of key content can be improved.
[0070] In one or more embodiments of this specification, when it is determined that there is at least one target candidate subject corresponding to key content as a preset subject, a reference subject corresponding to the key content is determined based on the dialogue information of subsequent rounds. The reference subject is updated to the target candidate subject corresponding to the key content, and the fourth confidence level corresponding to the key content is updated based on the reference subject.
[0071] In practical applications, when it is determined that at least one target candidate subject corresponding to key content is a preset subject, full lifecycle management can be performed on the memory attribution information of subjects identified as preset subjects. Specifically, the memory attribution information of subjects identified as preset subjects can be stored in a preset fuzzy memory storage pool, and a tiered usage strategy can be implemented according to the value level of the key content stored in the fuzzy memory storage pool. Furthermore, subsequent rounds of dialogue information can be continuously monitored, and a natural language inference model can be used to detect reference subjects in subsequent rounds of dialogue information that match the key content to be processed in the fuzzy memory pool. If the reference subject is determined to be any one of a first specified type, a second specified type, or a third specified type, the confidence level corresponding to the key content to be processed can be updated based on the type of the reference subject, the target candidate subject corresponding to the key content to be processed can be updated to the reference subject, and the key content to be processed can be migrated from the fuzzy memory pool to other memory storage areas.
[0072] Furthermore, it can also perform aging decay on memory ownership information in the fuzzy memory pool according to the last used time, and perform physical deletion when the effective confidence level is lower than the cleanup threshold.
[0073] Furthermore, in one or more embodiments of this specification, the triggering of the pre-set fourth rule may further include a high-value information judgment step. Specifically, determining that the target candidate subject corresponding to the key content is a preset subject, and determining the confidence level corresponding to the key content as the fourth confidence level, includes: If the candidate subject in the initial correspondence corresponding to the key content is determined to be of the fourth specified type, it is determined whether the key content is of the first preset type. If so, a first attribution query information is generated, wherein the first attribution query information is used to instruct the current dialogue subject to generate a first attribution response information, so as to determine the target candidate subject corresponding to the key content based on the first attribution response information; If not, then the target candidate subject corresponding to the key content is determined as the preset subject, and the confidence level corresponding to the key content is determined as the fourth confidence level.
[0074] It should be noted that the first presupposition type can be understood as representing key content that is high-value information, such as medical information, educational information, etc. The specific reason for the first presupposition type can be determined based on actual needs. Conversely, in the case of negation, that is, key content that does not belong to the first presupposition type, can be recorded as key content of the second presupposition type. The second presupposition type can be understood as representing key content that is low-value information, such as lyrics, movie information, etc. The specific reason for the second presupposition type can also be determined based on actual needs.
[0075] The current dialogue subject can be understood as the current dialogue user, that is, the user who conducts dialogue with the dialogue model through an electronic device. This can be a natural person, or a robot, virtual person, etc.
[0076] In one or more embodiments of this specification, the first attribution query information is used to initiate a query against an ambiguous or completely unknown subject corresponding to the key content, in order to determine what the subject corresponding to the key content actually is.
[0077] For example, the dialogue information is "allergic to drug A". The subject cannot be determined, but "allergic to drug A" is high-value information, specifically high-value medical information. Errors in this information could have serious consequences. Therefore, a first attribution query can be generated, such as "Who is allergic to drug A? Is it yourself, your friend, or a family member?" This first attribution query can be sent and displayed on the user's electronic device, allowing the user to input a response, such as "I am allergic to drug A". Based on the first attribution response, the target candidate subject corresponding to the key content "allergic to drug A" can be determined as "I".
[0078] The above method can proactively initiate clarification inquiries regarding key content of the first preset type when the attribution subject cannot be determined, thereby avoiding the risks caused by incorrect subject attribution.
[0079] Step 106: Store the memory attribution information to recall key content based on the subject and confidence level in the next round of dialogue.
[0080] In one or more embodiments of this specification, after obtaining the memory ownership information, the memory ownership information can be stored so that key content can be recalled in subsequent rounds of dialogue based on the memory ownership information according to the subject and confidence level.
[0081] In one or more embodiments of this specification, recalling key content based on the memory attribution information according to subject and confidence level in the next round of dialogue includes: Obtain the query subject in the next round of dialogue; Based on the memory attribution information, if the confidence level of the query subject is greater than a preset confidence threshold, the key content corresponding to the query subject is obtained from the memory attribution information.
[0082] In practical applications, it is possible to obtain subsequent dialogue information from the user's input, thereby extracting the query subject from the subsequent dialogue information.
[0083] Specifically, when determining the query subject in the next round of dialogue, it can be extracted directly from the next round of dialogue information, or it can be inferred based on the next round of dialogue information. For example, if the dialogue information is "I like spicy food, but my sister doesn't," and the next round of dialogue information is "What flavors of snacks do I like?", then the query subject can be determined to be "I." However, if the next round of dialogue information is "I want to buy some snacks for my sister, can you recommend some?", then the query subject can be determined to be "my sister," not "I."
[0084] After obtaining the query subject, the confidence level of the query subject can be determined from the memory attribution information. Only if the confidence level of the query subject is greater than a preset confidence threshold can the key content corresponding to that confidence level be retrieved. In other words, based on the memory attribution information, the confidence levels of the subjects corresponding to the query subject that are greater than the preset confidence threshold are first retrieved, and then the key content exceeding the preset confidence threshold is used as the key content corresponding to the query subject.
[0085] The preset reliability threshold can be set based on actual needs, and this manual does not impose specific restrictions.
[0086] The aforementioned AI memory data processing method binds key content, subject, and confidence level to set memory attribution information. This allows the system to execute based on confidence level and subject when recalling key content, avoiding attributing key content to the wrong subject and improving the accuracy of subject attribution in dialogue.
[0087] Furthermore, in one or more embodiments of this specification, when the confidence level corresponding to the query subject is determined not to be greater than a preset confidence threshold based on the memory attribution information, the type of key content can be considered to determine whether to recall the key content. Specifically, when the confidence level corresponding to the query subject is determined not to be greater than a preset confidence threshold based on the memory attribution information, the type of key content corresponding to the query subject in the memory attribution information is obtained. If the type is a first preset type, the key content in the memory attribution information is prohibited from participating in the recall, and a clarification inquiry process is forcibly triggered. If the type is a second preset type, the memory attribution information is allowed to participate in the recall in a downweighted manner, and in practical applications, fuzzy expressions can be used for recall. Specifically, the downweighting method can be to reduce the recall score of the key content, and fuzzy expressions can be understood as: in the generated response information, it is clear that the correspondence between the current key content and the query subject is uncertain. For example, if the query subject is "Xiaoming" and the key content is "likes spicy food", then the generated response information can be "Xiaoming may like spicy food".
[0088] In one or more embodiments of this specification, the similarity between key elements can also be determined; If the similarity between any two key contents is greater than a preset similarity threshold, the subject identifier of the candidate subject corresponding to the two key contents is set as the first type subject identifier, and the two key contents are stored in the first memory storage area and the second memory storage area respectively. If the similarity between any two key contents is less than or equal to the preset similarity threshold, the subject identifier of the candidate subject corresponding to the two key contents is set as the second type subject identifier, and the two key contents are stored in the third memory storage area.
[0089] Since dialogue models are prone to misattributing subjects when key content has a high degree of similarity, in one or more embodiments of this specification, multiple memory storage areas can be pre-set in the computing device so that key content with high similarity and key content with low similarity can be stored in different areas respectively.
[0090] In practical applications, for each pair of key content items, the two key content items can be input into the dialogue model or other pre-trained language model to analyze their similarity. If the similarity between the two key content items is greater than a preset similarity threshold, the subject identifier of the candidate subject corresponding to the two key content items can be set as a first type subject identifier, and the two key content items can be stored in the first memory storage area and the second memory storage area, respectively. Conversely, if the similarity between the two key content items is less than or equal to the preset similarity threshold, the subject identifier of the candidate subject corresponding to the two key content items can be set as a second type subject identifier, and the two key content items can be stored in the third memory storage area.
[0091] The first memory storage area and the second memory storage area are two different storage areas. The third memory storage area can be the first memory storage area, the second memory storage area, or another storage area different from the first memory storage area and the second memory storage area, depending on the actual situation.
[0092] In practical applications, the first memory storage area, the second memory storage area, and the third memory storage area can take the form of independent database tables, index partitions, or storage files on a physical disk, or different logical partitions in the same database, or different namespaces in the same storage medium, etc.
[0093] The main identifier can also be determined based on actual needs, such as characters, letters, etc.
[0094] The above method allows for the separate storage of key content with high similarity, thereby avoiding errors in key content retrieval due to high similarity during subsequent key content recall.
[0095] In one or more embodiments of this specification, recalling key content based on the memory attribution information according to subject and confidence level in the next round of dialogue includes: Obtain the query subject in the next round of dialogue, and determine the target subject identifier corresponding to the query subject; If the target entity identifier is determined to be a second type of entity identifier, the key content corresponding to the query entity is queried from the third memory storage area according to the entity and confidence level. If the target subject identifier is determined to be a first type of subject identifier, the target memory storage area corresponding to the query subject is determined from the first memory storage area and the second memory storage area, and the key content corresponding to the query subject is queried from the target memory storage area according to the subject and confidence level.
[0096] In practical applications, key content that is similar is stored separately, and the subject identifiers of any two similar key contents are distinguished. In other words, similar key contents belonging to different subjects are distinguished based on different types of subject identifiers. Thus, during retrieval, key contents can be accurately retrieved from the corresponding memory storage area based on different types of subject identifiers, avoiding information confusion.
[0097] In one or more embodiments of this specification, during the execution of the above-described method for processing memory data of artificial intelligence, when there are multiple candidate subjects corresponding to any one key content, it can be determined whether to determine the target candidate subject corresponding to the key content based on the value or importance of the key content.
[0098] Specifically, for each key content, if multiple candidate subjects are determined based on the dialogue information, it is determined whether the key content is a key content of the first preset type. If so, second attribution query information is generated corresponding to the key content. The second attribution query information is used to instruct the current dialogue subject to determine the standard candidate subject corresponding to the key content from each candidate subject and obtain the correspondence between the candidate subject and the standard candidate subject. If not, then obtain the correspondence between the key content and each candidate entity.
[0099] It should be noted that the first preset type is the same as the first preset type mentioned above, and will not be described in detail here.
[0100] In other words, in practical applications, when key content corresponds to multiple candidate entities, a clarification inquiry can be triggered based on the value level of the key content. Specifically, if the key content is determined to belong to a first preset type, a second attribution inquiry can be generated to determine the current dialogue entity from multiple candidate entities. If the key content belongs to the second preset type, multiple version records can be created, each marking a different candidate entity and its corresponding confidence level. The version chain records the state of each version so that when attribution confirmation evidence appears in subsequent dialogue information, the attribution can be corrected and erroneous versions can be archived.
[0101] Furthermore, in practical applications, when it is determined that the similarity between the key content corresponding to at least two target candidate subjects is greater than a preset similarity threshold, a risk identifier can be added to the information of the two target candidate subjects. This risk identifier is used to characterize the existence of other key content similar to the key content of the subject. Specifically, the subject identifier can be marked in the relationship graph to block the propagation of confidence, and the memory of different subject identifiers can be physically isolated, that is, partitioned storage can be performed. In one or more embodiments of this specification, when the subject identifier is a preset subject, the key content can be used to determine whether it is prohibited from being used for subject profiling or allowed to be used as temporary information, based on its value level. In practical applications, when the key content belongs to a first preset type, the memory attribution information corresponding to the key content is prohibited from being used for any subject profiling and must be clarified and confirmed by the user before it can be bound and used. When the key content belongs to a second preset type, the memory attribution information corresponding to the key content is allowed to be used as temporary information, but the corresponding response information must include a declaration, which can be a vague expression. In one or more embodiments of this specification, for each key content, if it is determined that there is only one candidate subject corresponding to the key content based on the dialogue information in subsequent rounds, the correspondence corresponding to the key content is updated.
[0102] In practical applications, although the candidate subject corresponding to key content may not be identifiable, i.e. the aforementioned preset subject, the preset subject will become a definite subject as the dialogue progresses. Therefore, if the candidate subject corresponding to the key content is determined to be only one based on the dialogue information in subsequent rounds, the correspondence corresponding to the key content can be updated, and the confidence level of the candidate subject corresponding to the key content can also be adjusted.
[0103] In one or more embodiments of this specification, a preset subject can also be stored in a fourth memory storage area to achieve isolated storage of memory ownership information with low confidence and high confidence, thereby avoiding errors in the subsequent use of key content and subjects.
[0104] In one or more embodiments of this specification, if the low-confidence memory attribution information still cannot determine the correspondence between key content and subject within a preset period, the low-confidence memory attribution information can be deleted, thus saving storage resources and avoiding memory information confusion.
[0105] In one or more embodiments of this specification, during the process of generating memory ownership information based on dialogue information, a version number of the memory ownership information can be recorded, so that in the event of a subject ownership error, the subject ownership error can be traced, corrected, and audited based on the version number.
[0106] In one or more embodiments of this specification, the method further includes: If the memory ownership information corresponding to the dialogue information is updated based on the next round of dialogue, a version number of the memory ownership information corresponding to the dialogue information is created so that if the memory ownership information is updated incorrectly, the memory ownership information can be rolled back based on the created version number.
[0107] In practical applications, the current memory ownership information can be updated based on the dialogue information in subsequent rounds. Therefore, when an update to the memory ownership information corresponding to the dialogue information is detected, the memory ownership information corresponding to the dialogue information can be retained, that is, the old memory ownership information can be retained. The old memory ownership information can be updated based on the dialogue information in subsequent rounds to create new memory ownership information. That is, the version number of the memory ownership information can be recorded. Specifically, a version chain pointer pointing the new memory ownership information to the old memory ownership information can be established. In subsequent steps, if an update error is found in the memory ownership information, or in response to a rollback command, the target version memory ownership information can be located based on the version number or the version chain pointer. Thus, the target version memory ownership information can be restored to its effective state, so as to realize the regression of memory ownership information based on the version number and support the traceable correction and auditing of memory ownership information.
[0108] Among these features, the status of old memory ownership information can be marked as obsolete or corrected, and old ownership records can be prohibited from participating in subsequent recalls.
[0109] Furthermore, in practical applications, memory attribution information also includes a subject attribution status field. This subject attribution status field can be understood as a dynamic change representing the degree of certainty between key content and its corresponding subject. The attribution status field includes states such as pending resolution, pending clarification, bound, rolled back, and archived. Specifically, when new attribution information is determined based on the received clarification response from the user and subsequent dialogue content, the subject attribution status corresponding to the key content can migrate between different subject attribution status fields, i.e., between pending resolution, pending clarification, bound, rolled back, archived, etc.
[0110] In one or more embodiments of this specification, the aforementioned confidence level represents the confidence level that the key content belongs to the target subject, or in other words, the degree of certainty that the key content belongs to the target subject. This confidence level, representing the degree of certainty that the key content belongs to the target subject, can be used as the subject attribution confidence level. In practical applications, a authenticity confidence level can also be set for each key content. This authenticity confidence level represents the degree of truthfulness of the key content. Specifically, for each extracted key content, an authenticity score can be analyzed based on dialogue information (including dialogue information and historical dialogue information) using a large language model, etc. This authenticity score can be used as the authenticity confidence level corresponding to the key content. Thus, the authenticity confidence level corresponding to each key content can be obtained, and the correspondence between each key content and its corresponding authenticity confidence level can be stored. Therefore, when recalling key content based on confidence level, key content can be recalled according to subject attribution confidence and authenticity confidence. In the next round of dialogue, when recalling key content based on memory attribution information according to subject and subject attribution confidence, the query subject in the next round of dialogue can be obtained. Based on the memory attribution information, if the confidence level corresponding to the query subject is greater than a preset confidence threshold, the key content corresponding to the query subject can be obtained from the memory attribution information. Furthermore, the target authenticity confidence level of the key content corresponding to the query subject can be obtained from the correspondence between the stored key content and the authenticity confidence level corresponding to each key content. If the target authenticity confidence level is greater than a preset authenticity confidence threshold, the key content corresponding to the query subject can be recalled.
[0111] In one or more embodiments of this specification, for each preset subject or low-confidence subject, the number of times the subject appears and the number of times the key content corresponding to the subject is recalled can be determined based on subsequent dialogue information. If the number of appearances is greater than a preset occurrence threshold and the number of recalls is greater than a preset recall threshold, the subject can be updated to a confirmed subject, which can improve the subject affiliation confidence of the subject and thus update the memory affiliation information of the subject.
[0112] In one or more embodiments of this specification, key content can be stored in the form of metacognitive memory objects. The metacognitive memory objects include content, metadata, and a decay function. The content can be understood as the key content itself. The metadata can be understood as relevant information corresponding to the key content, such as the subject identifier, subject attribution confidence, subject attribution status, version number, and subject relationship information corresponding to the key content, which are stored in the metadata. The decay function can be understood as a function used to calculate the effective confidence of memory in order to simulate the forgetting process of memory over time.
[0113] like Figure 2 As shown, Figure 2 The flowchart illustrates a method for processing memory data of artificial intelligence applied to cloud-side devices according to an embodiment of this specification, specifically including the following steps.
[0114] Step 202: Obtain the data processing request sent by the end device, wherein the data processing request carries dialogue information.
[0115] Step 204: Extract at least one key content and at least one candidate subject from the dialogue information, and determine the memory attribution information according to the preset attribution determination rules, each key content and each candidate subject. The memory attribution information includes the target candidate subject and confidence level corresponding to each key content. The confidence level represents the probability that the key content belongs to the target candidate subject.
[0116] Step 206: Send the memory ownership information to the terminal device and store the memory ownership information so that key content can be recalled in the next round of dialogue based on the memory ownership information according to the subject and confidence level.
[0117] The aforementioned method for processing memory data in artificial intelligence applied to cloud-side devices binds key content, subject, and confidence level to set memory attribution information. This allows the system to avoid attributing key content to the wrong subject when recalling key content, thereby improving the accuracy of subject attribution in dialogues.
[0118] Corresponding to the above method embodiments, this specification also provides an embodiment of an artificial intelligence memory data processing device. Figure 3 A schematic diagram of the structure of a device for processing memory data of artificial intelligence according to an embodiment of this specification is shown. Figure 3 As shown, the device includes: The first acquisition module 302 is configured to acquire dialogue information and extract at least one key content and at least one candidate subject from the dialogue information; The first determining module 304 is configured to determine memory attribution information based on preset attribution determination rules, key content, and candidate subjects. The memory attribution information includes the target candidate subject and confidence level corresponding to each key content, and the confidence level represents the probability that the key content belongs to the target candidate subject. The first storage module 306 is configured to store the memory ownership information in order to recall key content based on the memory ownership information according to the subject and confidence level in the next round of dialogue.
[0119] Optionally, the first determining module 304 is further configured to determine the initial correspondence between each key content and each candidate subject based on the dialogue information; and to determine memory attribution information based on the initial correspondence and a preset attribution determination rule, wherein the memory attribution information includes the target candidate subject and confidence level corresponding to each key content, and the confidence level represents the probability that the key content belongs to the target candidate subject.
[0120] Optionally, the first determining module 304 is further configured to determine an initial correspondence between the key content to be processed and the candidate subject to be processed when the key content to be processed and the candidate subject to be processed are located in the same sentence in the dialogue information, wherein the key content to be processed is any key content and the candidate subject to be processed is any candidate subject.
[0121] Optionally, the preset attribution determination rule includes a first rule, a second rule, and a third rule; The first determining module 304 is further configured to, for each key content, based on the first rule, determine, when the type of the candidate subject in the initial correspondence corresponding to the key content is determined to be a first specified type, determine the candidate subject in the initial correspondence corresponding to the key content as the target candidate subject corresponding to the key content, and determine the confidence level corresponding to the key content as a first confidence level, wherein the first specified type includes first-person pronouns; based on the second rule, when the type of the candidate subject in the initial correspondence corresponding to the key content is determined to be a second specified type, determine the candidate subject in the initial correspondence corresponding to the key content as the target candidate subject corresponding to the key content, and determine... The confidence level corresponding to the key content is the second confidence level, wherein the second specified type includes third-person pronouns, and the first confidence level is greater than the second confidence level; based on the third rule, if there is no candidate subject in the initial correspondence corresponding to the key content, or if the type of the candidate subject in the initial correspondence corresponding to the key content is determined to be the third specified type, the target candidate subject corresponding to the key content is determined to be the preset subject, and the confidence level corresponding to the key content is determined to be the third confidence level, wherein the third specified type includes ambiguous subjects, and the second confidence level is greater than the third confidence level; based on the target candidate subject and confidence level corresponding to each key content, memory attribution information is obtained.
[0122] Optionally, the first determining module 304 is further configured to determine whether the key content is a key content of a first preset type if there is no candidate subject in the initial correspondence corresponding to the key content, or if the type of the candidate subject in the initial correspondence corresponding to the key content is a third specified type; if yes, generate first attribution query information, wherein the first attribution query information is used to instruct the current dialogue subject to generate first attribution response information to determine the target candidate subject corresponding to the key content based on the first attribution response information; if no, determine that the target candidate subject corresponding to the key content is a preset subject, and determine that the confidence level corresponding to the key content is a third confidence level.
[0123] Optionally, the first determining module 304 is further configured to input the dialogue information into a preset natural language inference model to obtain the initial correspondence between each key content and each candidate subject output by the preset natural language inference model, wherein the natural language inference model is used to detect the logical relationship between the key content and the candidate subject in the dialogue information.
[0124] Optionally, the first determining module 304 is further configured to update the current subject relationship knowledge graph based on the dialogue information and each candidate subject, wherein the current subject relationship knowledge graph is constructed with subjects as nodes and the relationships between subjects as edges; and to determine the initial correspondence between each key content and each candidate subject based on the current subject relationship knowledge graph.
[0125] Optionally, the first determining module 304 is further configured to, for each key content, if it is determined from the dialogue information that there are multiple candidate subjects corresponding to the key content, determine whether the key content is a key content of a first preset type. If so, generate second attribution query information corresponding to the key content, wherein the second attribution query information is used to instruct the current dialogue subject to determine the standard candidate subject corresponding to the key content from each candidate subject and obtain the correspondence between the candidate subject and the standard candidate subject; if not, obtain the correspondence between the key content and each candidate subject.
[0126] Optionally, the first determining module 304 is further configured to update the correspondence corresponding to each key content if, based on the dialogue information in subsequent rounds, it is determined that there is only one candidate subject corresponding to the key content.
[0127] Optionally, the first storage module 306 is further configured to obtain the query subject in the next round of dialogue; and, based on the memory attribution information, if it is determined that the confidence level corresponding to the query subject is greater than a preset confidence threshold, to obtain the key content corresponding to the query subject from the memory attribution information.
[0128] Optionally, the first storage module 306 is further configured to determine the similarity between key content items; if the similarity between any two key content items is greater than a preset similarity threshold, the subject identifier of the candidate subject corresponding to the two key content items is set as a first type subject identifier, and the two key content items are stored in a first memory storage area and a second memory storage area respectively; if the similarity between any two key content items is less than or equal to the preset similarity threshold, the subject identifier of the candidate subject corresponding to the two key content items is set as a second type subject identifier, and the two key content items are stored in a third memory storage area.
[0129] Optionally, the first storage module 306 is further configured to: obtain the query subject in the next round of dialogue and determine the target subject identifier corresponding to the query subject; if the target subject identifier is determined to be a second type of subject identifier, query the key content corresponding to the query subject from the third memory storage area according to the subject and confidence level; if the target subject identifier is determined to be a first type of subject identifier, determine the target memory storage area corresponding to the query subject from the first memory storage area and the second memory storage area, and query the key content corresponding to the query subject from the target memory storage area according to the subject and confidence level.
[0130] The aforementioned AI memory data processing device can acquire dialogue information and extract at least one key content and at least one candidate subject from the dialogue information; determine memory attribution information according to preset attribution determination rules, each key content, and each candidate subject, wherein the memory attribution information includes the target candidate subject and confidence level corresponding to each key content, and the confidence level represents the probability that the key content belongs to the target candidate subject; store the memory attribution information so that in the next round of dialogue, key content can be recalled based on the memory attribution information according to the subject and confidence level.
[0131] The aforementioned AI memory data processing device sets key content, subject, and confidence level as memory attribution information. This allows it to avoid attributing key content to the wrong subject when recalling key content, thereby improving the accuracy of subject attribution in dialogue.
[0132] The above is a schematic scheme of an artificial intelligence memory data processing device according to this embodiment. It should be noted that the technical solution of this artificial intelligence memory data processing device and the technical solution of the artificial intelligence memory data processing method described above belong to the same concept. For details not described in detail in the technical solution of the artificial intelligence memory data processing device, please refer to the description of the technical solution of the artificial intelligence memory data processing method described above.
[0133] Corresponding to the above method embodiments, this specification also provides embodiments of a device for processing memory data of artificial intelligence applied to cloud-side devices. Figure 4 This specification illustrates a schematic diagram of a device for processing memory data of artificial intelligence applied to cloud-based devices, according to one embodiment of this specification. Figure 4 As shown, the device includes: The second acquisition module 402 is configured to acquire a data processing request sent by the end device, wherein the data processing request carries dialogue information; The second determining module 404 is configured to extract at least one key content and at least one candidate subject from the dialogue information, and determine memory attribution information according to a preset attribution determination rule, each key content and each candidate subject, wherein the memory attribution information includes the target candidate subject and confidence level corresponding to each key content, and the confidence level represents the probability that the key content belongs to the target candidate subject; The second storage module 406 is configured to send the memory ownership information to the end device and store the memory ownership information so as to recall key content based on the memory ownership information according to the subject and confidence level in the next round of dialogue.
[0134] The aforementioned artificial intelligence memory data processing device applied to cloud-side devices can acquire dialogue information and extract at least one key content and at least one candidate subject from the dialogue information; determine memory attribution information according to preset attribution determination rules, each key content, and each candidate subject, wherein the memory attribution information includes the target candidate subject and confidence level corresponding to each key content, and the confidence level represents the probability that the key content belongs to the target candidate subject; store the memory attribution information so that in the next round of dialogue, key content can be recalled based on the memory attribution information according to the subject and confidence level.
[0135] The aforementioned artificial intelligence memory data processing device applied to cloud-side devices binds key content, subject, and confidence level to set memory attribution information. This allows the device to avoid attributing key content to the wrong subject when recalling key content, thereby improving the accuracy of subject attribution in dialogues.
[0136] The above is an illustrative scheme of a device for processing memory data of artificial intelligence applied to cloud-side devices, according to this embodiment. It should be noted that the technical solution of this device for processing memory data of artificial intelligence applied to cloud-side devices belongs to the same concept as the technical solution of the above-described method for processing memory data of artificial intelligence applied to cloud-side devices. Details not described in detail in the technical solution of the device for processing memory data of artificial intelligence applied to cloud-side devices can be found in the description of the technical solution of the above-described method for processing memory data of artificial intelligence applied to cloud-side devices.
[0137] See Figure 5 , Figure 5 This specification illustrates an architecture diagram of an artificial intelligence memory data processing system according to an embodiment of the present specification. The artificial intelligence memory data processing system may include a client 100 and a server 200. Client 100 is used to send a data processing request to server 200, wherein the data processing request carries dialogue information; Server 200 is configured to receive the data processing request, extract at least one key content and at least one candidate subject from the dialogue information, and determine memory attribution information according to a preset attribution determination rule, each key content, and each candidate subject. The memory attribution information includes the target candidate subject and confidence level corresponding to each key content, where the confidence level represents the probability that the key content belongs to the target candidate subject. Server 200 is also configured to store the memory attribution information to recall key content based on the subject and confidence level in the next round of dialogue, and to send the memory attribution information to client 100. Client 100 is also used to receive memory ownership information sent by server 200, so as to recall key content based on the memory ownership information according to the subject and confidence level in the next round of dialogue.
[0138] Using the scheme of the embodiments of this specification, server 200 can obtain a data processing request carrying dialogue information sent by end device 100, and extract at least one key content and at least one candidate subject from the dialogue information; determine memory attribution information according to preset attribution determination rules, each key content and each candidate subject, wherein the memory attribution information includes the target candidate subject and confidence level corresponding to each key content, and the confidence level represents the probability that the key content belongs to the target candidate subject; store the memory attribution information so as to recall key content according to subject and confidence level based on the memory attribution information in the next round of dialogue.
[0139] The artificial intelligence memory data processing system may include multiple clients 100 and a server 200. Clients 100 can be referred to as edge devices, and server 200 can be referred to as cloud devices. Multiple clients 100 can establish communication connections through server 200. In data processing scenarios, server 200 is used to provide data processing services between multiple clients 100. Each client 100 can act as a sender or receiver, communicating through server 200.
[0140] Users can interact with server 200 through client 100 to receive data sent by other clients 100, or send data to other clients 100, etc. In data processing scenarios, users can publish data streams to server 200 through client 100, server 200 can generate memory ownership information based on the data stream, and push the memory ownership information to other clients that have established communication.
[0141] In this system, client 100 and server 200 establish a connection via a network. The network provides the medium for communication between client 100 and server 200. The network can include various connection types, such as wired or wireless communication links or fiber optic cables. Data transmitted by client 100 may need to undergo encoding, transcoding, compression, or other processing before being published to server 200.
[0142] Client 100 can be a browser, an app (application), a web application such as an H5 (HyperText Markup Language 5) application, a lightweight application (also known as a mini-program), or a cloud application. Client 100 can be developed based on the software development kit (SDK) of the corresponding service provided by server 200, such as a real-time communication (RTC) SDK. Client 100 can be deployed on a computing device and depends on the device or certain apps on the device to run. The computing device may have a display screen and support information browsing, such as a personal mobile terminal like a mobile phone, tablet, or personal computer. Various other types of applications can also be configured on the computing device, such as human-computer interaction applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, and social media platform software.
[0143] Server 200 may include servers providing various services, such as servers providing communication services to multiple clients, servers supporting backend training of models used on clients, and servers processing data sent by clients. It should be noted that server 200 can be implemented as a distributed server cluster composed of multiple servers, or as a single server. The server can also be a server in a distributed system, or a server integrated with blockchain. The server can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0144] It is worth noting that the artificial intelligence memory data processing method provided in the embodiments of this specification is generally executed by the server. However, in other embodiments of this specification, the client may also have similar functions to the server, thereby executing the artificial intelligence memory data processing method provided in the embodiments of this specification. In other embodiments, the artificial intelligence memory data processing method provided in the embodiments of this specification may also be jointly executed by the client and the server.
[0145] Figure 6 A structural block diagram of a computing device 600 according to an embodiment of this application is shown. The components of the computing device 600 include, but are not limited to, a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and a database 650 is used to store data.
[0146] The computing device 600 also includes an access device 640, which enables the computing device 600 to communicate via one or more networks 660. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 640 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0147] In one embodiment of this application, the aforementioned components of the computing device 600 and Figure 6 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 6 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this application. Those skilled in the art can add or replace other components as needed.
[0148] The computing device 600 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 600 can also be a mobile or stationary server.
[0149] The processor 620 is used to execute the following computer program / instructions, which, when executed by the processor, implement the steps of the above-mentioned artificial intelligence memory data processing method.
[0150] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the above-described method for processing memory data of artificial intelligence belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the above-described method for processing memory data of artificial intelligence.
[0151] An embodiment of this specification also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the above-described method for processing memory data in artificial intelligence.
[0152] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. In particular, the computer-readable storage medium embodiments are described simply because they are substantially similar to the artificial intelligence memory data processing method embodiments; relevant parts can be referred to the descriptions of the artificial intelligence memory data processing method embodiments.
[0153] An embodiment of this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described method for processing memory data in artificial intelligence.
[0154] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the above-described method for processing memory data of artificial intelligence belong to the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the above-described method for processing memory data of artificial intelligence.
[0155] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0156] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0157] It should be noted that the above description describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous. Secondly, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments of this specification.
[0158] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0159] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A method for processing memory data in artificial intelligence, comprising: Obtain dialogue information and extract at least one key content and at least one candidate subject from the dialogue information; Based on the preset attribution determination rules, each key content, and each candidate subject, memory attribution information is determined. The memory attribution information includes the target candidate subject and confidence level corresponding to each key content. The confidence level represents the probability that the key content belongs to the target candidate subject. The memory attribution information is stored so that key content can be recalled in the next round of dialogue based on the memory attribution information according to the subject and confidence level.
2. The method as described in claim 1, wherein determining memory attribution information based on preset attribution determination rules, key content, and candidate entities includes: Based on the dialogue information, determine the initial correspondence between each key content and each candidate subject; Based on the initial correspondence and the preset attribution determination rules, memory attribution information is determined, wherein the memory attribution information includes the target candidate subject and confidence level corresponding to each key content, and the confidence level represents the probability that the key content belongs to the target candidate subject.
3. The method as described in claim 2, wherein determining the initial correspondence between each key content and each candidate subject based on the dialogue information includes: If it is determined that the key content to be processed and the candidate subject to be processed are in the same sentence in the dialogue information, an initial correspondence is determined between the key content to be processed and the candidate subject to be processed, wherein the key content to be processed is any key content and the candidate subject to be processed is any candidate subject.
4. The method as described in claim 2, wherein the preset attribution determination rule includes a first rule, a second rule, a third rule, and a fourth rule; Based on the initial correspondence and the preset attribution determination rules, the memory attribution information is determined, including: For each key content, based on the first rule, if the type of the candidate subject in the initial correspondence corresponding to the key content is determined to be a first specified type, the candidate subject in the initial correspondence corresponding to the key content is determined to be the target candidate subject corresponding to the key content, and the confidence level corresponding to the key content is determined to be the first confidence level, wherein the first specified type includes explicit type; Based on the second rule, when the type of the candidate subject in the initial correspondence corresponding to the key content is determined to be the second specified type, the candidate subject in the initial correspondence corresponding to the key content is determined to be the target candidate subject corresponding to the key content, and the confidence level corresponding to the key content is determined to be the second confidence level, wherein the second specified type includes the association type, and the first confidence level is greater than the second confidence level; Based on the third rule, when the type of the candidate subject in the initial correspondence corresponding to the key content is determined to be the third specified type, the candidate subject in the initial correspondence corresponding to the key content is determined to be the target candidate subject corresponding to the key content, and the confidence level corresponding to the key content is determined to be the third confidence level, wherein the third specified type includes the unrelated type, and the second confidence level is greater than the third confidence level; Based on the fourth rule, when the type of the candidate subject in the initial correspondence corresponding to the key content is determined to be the fourth specified type, the target candidate subject corresponding to the key content is determined to be the preset subject, and the confidence level corresponding to the key content is determined to be the fourth confidence level. The fourth specified type includes ambiguous subjects and no subject, and the third confidence level is greater than the fourth confidence level. Based on the target candidate subjects and confidence levels corresponding to each key content, memory attribution information is obtained.
5. The method as described in claim 4, wherein determining the target candidate subject corresponding to the key content as a preset subject, and determining the confidence level corresponding to the key content as a fourth confidence level, includes: If the candidate subject in the initial correspondence corresponding to the key content is determined to be of the fourth specified type, it is determined whether the key content is of the first preset type. If so, a first attribution query information is generated, wherein the first attribution query information is used to instruct the current dialogue subject to generate a first attribution response information, so as to determine the target candidate subject corresponding to the key content based on the first attribution response information; If not, then the target candidate subject corresponding to the key content is determined as the preset subject, and the confidence level corresponding to the key content is determined as the fourth confidence level.
6. The method of claim 4, further comprising: If it is determined that there is at least one target candidate subject corresponding to key content as a preset subject, the reference subject corresponding to the key content is determined based on the dialogue information in subsequent rounds. The reference subject is updated to the target candidate subject corresponding to the key content, and the fourth confidence level corresponding to the key content is updated based on the reference subject.
7. The method as described in claim 2, wherein determining the initial correspondence between each key content and each candidate subject based on the dialogue information includes: The dialogue information is input into a preset natural language inference model to obtain the initial correspondence between each key content and each candidate subject output by the preset natural language inference model. The natural language inference model is used to detect the logical relationship between the key content and the candidate subjects in the dialogue information.
8. The method as described in claim 2, wherein determining the initial correspondence between each key content and each candidate subject based on the dialogue information includes: The current subject relationship knowledge graph is updated based on the dialogue information and each candidate subject, wherein the current subject relationship knowledge graph is constructed with subjects as nodes and the relationships between subjects as edges; Based on the current subject relationship knowledge graph, the initial correspondence between each key content and each candidate subject is determined.
9. The method of claim 2, further comprising: For each key content, if multiple candidate subjects are determined based on the dialogue information, it is determined whether the key content is a key content of the first preset type. If so, second attribution query information is generated for the key content. The second attribution query information is used to instruct the current dialogue subject to determine the standard candidate subject corresponding to the key content from each candidate subject and obtain the correspondence between the candidate subject and the standard candidate subject. If not, then obtain the correspondence between the key content and each candidate entity.
10. The method of claim 9, further comprising: For each key content, if it is determined that there is only one candidate subject corresponding to the key content based on the dialogue information in subsequent rounds, the corresponding relationship of the key content is updated.
11. The method according to any one of claims 1 to 10, wherein in the next round of dialogue, key content is recalled based on the memory attribution information according to subject and confidence level, comprising: Obtain the query subject in the next round of dialogue; Based on the memory attribution information, if the confidence level of the query subject is greater than a preset confidence threshold, the key content corresponding to the query subject is obtained from the memory attribution information.
12. The method according to any one of claims 1 to 10, wherein the method further comprises: Determine the similarity between the key elements; If the similarity between any two key contents is greater than a preset similarity threshold, the subject identifier of the candidate subject corresponding to the two key contents is set as the first type subject identifier, and the two key contents are stored in the first memory storage area and the second memory storage area respectively. If the similarity between any two key contents is less than or equal to the preset similarity threshold, the subject identifier of the candidate subject corresponding to the two key contents is set as the second type subject identifier, and the two key contents are stored in the third memory storage area.
13. The method of claim 12, wherein in the next round of dialogue, key content is recalled based on the memory attribution information according to subject and confidence level, comprising: Obtain the query subject in the next round of dialogue, and determine the target subject identifier corresponding to the query subject; If the target entity identifier is determined to be a second type of entity identifier, the key content corresponding to the query entity is queried from the third memory storage area according to the entity and confidence level. If the target subject identifier is determined to be a first type of subject identifier, the target memory storage area corresponding to the query subject is determined from the first memory storage area and the second memory storage area, and the key content corresponding to the query subject is queried from the target memory storage area according to the subject and confidence level.
14. The method of claim 1, further comprising: If the memory ownership information corresponding to the dialogue information is updated based on the next round of dialogue, a version number of the memory ownership information corresponding to the dialogue information is created so that if the memory ownership information is updated incorrectly, the memory ownership information can be rolled back based on the created version number.
15. A method for processing memory data in artificial intelligence, applied to cloud-side devices, comprising: Obtain a data processing request sent by the end device, wherein the data processing request carries dialogue information; Extract at least one key content and at least one candidate subject from the dialogue information, and determine memory attribution information according to the preset attribution determination rules, each key content and each candidate subject. The memory attribution information includes the target candidate subject and confidence level corresponding to each key content. The confidence level represents the probability that the key content belongs to the target candidate subject. The memory attribution information is sent to the terminal device and stored so that key content can be recalled in the next round of dialogue based on the memory attribution information according to the subject and confidence level.
16. A device for processing memory data of artificial intelligence, comprising: The first acquisition module is configured to acquire dialogue information and extract at least one key content and at least one candidate subject from the dialogue information; The first determining module is configured to determine memory attribution information based on preset attribution determination rules, key content, and candidate subjects. The memory attribution information includes the target candidate subject and confidence level corresponding to each key content, and the confidence level represents the probability that the key content belongs to the target candidate subject. The first storage module is configured to store the memory ownership information so that key content can be recalled in the next round of dialogue based on the memory ownership information according to the subject and confidence level.
17. A computing device, comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 14.
18. A computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 14.
19. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 14.