Methods, devices, equipment, media, and products for storing dialogue content of intelligent agents.

By acquiring and memorizing dialogue content from role-playing chat scenarios, the problem of long-term memory difficulties for role-playing agents is solved, improving the accuracy of dialogue content generation and user experience.

CN119884350BActive Publication Date: 2026-01-30BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411943569.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2026-01-30
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

In role-playing chat scenarios, the intelligent agents of the characters have difficulty maintaining long-term memory, resulting in inaccurate dialogue content generation.

Method used

By acquiring the current contextual dialogue information between the target object and the virtual object, dialogue content is generated based on dialogue features, and the dialogue memory data is generated when the memory generation conditions are triggered.

Benefits of technology

It achieves accurate generation and long-term memory of dialogue content, improving the user's chat experience in chat scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884350B_ABST
    Figure CN119884350B_ABST
Patent Text Reader

Abstract

This disclosure relates to the field of computer technology and discloses a method, apparatus, device, medium, and product for memorizing dialogue content of intelligent agents. The method includes: acquiring the current contextual dialogue information between a target object and a virtual object; generating the dialogue content of the virtual object in the current dialogue round based on the dialogue features of the current contextual dialogue information; and memorizing the dialogue content if it triggers a memory generation condition, thereby generating dialogue memory data. By implementing the technical solution of this disclosure, long-term memory of dialogue content can be achieved, facilitating accurate generation of subsequent dialogue content based on long-term memory, further improving the user's chat experience in chat scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer, in particular to an agent dialogue content memory method, device, equipment, medium and product. BACKGROUND

[0002] Many current social application programs support role-playing chat scene construction, such as a chat scene of a user and a virtual role, a chat scene of a user and multiple virtual roles, a chat scene of multiple users and multiple virtual roles, and the like, to meet the chat experience required by the user. However, in the role-playing group chat scene, the role agent is difficult to have long-term memory, and thus is difficult to extract data from the long-term memory, resulting in that the generated dialogue content is not accurate enough. SUMMARY

[0003] Therefore, the present disclosure provides an agent dialogue content memory method, device, equipment, medium and product to solve the problem of difficulty in generating long-term memory data of dialogue content.

[0004] In a first aspect, the present disclosure provides an agent dialogue content memory method, comprising: obtaining current context dialogue information of a target object and a virtual object; generating dialogue content of the virtual object in a current dialogue turn based on dialogue features of the current context dialogue information; and if the dialogue content triggers a memory generation condition, memorizing the dialogue content to generate dialogue memory data.

[0005] In a second aspect, the present disclosure provides an agent dialogue content memory device, comprising: an obtaining module configured to obtain current context dialogue information of a target object and a virtual object; a dialogue content generation module configured to generate dialogue content of the virtual object in a current dialogue turn based on dialogue features of the current context dialogue information; and a dialogue content memory module configured to, if the dialogue content triggers a memory generation condition, memorize the dialogue content to generate dialogue memory data.

[0006] In a third aspect, the present disclosure provides a computer device, comprising: a memory and a processor, which are communicatively connected with each other, and the memory stores computer instructions; the processor executes the computer instructions to perform the dialogue content memory method of the first aspect or any of the corresponding embodiments thereof.

[0007] In a fourth aspect, the present disclosure provides a computer readable storage medium, which stores computer instructions for causing a computer to perform the dialogue content memory method of the first aspect or any of the corresponding embodiments thereof.

[0008] Fifthly, this disclosure provides a computer program product, including computer instructions for causing a computer to execute a method for memorizing dialogue content as described in the first aspect or any corresponding embodiment.

[0009] The method, apparatus, device, storage medium, and program product for memorizing dialogue content disclosed herein obtain the current dialogue turn between the target object and the virtual object, and generate corresponding dialogue content based on the dialogue characteristics of the current dialogue turn. This allows for the generation of dialogue content by referencing dialogue data from the current dialogue turn, ensuring that the generated dialogue content matches the content of the current dialogue turn and improving the accuracy of dialogue content generation. When the dialogue content triggers the memory generation condition, the dialogue content generated in the current dialogue turn is memorized, thereby achieving long-term memory of the dialogue content. This facilitates accurate generation of subsequent dialogue content by referring to long-term memory, further enhancing the user's chat experience in chat scenarios. Attached Figure Description

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

[0011] Figure 1 This is a flowchart illustrating a method for memorizing dialogue content of an intelligent agent according to an embodiment of the present disclosure.

[0012] Figure 2 This is a flowchart illustrating another method for memorizing dialogue content of an intelligent agent according to an embodiment of the present disclosure;

[0013] Figure 3 This is a schematic diagram illustrating the generation of the first round of dialogue content according to an embodiment of this disclosure;

[0014] Figure 4 This is a schematic diagram illustrating the generation of non-first-round dialogue content according to an embodiment of this disclosure;

[0015] Figure 5 This is a schematic diagram illustrating the generation of background information according to an embodiment of the present disclosure;

[0016] Figure 6 This is a flowchart illustrating another method for memorizing dialogue content of an intelligent agent according to an embodiment of the present disclosure;

[0017] Figure 7 This is a schematic diagram illustrating the memory generation of dialogue content according to an embodiment of the present disclosure;

[0018] Figure 8This is a structural block diagram of a memory device for intelligent agent dialogue content according to an embodiment of the present disclosure;

