Dialogue content memorizing method and device, equipment, storage medium and program product

By obtaining and memorizing the dialogue content between the target object and the virtual object, the problem that the character agent has difficulty in having long-term memory is solved, and the precise generation of dialogue content and the improvement of user chat experience is achieved.

CN119884350AActive Publication Date: 2025-04-25BEIJING VOLCANO ENGINE TECH CO LTD

Patent Information

Application Number
CN202411943569.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-25
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

In the role-playing group chat scenario, it is difficult for the character agent to have long-term memory, so it is difficult to extract data from long-term memory, resulting in inaccurate generation of dialogue content.

Method used

By obtaining the current context dialogue information between the target object and the virtual object, the dialogue content of the virtual object in the current dialogue round is generated based on the dialogue characteristics of the current context dialogue information, and the dialogue content is memorized when the memory generation condition is triggered to generate dialogue memory data.

Benefits of technology

It realizes long-term memory of dialogue content, facilitates subsequent reference to long-term memory for accurate generation of dialogue content, improves users' chat experience in chat scenes, and improves the accuracy of dialogue content generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884350A_ABST
    Figure CN119884350A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a dialogue content memorizing method and device, equipment, a storage medium and a program product. The method comprises the following steps: acquiring current context dialogue information of a target object and a virtual object; on the basis of dialogue characteristics of the current context dialogue information, dialogue content of the virtual object in the current dialogue round is generated; and if the dialogue content triggers the memory generation condition, memorizing the dialogue content, and generating dialogue memory data. By implementing the technical scheme of the invention, long-term memory of the dialogue content can be realized, subsequent accurate generation of the dialogue content by referring to the long-term memory is facilitated, and the chat experience of the user in the chat scene is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, equipment, storage medium and program product for memorizing conversation content. Background Art

[0002] Currently, many social applications support the construction of role-playing chat scenarios, such as a chat scenario between a user and a virtual character, a chat scenario between a user and multiple virtual characters, and a chat scenario between multiple users and multiple virtual characters, to meet the chat experience required by users. However, in a role-playing group chat scenario, it is difficult for the character agent to have long-term memory, making it difficult to extract data from the long-term memory, resulting in inaccurate generation of conversation content. Summary of the invention

[0003] In view of this, the present disclosure provides a method, device, equipment, storage medium and program product for memorizing conversation content to solve the problem of difficulty in generating long-term memory data of conversation content.

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

[0005] In a second aspect, the present disclosure provides a device for memorizing conversation content, including: an acquisition module for acquiring current context conversation information between a target object and a virtual object; a conversation content generation module for generating the conversation content of the virtual object in the current conversation round based on conversation features of the current context conversation information; and a conversation content memory module for memorizing the conversation content and generating conversation memory data if the conversation content triggers a memory generation condition.

[0006] In a third aspect, the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method for memorizing conversation content of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0007] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for memorizing conversation content of the first aspect or any corresponding embodiment thereof.

[0008] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, which are used to enable a computer to execute the method for memorizing conversation content of the first aspect or any corresponding embodiment thereof.

[0009] The method, device, equipment, storage medium and program product for memorizing the conversation content provided by the present disclosure obtain the current conversation round between the target object and the virtual object, and generate the corresponding conversation content in combination with the conversation features of the current conversation round, thereby being able to refer to the conversation data in the current conversation round to generate the conversation content, ensuring that the generated conversation content matches the content of the current conversation round, and improving the accuracy of the generation of the conversation content. When the conversation content triggers the memory generation condition, the conversation content generated in the current conversation round is memorized, thereby being able to achieve long-term memory of the conversation content, facilitating the subsequent accurate generation of the conversation content with reference to the long-term memory, and further improving the chat experience of the user in the chat scene. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0011] Figure 1 is a flowchart of a method for memorizing conversation content according to an embodiment of the present disclosure;

[0012] Figure 2 is a flowchart of another method for memorizing conversation content according to an embodiment of the present disclosure;

[0013] Figure 3 is a schematic diagram of generating the first round of dialogue content according to an embodiment of the present disclosure;

