Conversation processing method and device, program product and electronic equipment

By using historical conversation information in the database to filter candidate response information in the service robot, the problem of the service robot's inability to respond accurately is solved, and the accuracy of the response and user experience are improved.

CN120632022APending Publication Date: 2025-09-12HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510687979.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing service robots are unable to accurately respond to users' questions, resulting in a reduced user experience.

Method used

By receiving the first dialogue information, using the historical dialogue information stored in the database to determine the memory information, screening the candidate reply information, and determining the target reply information based on the candidate reply information, the accuracy of the reply is improved.

Benefits of technology

The accuracy of the answers is improved, making the answers more in line with the user's question and answer habits and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632022A_ABST
    Figure CN120632022A_ABST
Patent Text Reader

Abstract

The invention provides a dialogue processing method and device, a program product and electronic equipment, and relates to the technical field of computers. The method comprises the following steps: receiving first dialogue information, and screening at least one piece of candidate reply information matched with the first dialogue information from a database according to the first dialogue information; wherein the database comprises memory information determined according to historical dialogue information; and determining target reply information according to the at least one piece of candidate reply information. According to the method, the memory information is obtained by deeply mining the dialogue information of the first account corresponding to the first dialogue in advance, and the memory information is stored in the database, so that when the first dialogue information is received, the memory information obtained based on deep mining can be obtained from the database, questions in the dialogue are answered, and the dialogue efficiency is improved. And the reply accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer technology, and more specifically, to a dialogue processing method, a dialogue processing device, a computer program product, and an electronic device. Background Art

[0002] Currently, with the continuous development of technology and the continuous expansion of user needs, various types of service robots have been developed and used. For example, service robots that provide users with search functions, service robots that provide users with product consultation services, and service robots that provide users with chat services. Summary of the Invention

[0003] However, the service robots that provide services to users in related technologies can only respond to questions raised by users based on the current round of dialogue. There may be situations where they cannot accurately respond to questions raised by users, thereby reducing the user experience.

[0004] In view of this, the present disclosure provides a conversation processing method, a conversation processing device, a computer program product, and an electronic device to improve the accuracy of responses to a certain extent, thereby enhancing the user experience.

[0005] According to a first aspect of the present disclosure, a method for processing a conversation is provided, the method comprising:

[0006] receiving a first conversation message;

[0007] screening at least one candidate reply message matching the first conversation information from a database based on the first conversation information; wherein the database includes memory information determined based on historical conversation information;

[0008] Target reply information is determined according to the at least one candidate reply information.

[0009] In a possible implementation, before receiving the first conversation information, the method further includes:

[0010] Determining historical conversation information corresponding to the first account to which the first conversation information belongs;

[0011] Processing the historical conversation information to obtain memory information;

[0012] Vectorization is performed on the memory information to obtain a memory vector, and the memory vector is stored in the database.

[0013] In one possible implementation, processing the historical conversation information to obtain memory information includes:

[0014] Processing the historical conversation information to obtain observation memory information, and determining insight memory information based on the observation memory information;

[0015] The vectorizing the memory information to obtain a memory vector includes:

[0016] Vectorization processing is performed on the observation memory information and the insight memory information to obtain an observation memory vector and an insight memory vector.

[0017] In one possible implementation, processing the historical conversation information to obtain observation memory information includes:

[0018] Determining whether the historical conversation information stored in the first storage repository meets a preset processing condition;

[0019] When it is determined that the historical conversation information stored in the first repository meets the preset processing condition, a preset model is called to perform multiple processing on the historical conversation information to obtain observation memory information.

[0020] In one possible implementation, determining whether the historical conversation information stored in the first storage repository meets a preset processing condition includes:

[0021] Determining whether a storage duration of the historical conversation information stored in the first storage repository reaches a first threshold;

[0022] If it is determined that the storage duration of the historical conversation information stored in the first repository does not reach the first threshold, and it is determined that the amount of historical conversation information stored in the first repository reaches the second threshold, then it is determined that the preset processing condition is met;

[0023] If it is determined that the storage duration of the historical conversation information stored in the first storage repository reaches the first threshold, it is determined that the preset processing condition is met.

[0024] In one possible implementation, a preset model is called to perform multiple processing on the historical conversation information to obtain observation memory information, including:

[0025] Calling the preset model to perform filtering processing on the historical conversation information according to the first processing rule to obtain real information;

[0026] Calling the preset model to perform memory retrieval processing on the real information according to the second processing rule to obtain initial observation memory information;

[0027] The preset model is called to perform deduplication processing on the initial observation memory information according to the third processing rule to obtain the observation memory information.

[0028] In one possible implementation, determining insight memory information based on the observation memory information includes:

[0029] When it is determined that the amount of information in the observed memory information reaches a third threshold, performing keyword extraction processing on the observed memory information to obtain newly generated attribute keywords;

[0030] Adding the newly generated attribute keyword to the existing attribute keyword list to obtain an updated attribute keyword list;

[0031] The updated sub-insight memory information of each attribute keyword in the updated attribute keyword list is determined to obtain the insight memory information.

[0032] In a possible implementation, performing keyword extraction processing on the observation memory information to obtain newly generated attribute keywords includes:

[0033] Obtaining existing attribute keywords from the existing attribute keyword list;

[0034] Based on the existing attribute keywords, keyword extraction processing is performed on the observation memory information to obtain newly generated attribute keywords.

[0035] In a possible implementation, determining to update associated memory information for each attribute keyword in the updated attribute keyword list to obtain the insight memory information includes:

[0036] Determining existing sub-insight memory information for each attribute keyword;

[0037] Determining, from the observation memory information, respectively, mining insight memory information having a matching similarity greater than a fourth threshold with each of the sub-insight memory information;

[0038] According to each of the obtained mining insight memory information and the corresponding existing sub-insight memory information, the updated sub-insight memory information of each attribute keyword is determined to obtain the insight memory information.

[0039] In a possible implementation, screening at least one candidate reply information matching the first conversation information from a database according to the first conversation information includes:

[0040] The first dialogue information is converted into a first dialogue vector, and at least one candidate answer vector matching the first dialogue vector is screened from a database.

[0041] In one possible implementation, converting the first dialogue information into a first dialogue vector includes:

[0042] performing a first formatting process on the first dialogue information to obtain first formatted information;

[0043] When it is determined that the first formatted information includes time information, formatting the time information in the first formatted information to obtain second formatted information;

[0044] Perform vector conversion processing on the second formatted information to obtain a first dialogue vector.

[0045] In one possible implementation, determining target response information according to the at least one candidate response information includes:

[0046] screening the at least one candidate response vector to determine a target response vector;

[0047] The target response vector is converted to obtain target response information.

[0048] In one possible implementation, screening the at least one candidate response vector to determine a target response vector includes:

[0049] calling a preset ranking model to rank the at least one candidate answer vector to obtain a first ranking result including a plurality of first ranking values, and performing an initial screening on the at least one candidate answer vector according to the first ranking result to obtain a first candidate answer vector set;

[0050] The first candidate response vector set is sorted to obtain a second sorting result, and the first candidate response vector set is screened according to the second sorting result to obtain a target response vector.

[0051] In a possible implementation, sorting the first candidate answer vector set to obtain a second sorting result includes:

[0052] Determine a first weight and a second weight corresponding to each candidate answer vector in the first set of candidate answer vectors;

[0053] Determine a second ranking value corresponding to each candidate answer vector according to the first weight and the second weight corresponding to each candidate answer vector and the first ranking value;

[0054] A second ranking result is obtained according to the second ranking value corresponding to each candidate answer vector.