[0019] Figure 9 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present disclosure. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0021] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0022] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0023] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0024] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0025] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0026] According to an embodiment of this disclosure, a method for remembering dialogue content is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0027] This embodiment provides a method for memorizing the dialogue content of an intelligent agent, which can be used in computer devices such as computers, mobile phones, and tablets. Figure 1 This is a flowchart of a method for memorizing the dialogue content of an intelligent agent according to an embodiment of this disclosure, such as... Figure 1 As shown, the process includes the following steps:

[0028] Step S101: Obtain the current context dialogue information between the target object and the virtual object.

[0029] A virtual object is a pre-defined participant in the dialogue, possessing a corresponding virtual role, such as a writer, fitness expert, or scholar. The current context dialogue information refers to the dialogue information formed during the conversation, where the target object and the virtual object speak in turn.

[0030] The target user creates a chat scenario through a social application and sets up a corresponding virtual object for that scenario. The target user can then engage in dialogue with this virtual object. During this dialogue, the computer device acquires contextual dialogue information formed by the sequential speaking of the target user and the virtual object within the current chat scenario.

[0031] Step S102: Based on the dialogue features of the current context dialogue information, generate the dialogue content of the virtual object in the current dialogue round.

[0032] Dialogue features are specific attributes exhibited during the dialogue between the target object and the virtual object. These features are used to analyze the content, style, intent, and roles of the dialogue participants (target object and virtual object). The current dialogue turn is the turn in which the target object initiates a dialogue request to elicit a response from the virtual object.

[0033] The process analyzes the dialogue between the target object and the virtual object within the contextual dialogue information, determines the dialogue characteristics of the virtual object in the current contextual dialogue information, and organizes the dialogue content generated by the virtual object in response to the target object's dialogue request in a streaming dialogue format, according to the dialogue characteristics, so that the dialogue content matches the target object's dialogue request. Streaming dialogue refers to a natural, continuous dialogue mode without obvious pauses or interruptions.

[0034] Step S103: If the dialogue content triggers the memory generation condition, then the dialogue content is memorized to generate dialogue memory data.

[0035] The memory generation condition is a pre-set condition for memorizing the dialogue content. Specifically, the memory generation condition can be that the target object exits the current dialogue round, or that the number of dialogues between the target object and the virtual object in the current dialogue round reaches a preset number (such as 20, 50, or 100 times). Of course, it can also be other forms. The memory generation condition is not specifically limited here, and those skilled in the art can determine it according to actual needs.

[0036] During the generation of dialogue content in the current dialogue turn, it is continuously monitored whether the dialogue content generated in the current dialogue turn triggers the memory generation condition. If the dialogue content generated in the current dialogue turn triggers the memory generation condition, the dialogue content generated in the current dialogue turn is memorized, and corresponding dialogue memory data is generated.

[0037] The dialogue content memorization method provided in this embodiment obtains the current dialogue turn between the target object and the virtual object, and generates corresponding dialogue content based on the dialogue characteristics of the current turn. This allows for the generation of dialogue content by referencing the dialogue data in the current turn, ensuring that the generated dialogue content matches the content of the current turn and improving the accuracy of dialogue content generation. When the dialogue content triggers the memorization generation condition, the dialogue content generated in the current turn is memorized, thus achieving long-term memorization of the dialogue content. This facilitates accurate generation of dialogue content by referring to long-term memory, further enhancing the user's chat experience in chat scenarios.

[0038] This embodiment provides a method for memorizing dialogue content, which can be used in computer devices such as computers, mobile phones, and tablets. Figure 2 This is a flowchart of a method for remembering dialogue content according to an embodiment of this disclosure, such as... Figure 2 As shown, the process includes the following steps:

[0039] Step S201: Obtain the current context dialogue information between the target object and the virtual object. For details, please refer to the relevant descriptions of the corresponding steps in the above-described embodiments; they will not be repeated here.

[0040] Step S202: Based on the dialogue features of the current context dialogue information, generate the dialogue content of the virtual object in the current dialogue round.

[0041] Specifically, step S202 includes:

[0042] Step S2021: Obtain the dialogue request of the target object in the current dialogue round.

[0043] A dialogue request is a request from a target object to engage in dialogue with a virtual object. For example, the target object might ask, "A, I'm thinking of starting a fitness routine soon, do you have any suggestions?" Specifically, computer devices may have social applications deployed on them. The target object can use these applications to construct a chat scenario with the virtual object. When the target object initiates a dialogue request within the chat scenario, the social application can retrieve and respond to the target object's request in the current dialogue round. Correspondingly, the virtual object A in the chat scenario can provide a targeted response based on the dialogue request initiated by the target object, generating dialogue content that matches the request.

[0044] Step S2022: Detect whether the current dialogue round is the first round of dialogue.

[0045] When the target object initiates a dialogue request in a chat scenario, it is checked whether the current dialogue round of the dialogue request is the first round of dialogue between the target object and the virtual object. If the current dialogue round is the first round of dialogue, step S2023 is executed; otherwise, step S2025 is executed.

[0046] Step S2023: If the current dialogue round is the first round of dialogue, then retrieve the dialogue configuration information and dialogue-related knowledge of the target object based on the dialogue request.