[0014] Figure 4 is a schematic diagram of generating non-first-round dialogue content according to an embodiment of the present disclosure;

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

[0016] Figure 6 is a flowchart of another method for memorizing conversation content according to an embodiment of the present disclosure;

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

[0018] Figure 8is a structural block diagram of a conversation content memory device according to an embodiment of the present disclosure;

[0019] Fig. 9 It is a schematic diagram of the hardware structure of the computer device of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present disclosure.

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

[0022] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0023] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

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

[0025] It is understandable 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 relevant provisions.

[0026] According to an embodiment of the present disclosure, an embodiment of a method for memorizing conversation content is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0027] In this embodiment, a method for memorizing conversation content is provided, which can be used in computer devices such as computers, mobile phones, tablet computers, etc. Figure 1 is a flow chart of a method for memorizing conversation content according to an embodiment of the present disclosure, such as Figure 1 As shown, the process includes the following steps:

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

[0029] The virtual object is a pre-set object participating in the dialogue, and the virtual object has a corresponding virtual role, such as a writer, a fitness expert, a scholar, etc. The current context dialogue information refers to the dialogue information formed by the target object and the virtual object speaking in turn during the dialogue process.

[0030] The target object creates a chat scene through a social application and sets a corresponding virtual object for the chat scene. Then, the target object can have a conversation with the virtual object it has set. During the conversation between the target object and the virtual object, the computer device can obtain the contextual conversation information formed by the target object and the virtual object speaking in sequence in the current chat scene.

[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] The dialogue features are specific attributes shown during the dialogue between the target object and the virtual object. The dialogue features are used to analyze the content, style, intention, and roles of the dialogue participants (target object and virtual object) between the virtual object and the target object. The current dialogue turn is the dialogue turn in which the target object currently initiates a dialogue request for the virtual object to respond.

[0033] Analyze the dialogue between the target object and the virtual object in the context dialogue information, determine the dialogue features of the virtual object in the current context dialogue information, and organize the dialogue content generated by the virtual object in response to the dialogue request of the target object in the form of streaming dialogue according to the dialogue features, so that the dialogue content matches the dialogue request of the target object. Streaming dialogue refers to a natural, continuous dialogue method without obvious pauses or interruptions.

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

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

[0036] In the process of generating the dialogue content in the current dialogue round, whether the dialogue content generated in the current dialogue round triggers the memory generation condition is detected in real time. If the dialogue content generated in the current dialogue round triggers the memory generation condition, the dialogue content generated in the current dialogue round is memorized to generate corresponding dialogue memory data.

[0037] The method for memorizing the conversation content provided in this embodiment obtains the current conversation round between the target object and the virtual object, and generates the corresponding conversation content in combination with the conversation features of the current conversation round, thereby being able to refer to the conversation data in the current conversation round to generate the conversation content, ensuring that the generated conversation content matches the content of the current conversation round, and improving the accuracy of the generation of the conversation content. When the conversation content triggers the memory generation condition, the conversation content generated in the current conversation round is memorized, thereby achieving long-term memory of the conversation content, facilitating the subsequent accurate generation of the conversation content with reference to the long-term memory, and further improving the chat experience of the user in the chat scene.

[0038] In this embodiment, a method for memorizing conversation content is provided, which can be used in computer devices such as computers, mobile phones, tablet computers, etc. Figure 2 is a flow chart of a method for memorizing conversation content according to an embodiment of the present disclosure, such as Figure 2 As shown, the process includes the following steps:

[0039] Step S201, obtaining current contextual dialogue information between the target object and the virtual object. For details, please refer to the description of the corresponding steps in the above exemplary embodiment, which 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, the above step S202 includes:

[0042] Step S2021, obtaining the dialogue request of the target object in the current dialogue round.

[0043] The dialogue request is a request from the target object to conduct a dialogue with the virtual object. For example, the target object may ask a question such as "A, I want to exercise recently, do you have any good suggestions?" Specifically, a social application is deployed in the computer device, and the target object can build a chat scene with the virtual object through the social application. When the target object initiates a dialogue request in the chat scene, the social application can obtain and respond to the dialogue request of the target object in the current dialogue round. Accordingly, the virtual object A in the chat scene can make a targeted reply according to the dialogue request initiated by the target object, and generate dialogue content matching the dialogue request.