[0055] In a possible implementation, the first weight is determined based on the time information corresponding to the candidate answer vector and a first assignment rule, and the second weight is determined based on the memory type corresponding to the candidate answer vector and a second assignment rule.

[0056] According to a second aspect of the present disclosure, a conversation processing device is provided, the device comprising:

[0057] A receiving unit, configured to receive first conversation information;

[0058] a screening unit, configured to screen, from a database based on the first conversation information, at least one candidate reply information that matches the first conversation information; wherein the database includes memory information determined based on historical conversation information;

[0059] A determination unit is configured to determine target response information based on the at least one candidate response information.

[0060] In a possible implementation, the device further includes a processing unit configured to:

[0061] Determining historical conversation information corresponding to the first account to which the first conversation information belongs;

[0062] Processing the historical conversation information to obtain memory information;

[0063] Vectorization is performed on the memory information to obtain a memory vector, and the memory vector is stored in the database.

[0064] In a possible implementation, the processing unit is configured to:

[0065] Processing the historical conversation information to obtain observation memory information, and determining insight memory information based on the observation memory information;

[0066] The vectorizing the memory information to obtain a memory vector includes:

[0067] Vectorization processing is performed on the observation memory information and the insight memory information to obtain an observation memory vector and an insight memory vector.

[0068] In a possible implementation, the processing unit is configured to:

[0069] Determining whether the historical conversation information stored in the first storage repository meets a preset processing condition;

[0070] When it is determined that the historical conversation information stored in the first repository meets the preset processing condition, a preset model is called to perform multiple processing on the historical conversation information to obtain observation memory information.

[0071] In a possible implementation, the processing unit is configured to:

[0072] Determining whether a storage duration of the historical conversation information stored in the first storage repository reaches a first threshold;

[0073] If it is determined that the storage duration of the historical conversation information stored in the first repository does not reach the first threshold, and it is determined that the amount of historical conversation information stored in the first repository reaches the second threshold, then it is determined that the preset processing condition is met;

[0074] If it is determined that the storage duration of the historical conversation information stored in the first storage repository reaches the first threshold, it is determined that the preset processing condition is met.

[0075] In a possible implementation, the processing unit is configured to:

[0076] Calling the preset model to perform filtering processing on the historical conversation information according to the first processing rule to obtain real information;

[0077] Calling the preset model to perform memory retrieval processing on the real information according to the second processing rule to obtain initial observation memory information;

[0078] The preset model is called to perform deduplication processing on the initial observation memory information according to the third processing rule to obtain the observation memory information.

[0079] In a possible implementation, the processing unit is configured to:

[0080] When it is determined that the amount of information in the observed memory information reaches a third threshold, performing keyword extraction processing on the observed memory information to obtain newly generated attribute keywords;

[0081] Adding the newly generated attribute keyword to the existing attribute keyword list to obtain an updated attribute keyword list;

[0082] The updated sub-insight memory information of each attribute keyword in the updated attribute keyword list is determined to obtain the insight memory information.

[0083] In a possible implementation, the processing unit is configured to:

[0084] Obtaining existing attribute keywords from the existing attribute keyword list;

[0085] Based on the existing attribute keywords, keyword extraction processing is performed on the observation memory information to obtain newly generated attribute keywords.

[0086] In a possible implementation, the processing unit is configured to:

[0087] Determining existing sub-insight memory information for each attribute keyword;

[0088] Determining, from the observation memory information, respectively, mining insight memory information having a matching similarity greater than a fourth threshold with each of the sub-insight memory information;

[0089] According to each of the obtained mining insight memory information and the corresponding existing sub-insight memory information, the updated sub-insight memory information of each attribute keyword is determined to obtain the insight memory information.

[0090] In a possible implementation, the screening unit is used to:

[0091] The first dialogue information is converted into a first dialogue vector, and at least one candidate answer vector matching the first dialogue vector is screened from a database.

[0092] In a possible implementation, the screening unit is used to:

[0093] performing a first formatting process on the first dialogue information to obtain first formatted information;

[0094] When it is determined that the first formatted information includes time information, formatting the time information in the first formatted information to obtain second formatted information;

[0095] Perform vector conversion processing on the second formatted information to obtain a first dialogue vector.

[0096] In a possible implementation manner, the determining unit is configured to:

[0097] screening the at least one candidate response vector to determine a target response vector;

[0098] The target response vector is converted to obtain target response information.

[0099] In a possible implementation manner, the determining unit is configured to:

[0100] calling a preset ranking model to rank the at least one candidate answer vector to obtain a first ranking result including a plurality of first ranking values, and performing an initial screening on the at least one candidate answer vector according to the first ranking result to obtain a first candidate answer vector set;

[0101] The first candidate response vector set is sorted to obtain a second sorting result, and the first candidate response vector set is screened according to the second sorting result to obtain a target response vector.

[0102] In a possible implementation manner, the determining unit is configured to:

[0103] Determine a first weight and a second weight corresponding to each candidate answer vector in the first set of candidate answer vectors;

[0104] Determine a second ranking value corresponding to each candidate answer vector according to the first weight and the second weight corresponding to each candidate answer vector and the first ranking value;

[0105] A second ranking result is obtained according to the second ranking value corresponding to each candidate answer vector.

[0106] In one possible implementation, the first weight is determined based on the time information corresponding to the candidate response vector and a first assignment rule, and the second weight is determined based on the memory type corresponding to the candidate response vector and a second assignment rule.

[0107] According to a third aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method of the first aspect and possible implementations thereof are implemented.

[0108] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the method of the above-mentioned first aspect and its possible implementation methods by executing the executable instructions.

[0109] The technical solution disclosed in this disclosure has the following beneficial effects:

[0110] In an embodiment of the present disclosure, a first conversation message can be received, and then at least one candidate reply message that matches the first conversation message can be screened from a database based on the first conversation message; wherein the database includes memory information determined based on historical conversation information, that is, the candidate reply message can be determined from the historical conversation information corresponding to the first account to which the first conversation message belongs, that is, the first conversation message corresponding to the first account is replied based on the historical habits corresponding to the first account, rather than just based on this conversation. In this way, not only can the first conversation message be responded to efficiently, but also the accuracy of the reply is enhanced, so that the target reply information determined based on at least one candidate reply message is more in line with the question-and-answer habits of the first account, thereby improving the user experience.

[0111] Other features and advantages of the present disclosure will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present disclosure. The purposes and other advantages of the present disclosure can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0112] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the embodiments of the present disclosure. Obviously, the drawings introduced below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0113] Figure 1 A schematic diagram of an application scenario in this exemplary embodiment is shown;

[0114] Figure 2 A flowchart illustrating a method for processing a conversation in this exemplary embodiment is shown;

[0115] Figure 3 A schematic diagram showing a process of building a database in this exemplary embodiment is shown;

[0116] Figure 4 A schematic diagram illustrating another method for processing a conversation in this exemplary embodiment;

[0117] Figure 5 A schematic diagram showing a page for setting memory configuration information in this exemplary embodiment;

[0118] Figure 6 A process diagram showing a method for handling a conversation in this exemplary embodiment;

[0119] Figure 7 A schematic structural diagram of a dialog processing device in this exemplary embodiment is shown;

[0120] Figure 8 A schematic structural diagram of an electronic device in this exemplary embodiment is shown. DETAILED DESCRIPTION

[0121] In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the technical solutions 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 only part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure. In the absence of conflict, the embodiments in the present disclosure and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.

[0122] The terms "comprises" and "comprising" and any variations thereof in the specification and claims of this disclosure are intended to cover non-exclusive protection. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements, but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.