[0047] Dialogue configuration information refers to the target object's preferences for the dialogue, such as topics of interest and virtual characters. Dialogue-related knowledge is background knowledge related to the dialogue request; this knowledge characterizes the prior information or knowledge required to understand a topic, event, concept, or to engage in dialogue. Specifically, this dialogue-related knowledge can include historical background, scientific principles, cultural customs, and technical terminology. Figure 3 As shown, if the current dialogue round is determined to be the first round of dialogue, the dialogue request initiated by the target object is parsed, and the vector database is retrieved based on the parsing result of the dialogue request to determine the dialogue configuration information for the target object and the dialogue-related knowledge for the dialogue request.

[0048] Specifically, the vector database stores the configuration information of the target object, the settings of the virtual object, and the historical dialogue information between the target object and the virtual object. When a dialogue request initiated by the target object is received, the dialogue request is converted into a vector representation. The vector similarity is used to retrieve dialogue-related knowledge matching the dialogue request and dialogue configuration information matching the target object from the vector database.

[0049] Step S2024: Based on the dialogue configuration information and dialogue-related knowledge, generate the dialogue content of the virtual object in response to the dialogue request in the current dialogue round.

[0050] Based on the dialogue configuration information, determine the topics or content that the target audience is interested in during the current dialogue round, and organize a response to the dialogue request according to relevant dialogue knowledge, generating corresponding dialogue content in the form of a streaming dialogue, such as... Figure 3 As shown. Simultaneously, the dialogue configuration information and related knowledge are returned to the social application for subsequent use.

[0051] In some optional implementations, step S2024 above includes:

[0052] Step a1: Based on the dialogue configuration information and dialogue-related knowledge, determine whether it is necessary to introduce historical dialogue information.

[0053] Step a2: If it is necessary to import historical dialogue information, retrieve the historical dialogue content related to the dialogue request from the historical dialogue information.

[0054] Step a3: Generate the dialogue content of the virtual object in the current dialogue round based on the historical dialogue content.

[0055] Social applications deploy pre-trained intent recognition models to determine whether historical dialogue information needs to be introduced. These intent recognition models can be trained based on a large language pattern architecture or a neural network model architecture; no specific limitation is made here.

[0056] like Figure 3 As shown, dialogue configuration information and dialogue-related knowledge are input into the intent recognition model, which then determines whether historical dialogue information needs to be introduced. If historical dialogue information is needed, the model retrieves the vector database storing historical dialogue information and extracts the most relevant historical dialogue content based on vector similarity. This most relevant historical dialogue content is then introduced into the current dialogue round to generate the dialogue content for the target audience. If historical dialogue information is not needed, the dialogue content for the target audience is directly generated based on dialogue-related knowledge and dialogue configuration information.

[0057] In the above implementation, historical dialogue information, as long-term memory possessed by the role's intelligent agent, signifies that the agent possesses all memories from past dialogue rounds when historical dialogue information is introduced. Therefore, it is possible to retrieve historical dialogue content related to the dialogue request from the historical dialogue information, realizing retrieval of long-term memory data and facilitating the generation of dialogue content by the role's intelligent agent with reference to long-term memory data.

[0058] Step S2025: If the current dialogue round is not the first round of dialogue, then the dialogue request is rewritten to obtain the rewritten target dialogue request.

[0059] If the current dialogue round is not the first round, it means the target object is re-entering a dialogue round to interact with the virtual object. In this case, dialogue information from the previous round can be retrieved, and the current dialogue request can be rewritten to reduce ambiguous and semantically incoherent content, resulting in a clear and semantically coherent target dialogue request, such as... Figure 4 As shown.

[0060] In a specific example, if "Character A" was discussed in the previous round, then when the dialogue request "Why does he like to eat food B" is initiated in the current round, it can be determined that "he" in the dialogue request refers to "Character A". Therefore, the current dialogue request can be rewritten as "Why does Character A like to eat food B" to avoid the virtual object responding incorrectly due to the unclear reference of "he".

[0061] Step S2026: Determine whether background information and / or historical dialogue information need to be introduced based on the target dialogue request.

[0062] Background information refers to information related to the literary work carried in the target dialogue request; historical dialogue information refers to the dialogue information generated by the target object and the virtual object in past dialogue rounds.

[0063] As mentioned above, social applications deploy intent recognition models. The target dialogue request is input into the intent recognition model, which then parses the content carried in the request. The parsing result determines whether background information, historical information, or both should be included. Figure 4 As shown, if background information and / or historical dialogue information need to be introduced, step S2027 is executed; otherwise, dialogue-related knowledge matching the target dialogue request is retrieved directly from the vector database, and dialogue content is generated according to the dialogue-related knowledge.

[0064] Step S2027: If background information and / or historical dialogue information need to be introduced, then the dialogue content of the virtual object in the current dialogue round is generated based on the background information and / or historical dialogue information.

[0065] If background information is required, the most relevant background fragments to the target dialogue request are retrieved from the vector database, and / or, if historical dialogue information is required, the most relevant dialogue content to the target dialogue request is retrieved from the historical dialogue information in the vector database. Figure 4 As shown, the most relevant background fragments and / or historical dialogue content retrieved are assembled, and the assembled memory information is entered into the current dialogue round to generate dialogue content to respond to the target object.

[0066] In some optional implementations, step S2027 above includes:

[0067] Step b1: When historical dialogue information is introduced, retrieve the dialogue summary information corresponding to the historical dialogue information.

[0068] Step b2: Generate the dialogue content for the current dialogue round based on the dialogue summary information.