[0044] Step S2022, detecting whether the current dialogue round is the first dialogue round.

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

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

[0047] The dialogue configuration information is the preference information set by the target object for the dialogue, such as topics of interest, virtual characters, etc.; the dialogue-related knowledge is the background knowledge related to the dialogue request, which is used to represent the previous information or knowledge required to understand a certain topic, event, concept or conduct a dialogue exchange. Specifically, the dialogue-related knowledge may include historical background, scientific principles, cultural customs, technical terms, etc. Figure 3 As shown, if it is determined that the current dialogue round is the first dialogue round, the dialogue request initiated by the target object is parsed, and the vector database is retrieved according to 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 expression, and the dialogue-related knowledge matching the dialogue request and the dialogue configuration information matching the target object are retrieved from the vector database using vector similarity.

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

[0050] According to the dialogue configuration information, the topic or content that the target object is interested in in the current dialogue round is determined, and the dialogue request is organized and replied according to the dialogue-related knowledge, and the corresponding dialogue content is generated in the form of a streaming dialogue, such as Figure 3 At the same time, the conversation configuration information and conversation-related knowledge are returned to the social application to facilitate subsequent calls by the social application.

[0051] In some optional implementations, the above step S2024 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 historical conversation information needs to be introduced, historical conversation content related to the conversation request is retrieved from the historical conversation information.

[0054] Step a3, generating the conversation content of the virtual object in the current conversation round according to the historical conversation content.

[0055] A pre-trained intent recognition model is deployed in the social application, and the intent recognition model is used to determine whether historical conversation information needs to be introduced. The intent recognition model can be trained based on a large language model architecture or a neural network model architecture, which is not specifically limited here.

[0056] like Figure 3 As shown, the dialogue configuration information and dialogue-related knowledge are input into the intent recognition model, and the intent recognition model determines whether it is necessary to introduce historical dialogue information at present. If it is necessary to introduce historical dialogue information, the vector database storing historical dialogue information is retrieved, and the historical dialogue content most relevant to the dialogue request is retrieved from the historical dialogue information in the vector database according to the vector similarity. Then, the retrieved most relevant historical dialogue content is introduced into the current dialogue round to generate the dialogue content for replying to the target object. If it is not necessary to introduce historical dialogue information, the dialogue content for replying to the target object is directly generated based on the dialogue-related knowledge and dialogue configuration information.

[0057] In the above implementation, the historical dialogue information is the long-term memory of the role agent. When the historical dialogue information is introduced, it means that the role agent has all the memories of the past dialogue rounds. Therefore, the historical dialogue content related to the dialogue request can be retrieved from the historical dialogue information, and the retrieval of the long-term memory data is realized, which is convenient for the role agent to refer to the long-term memory data to generate the dialogue content.

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

[0059] If the current dialogue round is not the first round of dialogue, it means that the target object is entering the dialogue round again to talk to the virtual object. At this time, the dialogue information generated in the previous round can be pulled and the dialogue request of the current round can be rewritten to reduce the content with ambiguous references and incoherent semantics in the dialogue request, so as to obtain a target dialogue request with clear references and smooth semantics, such as Figure 4 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 this time, it can be determined that "he" in the dialogue request refers to "character A", so the dialogue request initiated this time can be rewritten as "Why does character A like to eat food B" to avoid the virtual object's response deviation due to unclear reference of "he".

[0061] Step S2026: determine whether background information and / or historical conversation information needs to be introduced based on the target conversation request.

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

[0063] As mentioned above, an intent recognition model is deployed in the social application. The target conversation request is input into the intent recognition model, and the content carried by the target conversation request is parsed by the intent recognition model. The parsing result determines whether it is necessary to introduce background information, historical information, or both background information and historical conversation information. Figure 4 As shown, if background information and / or historical conversation information needs to be introduced, step S2027 is executed, otherwise the conversation-related knowledge matching the target conversation request is directly retrieved from the vector database, and the conversation content is generated according to the conversation-related knowledge.