[0123] In the embodiments of the present disclosure, one or more, "many" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or plural.

[0124] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order, sequence, size and priority. For example, the first semantic vector and the second semantic vector in the embodiment of the present disclosure are only used to distinguish different semantic vectors. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0125] The following describes exemplary embodiments of the present disclosure in conjunction with the accompanying drawings. The accompanying drawings are schematic diagrams of the present disclosure and are not necessarily drawn to scale. Some of the block diagrams shown in the accompanying drawings may be functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, or in hardware modules or integrated circuits, or in networks, processors or microcontrollers. The embodiments can be implemented in various forms and should not be construed as being limited to the examples set forth herein. The features, structures or characteristics described in the present disclosure can be combined in one or more embodiments in any suitable manner. In the description below, many specific details are provided to provide a full description of the embodiments of the present disclosure. However, those skilled in the art will appreciate that one or more specific details may be omitted when implementing the technical solutions of the present disclosure, or that other methods, components, devices, steps, etc. may be used to replace one or more specific details.

[0126] It should be noted that in the embodiments of this disclosure, certain software, components, models, and other existing industry solutions may be mentioned. These should be considered exemplary and are intended solely to illustrate the feasibility of implementing the technical solutions of this disclosure. This does not mean that the applicant has or will necessarily use such solutions. The collection, dissemination, use, and display of data in this technical solution comply with relevant national laws and regulations. SUMMARY OF THE INVENTION

[0128] At present, in the relevant technology, when a service robot provides services to users, for example, when a chat robot provides chat services to users, it only supports providing the conversation records before and after the current chat record as the context to the model voice for dialogue. Users may ask questions related to the conversation before the current chat record, and it is impossible to provide users with quick and accurate answers, which reduces the user experience.

[0129] In view of one or more of the above-mentioned problems, an exemplary embodiment of the present disclosure provides a conversation processing method, through which a first conversation message can be received, and then at least one candidate reply message matching the first conversation message can be screened from a database based on the first conversation message; wherein the database includes memory information determined based on historical conversation information, that is, the candidate reply information can be determined from the historical conversation information corresponding to the first account to which the first conversation message belongs, that is, the first conversation message corresponding to the first account is replied based on the historical habits corresponding to the first account, rather than just based on this conversation. In this way, not only can the first conversation message be responded to efficiently, but also the accuracy of the reply is enhanced, so that the target reply information determined based on at least one candidate reply message is more in line with the question-and-answer habits of the first account, thereby improving the user experience.

[0130] Application Scenario Overview

[0131] To better understand the technical solutions provided by the embodiments of the present disclosure, the following briefly introduces the application scenarios to which the technical solutions provided by the embodiments of the present disclosure are applicable. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of the present disclosure and are not limiting. In specific implementations, the technical solutions provided by the embodiments of the present disclosure can be flexibly applied according to actual needs.

[0132] In order to more clearly introduce the contents of the embodiments of the present disclosure, some key terms are introduced below:

[0133] (1) Large Language Model (LLM): A type of AI model trained using deep learning techniques that can understand and generate natural language text. These models are typically trained on large amounts of text data to learn language patterns and structures, enabling them to perform a variety of language-related tasks, such as text generation, translation, text summarization, and sentiment analysis.

[0134] (2) Vectorization: It is a process of converting various types of data or entities into vector representation.

[0135] (3) Vector database: A database specifically designed for storing and retrieving high-dimensional vector data. For example, Elasticsearch. Vector databases play a key role in many applications related to artificial intelligence and machine learning. For example, in the field of information retrieval, they are used for text search, image search, etc., and can quickly find similar documents or images based on the query content entered by the user; in recommendation systems, they provide personalized recommendations to users by calculating the similarity between the vector representations of users and items; in natural language processing tasks such as text classification and sentiment analysis, they help quickly find similar text data for model training and prediction.

[0136] (4) Virtual humans: refers to virtual characters with human appearance, behavior, and intelligence created and simulated through computer technology, artificial intelligence technology, etc. Virtual humans have a wide range of applications in many fields. In the entertainment field, they can be used in movies, games, virtual reality experiences, etc., bringing users a new visual and interactive enjoyment; in the education field, they can serve as virtual teachers or learning partners to assist the teaching and learning process; in the medical field, they can be used for medical training, rehabilitation treatment, etc.; in the business field, they can serve as virtual anchors, customer service representatives, etc., providing services and promotion for enterprises.

[0137] In the embodiments of the present disclosure, dialogue processing technology can be applied to various business scenarios that provide services to users, such as business scenarios for responding to teaching questions raised by students or teachers, or business scenarios for providing business responses to pre-sales or after-sales information, or business scenarios for responding to preference questions raised by users. This is not limited in the embodiments of the present disclosure.

[0138] See also Figure 1 As shown, Figure 1 This is an application scenario to which the technical solution of the embodiment of the present disclosure can be applied. In this scenario diagram, it includes a terminal device 110 and an electronic device 120. There can be one or more terminal devices 110, and each terminal device 110 can be provided with a dialogue processing system platform, so that different users can log in to the dialogue processing system platform deployed on the corresponding terminal device 110. Figure 1 One is shown as an example. The electronic device 120 can be understood as a device that provides services to the dialogue processing system. It should be noted that in the embodiments of the present disclosure, the dialogue processing system can refer to a dialogue processing system that provides teaching services, a dialogue processing system that provides companionship services, or, of course, a dialogue processing system that provides customer service services, which is not limited in the embodiments of the present disclosure. Furthermore, the terminal device 110 and the electronic device 120 communicate via one or more networks 130.

[0139] In an embodiment of the present disclosure, a user can log in to the platform of the dialogue processing system deployed on the corresponding terminal device 110 and input the first dialogue information, so that the terminal device 110 can send the first dialogue information to the electronic device 120, so that the electronic device 120 can receive the first dialogue information, and then filter at least one candidate reply information that matches the first dialogue information from the database based on the first dialogue information; wherein the database includes memory information determined based on historical dialogue information, so that the target reply information is determined based on the at least one candidate reply information.

[0140] In the embodiments of the present disclosure, Figure 1 The terminal device 110 can be a mobile phone, a tablet computer (PAD), a personal computer, a smart TV, a smart watch, a smart speaker, a smart car device, and a wearable device, but is not limited thereto.

[0141] In the embodiments of the present disclosure, Figure 1The electronic device 120 may also be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server or cloud server cluster that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, but is not limited to these.

[0142] Of course, the method provided in the embodiment of the present disclosure is not limited to Figure 1 The application scenario shown can also be used in other possible application scenarios, for example, only the electronic device 120 executes the conversation processing method, which is not limited in the embodiment of the present disclosure.

[0143] Exemplary Methods

[0144] To further illustrate the technical solutions provided by the embodiments of the present disclosure, this is described in detail below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of the present disclosure provide the method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiments of the present disclosure. In the actual processing process or when the device is executed, the method may be executed in the order of the methods shown in the embodiments or drawings or in parallel.

[0145] See Figure 2 , Figure 2 FIG is a flow chart of a method for processing a conversation in an embodiment of the present disclosure. The method flow can be executed by an electronic device, for example, which can be Figure 1 The electronic device 120 in the embodiment of the present invention is implemented as follows:

[0146] Step 201: Receive first conversation information;

[0147] Step 202: Filtering at least one candidate reply message matching the first conversation message from a database based on the first conversation message; wherein the database includes memory information determined based on historical conversation message;

[0148] Step 203: Determine target response information based on at least one candidate response information.