[0069] The dialogue summary information is a summary of historical dialogue information. This dialogue summary information is generated by extracting key information from historical dialogue information, and it is stored together with the historical dialogue information in a vector database.

[0070] When it is necessary to introduce historical dialogue information, the dialogue summary information corresponding to the historical dialogue information can be retrieved to find information that matches the target dialogue request. The retrieved matching information is then introduced into the current dialogue round to generate dialogue content that corresponds to the target dialogue request. The dialogue content is then replied to the target object in the form of a streaming dialogue.

[0071] In the above implementation, when it is determined to introduce historical dialogue information, the amount of data retrieval is reduced by retrieving dialogue summary information, thereby improving the efficiency of dialogue content generation.

[0072] In some optional implementations, the background information generation step includes:

[0073] Step c1: Obtain the background genre file and extract the text attribute information from the background genre file.

[0074] Step c2: Slice the text content of the background genre file to generate background slice content.

[0075] Step c3: Summarize the content of the background slices and generate slice summary information.

[0076] Step c4: Vectorize the background slice content into text, and generate background information based on the text vectorization result, text attribute information, and slice summary information.

[0077] Background genre files are pre-selected literary genre files featuring different dialogue characters, specifically including various books and manually compiled world-building documents. For example, if the dialogue character is Character C, the corresponding background genre file would be "XXX". Text attribute information refers to the attribute information carried in the background genre file that characterizes the text content, such as chapter identifiers and character identifiers.

[0078] Background slice content can be generated by slicing the text content of a background genre file according to a preset length; or it can be generated by slicing the text content of a background genre file according to semantic dimensions, such as... Figure 5 As shown; alternatively, it can be generated by adaptively slicing the text content of the background text file using a slicing tool, such as... Figure 5 As shown. Of course, other methods can also be used for slicing, and no specific limitation is made here.

[0079] The background slice content obtained after slicing is summarized to determine the slice summary information. This slice summary information, along with text attribute information, is used as additional field information for the text content. A vectorization model is then used to vectorize the background slice content, yielding vectorized information. This additional field information and vectorized information are then used to determine the background information, such as... Figure 5 As shown, the background information is stored in the vector database according to the pre-defined input fields (such as chapter identifier field, role identifier field, original text excerpt field, original text summary field, additional fields, file identifier field, etc.). Subsequently, the text content can be filtered according to the input fields to select the corresponding text content, and then related content can be retrieved according to vector similarity.

[0080] In some alternative implementations, the text content of the background text file is cleaned before slicing to remove irrelevant content, resulting in processed text content. In one specific example, dirty text fragments (such as multiple blank lines) in the text content are filtered using regular expression matching to generate clean text content, thereby improving the slicing effect.

[0081] In some optional implementations, after slicing, to address issues such as excessive dialogue, scene descriptions, low information density, and disjointed plots in the background slice content, a data augmentation model can be used to summarize and rewrite the background slice content. This ensures the semantic integrity of the background slice content and enhances its information quality. The data augmentation model can be trained based on a large language pattern architecture, a deep learning model architecture, or a neural network model architecture; no specific limitation is made here.

[0082] In the above embodiments, by pre-acquiring background genre files, background information is generated using the background genre files, so that the role agent can refer to the background information it possesses to generate dialogue content, thereby improving the accuracy of dialogue content generation.

[0083] Step S203: If the dialogue content triggers the memory generation condition, the dialogue content is memorized, and dialogue memory data is generated. For details, please refer to the relevant descriptions of the corresponding steps in the above-described embodiments; they will not be repeated here.

[0084] The method for memorizing dialogue content for intelligent agents provided in this embodiment determines the generation method of dialogue content based on whether the current dialogue round is the first round. When the current dialogue round is the first round, corresponding dialogue content is generated by retrieving the dialogue configuration information and dialogue-related knowledge corresponding to the dialogue request. This ensures that the generated dialogue content matches the role of the intelligent agent, avoiding a monotonous generation of dialogue content and guaranteeing more vivid and diverse dialogue content. When the current dialogue round is not the first round, the dialogue request initiated by the target object is rewritten to reduce interference from the target dialogue request on the generation of dialogue content. Simultaneously, it determines whether background information and / or historical dialogue information need to be introduced based on the target dialogue request. If it is determined that background information and / or historical dialogue information need to be introduced, the generated dialogue content can be generated with reference to the introduced background information and / or historical dialogue information, improving the consistency of dialogue content generation within the context. This ensures that the generated dialogue content has logical semantic consistency and guarantees the quality of the generated dialogue content.

[0085] This embodiment provides a method for memorizing the dialogue content of an intelligent agent, which can be used in computer devices such as computers, mobile phones, and tablets. Figure 6 This is a flowchart of a method for memorizing the dialogue content of an intelligent agent according to an embodiment of this disclosure, such as... Figure 6 As shown, the process includes the following steps:

[0086] Step S301: Obtain the current dialogue turn between the target object and the virtual object. For details, please refer to the relevant descriptions of the corresponding steps in the above-described embodiments; they will not be repeated here.

[0087] Step S302: Based on the dialogue features of the current dialogue round, generate the dialogue content between the target object and the virtual object in the current dialogue round. For details, please refer to the relevant descriptions of the corresponding steps in the above-described embodiments, which will not be repeated here.