[0064] Step S2027: If background information and / or historical dialogue information needs to be introduced, 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 needs to be introduced, the background segment most relevant to the target dialogue request is retrieved from the background information in the vector database, and / or, if historical dialogue information needs to be introduced, the dialogue content most relevant 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 conversation contents retrieved are assembled, and the assembled memory information is entered into the current conversation round to generate conversation contents to reply to the target object.

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

[0067] Step b1, when historical conversation information is introduced, the conversation summary information corresponding to the historical conversation information is retrieved.

[0068] Step b2: Generate the conversation content of the current conversation round according to the conversation summary information.

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

[0070] When historical conversation information needs to be introduced, the conversation summary information corresponding to the historical conversation information can be retrieved to retrieve information matching the target conversation request from the conversation summary information, and the retrieved matching information can be introduced into the current conversation round to generate conversation content corresponding to the target conversation request, and the conversation content can be replied to the target object in the form of a streaming conversation.

[0071] In the above implementation, when it is determined to introduce historical conversation information, the conversation summary information is retrieved to reduce the amount of data retrieval, thereby improving the efficiency of generating conversation content.

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

[0073] Step c1, obtaining a background genre file, and extracting text attribute information in the background genre file.

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

[0075] Step c3, summarize the background slice content and generate slice summary information.

[0076] Step c4, performing text vectorization on the background slice content, and generating background information based on the text vectorization result, text attribute information and slice summary information.

[0077] The background genre file is a pre-selected literary genre file with different dialogue characters, including various books, manually organized world view documents, etc. For example, the dialogue character is character C, and its corresponding background genre file is "XXX". The text attribute information is the attribute information carried in the background genre file for representing the text content, such as chapter identification, character identification, etc.

[0078] The background slice content can be generated by slicing the text content of the background genre file according to a preset length; or it can be generated by slicing the text content of the background genre file according to a semantic dimension, such as Figure 5 As shown; it can also be generated by using a slicing tool to adaptively slice the text content of the background genre file, such as Figure 5 Of course, other methods can also be used for slicing, which are not specifically limited here.

[0079] Summarize the background slice content obtained after the slice processing to determine the slice summary information. The slice summary information and the text attribute information are used as the additional field information of the text content, and the background slice content is vectorized using the vectorization model to obtain vectorized information. The additional field information and the vectorized information are determined as the background information, such as Figure 5 The background information is stored in the vector database according to the pre-set storage fields (such as chapter identification field, role identification field, original text segment field, original text summary field, additional field, file identification field, etc.), and the text content can be filtered according to the storage fields to select the corresponding text content, and then the relevant content can be retrieved according to the vector similarity.

[0080] In some optional implementations, before slicing, the text content of the background genre file is cleaned to remove irrelevant content and obtain processed text content. In a specific example, dirty text fragments (such as multiple blank lines, etc.) in the text content are filtered out in a regular matching manner to generate clean text content to improve the slicing effect of the text content.

[0081] In some optional implementations, after slicing, the background slice content may contain a large amount of dialogue, scene descriptions, low information density, incoherent plots, and other issues. The data enhancement model may be used to summarize and rewrite the background slice content to ensure the semantic integrity of the background slice content and enhance the information quality of the background slice content. The data enhancement model may be trained based on a large language model architecture, may be trained based on a deep learning model architecture, or may be trained based on a neural network model architecture, which is not specifically limited here.

[0082] In the above implementation, by obtaining the background genre file in advance and using the background genre file to generate background information, the character agent can refer to the background information it has to generate the dialogue content, thereby improving the accuracy of the generation of the dialogue content.

[0083] Step S203: if the conversation content triggers the memory generation condition, the conversation content is memorized to generate conversation memory data. For details, please refer to the relevant description of the corresponding steps in the above exemplary embodiment, which will not be repeated here.