[0149] In an embodiment of the present disclosure, the electronic device can obtain memory information by pre-processing the conversation information of the first account corresponding to the first conversation in depth, and store the memory information in a database. Therefore, when the first conversation information is received, the electronic device can obtain the memory information obtained based on the deep mining from the database, answer the questions in the conversation, and improve the accuracy of the answer.

[0150] In the embodiment of the present disclosure, before introducing the dialogue processing solution, the database construction solution provided by the present disclosure is first introduced.

[0151] In the embodiments of the present disclosure, see Figure 3 As shown, the database can be constructed by taking but not limited to the following steps:

[0152] Step 301: Determine historical conversation information corresponding to a first account to which first conversation information belongs.

[0153] In an embodiment of the present disclosure, the electronic device can save the conversation information interacting with each user in a fixed storage area in the order of conversation sending time, wherein the fixed storage area is divided into multiple storage libraries, each of which can be used to store conversation information corresponding to one user.

[0154] For example, user M can log in to the dialogue processing system on the corresponding terminal device 1 and send message 1 to the virtual person corresponding to the dialogue processing system, so that the virtual person sends reply 1, and the electronic device can obtain a dialogue message. The electronic device can then store the dialogue message in the storage library corresponding to user M.

[0155] In an embodiment of the present disclosure, the electronic device may first determine the first account based on the identification information of the first account carried in the first conversation message, and then search the fixed storage area for historical conversation information corresponding to the first account. The identification information may be determined based on at least two of the following: letters, numbers, and characters, which is not limited in the present disclosure.

[0156] In the embodiment of the present disclosure, the historical conversation information corresponding to the first account can be understood as all conversation information at the time before the first conversation information is received.

[0157] For example, assuming that the first conversation information triggered by the first account is "What food do I like" and the sending time is 13:32 on April 20, 2025, the electronic device can treat all conversation information between the first account and the conversation processing system before 13:32 on April 20, 2025 as historical conversation information.

[0158] Step 302: Process the historical conversation information to obtain memory information.

[0159] In an embodiment of the present disclosure, after the electronic device obtains historical conversation information, it can process the historical conversation information to obtain observation memory information, and determine insight memory information based on the observation memory information.

[0160] In the embodiments of the present disclosure, the electronic device may determine the observation memory information in the following manners, but not limited to:

[0161] Step A: Determine whether the historical conversation information stored in the first storage library meets a preset processing condition.

[0162] In an embodiment of the present disclosure, the electronic device can determine whether the storage duration of the historical conversation information stored in the first repository has reached a first threshold; if it is determined that the storage duration of the historical conversation information stored in the first repository has not reached the first threshold, and it is determined that the number of historical conversation information stored in the first repository has reached a second threshold, then it is determined that the preset processing condition is satisfied; if it is determined that the storage duration of the historical conversation information stored in the first repository has reached the first threshold, then it is determined that the preset processing condition is satisfied. The first threshold and the second threshold can be determined based on actual implementation, and are not limited in this embodiment of the present disclosure. In other words, the preset processing condition can be understood as reaching the maximum aggregation time (i.e., the first threshold) or the maximum number of aggregated conversations (i.e., the second threshold).

[0163] For example, assuming that the storage duration of the historical conversation information of the first account stored in the first repository is 1 minute, and the first threshold is 2 minutes, and the number of conversations of the historical conversation information of the first account stored in the first repository is 30 pairs, and the second threshold is 30, then it is determined that the historical conversation information stored in the first repository meets the preset processing conditions.

[0164] For another example, assuming that the storage duration of the historical conversation information of the first account stored in the first repository is 2 minutes, and the first threshold is 2 minutes, it is determined that the historical conversation information stored in the first repository meets the preset processing condition.

[0165] In an embodiment of the present disclosure, in order to avoid a situation where the first threshold is not reached but the second threshold is reached but not accurately judged, a delayed message can be triggered for the conversation information within each first threshold interval, and a separate identifier, such as a key, is configured in each interval. In this way, when it is determined that the first threshold is reached, it can be first determined based on the key whether it has been sent, that is, whether there has been a situation where the first threshold is not reached but the second threshold is reached. When it is determined that this situation has occurred, the delayed message in the interval will not be consumed. When it is determined that the key has not been sent, it is determined that the first threshold is reached, and the delayed message in the interval is consumed, that is, the historical conversation information in the interval is processed.

[0166] Step B: When it is determined that the historical conversation information stored in the first storage library meets the preset processing conditions, a preset model is called to perform multiple processing on the historical conversation information to obtain observation memory information.

[0167] In an embodiment of the present disclosure, upon determining that the historical conversation information stored in the first repository meets preset processing conditions, the historical conversation information can be retrieved from the first repository and arranged in reverse chronological order. A preset model can then be invoked to filter the historical conversation information according to a first processing rule to obtain real information; a preset model can be invoked to perform memory extraction on the real information according to a second processing rule to obtain initial observation memory information; and a preset model can be invoked to perform deduplication on the initial observation memory information according to a third processing rule to obtain observation memory information. The preset model can be a large language model.

[0168] For example, the observation memory information is: Monday, December 23, 2024: User loves playing the piano; Monday, December 23, 2024: User likes eating watermelon; Monday, December 23, 2024: User went to XXX amusement park on Saturday, January 18, 2025 (inferred time: Saturday, January 18, 2025). In other words, the observation memory information in this disclosure is the sum of important event memories, and the observation memory information includes multiple important event memories. For example, the aforementioned "Monday, December 23, 2024: User loves playing the piano" can be understood as a single important event memory.

[0169] In the disclosed embodiment, when the historical conversation information stored in the first repository of the electronic device meets the preset processing conditions, for ease of description, the historical conversation information stored in the first repository that meets the preset processing conditions is referred to as memory information to be summarized. Then, the preset model can be invoked to filter the memory information to be summarized according to the first processing rule. Optionally, the first processing rule is a rule for filtering conversations containing real user information, for example:

[0170] Task: Score the information about the user contained in the given 10 sentences. The scores are expressed in letters; a (does not contain user information), b (the sentence only contains user assumptions or fictional content, such as novels, scripts, etc.), c (contains general user information, time-sensitive information, or user information that requires guesswork), d (clearly contains or can be determined to infer important information about the user, or the user requires records). Important user information includes basic user information, user portrait information, user interest preference information, user personality, user values, user interpersonal relationships, user major event turning points, etc. Each sentence is scored, and a total of 10 scores are output, which are output in the following format:

[0171] Thinking: Briefly describe the basis and process of your thinking, no more than 30 words.

[0172] Result: <sentence number><score: a or b or c or d>.

[0173] #Example

[0174] sentence:

[0175] 1{{user_name}}:Have you had lunch?

[0176] 2{{user_name}}: I like eating peaches

[0177] Thinking: Sentence 1 does not contain {{user_name}} information. Result: <1>

[0178] Think about it: From the second sentence, we can know that {{user_name}} likes to eat peaches, which is confirmed information. Result: <2> <d>.

[0179] In the embodiment of the present disclosure, a preset model can be called to perform memory extraction processing on real information according to the second processing rule to obtain initial observation memory information; wherein the initial observation memory information includes observation memory information that does not include time and observation memory information that includes time. Optionally, the second processing rule is an extraction rule for extracting time-related and non-time-related memories, for example:

[0180] Task: Extract important user information and corresponding keywords from the following 10 user sentences. If no important information is available, answer "None." Extract a maximum of 10 pieces of information. Important user information includes basic user information, user profile information, user interests and preferences, user personality, user values, user relationships, and user milestones. If the sentence contains only user assumptions or fictional content, such as novels or scripts, answer "None." Extract information for each sentence, and output 10 pieces of information. Please think step by step and output them in the following format, with <> appended to the final result:

[0181] Thinking: Briefly describe the basis and process of your thinking, no more than 50 words.

[0182] Information: <sentence number><><clear important information or "none"><keywords>.

[0183] In the disclosed embodiment, it is also possible to obtain observation memory information that has been summarized today, then merge the initial observation memory information and the observation memory information that has been summarized today, sort them in reverse order by memory time, and then call the preset model to perform deduplication processing on the merged observation memory information according to the third processing rule to obtain observation memory information. Optionally, the third processing rule is a rule for deduplication processing of generated memories and newly generated memories, for example:

[0184] Task: For each of the following 20 sentences, determine whether they contradict the information stored in any sentence with the "previous number," or whether the sentence's main information is contained in any sentence with the "previous number." Note: Only the relationship with the sentence with the "previous number" is determined, not the relationship with the sentence with the "following number."

[0185] The forms of contradiction include logical contradictions and contradictions caused by changes in attributes (such as not being able to work in two places at the same time, not being able to be in two places at the same time, not doing two different things at the same time, etc.).

[0186] Each sentence is judged and 20 judgments are output in the following format:

[0187] Thinking: Briefly describe the basis and process of your thinking, no more than 50 words.

[0188] Judgment: <sentence number><contradiction, nothing is included>, add <>.

[0189] Optionally, when the first processing rule, the second processing rule, and the third processing rule in the embodiment of the present disclosure are all prompt word templates, the electronic device can be driven by the corresponding prompt word template, and use a preset model to perform filtering processing on the summarized memory information, perform memory extraction processing on the real information, and perform deduplication processing on the initial observation memory information. Among them, the prompt word template (Prompt) is an important concept when using a natural language processing model. It refers to a piece of text input by the user to the model to guide the model to generate a response or complete a specific task. Simply put, Prompt is an instruction or prompt used to tell the model what task you want it to complete, and can be regarded as an input method for interacting with the model.

[0190] In an embodiment of the present disclosure, after the electronic device obtains the observation memory information, it can store the observation memory information in a database, such as an Elasticsearch (ES) database, or other distributed databases, which is not limited in the embodiment of the present disclosure.

[0191] In the embodiment of the present disclosure, after the electronic device obtains the observation memory information based on the aforementioned method, it can also determine the insight memory information based on the observation memory information.

[0192] In an embodiment of the present disclosure, when it is determined that the amount of information in the observed memory information reaches a third threshold, keyword extraction processing is performed on the observed memory information to obtain newly generated attribute keywords. The third threshold can be updated based on the corresponding settings of the actual implementation, such as 20, 30, etc., which is not limited in the embodiment of the present disclosure. That is to say, when it is determined that the amount of information in the observed memory information, that is, the number of important event memories, reaches the third threshold, for example, the number of important event memories is 20, and the third threshold is 20, the observed memory information can be summarized, so that insight memory information can be obtained, that is, the user portrait corresponding to the first account can be obtained.

[0193] Optionally, existing attribute keywords may be obtained from an existing attribute keyword list, and then keyword extraction processing may be performed on the observation memory information based on the existing attribute keywords to obtain newly generated attribute keywords.

[0194] In an embodiment of the present disclosure, when the electronic device determines that the number of observation memory information has reached a third threshold, the observation memory information of this number of information can be used as the observation memory information to be processed. Then, a list of existing insight memory information in the database is obtained, and existing attribute keyword information is obtained from the insight memory information list, so that keyword extraction processing is performed on the observation memory information to be processed based on the existing attribute keyword information to obtain newly generated attribute keywords. Among them, the attribute keyword can be understood as an item in the user portrait, and the existing attribute keyword information is, for example, sports hobbies, fruit preferences, and music preferences. Optionally, keyword extraction processing can be performed on the observation memory information to be processed based on the existing attribute keyword information and the fourth processing rule; wherein the fourth processing rule can be understood as a keyword extraction rule, for example:

[0195] Task: Extract up to 10 of the most important user attributes from the following information, without duplication of semantics with existing user attributes.

[0196] Requirement 1: User attributes can include basic information, basic portraits, interests such as sports preferences, travel preferences, and food preferences, the nature of important events (such as recent important events), and highly summarized life ideals, values, outlook on life, personality, or interpersonal relationships with friends.

[0197] Requirement 2: Based on user attributes, you can generate the question "What is the user's <user attribute>?" to extract the value corresponding to the user attribute from the information.

[0198] Output format: Each line outputs one user attribute. 4 characters are recommended for each user attribute. If there is no information, please answer "None". A maximum of 10 entries are output.

[0199] Example output:

[0200] Sports hobbies

[0201] Fruit lover.

[0202] In the disclosed embodiment, after obtaining a newly generated attribute keyword, the newly generated attribute keyword can be added to the existing attribute keyword list to obtain an updated attribute keyword list, and updated sub-insight memory information for each attribute keyword in the updated attribute keyword list can be determined to obtain insight memory information. The updated sub-insight memory information can be understood as the memory content of an item in the user profile, such as the user's sports hobby: fishing.

[0203] In the embodiment of the present disclosure, the existing sub-insight memory information of each attribute keyword can be determined, and then the mined insight memory information with a matching similarity greater than a fourth threshold with each sub-insight memory information can be determined from the observed memory information; based on each mined insight memory information obtained and the corresponding existing sub-insight memory information, the updated sub-insight memory information of each attribute keyword is determined to obtain the insight memory information.

[0204] In an embodiment of the present disclosure, the vector of the existing sub-insight memory information and the vector of each content in the observation memory information can be calculated, and the similarity score between the vector of the existing sub-insight memory information and the vector of each content in the observation memory information can be calculated. Then, the similarity scores are sorted using a sorting model, and the content with a similarity score higher than a fourth threshold after sorting is used as the mined insight memory information. The preset model is called to summarize the mined insight memory information to obtain the mined insight memory information. Finally, based on the obtained mined insight memory information and the corresponding existing sub-insight memory information, the updated sub-insight memory information of each attribute keyword is determined to obtain the insight memory information.

[0205] Optionally, based on each obtained insight memory information and the fifth processing rule, the updated sub-insight memory information of each attribute keyword is determined; wherein the fifth processing rule can be understood as a rule for updating the sub-insight memory information, for example:

[0206] Task: Extract the profile information of a user in a given category from the following sentences and determine whether it contradicts existing information. If so, integrate the existing and new information based on the new information and output the result. If no changes are needed, answer "None".

[0207] The form of contradiction can be a logical contradiction or a contradiction caused by a change in attributes (such as not being able to work in two places at the same time, not being able to be in two places at the same time, not doing two different things at the same time, etc.).

[0208] Please think step by step and output in the following format, with information enclosed in <>:

[0209] Thinking: The basis and process of thinking, within 100 words.

[0210] User's profile: <information>.

[0211] Optionally, when the fourth processing rule and the fifth processing rule in the embodiment of the present disclosure are both prompt word templates, the electronic device can be driven by the corresponding prompt word template and use a preset model to execute the generation of new attribute keywords, or to execute the determination of updated sub-insight memory information for each attribute keyword.

[0212] In the disclosed embodiments, the electronic device can obtain insight memory information based on the aforementioned method, such as the user's sports hobbies: fishing, running, and playing basketball; the user's fruit preference: liking watermelon; and the user's music preference: liking songs by singer F. In other words, the insight memory information is the sum of the user's profile information, including multiple items of user profile information and the memory content of each item.