[0088] Step S303: If the dialogue content triggers the memory generation condition, then the dialogue content is memorized to generate dialogue memory data.

[0089] Specifically, step S303 includes:

[0090] Step S3031: If the dialogue content triggers the memory generation condition, determine the target dialogue content to be memorized.

[0091] When the dialogue content triggers the memory generation condition, the target dialogue content to be memorized is extracted from the dialogue content generated in the current dialogue round. Specifically, if the memory generation condition is exiting the current dialogue round, then when the target object exits the current dialogue round, all dialogue content generated in the current dialogue round is identified as the target dialogue content to be memorized.

[0092] If the memory generation condition is that the number of dialogues reaches a preset number, then the number of dialogues between the target object and the virtual object in the current dialogue round is counted to determine whether the preset number has been reached. When it is determined that the number of dialogues has reached the preset number, the dialogue content generated within the predicted number of dialogues is determined as the target dialogue content to be memorized.

[0093] Step S3032: Obtain the memory type for the target dialogue content.

[0094] Memory type is used to characterize the way target dialogue content is remembered. This memory type is pre-defined by the target object when constructing the chat scene. If the dialogue content of the current conversation round triggers the memory condition, the social application can determine the memory type for the target dialogue content by parsing the chat scene's construction configuration information.

[0095] Step S3033: Memorize the target dialogue content according to the memory type and generate dialogue memory data.

[0096] The target dialogue content is vectorized according to memory type, generating vectorized dialogue content, which is then stored in a vector database. Simultaneously, additional information corresponding to the target dialogue content (such as dialogue creation / expiration time, memory type, chat scene identifier, target object identifier, role identifier, and dialogue identifier) ​​is obtained and stored in the vector database. Figure 7 As shown, additional information stored in the vector database, along with vectorized content, is identified as dialogue memory data.

[0097] In some alternative implementations, such as Figure 7 As shown, memory types can specifically include one or more of the following: original dialogue memory, dialogue summary memory, and target object memory. Original dialogue memory refers to memorizing the content of a target dialogue; dialogue summary memory refers to memorizing the content of a summarized target dialogue; and target object memory refers to memorizing the dialogue content corresponding to the target object.

[0098] The above implementation supports the generation of dialogue content according to multiple memory types, realizing the diversification of dialogue content generation and making it easy to adapt to various group chat scenarios.

[0099] In some optional implementations, step S3033 above includes:

[0100] Step d1: Extract the key fields from the target dialogue content.

[0101] Step d2: Vectorize the target dialogue content according to the memory type to generate vectorized text of the target dialogue content.

[0102] Step d3 involves memorizing the target dialogue content based on vectorized text and key fields to generate dialogue memory data.

[0103] Key fields are fields that represent key information in the target dialogue content. These key fields are determined from the database fields (pre-defined fields used to ensure that all dialogue content can be accurately entered into the database) according to the memory type. Specifically, they may include dialogue creation / expiration time fields, target object identification fields, role fields, dialogue summary fields, dialogue record fields, chat scene identification fields, etc.

[0104] By using a vectorization model to vectorize the target dialogue content according to memory type, the corresponding vectorized text is obtained. Specifically, text vectorization can include vectorizing the original target dialogue content; vectorizing a summary of the target dialogue content; and vectorizing the dialogue content of the target object.

[0105] The vectorized text is memorized according to key fields to generate dialogue memory data corresponding to the target dialogue content. Subsequently, the target dialogue content in the vector database can be filtered according to key fields to select the corresponding dialogue content.

[0106] Specifically, target dialogue content in the vector database can be filtered according to key fields, and the dialogue content can be inverted according to timestamps. The n closest dialogues from the inverted results are then selected as the relevant dialogue content for retrieval. Alternatively, after selecting the n closest dialogues from the inverted results, relevant dialogue content can be retrieved based on vector similarity.

[0107] In the above implementation, by memorizing the target dialogue content according to key fields and vectorized text, the target dialogue content and key fields are indexed in the vector database. This facilitates the retrieval of relevant content by combining key fields, thereby improving retrieval efficiency and accuracy.

[0108] When the memory type is target object memory, the above step S3033 includes:

[0109] Step e1: Retrieve the historical dialogue summary information between the last time the target object was remembered and the current time the target object was remembered, and extract the dialogue attribute information of the target object from the historical dialogue summary information.

[0110] Step e2: Based on the dialogue attribute information, memorize the target dialogue content and generate dialogue memory data.

[0111] Dialogue attribute information is used to characterize the dialogue features of the target object in the dialogue, specifically including the target object's basic profile information and preference profile information.

[0112] The system retrieves historical dialogue summaries from the last memory of the target object to the current memory of the target object from the vector database, parses these summaries, identifies dialogue information related to the target object within them, and extracts the target object's dialogue attribute information from the dialogue information, such as... Figure 7 As shown, the target dialogue content is memorized according to preset input fields and dialogue attribute information, generating corresponding dialogue memory data. The preset input fields ensure that all dialogue content related to the target object can be accurately input into the database. These fields may include user identifier fields, user configuration information input time / dialogue time fields, role identifier fields, dialogue environment fields, memorized content fields, and additional information fields, etc., but are not specifically limited here.