[0084] The method for memorizing the dialogue content provided in this embodiment detects whether the current dialogue round is the first dialogue round, and determines the generation method of the dialogue content according to the detection result of the first dialogue round. When the current dialogue round is the first dialogue round, the dialogue configuration information and dialogue-related knowledge corresponding to the dialogue request are retrieved to generate the corresponding dialogue content, so that the generation of the dialogue content matches the role intelligent body, avoiding the generation of the dialogue content being simplistic, and ensuring that the dialogue content is more vivid and diversified. When the current dialogue round is not the first dialogue round, the dialogue request initiated by the target object is rewritten to reduce the interference of the target dialogue request on the generation of the dialogue content. At the same time, it is determined whether the background information and / or historical dialogue information needs to be introduced in combination with the target dialogue request. If it is determined that the background information and / or historical dialogue information needs to be introduced, the dialogue content can be generated with reference to the introduced background information and / or historical dialogue information, which improves the generation consistency of the dialogue content in the context, thereby ensuring that the generation of the dialogue content is logically semantically consistent and the generation quality of the dialogue content is guaranteed.

[0085] In this embodiment, a method for memorizing conversation content is provided, which can be used in computer devices such as computers, mobile phones, tablet computers, etc. Figure 6 is a flow chart of a method for memorizing conversation content according to an embodiment of the present disclosure, such as Figure 6 As shown, the process includes the following steps:

[0086] Step S301, obtaining the current dialogue turn between the target object and the virtual object. For details, please refer to the relevant description of the corresponding steps in the above exemplary embodiment, which will not be repeated here.

[0087] Step S302: Generate the conversation content between the target object and the virtual object in the current conversation round based on the conversation features of the current conversation round. Please refer to the description of the corresponding steps in the above exemplary embodiment for details, which will not be repeated here.

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

[0089] Specifically, the above step S303 includes:

[0090] Step S3031, if the conversation content triggers the memory generation condition, determine the target conversation content to be memorized.

[0091] When it is determined that the conversation content triggers the memory generation condition, the target conversation content to be memorized is extracted from the conversation content generated in the current conversation round. Specifically, if the memory generation condition is to exit the current conversation round, when the target object exits the current conversation round, all the conversation content generated in the current conversation round is determined as the target conversation content to be memorized.

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

[0093] Step S3032, obtaining the memory type for the target conversation content.

[0094] The memory type is used to characterize the way to memorize the target conversation content. The memory type is pre-set by the target object when building the chat scene. If the conversation content of the current conversation round triggers the memory condition, the social application can determine the memory type for the target conversation content by parsing the chat scene construction configuration information.

[0095] Step S3033, memorize the target conversation content according to the memory type to generate conversation memory data.

[0096] The target conversation content is vectorized according to the memory type to generate vectorized conversation content, and the vectorized conversation content is stored in the vector database. At the same time, additional information corresponding to the target conversation content (such as conversation creation / expiration time, memory type, chat scene identifier, target object identifier, role identifier, and conversation identifier, etc.) is obtained and stored in the vector database, such as Figure 7 The additional information and the vectorized content stored in the vector database are determined as the conversation memory data.

[0097] In some optional embodiments, such as Figure 7 As shown, the memory type may specifically include one or more of original dialogue memory, dialogue summary memory, and target object memory. Among them, original dialogue memory means memorizing the target dialogue content; dialogue summary memory means memorizing the target dialogue content after summarizing it; and target object memory means memorizing the dialogue content corresponding to the target object.

[0098] In the above implementation, it supports the generation of conversation content memories according to a variety of memory types, thereby achieving diversified generation of conversation content memories and facilitating adaptation to a variety of group chat scenarios.

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

[0100] Step d1, extracting key fields of the target conversation content.

[0101] Step d2, text vectorization is performed on the target conversation content according to the memory type to generate a vectorized text of the target conversation content.

[0102] Step d3, memorize the target conversation content based on the vectorized text and key fields to generate conversation memory data.

[0103] The key field is a field that represents the key information of the target conversation content. The key field is determined from the storage field (a pre-set field used to ensure that all conversation content can be accurately stored) according to the memory type. Specifically, it may include the conversation creation / expiration time field, the target object identification field, the role field, the conversation summary field, the conversation record field, the chat scene identification field, etc.