[0213] In an embodiment of the present disclosure, after the electronic device obtains insight memory information, it can store the insight memory information in a database, such as an Elasticsearch (ES) database or other distributed database, which is not limited in the embodiment of the present disclosure.

[0214] Step 303: Perform vectorization processing on the memory information to obtain a memory vector, and store the memory vector in a database.

[0215] In an embodiment of the present disclosure, after obtaining the observation memory information and the insight memory information, the observation memory information and the insight memory information can be vectorized to obtain the observation memory vector and the insight memory vector, and the observation memory vector and the insight memory vector can be stored in a database to obtain a database.

[0216] In an embodiment of the present disclosure, the database stores observation memory vectors and insight memory vectors corresponding to multiple accounts, and each account can establish a link with its corresponding observation memory vector and insight memory vector in the form of an index. For example, the database includes a field name for representing the primary key as id, a field name for representing the virtual person ID (i.e., the object provided by the dialogue processing system) as Botid, a field name for representing the user ID as userid, a field name for representing the memory type as memoryType, a field name for representing the memory content as content, a field name for representing the memory vector data as contentVector, and a field name for representing the memory expiration time as expiredTime.

[0217] In the embodiment of the present disclosure, after introducing the construction of the database, the following describes a solution for quickly responding to conversation information based on the database. For example, see< / d> Figure 4 shown.

[0218] Step 401: Receive a conversation request.

[0219] In an embodiment of the present disclosure, when an electronic device receives a conversation request sent by a user through a corresponding terminal device, it can obtain first conversation information carried in the conversation request, wherein the first conversation information includes not only the conversation content but also the identification information of the account that triggered the first conversation information.

[0220] Step 402: Obtain memory configuration information.

[0221] In an embodiment of the present disclosure, after receiving the first dialogue information sent by the terminal device, memory configuration information may also be obtained, where the memory configuration information is used to indicate whether to call a database.

[0222] In the embodiment of the present disclosure, the memory configuration information may be set and updated based on actual implementation, which is not limited in the embodiment of the present disclosure.

[0223] In the embodiment of the present disclosure, the memory configuration information of the dialogue processing system can be set, for example, see Figure 5 As shown, the service provider of the dialogue processing system can select short-term memory in the current setting page, so that the electronic device can obtain memory configuration information for indicating not to call the database. Figure 5 The "short-term memory" here can be understood as only obtaining the chat context of the first conversation information, such as the 10 messages before the moment corresponding to the first conversation information. Figure 5 The "independent memory" in can be understood as the memory of a specific scene. Figure 5 The "shared memory" in the above description can be understood as memory shared by multiple scenarios. In other words, in the embodiment of the present disclosure, the memory configuration information can also indicate the call of part of the data in the database.

[0224] In an embodiment of the present disclosure, memory configuration information can be updated based on the settings of the service provider of the dialogue processing system, so that the electronic device can obtain the memory configuration information. Of course, fixed memory configuration information can also be set for the dialogue processing system, so that the electronic device can directly use the memory configuration information obtained previously, reducing the number of acquisitions, reducing the resource consumption of the dialogue processing system, and improving the overall response efficiency. Alternatively, the electronic device can automatically set the memory configuration information based on a preset rule, wherein the preset rule is, for example, extracting content that matches the important event memory and / or user profile memory, and determining to set the memory configuration information as information corresponding to the independent memory or shared memory based on the matching content; if no content that matches the important event memory and / or user profile memory is extracted, then the memory configuration information is set as information corresponding to the short-term memory. In this way, the electronic device can automatically and quickly determine whether to call the database, without manual intervention, avoiding the situation where the staff of the service provider of the dialogue processing system set the wrong settings, improving the accuracy of the dialogue information response, and thus improving the user experience.

[0225] Step 403: Determine whether the reply to the first dialogue message requires calling a database based on the memory configuration information. If the memory configuration information determines that the database needs to be called, execute step 404. If the memory configuration information determines that the database does not need to be called, execute step 403.

[0226] In an embodiment of the present disclosure, after receiving the first conversation message, the electronic device can also determine, based on the memory configuration information, whether the reply to the first conversation message requires calling the database for reply, that is, determine whether to reply to the conversation proposed by the user based on the important event memory and user portrait memory. In this way, the conversation information can be classified and processed, which not only improves the efficiency of replying to the conversation information, but also improves the accuracy of replying to the conversation information.

[0227] Step 404: Perform reply processing on the first dialogue information carried in the dialogue request according to the reply model of the dialogue processing system to obtain target reply information.

[0228] In step 405, at least one candidate reply information matching the first dialogue information is screened from a database based on the first dialogue information; wherein the database includes memory information determined based on historical dialogue information.

[0229] In an embodiment of the present disclosure, after receiving the first conversation information, the electronic device may convert the first conversation information into a first conversation vector, and screen at least one candidate answer vector matching the first conversation vector from a database.

[0230] In an embodiment of the present disclosure, the electronic device may perform a first formatting process on the first conversation information to obtain the first formatted information; when it is determined that the first formatted information includes time information, the electronic device may perform a formatting process on the time information in the first formatted information to obtain the second formatted information; and perform a vector conversion process on the second formatted information to obtain the first conversation vector.

[0231] Optionally, the first formatting process includes removing leading and trailing spaces and / or adding the requested system time. If it is determined that the first formatted information includes time information, i.e., the first conversation information involves time information, the time information can be formatted into a dictionary to obtain second formatted information. The preset model is then used to perform vector conversion on the second formatted information to obtain the first conversation vector.

[0232] In the embodiment of the present disclosure, after the first dialogue vector is obtained, at least one candidate reply information matching the identification information may be retrieved from a database based on the identification information corresponding to the first dialogue vector.

[0233] Step 406: Determine target response information based on at least one candidate response information.

[0234] In an embodiment of the present disclosure, after obtaining at least one candidate response vector, the at least one candidate response vector can be screened to determine a target response vector, and then the target response vector can be converted to obtain target response information.

[0235] In an embodiment of the present disclosure, the electronic device can call a preset sorting model to sort at least one candidate reply vector, obtain a first sorting result including multiple first sorting values, and perform initial screening on at least one candidate reply vector based on the first sorting result to obtain a first candidate reply vector set; sort the first candidate reply vector set to obtain a second sorting result, and screen the first candidate reply vector set based on the second sorting result to obtain a target reply vector.

[0236] Optionally, the electronic device may determine a first weight and a second weight corresponding to each candidate answer vector in the first set of candidate answer vectors, and then determine a second ranking value corresponding to each candidate answer vector based on the first weight and the second weight and the first ranking value corresponding to each candidate answer vector, and may also obtain a second ranking result based on the second ranking value corresponding to each candidate answer vector. The first weight is determined based on the time information corresponding to the candidate answer vector and the first assignment rule, and the second weight is determined based on the memory type corresponding to the candidate answer vector and the second assignment rule.

[0237] The first assignment rule, for example, is that the smaller the time difference between the time information corresponding to the candidate response vector and the time information corresponding to the first conversation message, the higher the assigned value. For example, if the time information corresponding to the candidate response vector is 13:15 on May 4, 2024, and the time information corresponding to the first conversation message is 7:15 on May 5, 2024, then based on the time difference not exceeding one day, the first weight is determined to be 0.7. The second assignment rule, for example, is to determine the second weight based on the level corresponding to the memory type and the value corresponding to each level. For example, if the memory type is S, the corresponding level is 2, and the value corresponding to level 2 is 0.3, then the second weight is 0.3.