[0113] In the above implementation, when the memory type is target object memory, the historical dialogue summary information between the last target object memory and the current target object memory is retrieved to accurately extract the dialogue attribute information of the target object. Then, the target dialogue content is memorized according to the dialogue attribute information, thereby realizing the matching between dialogue attribute information and target dialogue content. Long-term memory of target dialogue content is achieved from the dimension of dialogue attribute information, which facilitates subsequent retrieval of related content according to dialogue attribute information.

[0114] In some optional implementations, the above method further includes:

[0115] Step f1 displays the dialog parameter configuration interface between the target object and the virtual object.

[0116] Step f2: In response to the parameter configuration operation generated in the dialogue parameter configuration interface, determine the dialogue parameters between the target object and the virtual object based on the parameter configuration operation.

[0117] The dialogue parameter configuration interface is used to set the parameters for dialogue between the target object and the virtual object. This dialogue parameter configuration interface can include multiple dialogue parameters such as the object name of the virtual object (e.g., the character name of the virtual object), the character identifier (e.g., the character ID), the target object identifier (e.g., the user ID), and the background genre file identifier (e.g., the novel background ID).

[0118] The target object can configure various dialogue parameters in the dialogue parameter configuration interface according to its actual dialogue needs. Correspondingly, the dialogue parameter configuration interface can respond to the parameter configuration operation generated by the target object in the dialogue parameter configuration interface, and determine the dialogue parameters required for the target object to have a dialogue with the virtual object according to the parameter configuration operation.

[0119] In the above implementation, the configuration of dialogue parameters is supported, realizing the configurability of dialogue parameters. This makes it easier for the target object to flexibly set the corresponding dialogue parameters according to actual needs, which is beneficial for simulating real group chat scenarios and thus greatly improving the dialogue experience between the target object and the virtual object.

[0120] In some optional implementations, the method further includes: in response to a dialogue memory configuration operation generated in the dialogue parameter configuration interface, processing the dialogue content generated in the current dialogue round based on the dialogue memory configuration operation.

[0121] The dialogue memory configuration operation refers to the operations performed during the current dialogue round, specifically including uploading the current dialogue for memory, clearing the current dialogue, and downloading the current dialogue. The dialogue parameter configuration interface includes corresponding controls for uploading, clearing, and downloading the current dialogue. The target object can trigger these controls to determine whether to upload, clear, or download the current dialogue for problem localization, etc. Correspondingly, the dialogue parameter configuration interface can process the dialogue content generated in the current dialogue round based on the dialogue memory configuration operation.

[0122] In the above embodiments, the memory configuration operation of dialogue content is supported, realizing the memory configuration of dialogue content, which makes it easier for the target object to flexibly determine the processing method of dialogue content according to actual needs.

[0123] The method for memorizing dialogue content provided in this embodiment obtains the memory type of the target dialogue content when the dialogue content triggers the memory generation condition, and memorizes the target dialogue content according to the memory type. This achieves diversified memory generation of the target dialogue content, making it easier for memory generation to adapt to various group chat scenarios. This allows the group chat scenario to simulate the real group chat scenario to a greater extent, thereby ensuring the user's group chat experience in various group chat scenarios.

[0124] This embodiment also provides a memory device for intelligent agent dialogue content, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0125] This embodiment provides a device for remembering the content of an agent's dialogue, such as... Figure 8 As shown, it includes:

[0126] The acquisition module 401 is used to acquire the current context dialogue information between the target object and the virtual object.

[0127] The dialogue content generation module 402 is used to generate the dialogue content of the virtual object in the current dialogue round based on the dialogue features of the current context dialogue information.

[0128] The dialogue content memory module 403 is used to remember the dialogue content and generate dialogue memory data if the dialogue content triggers the memory generation condition.

[0129] In some alternative implementations, the dialogue content generation module 402 includes:

[0130] The dialogue request acquisition unit is used to acquire the dialogue request of the target object in the current dialogue round.

[0131] The first-round detection unit is used to detect whether the current dialogue round is the first round of dialogue.

[0132] The first retrieval unit is used to retrieve the dialogue configuration information and dialogue-related knowledge of the target object based on the dialogue request if the current dialogue round is the first round of dialogue.

[0133] The first generation unit is used to generate dialogue content for the virtual object in response to the dialogue request in the current dialogue round, based on dialogue configuration information and dialogue-related knowledge.

[0134] In some optional implementations, the first generating unit includes:

[0135] The judgment subunit is used to determine whether historical dialogue information needs to be introduced based on dialogue configuration information and dialogue-related knowledge.

[0136] The history retrieval subunit is used to retrieve historical dialogue content related to the dialogue request from the historical dialogue information if it is necessary to import historical dialogue information.

[0137] The first generation subunit is used to generate the dialogue content of the virtual object in the current dialogue round based on the historical dialogue content.

[0138] In some alternative implementations, the dialogue content generation module 402 further includes:

[0139] The request rewriting unit is used to rewrite the dialogue request if the current dialogue round is not the first round of dialogue, so as to obtain the rewritten target dialogue request.

[0140] The information introduction judgment unit is used to determine whether background information and / or historical dialogue information need to be introduced based on the target dialogue request.

[0141] The second generation unit is used to generate the dialogue content of the virtual object in the current dialogue round based on the background information and / or historical dialogue information if background information and / or historical dialogue information need to be introduced.

[0142] In some optional implementations, the second generation unit includes:

[0143] The summary information retrieval subunit is used to retrieve the dialogue summary information corresponding to the historical dialogue information when historical dialogue information is introduced.