[0104] The target conversation content is text-vectorized using the vectorization model according to the memory type to obtain the vectorized text corresponding to the target conversation content. Specifically, the text vectorization may include text vectorizing the original target conversation content; text vectorizing the summary of the target conversation content; and text vectorizing the conversation content of the target object.

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

[0106] Specifically, the target conversation content in the vector database can be filtered according to the key field, and the conversation content can be reversed according to the timestamp, and the nearly n conversations can be selected as the retrieved related conversation content based on the reversed result. It is also possible to retrieve the relevant conversation content based on the vector similarity after selecting the nearly n conversations based on the reversed result.

[0107] In the above implementation, the target conversation content is memorized according to key fields and vectorized text to achieve indexing of the target conversation content and key fields in the vector database, which is beneficial for retrieving related content in combination with key fields, thereby improving retrieval efficiency and retrieval accuracy.

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

[0109] Step e1, retrieving historical conversation summary information between the last target object memory and the current target object memory, and extracting conversation attribute information of the target object from the historical conversation summary information.

[0110] Step e2, memorizing the target conversation content based on the conversation attribute information to generate conversation memory data.

[0111] The conversation attribute information is used to characterize the conversation characteristics of the target object in the conversation, including the basic portrait information and preference portrait information of the target object.

[0112] The historical dialogue summary information between the last target object memory and the current target object memory in the vector database is retrieved, and the historical dialogue summary information is parsed to determine the dialogue information related to the target object contained in the historical dialogue summary information, and the dialogue attribute information of the target object is extracted from the dialogue information, such as Figure 7 As shown. The target conversation content is memorized according to the preset storage fields and conversation attribute information to generate corresponding conversation memory data. Among them, the preset storage fields are used to ensure that all conversation contents related to the target object can be accurately stored, and may specifically include user identification fields, storage time fields / conversation time fields of user configuration information, role identification fields, conversation environment fields, memory content fields, additional information fields, etc., which are not specifically limited here.

[0113] In the above implementation, when the memory type is target object memory, the historical conversation summary information between the last target object memory and the current target object memory is retrieved in order to accurately extract the conversation attribute information of the target object, and then the target conversation content is memorized according to the conversation attribute information, thereby achieving a match between the conversation attribute information and the target conversation content, and realizing long-term memory of the target conversation content from the dimension of the conversation attribute information, which facilitates the subsequent retrieval of related content according to the conversation attribute information.

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

[0115] Step f1, displaying the dialogue parameter configuration interface between the target object and the virtual object.

[0116] Step f2, in response to a parameter configuration operation generated in the dialogue parameter configuration interface, determining 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 the target object to conduct dialogues with the virtual object. The dialogue parameter configuration interface may include dialogue parameters such as the object name of multiple virtual objects (such as the character name of the virtual object), character identifier (such as character ID), target object identifier (such as user ID), background genre file identifier (such as novel background ID), etc.

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

[0119] In the above implementation, the configuration operation of the dialogue parameters is supported, and the configuration of the dialogue parameters is realized, which is convenient for the target object to flexibly set the corresponding dialogue parameters according to actual needs, which is conducive to simulating real group chat scenarios, thereby 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 turn based on the dialogue memory configuration operation.

[0121] The dialogue memory configuration operation is an operation generated for the current round of dialogue, including uploading the current round of dialogue for memory, clearing the current round of dialogue, downloading the current round of dialogue, etc. The dialogue parameter configuration interface is provided with corresponding controls for uploading the current round of dialogue, clearing the current round of dialogue, and downloading the current round of dialogue. The target object can determine whether to upload the current round of dialogue for memory, clear the current round of dialogue, or download the current round of dialogue for problem location, etc. by triggering the corresponding controls in the dialogue parameter configuration interface. Accordingly, the dialogue parameter configuration interface can process the dialogue content generated by the current dialogue round based on the dialogue memory configuration operation.

[0122] In the above implementation, the memory configuration operation of the conversation content is supported, and the memory configuration of the conversation content is realized, which is convenient for the target object to flexibly determine the processing method of the conversation content according to actual needs.