[0238] That is to say, when determining the final target response vector, the impact of memory type and time distance on the response is fully considered, so as to more accurately determine the target response vector, improve the timeliness of the target response information, and thus improve the user experience.

[0239] In the embodiment of the present disclosure, Figure 6 As shown, after receiving the first conversation message, the electronic device can identify the intent of the first conversation message and then retrieve information from the corresponding memory management database to determine the final target response message. In other words, the virtual person corresponding to the conversation processing system can obtain and record the user's habits, preferences, and emotional information during the conversation with the user. This allows the user to provide a more personalized and coherent interactive experience when receiving the conversation message sent by the user, thereby improving the user's user experience.

[0240] Exemplary devices

[0241] The exemplary embodiment of the present disclosure also provides a conversation processing device. Figure 7 As shown, the dialogue processing device 700 includes the following program units:

[0242] Receiving unit 701, configured to receive first conversation information;

[0243] A screening unit 702 is configured to screen, based on the first conversation information, at least one candidate reply information that matches the first conversation information from a database; wherein the database includes memory information determined based on historical conversation information;

[0244] The determining unit 703 is configured to determine target response information based on the at least one candidate response information.

[0245] In a possible implementation, the device further includes a processing unit configured to:

[0246] Determining historical conversation information corresponding to the first account to which the first conversation information belongs;

[0247] Processing the historical conversation information to obtain memory information;

[0248] Vectorization is performed on the memory information to obtain a memory vector, and the memory vector is stored in the database.

[0249] In a possible implementation, the processing unit is configured to:

[0250] Processing the historical conversation information to obtain observation memory information, and determining insight memory information based on the observation memory information;

[0251] The vectorizing the memory information to obtain a memory vector includes:

[0252] Vectorization processing is performed on the observation memory information and the insight memory information to obtain an observation memory vector and an insight memory vector.

[0253] In a possible implementation, the processing unit is configured to:

[0254] Determining whether the historical conversation information stored in the first storage repository meets a preset processing condition;

[0255] When it is determined that the historical conversation information stored in the first repository meets the preset processing condition, a preset model is called to perform multiple processing on the historical conversation information to obtain observation memory information.

[0256] In a possible implementation, the processing unit is configured to:

[0257] Determining whether a storage duration of the historical conversation information stored in the first storage repository reaches a first threshold;

[0258] If it is determined that the storage duration of the historical conversation information stored in the first repository does not reach the first threshold, and it is determined that the amount of historical conversation information stored in the first repository reaches the second threshold, then it is determined that the preset processing condition is met;

[0259] If it is determined that the storage duration of the historical conversation information stored in the first storage repository reaches the first threshold, it is determined that the preset processing condition is met.

[0260] In a possible implementation, the processing unit is configured to:

[0261] Calling the preset model to perform filtering processing on the historical conversation information according to the first processing rule to obtain real information;

[0262] Calling the preset model to perform memory retrieval processing on the real information according to the second processing rule to obtain initial observation memory information;

[0263] The preset model is called to perform deduplication processing on the initial observation memory information according to the third processing rule to obtain the observation memory information.

[0264] In a possible implementation, the processing unit is configured to:

[0265] When it is determined that the amount of information in the observed memory information reaches a third threshold, performing keyword extraction processing on the observed memory information to obtain newly generated attribute keywords;

[0266] Adding the newly generated attribute keyword to the existing attribute keyword list to obtain an updated attribute keyword list;

[0267] The updated sub-insight memory information of each attribute keyword in the updated attribute keyword list is determined to obtain the insight memory information.

[0268] In a possible implementation, the processing unit is configured to:

[0269] Obtaining existing attribute keywords from the existing attribute keyword list;

[0270] Based on the existing attribute keywords, keyword extraction processing is performed on the observation memory information to obtain newly generated attribute keywords.

[0271] In a possible implementation, the processing unit is configured to:

[0272] Determining existing sub-insight memory information for each attribute keyword;

[0273] Determining, from the observation memory information, respectively, mining insight memory information having a matching similarity greater than a fourth threshold with each of the sub-insight memory information;

[0274] According to each of the obtained mining insight memory information and the corresponding existing sub-insight memory information, the updated sub-insight memory information of each attribute keyword is determined to obtain the insight memory information.

[0275] In a possible implementation, the screening unit 702 is configured to:

[0276] The first dialogue information is converted into a first dialogue vector, and at least one candidate answer vector matching the first dialogue vector is screened from a database.

[0277] In a possible implementation, the screening unit 702 is configured to:

[0278] performing a first formatting process on the first dialogue information to obtain first formatted information;

[0279] When it is determined that the first formatted information includes time information, formatting the time information in the first formatted information to obtain second formatted information;

[0280] Perform vector conversion processing on the second formatted information to obtain a first dialogue vector.

[0281] In a possible implementation, the determining unit 703 is configured to:

[0282] screening the at least one candidate response vector to determine a target response vector;

[0283] The target response vector is converted to obtain target response information.

[0284] In a possible implementation, the determining unit 703 is configured to:

[0285] calling a preset ranking model to rank the at least one candidate answer vector to obtain a first ranking result including a plurality of first ranking values, and performing an initial screening on the at least one candidate answer vector according to the first ranking result to obtain a first candidate answer vector set;

[0286] The first candidate response vector set is sorted to obtain a second sorting result, and the first candidate response vector set is screened according to the second sorting result to obtain a target response vector.

[0287] In a possible implementation, the determining unit 703 is configured to:

[0288] Determine a first weight and a second weight corresponding to each candidate answer vector in the first set of candidate answer vectors;

[0289] Determine a second ranking value corresponding to each candidate answer vector according to the first weight and the second weight corresponding to each candidate answer vector and the first ranking value;

[0290] A second ranking result is obtained according to the second ranking value corresponding to each candidate answer vector.

[0291] In one possible implementation, the first weight is determined based on the time information corresponding to the candidate response vector and a first assignment rule, and the second weight is determined based on the memory type corresponding to the candidate response vector and a second assignment rule.

[0292] The specific details of each part of the above-mentioned device have been described in detail in the implementation method part. The undisclosed details can be found in the implementation method part, so they will not be repeated here.

[0293] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0294] Exemplary Program Products

[0295] The exemplary embodiments of the present disclosure further provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, implements the above-mentioned dialog processing method.

[0296] In one embodiment, a computer program product may be a tangible product containing a computer program, such as a computer-readable storage medium storing the computer program. The computer-readable storage medium may be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, including but not limited to random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory (Flash), mechanical hard disk drive (HDD), solid-state drive (SSD), and the like. Exemplarily, the computer program product may be implemented as a non-volatile storage medium storing the computer program, such as a read-only memory, a NAND flash memory (NandFlash), and the like.

[0297] In one embodiment, the computer program product may be an intangible product containing a computer program. For example, the computer program product may be implemented as a virtual digital product, such as a digital file such as an executable file or installation package storing the computer program.

[0298] The code of the computer program can be written in one or more programming languages. Programming languages ​​include C, Java, C++, etc. The program code can be executed entirely on the user computing device, partially on the user computing device, or as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device via any type of network, such as a local area network (LAN), a wide area network (WAN), etc., or can be connected to an external computing device (e.g., via an Internet connection provided by a carrier).

[0299] Computer programs can be carried or transmitted through electrical, magnetic, optical, electromagnetic, infrared, and other signals. Electronic devices can convert signals carrying computer programs into digital signals to run the computer programs. When a computer program runs on an electronic device, its code is used to enable the electronic device to execute (more specifically, it can enable the processor of the electronic device to execute) the method steps of various exemplary embodiments of the present disclosure, such as the above-mentioned conversation processing method, which includes the following steps: Step 201: Receive a first conversation message; Step 202: Filter at least one candidate reply information that matches the first conversation message from a database based on the first conversation message; wherein the database includes memory information determined based on historical conversation information; Step 203: Determine the target reply information based on the at least one candidate reply information.