[0144] The second generation subunit is used to generate the dialogue content of the virtual object in the current dialogue round based on the dialogue summary information.

[0145] In some alternative embodiments, the above-described apparatus further includes:

[0146] The background information generation module is used to generate background information.

[0147] Specifically, the background information generation module includes:

[0148] The attribute extraction unit is used to obtain the background genre file and extract the text attribute information from the background genre file.

[0149] The first slicing unit is used to slice the text content of the background genre file to generate background slice content.

[0150] The summary unit is used to summarize the content of the background slice and generate slice summary information.

[0151] The vectorization unit is used to vectorize the text of the background slice content, and generates background information based on the text vectorization result, text attribute information and slice summary information.

[0152] In some alternative implementations, the dialogue content memory module 403 includes:

[0153] The target determination unit is used to determine the target dialogue content to be memorized if the dialogue content triggers the memory generation condition.

[0154] The memory type acquisition unit is used to acquire the memory type for the target dialogue content.

[0155] The memory data generation unit is used to memorize the target dialogue content according to the memory type and generate dialogue memory data.

[0156] In some alternative implementations, the memory type may specifically include one or more of the following: original conversation memory, conversation summary memory, and target object memory.

[0157] In some alternative implementations, the memory data generation unit includes:

[0158] The field extraction sub-unit is used to extract key fields from the target dialogue content.

[0159] The vectorization subunit is used to vectorize the target dialogue content according to the memory type, generating vectorized text of the target dialogue content.

[0160] The first memory subunit is used to memorize the target dialogue content based on vectorized text and key fields, generating dialogue memory data.

[0161] In some optional implementations, when the memory type is target object memory, the memory data generation unit includes:

[0162] The summary information retrieval subunit is used to retrieve historical dialogue summary information between the last time the target object was remembered and the current time the target object was remembered, and to extract the dialogue attribute information of the target object from the historical dialogue summary information.

[0163] The second memory subunit is used to memorize the target dialogue content based on dialogue attribute information and generate dialogue memory data.

[0164] In some alternative embodiments, the above-described apparatus further includes:

[0165] The configuration interface display module is used to display the dialogue parameter configuration interface between the target object and the virtual object.

[0166] The parameter configuration module is used to respond to parameter configuration operations generated in the dialogue parameter configuration interface and determine the dialogue parameters of the target object and the virtual object based on the parameter configuration operations.

[0167] In some alternative embodiments, the above-described apparatus further includes:

[0168] The memory configuration module is used to respond to the dialogue memory configuration operation generated in the dialogue parameter configuration interface and process the dialogue content generated in the current dialogue round based on the dialogue memory configuration operation.

[0169] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0170] In this embodiment, the memory device for the dialogue content is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0171] The intelligent agent dialogue content memory device provided in this embodiment obtains the current dialogue turn between the target object and the virtual object, and generates corresponding dialogue content based on the dialogue features of the current dialogue turn. This allows for the generation of dialogue content by referencing the dialogue data in the current dialogue turn, ensuring that the generated dialogue content matches the content of the current dialogue turn and improving the accuracy of dialogue content generation. When the dialogue content triggers the memory generation condition, the dialogue content generated in the current dialogue turn is memorized, thereby achieving long-term memory of the dialogue content. This facilitates accurate generation of dialogue content by referring to the long-term memory, further enhancing the user's chat experience in chat scenarios.

[0172] This disclosure also provides a computer device having the above-described features. Figure 8 The device for storing the dialogue content shown.

[0173] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of this disclosure, such as... Figure 9 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 9 Take a processor 10 as an example.

[0174] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0175] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.

[0176] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0177] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0178] The computer device also includes an input device 30 and an output device 40. The processor 10, memory 20, input device 30, and output device 40 can be connected via a bus or other means. Figure 9 Taking the example of a connection between China and Israel via a bus.

[0179] Input device 30 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the computer device, such as a touchscreen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 40 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.

[0180] The computer device also includes a communication interface for communicating with other devices or communication networks.

[0181] This disclosure also provides a computer-readable storage medium in which the methods described in this disclosure can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium after being downloaded over a network. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium may be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium may also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code that, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0182] A portion of this disclosure can be applied to computer program products, such as computer program instructions, which, when executed by a computer, can invoke or provide methods and / or technical solutions according to this disclosure through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, and installation package files. Accordingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions; the computer compiling the instructions and then executing the corresponding compiled program; the computer reading and executing the instructions; or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0183] Although embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. An agent method for memorizing content of a dialogue, the method comprising: The method comprises: obtaining current contextual dialogue information of a target object and a virtual object; generating dialogue content of the virtual object in a current dialogue turn based on dialogue features of the current contextual dialogue information; if the dialogue content triggers a memory generation condition, memorizing the dialogue content to generate long-term memory dialogue memory data; if the dialogue content triggers a memory generation condition, memorizing the dialogue content to generate long-term memory dialogue memory data, comprising: if the dialogue content triggers a memory generation condition, determining target dialogue content to be memorized; obtaining a memory type for the target dialogue content, the memory type comprising at least one of original dialogue memory, dialogue summary memory, and target object memory, the original dialogue memory indicating memorizing the target dialogue content, the dialogue summary memory indicating memorizing after summarizing the target dialogue content, and the target object memory indicating memorizing according to dialogue content corresponding to the target object; memorizing the target dialogue content according to the memory type to generate the dialogue memory data; when the memory type is the target object memory, the memorizing the target dialogue content according to the memory type to generate the dialogue memory data comprises: retrieving historical dialogue summary information between last target object memory and current target object memory, and extracting dialogue attribute information of the target object from the historical dialogue summary information, the dialogue attribute information comprising basic portrait information and preference portrait information of the target object; memorizing the target dialogue content according to a preset storage field and the dialogue attribute information to generate the dialogue memory data, the preset storage field being used to ensure that all dialogue content related to the target object is accurately stored.