[0123] The conversation content memorizing method provided in this embodiment, when the conversation content triggers the memory generation condition, obtains the memory type of the target conversation content and memorizes the target conversation content according to the memory type, thereby realizing diversified memory generation of the target conversation content, facilitating memory generation to adapt to a variety of group chat scenarios, so that the group chat scenario can simulate the real group chat scenario to a greater extent, thereby ensuring the group chat experience of users in various group chat scenarios.

[0124] In the present embodiment, a memory device for the content of a conversation is also provided, and the device is used to implement the above-mentioned embodiment and the preferred implementation mode, and the description thereof has been made no further. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and contemplated.

[0125] This embodiment provides a device for storing conversation content, such as Figure 8 As shown, including:

[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 conversation content memory module 403 is used to memorize the conversation content and generate conversation memory data if the conversation content triggers the memory generation condition.

[0129] In some optional 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 dialogue round.

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

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

[0135] The judgment subunit is used to judge whether it is necessary to introduce historical dialogue information based on the dialogue configuration information and dialogue-related knowledge.

[0136] The history retrieval subunit is used to retrieve the historical conversation content related to the conversation request from the historical conversation information if the historical conversation information needs to be introduced.

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

[0138] In some optional 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 dialogue round, so as to obtain a rewritten target dialogue request.

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

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

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

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

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

[0145] In some optional embodiments, the above device further includes:

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

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

[0148] The attribute extraction unit is used to obtain a background genre file and extract text attribute information in 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 background slice content and generate slice summary information.

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

[0152] In some optional implementations, the conversation content memory module 403 includes:

[0153] The target determination unit is used to determine the target conversation content to be memorized if the conversation 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 generating unit is used to memorize the target dialogue content according to the memory type and generate dialogue memory data.

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

[0157] In some optional implementations, the memory data generating unit includes:

[0158] The field extraction subunit is used to extract key fields of the target conversation content.

[0159] The vectorization subunit is used to perform text vectorization on the target conversation content according to the memory type, and generate vectorized text of the target conversation content.

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

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

[0162] The summary information retrieval subunit is used to retrieve the historical dialogue summary information between the last target object memory and the current target object memory, and 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 conversation content based on the conversation attribute information and generate conversation memory data.

[0164] In some optional embodiments, the above device 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 the parameter configuration operation generated in the dialogue parameter configuration interface and determine the dialogue parameters between the target object and the virtual object based on the parameter configuration operation.

[0167] In some optional embodiments, the above device 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] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

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

[0171] The conversation content memory device provided in this embodiment obtains the current conversation round between the target object and the virtual object, and generates the corresponding conversation content in combination with the conversation features of the current conversation round, thereby being able to refer to the conversation data in the current conversation round to generate the conversation content, ensuring that the generated conversation content matches the content of the current conversation round, and improving the accuracy of the generation of the conversation content. When the conversation content triggers the memory generation condition, the conversation content generated in the current conversation round is memorized, thereby achieving long-term memory of the conversation content, facilitating the subsequent accurate generation of the conversation content by referring to the long-term memory, and further improving the chat experience of the user in the chat scene.

[0172] The present disclosure also provides a computer device having the above Figure 8 A memory device for the content of the conversation shown.

[0173] See also Fig. 9 , Fig. 9 is a schematic diagram of a computer device provided by an optional embodiment of the present disclosure, such as Fig. 9 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 10 is taken as an example.

[0174] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0175] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0176] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0177] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a 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, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.

[0179] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0180] The computer device also includes a communication interface, which is used for the computer device to communicate with other devices or a communication network.

[0181] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0182] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

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

Claims

1. A method for memorizing conversation content, characterized in that: The method comprises: Get the current context dialogue information between the target object and the virtual object; Based on the dialogue features of the current context dialogue information, generating the dialogue content of the virtual object in the current dialogue round; If the conversation content triggers a memory generation condition, the conversation content is memorized to generate conversation memory data.