[0300] By implementing the above-mentioned method steps through a computer program, a first conversation message can be received, and then at least one candidate reply message that matches the first conversation message can be screened from a database based on the first conversation message; wherein the database includes memory information determined based on historical conversation information, that is, candidate reply information can be determined from historical conversation information corresponding to the first account to which the first conversation message belongs, that is, the first conversation message corresponding to the first account is replied based on the historical habits corresponding to the first account, rather than just based on the current conversation. In this way, not only can the first conversation message be responded to efficiently, but also the accuracy of the reply is enhanced, so that the target reply information determined based on at least one candidate reply message is more in line with the question-and-answer habits of the first account, thereby improving the user experience.

[0301] Exemplary electronic devices

[0302] The exemplary embodiments of the present disclosure further provide an electronic device. The electronic device may include a processor and a memory. The memory stores executable instructions for the processor, such as a computer program. The processor executes the executable instructions to perform the method steps of various exemplary embodiments of the present disclosure.

[0303] Reference below Figure 8 , the electronic device is exemplarily described in the form of a general-purpose computing device. It should be understood that Figure 8 The electronic device 800 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0304] like Figure 8 As shown, the electronic device 800 may include: a processor 810 , a memory 820 , a bus 830 , an I / O (input / output) interface 840 , and a network adapter 850 .

[0305] The memory 820 may include volatile memory, such as RAM 821 and cache unit 822, and may also include non-volatile memory, such as ROM 823. The memory 820 may also include one or more program modules 824. Such program modules 828 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. For example, the program module 824 may include each unit in the aforementioned apparatus.

[0306] The processor 810 may include one or more processing units, for example: the processor 810 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc.

[0307] The processor 810 can be used to execute executable instructions stored in the memory 820, such as the above-mentioned dialogue processing method, which includes the following steps: Step 201: Receive the first dialogue information; Step 202: Filter at least one candidate reply information that matches the first dialogue information from the database based on the first dialogue information; wherein the database includes memory information determined based on historical dialogue information; Step 203: Determine the target reply information based on at least one candidate reply information.

[0308] By executing the above-mentioned method steps through the processor 810, a first conversation message can be received, and then at least one candidate reply message that matches the first conversation message can be screened from the database based on the first conversation message; wherein the database includes memory information determined based on historical conversation information, that is, the candidate reply message can be determined from the historical conversation information corresponding to the first account to which the first conversation message belongs, that is, the first conversation message corresponding to the first account is replied based on the historical habits corresponding to the first account, rather than just based on this conversation. In this way, not only can the first conversation message be responded to efficiently, but also the accuracy of the reply is enhanced, so that the target reply information determined based on at least one candidate reply message is more in line with the question and answer habits of the first account, thereby improving the user experience.

[0309] The bus 830 is used to realize the connection between different components of the electronic device 800 and may include a data bus, an address bus, and a control bus.

[0310] The electronic device 800 can communicate with one or more external devices 900 (eg, a keyboard, a mouse, an external controller, etc.) through the I / O interface 840 .

[0311] The electronic device 800 can communicate with one or more networks via the network adapter 850. For example, the network adapter 850 can provide mobile communication solutions such as 3G / 4G / 5G, or wireless communication solutions such as wireless LAN, Bluetooth, and near-field communication. The network adapter 850 can communicate with other modules of the electronic device 800 via the bus 830.

[0312] although Figure 8 Not shown, other hardware and / or software modules may also be provided in the electronic device 800, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0313] As can be seen from the above, the technical solutions of the present disclosure can be implemented as methods, devices, systems, computer program products, storage media, electronic devices, etc. Those skilled in the art will understand that various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation that combines hardware and software aspects, such as "circuit", "module" or "system".

[0314] It should be understood that the present disclosure is not limited to the specific method steps or structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. Those skilled in the art will easily think of other embodiments based on the specific embodiments provided by the present disclosure. Therefore, the specific embodiments provided by the present disclosure are merely exemplary, and the scope and spirit of the present disclosure are indicated by the claims, which should cover any variations, uses or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the field of the present technology that are not disclosed in the present disclosure.

Claims

1. A method for processing a conversation, characterized in that: The method comprises: receiving a first conversation message; screening at least one candidate reply message matching the first conversation information from a database based on the first conversation information; wherein the database includes memory information determined based on historical conversation information; Target reply information is determined according to the at least one candidate reply information.

2. The method according to claim 1, characterized in that Before receiving the first conversation information, the method further includes: Determining historical conversation information corresponding to the first account to which the first conversation information belongs; Processing the historical conversation information to obtain memory information; Vectorization is performed on the memory information to obtain a memory vector, and the memory vector is stored in the database.

3. The method according to claim 2, characterized in that Processing the historical conversation information to obtain memory information includes: Processing the historical conversation information to obtain observation memory information, and determining insight memory information based on the observation memory information; The vectorizing the memory information to obtain a memory vector includes: Vectorization processing is performed on the observation memory information and the insight memory information to obtain an observation memory vector and an insight memory vector.

4. The method according to claim 3, characterized in that Processing the historical conversation information to obtain observation memory information includes: Determining whether the historical conversation information stored in the first storage repository meets a preset processing condition; When it is determined that the historical conversation information stored in the first repository meets the preset processing condition, a preset model is called to perform multiple processing on the historical conversation information to obtain observation memory information.

5. The method according to claim 4, characterized in that Determining whether the historical conversation information stored in the first storage repository meets a preset processing condition includes: Determining whether a storage duration of the historical conversation information stored in the first storage repository reaches a first threshold; If it is determined that the storage duration of the historical conversation information stored in the first repository does not reach the first threshold, and it is determined that the amount of historical conversation information stored in the first repository reaches the second threshold, then it is determined that the preset processing condition is met; If it is determined that the storage duration of the historical conversation information stored in the first storage repository reaches the first threshold, it is determined that the preset processing condition is met.

6. The method according to claim 4, characterized in that Calling a preset model to perform various processes on the historical conversation information to obtain observation memory information, including: Calling the preset model to perform filtering processing on the historical conversation information according to the first processing rule to obtain real information; Calling the preset model to perform memory retrieval processing on the real information according to the second processing rule to obtain initial observation memory information; The preset model is called to perform deduplication processing on the initial observation memory information according to the third processing rule to obtain the observation memory information.

7. The method according to any one of claims 3 to 6, characterized in that: Determining insight memory information based on the observation memory information includes: When it is determined that the amount of information in the observed memory information reaches a third threshold, performing keyword extraction processing on the observed memory information to obtain newly generated attribute keywords; Adding the newly generated attribute keyword to the existing attribute keyword list to obtain an updated attribute keyword list; The updated sub-insight memory information of each attribute keyword in the updated attribute keyword list is determined to obtain the insight memory information.

8. A dialogue processing device, characterized in that: The device comprises: A receiving unit, configured to receive first conversation information; a screening unit, configured to screen, from a database based on the first conversation information, at least one candidate reply information that matches the first conversation information; wherein the database includes memory information determined based on historical conversation information; A determination unit is configured to determine target response information based on the at least one candidate response information.

9. An electronic device, characterized in that: include: processor; a memory for storing executable instructions of the processor; The processor is configured to perform the method according to any one of claims 1 to 7 by executing the executable instructions.

10. A computer program product having a computer program stored thereon, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.