2. The method of claim 1, wherein, The generating dialogue content of the virtual object in a current dialogue turn based on dialogue features of the current contextual dialogue information comprises: obtaining a dialogue request of the target object in the current dialogue turn; detecting whether the current dialogue turn is a first dialogue turn; if the current dialogue turn is a first dialogue turn, retrieving dialogue configuration information and dialogue-related knowledge of the target object based on the dialogue request; generating dialogue content of the virtual object in the current dialogue turn for the dialogue request based on the dialogue configuration information and the dialogue-related knowledge.

3. The method of claim 2, wherein, The generating dialogue content of the virtual object in a current dialogue turn for a dialogue request based on dialogue configuration information and dialogue-related knowledge comprises: judging whether historical dialogue information needs to be introduced based on the dialogue configuration information and the dialogue-related knowledge; if the historical dialogue information needs to be introduced, retrieving historical dialogue content related to the dialogue request from the historical dialogue information; generating dialogue content of the virtual object in the current dialogue turn according to the historical dialogue content.

4. The method of claim 2, wherein, Further comprising: if the current dialogue turn is not a first dialogue turn, rewriting the dialogue request to obtain a rewritten target dialogue request; determine whether background information and / or historical dialogue information needs to be introduced based on the target dialogue request; if the background information and / or the historical dialogue information needs to be introduced, generate dialogue content of the virtual object in the current dialogue turn based on the background information and / or the historical dialogue information.

5. The method of claim 4, wherein, Further comprising: when the historical dialogue information is introduced, retrieve dialogue summary information corresponding to the historical dialogue information; generate dialogue content of the virtual object in the current dialogue turn according to the dialogue summary information.

6. The method of claim 4, wherein, The generation of the background information comprises: obtain a background genre file, and extract text attribute information in the background genre file; slice the text content of the background genre file to generate background slice content; summarize the background slice content to generate slice summary information; text vectorize the background slice content, the text attribute information, and the slice summary information to obtain the background information.

7. The method of claim 1, wherein, The memory type comprises: extract a key field of the target dialogue content; text vectorize the target dialogue content according to the memory type to generate a vectorized text of the target dialogue content; memory the target dialogue content based on the vectorized text and the key field to generate the dialogue memory data.

8. The method of claim 1, wherein, Further comprising: display a dialogue parameter configuration interface of the target object and the virtual object; determine dialogue parameters of the target object and the virtual object based on a parameter configuration operation generated in the dialogue parameter configuration interface.

9. The method of claim 8, wherein, Further comprising: respond to a dialogue memory configuration operation generated in the dialogue parameter configuration interface, and process dialogue content generated in the current dialogue turn based on the dialogue memory configuration operation.

10. A memory device for the content of a dialogue between an intelligent agent, characterized in that, The device comprises: an acquisition module configured to acquire current contextual dialogue information of a target object and a virtual object; a dialogue content generation module configured to generate dialogue content of the virtual object in a current dialogue turn based on dialogue features of the current contextual dialogue information; a dialogue content memory module configured to memorize the dialogue content to generate dialogue memory data of long-term memory if the dialogue content triggers a memory generation condition; The dialogue content memory module comprises: a target determination unit configured to determine target dialogue content to be memorized if the dialogue content triggers the memory generation condition; a memory type acquisition unit configured to acquire a memory type for the target dialogue content, the memory type comprising at least one of original dialogue memory, dialogue summary memory, and target object memory, the original dialogue memory indicating that the target dialogue content is memorized, the dialogue summary memory indicating that the target dialogue content is memorized after summarization, and the target object memory indicating that dialogue content corresponding to the target object is memorized; a memory data generation unit configured to memorize the target dialogue content according to the memory type to generate the dialogue memory data. The memory data generation unit is configured to, when the memory type is the target object memory, retrieve historical conversation summary information between last target object memory and current target object memory, extract conversation attribute information of the target object from the historical conversation summary information, the conversation attribute information including basic portrait information and preference portrait information of the target object; and store the target conversation content according to a preset storage field and the conversation attribute information, to generate the conversation memory data, and the preset storage field is configured to ensure that all conversation contents related to the target object are accurately stored.

11. A computer device, characterized by The memory and the processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the memory method of the conversation content according to any one of claims 1 to 9. The computer readable storage medium stores computer instructions, and the computer instructions are used to make the computer execute the memory method of the conversation content according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and the computer instructions are used to make the computer execute the memory method of the conversation content according to any one of claims 1 to 9.

13. A computer program product, characterised in that, The computer readable storage medium stores computer instructions, and the computer instructions are used to make the computer execute the memory method of the conversation content according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Data processing method for chat and related device

    CN114003702A

  • Content generation method and device, model construction method and device, data processing method and device, equipment and medium

    CN117151119A

  • Human-machine conversation method and apparatus, and electronic device

    WO2024169406A1