2. The method according to claim 1, characterized in that The generating the conversation content of the virtual object in the current conversation round based on the conversation feature of the current context conversation information includes: Obtaining a dialogue request of the target object in the current dialogue round; Detecting whether the current dialogue round is the first dialogue round; If the current dialogue round is the first dialogue round, retrieving the dialogue configuration information and dialogue-related knowledge of the target object based on the dialogue request; Based on the dialogue configuration information and the dialogue-related knowledge, a dialogue content of the virtual object in response to the dialogue request in the current dialogue round is generated.

3. The method according to claim 2, characterized in that The generating, based on the dialogue configuration information and the dialogue-related knowledge, the dialogue content of the virtual object in the current dialogue round for the dialogue request includes: Based on the dialog configuration information and the dialog-related knowledge, determining whether it is necessary to introduce historical dialog information; If the historical conversation information needs to be introduced, the historical conversation content related to the conversation request is retrieved from the historical conversation information; The conversation content of the virtual object in the current conversation round is generated according to the historical conversation content.

4. The method according to claim 2, characterized in that: Also includes: If the current dialogue round is not the first dialogue round, rewriting the dialogue request to obtain a rewritten target dialogue request; Determining 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, the dialogue content of the virtual object in the current dialogue round is generated based on the background information and / or the historical dialogue information.

5. The method according to claim 4, characterized in that Also includes: When the historical conversation information is introduced, retrieving the conversation summary information corresponding to the historical conversation information; Generate the conversation content of the virtual object in the current conversation round according to the conversation summary information.

6. The method according to claim 4, characterized in that The generation of the background information includes: Acquire a background genre file, and extract text attribute information from the background genre file; Slicing the text content of the background genre file to generate background slice content; Summarizing the background slice content to generate slice summary information; Text vectorization is performed on the background slice content, the text attribute information and the slice summary information to obtain the background information.

7. The method according to claim 1, characterized in that If the conversation content triggers a memory generation condition, the conversation content is memorized to generate conversation memory data, including: If the conversation content triggers a memory generation condition, determining a target conversation content to be memorized; Obtaining a memory type for the target conversation content; The target conversation content is memorized according to the memory type to generate the conversation memory data.

8. The method according to claim 7, characterized in that The step of memorizing the target conversation content according to the memory type to generate the conversation memory data includes: Extracting key fields of the target conversation content; Performing text vectorization on the target conversation content according to the memory type to generate a vectorized text of the target conversation content; The target conversation content is memorized based on the vectorized text and the key fields to generate the conversation memory data.

9. The method according to claim 7, characterized in that: The memory type includes at least one of original conversation memory, conversation summary memory and target object memory; When the memory type is the target object memory, memorizing the target conversation content according to the memory type to generate the conversation memory data includes: Retrieving historical conversation summary information between the last target object memory and the current target object memory, and extracting conversation attribute information of the target object from the historical conversation summary information; The target conversation content is memorized based on the conversation attribute information to generate the conversation memory data.

10. The method according to claim 1, characterized in that Also includes: Displaying a dialogue parameter configuration interface between the target object and the virtual object; In response to a parameter configuration operation generated in the dialogue parameter configuration interface, a dialogue parameter between the target object and the virtual object is determined based on the parameter configuration operation.

11. The method according to claim 10, characterized in that Also includes: In response to a dialogue memory configuration operation generated in the dialogue parameter configuration interface, the dialogue content generated in the current dialogue round is processed based on the dialogue memory configuration operation.

12. A device for memorizing conversation content, characterized in that: The device comprises: An acquisition module, used to acquire current context dialogue information between the target object and the virtual object; A dialogue content generation module, 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; The conversation content memory module is used to memorize the conversation content and generate conversation memory data if the conversation content triggers a memory generation condition.

13. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for memorizing the conversation content according to any one of claims 1 to 11 by executing the computer instructions.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for memorizing conversation content according to any one of claims 1 to 11.

15. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the method for memorizing conversation content according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Multi-round dialogue processing method, device and equipment

    CN110032633A

  • 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

  • System for acquiring special domain knowledge of natural medicinal materials

    CN117648424A

  • Memory enhancement reply method and device of dialogue system and electronic equipment

    CN118153687A

Cited By

  • Data archiving method, data retrieval method, data archiving device, data retrieval device, medium, equipment and product

    CN120705274A