Session content determination method and device, electronic equipment and computer program product
By obtaining user association information and the current session context, and generating session reply content that meets personalized needs, the chat assistant's shortcomings in performance and context understanding are solved, and the depth of chat sessions and user retention is improved.
Patent Information
- Application Number
- CN202411346876.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-10
AI Technical Summary
When generating session reply suggestions, existing chat assistants need to search long-term historical chat records, resulting in performance bottlenecks, and they cannot understand the context of long-term historical chat content, and cannot accurately capture the user's emotions and emotional needs, resulting in insufficient reply Sensitive or inappropriate.
By obtaining user's user association information, performing character extraction processing, generating user character tags, and combining the context information of the current session, a large language model is used to generate session reply content that meets user needs.
The query performance problem when preset reply content determines the response suggestions is solved. The generated session reply content can better match the session context, meet the user's personalized needs, and improve the depth of the chat session and user retention.
Smart Images

Figure CN119293169A_ABST
Abstract
Description
Background Art
[0002] This section is intended to provide a background or context to the embodiments of the disclosure that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.
[0003] With the continuous development of Internet technology and the changes in people's social needs, social networks have become an indispensable part of people's daily lives. Social network services are usually based on the Internet and provide users with various interactive channels for contact and communication.
[0004] In social chat applications, there are currently functions similar to chat assistants to help users who are not good at socializing to chat with others better and improve the depth of chat conversations between the two parties. In terms of technical implementation, it is necessary to generate corresponding reply suggestions based on the context information of the user's chat through the configuration system or retrieval system to prompt the user to choose. Summary of the invention
[0005] However, existing chat assistants face performance bottlenecks when generating conversation reply suggestions due to the need to retrieve long-term historical chat records, and are unable to understand the context of long-term historical chat content.
[0006] To this end, the present disclosure proposes an improved method for determining conversation content, and provides a solution for generating conversation reply content based on long-term memory understanding, which combines the context information of the real-time conversation to generate conversation reply suggestions that meet user needs.
[0007] In this context, embodiments of the present disclosure are intended to provide a method for determining session content, an apparatus for determining session content, an electronic device, a computer-readable storage medium, and a computer program product.
[0008] In a first aspect of an embodiment of the present disclosure, a method for determining conversation content is provided, comprising: obtaining user association information of a first user; performing personality extraction processing on the user association information to obtain a first personality tag corresponding to the first user; obtaining a current conversation context corresponding to the first user, performing session identification processing on the current conversation context to obtain a conversation identification result of the current conversation of the first user; and determining recommended reply content of the current conversation based on the first personality tag and the conversation identification result.
[0009] In one embodiment of the present disclosure, obtaining user association information of the first user includes: obtaining user personal information of the first user; obtaining user behavior information of the first user in an application platform, the user behavior information including resource operation records of the first user and one or more of associated user information; obtaining historical chat content of the first user, and using the user personal information, the user behavior information and the historical chat content as the user association information.
[0010] In one embodiment of the present disclosure, the performing of personality extraction processing on the user association information to obtain a first personality label corresponding to the first user includes: constructing at least one task prompt text according to the user association information; performing corpus extraction processing on the user association information based on the task prompt text to obtain a task extraction result; inputting the task extraction result into a pre-constructed large language model to obtain the first personality label, wherein the first personality label includes one or more of topic preference, personality portrait, chat style, user relationship and emotional understanding.
[0011] In one embodiment of the present disclosure, the user association information includes historical chat content, and the corpus extraction processing is performed on the user association information based on the task prompt text to obtain a task extraction result, including: based on the historical chat content, determining a second user corresponding to the first user; based on the task prompt text, performing corpus extraction processing on the historical chat content to obtain user relationship corpus and conversation emotion corpus between the first user and the second user; the user relationship corpus is used to generate the user relationship, and the conversation emotion corpus is used to generate emotion understanding.
[0012] In one embodiment of the present disclosure, the user relationship is used to characterize the user association relationship between the first user and the second user, and the emotion understanding is used to characterize the emotions of the first user and the second user in the historical chat content.
[0013] In one embodiment of the present disclosure, the conversation recognition result includes a topic extraction result, an intention recognition result and a perfunctory detection recognition result; the performing conversation recognition processing on the current conversation context to obtain the conversation recognition result of the current conversation of the first user includes: performing topic extraction processing on the current conversation context to obtain the topic extraction result of the current conversation; performing intention recognition processing on the current conversation context to obtain the intention recognition result of the current conversation; performing perfunctory detection processing on the current conversation context to obtain the perfunctory detection recognition result of the current conversation.
[0014] In one embodiment of the present disclosure, determining the recommended reply content of the current conversation based on the first personality tag and the conversation identification result includes: determining a conversation object user in the current conversation, the conversation object user being a user having a conversation with the first user in the current conversation; obtaining a second personality tag corresponding to the conversation object user; and determining the recommended reply content based on the first personality tag, the second personality tag and the conversation identification result.
[0015] In one embodiment of the present disclosure, determining the recommended reply content based on the first personality tag, the second personality tag, and the conversation recognition result includes: determining a current conversation prompt text corresponding to the current conversation; inputting the current conversation prompt text, the first personality tag, the second personality tag, and the conversation recognition result into a large language model; and outputting the recommended reply content by the large language model.
[0016] In a second aspect of the embodiments of the present disclosure, a conversation content determination device is provided, including: an associated information determination module, used to obtain user associated information of a first user; a first personality determination module, used to perform personality extraction processing on the user associated information to obtain a first personality label corresponding to the first user; a session identification module, used to obtain a current session context corresponding to the first user, perform session identification processing on the current session context, and obtain a session identification result of the current session of the first user; and a reply content determination module, used to determine recommended reply content for the current session based on the first personality label and the session identification result.
[0017] In one embodiment of the present disclosure, the associated information determination module includes an associated information determination unit, which is used to: obtain user personal information of the first user; obtain user behavior information of the first user in the application platform, the user behavior information including resource operation records of the first user and one or more associated user information; obtain historical chat content of the first user, and use the user personal information, the user behavior information and the historical chat content as the user associated information.
[0018] In one embodiment of the present disclosure, the first personality determination module includes a first personality determination unit, which is used to: construct at least one task prompt text based on the user association information; based on the task prompt text, perform corpus extraction processing on the user association information to obtain a task extraction result; input the task extraction result into a pre-constructed large language model to obtain the first personality label, and the first personality label includes one or more of topic preference, personality portrait, chat style, user relationship and emotional understanding.
[0019] In one embodiment of the present disclosure, the user association information includes historical chat content, and the first character determination unit based on the task prompt text includes a corpus extraction subunit, which is used to: determine the second user corresponding to the first user based on the historical chat content; perform corpus extraction processing on the historical chat content based on the task prompt text to obtain user relationship corpus and conversation emotion corpus between the first user and the second user; the user relationship corpus is used to generate the user relationship, and the conversation emotion corpus is used to generate emotion understanding.
[0020] In one embodiment of the present disclosure, the conversation recognition result includes a topic extraction result, an intention recognition result and a perfunctory detection recognition result; the conversation recognition module includes a conversation recognition unit, which is used to: perform topic extraction processing on the current conversation context to obtain the topic extraction result of the current conversation; perform intention recognition processing on the current conversation context to obtain the intention recognition result of the current conversation; perform perfunctory detection processing on the current conversation context to obtain the perfunctory detection recognition result of the current conversation.
[0021] In one embodiment of the present disclosure, the reply content determination module includes a reply content determination unit, which is used to: determine a conversation object user in the current session, wherein the conversation object user is a user who has a conversation with the first user in the current session; obtain a second personality tag corresponding to the conversation object user; and determine the recommended reply content based on the first personality tag, the second personality tag and the conversation identification result.
[0022] In one embodiment of the present disclosure, the reply content determination unit includes a reply content determination subunit, which is used to: determine a current session prompt text corresponding to the current session; input the current session prompt text, the first personality label, the second personality label and the session recognition result into a large language model; and output the recommended reply content by the large language model.
[0023] In a third aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for determining the content of a conversation as described above is implemented.
[0024] In a fourth aspect of the embodiments of the present disclosure, an electronic device is provided, comprising: a processor; and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method for determining the content of a conversation as described above is implemented.
[0025] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program, which implements any one of the above-mentioned methods for determining the content of a conversation when executed by a processor.
[0026] According to the technical solution of the embodiment of the present disclosure, on the one hand, the conversation reply content is generated according to the user's personality tag content and the context information of the current conversation, which can solve the query performance problem that may exist when determining the reply suggestion based on the preset reply content. On the other hand, the personality tag content is generated according to the user's association information, and the conversation reply content is generated in combination with the context information of the current conversation, so that the generated conversation reply content can better match the conversation context and better meet the user's personalized needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:
[0028] Figure 1 A schematic block diagram schematically illustrates a system architecture of an exemplary application scenario according to some embodiments of the present disclosure;
[0029] Figure 2 The following schematically shows a flow chart of a method for determining session content according to some embodiments of the present disclosure;
[0030] Figure 3 The overall flow chart of the session content determination scheme according to some embodiments of the present disclosure is schematically shown;
[0031] Figure 4 Schematically shows a process diagram of the user persona extraction stage according to some embodiments of the present disclosure;
[0032] Figure 5 Schematically shows a process diagram of a session content generation phase according to some embodiments of the present disclosure;
[0033] Figure 6 A schematic block diagram schematically illustrates a session content determination device according to some embodiments of the present disclosure;
[0034] Figure 7 A schematic diagram schematically illustrates a storage medium according to an example embodiment of the present disclosure;
[0035] Figure 8 A block diagram of an electronic device according to an exemplary embodiment of the invention is schematically shown.
[0036] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0037] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0038] Those skilled in the art will appreciate that the embodiments of the present disclosure may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0039] According to an embodiment of the present disclosure, a method for determining conversation content, an apparatus for determining conversation content, an electronic device, a computer-readable storage medium, and a computer program product are proposed.
[0040] In this article, it is important to understand that the terms involved, such as Large Language Model (LLM), are natural language processing models based on deep learning technology that are designed to understand and generate natural language text. These models learn the structure, rules, and semantics of language by pre-training on massive data, thus having the ability to understand and generate text. Natural Language Processing (NLP) aims to enable computers to understand, interpret, and generate human language. It combines multiple methods such as computational linguistics, statistics, machine learning, and deep learning to achieve effective communication between humans and machines.
[0041] In addition, any number of elements in the drawings is for illustration and not limitation, and any naming is only for distinction and does not have any limiting meaning.
[0042] The principle and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure. SUMMARY OF THE INVENTION
[0044] For social chat applications, in one technical solution, the reply suggestion information is first stored in a search engine in a certain format through manual preset. When a chat conversation is triggered, the chat context content is extracted by NLP technology. Then, the search engine is searched for matching reply suggestion information based on the corresponding keywords, and the top N results are selected based on the text relevance sorting and returned to the user.
[0045] However, the above scheme may have query performance bottlenecks in the retrieval system when the amount of preset reply suggestions is too large. Traditional NLP technology has limited ability to understand context when extracting keywords, and the preset reply suggestion information returned may not be very relevant to the context. In addition, since the reply suggestions are generated by retrieving preset reply suggestion information, it is impossible to provide targeted replies based on the user's specific needs or preferences; and the use of this scheme cannot accurately capture the user's emotions and emotional needs, resulting in replies that appear insensitive or inappropriate in some social scenarios.
[0046] In another technical solution, the chat context content is directly input into the LLM, and the corresponding reply suggestions are obtained and returned to the user. However, due to technical reasons such as the context length, storage system, and service performance of the LLM, only a relatively small amount of chat history is transmitted as context information input, and it is impossible to achieve long-term historical chat content context understanding.
[0047] Based on the above content, the basic idea of the present disclosure is to provide a solution for generating conversation reply content based on long-term memory understanding, which combines the context information of the real-time conversation to generate conversation reply suggestions that meet user needs.
[0048] After introducing the basic principles of the present disclosure, various non-limiting embodiments of the present disclosure are described in detail below.
[0049] Application Scenario Overview
[0050] First reference Figure 1 , Figure 1 A schematic block diagram of a system architecture showing an exemplary application scenario in which a method and apparatus for determining conversation content according to an embodiment of the present disclosure can be applied is shown.
[0051] like Figure 1 As shown, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. The terminal devices 101, 102, 103 may be various electronic devices with display screens, including but not limited to desktop computers, portable computers, smart phones, tablet computers, etc. It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. For example, the server 105 may be a server cluster composed of multiple servers.
[0052] The method for determining the content of a conversation provided in the embodiment of the present disclosure is generally executed by the server 105, and accordingly, the apparatus for determining the content of a conversation is generally disposed in the server 105. However, it is easy for a person skilled in the art to understand that the method for determining the content of a conversation provided in the embodiment of the present disclosure can also be executed by the terminal devices 101, 102, and 103, and accordingly, the apparatus for determining the content of a conversation can also be disposed in the terminal devices 101, 102, and 103, and this is not particularly limited in the present exemplary embodiment. For example, in an exemplary embodiment, a user can conduct a conversation chat through the terminal devices 101, 102, and 103, and the terminal devices 101, 102, and 103 can upload the historical chat session content and the current chat session content to the server 105, and the server generates a user personality tag according to the historical chat content through the method for determining the content of a conversation provided in the embodiment of the present disclosure, and generates a conversation reply content in combination with the context information of the current conversation chat, and transmits the generated conversation reply content to the terminal devices 101, 102, and 103, etc., so that the terminal devices 101, 102, and 103 can display the generated conversation reply content to the user.
[0053] It should be understood that Figure 1 The application scenario shown is only an example in which the embodiments of the present disclosure can be implemented. The scope of application of the embodiments of the present disclosure is not limited in any aspect by the application scenario.
[0054] Exemplary Methods
[0055] Combine the following Figure 1 For application scenarios, refer to Figure 2 To describe the method for determining the content of a conversation according to an exemplary embodiment of the present disclosure. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principle of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.
[0056] The present disclosure first provides a method for determining the content of a session. The method may be executed by a terminal device or a server, and the present disclosure does not specifically limit this. In this exemplary embodiment, the method is described by taking a server executing the method as an example.
[0057] Reference Figure 2 As shown, the method for determining the content of a conversation may include the following steps S210 to S240:
[0058] Step S210: Acquire user association information of the first user.
[0059] In one embodiment of the present disclosure, the first user may be an auxiliary object user in the current chat session, that is, the chat session application implemented based on the session content determination method of the present disclosure may assist the first user in generating chat reply suggestions. The chat reply suggestions include one or more recommended reply contents. The user association information may be information associated with the first user.
[0060] After the first user is determined, user association information of the first user is obtained. For example, the user association information may include but is not limited to user personal information of the first user, behavior information of the first user on the application platform, and historical chat content between the first user and other users.
[0061] Step S220: Perform personality extraction processing on the user association information to obtain a first personality label corresponding to the first user.
[0062] In one embodiment of the present disclosure, the first personality tag may be a personality tag corresponding to the first user, and the first personality tag may include the first user's topic preference, personality portrait, chat style and other content in the chat.
[0063] After obtaining the user association information of the first user, the user association information is subjected to personality extraction processing. For example, the personality LLM may be used to perform the personality extraction process to obtain a first personality tag of the first user. The first personality tag may include one or more contents.
[0064] Step S230: acquiring a current session context corresponding to the first user, performing session identification processing on the current session context, and obtaining a session identification result of the current session of the first user.
[0065] In one embodiment of the present disclosure, the current conversation context may be context information of a real-time chat between the first user and other users. The conversation recognition result may be a recognition result obtained after performing conversation recognition processing on the current conversation context, and the conversation recognition processing may include topic extraction, emotional demand detection and other processing processes.
[0066] When it is detected that the first user is chatting with other users, the context information of the first user in the current session can be obtained in real time, and semantic recognition is performed on the obtained context information of the current session to obtain corpus content for generating recommended content for the current session as the session recognition result of the current session.
[0067] Step S240: Determine the recommended reply content for the current conversation based on the first person setting tag and the conversation recognition result.
[0068] In one embodiment of the present disclosure, the recommended reply content may be specific content of a real-time conversation reply generated based on a summary of multi-dimensional information and the current conversation context.
[0069] The identified first person label and the conversation recognition result of the current conversation are used as corpus data, and the above corpus data is used as input data of the chat LLM. The chat LLM is used to process the above corpus data, simulate or generate a text response that meets the user's personalized needs as the recommended reply content of the current conversation, and the recommended reply content is displayed to the user for the first user to select.
[0070] In the method for determining the conversation content provided in this example implementation, on the one hand, the conversation reply content is generated based on the user's persona tag content and the context information of the current conversation, which can solve the query performance problem that may exist when determining the reply suggestion based on the preset reply content. On the other hand, the persona tag content is generated based on the user's associated information, and the conversation reply content is generated in combination with the context information of the current conversation, so that the generated conversation reply content can better match the conversation context and better meet the user's personalized needs.
[0071] Next, the above steps of this exemplary embodiment are described in more detail.
[0072] refer to Figure 3 , Figure 3 The overall flow chart of the conversation content determination scheme according to some embodiments of the present disclosure is schematically shown. The conversation content determination method of the present disclosure includes two stages, a user persona extraction stage and a conversation content generation stage. The first persona label corresponding to the first user generated in the user persona extraction stage and the persona information generated in the user persona extraction stage are regularly updated, and the persona information obtained by regular updates is used in the conversation content generation stage, and finally the recommended reply content of the current conversation is generated.
[0073] In one embodiment of the present disclosure, for step S210, obtaining user association information of the first user includes: obtaining user personal information of the first user; obtaining user behavior information of the first user in the application platform, the user behavior information including resource operation records of the first user and one or more of associated user information; obtaining historical chat content of the first user, and using the user personal information, user behavior information and historical chat content as user association information.
[0074] In the user persona extraction stage, the main content sources of the first user's user persona information extraction may include the following three aspects: (1) User personal information may be the basic personal information filled in by the first user on the application platform. The user personal information may include but is not limited to the first user's user name, avatar, personal profile (such as age, city, gender), contact information, etc., so as to display the personal image and basic information on the application platform. The application platform may be a social network platform where the first user conducts conversations and chats with other users.
[0075] (2) User behavior information may be the interest behavior of the first user on the application platform, including the resource operation records of the first user on various resources, that is, the interest behavior on the site. Resource operation records may be the behavior records of the first user operating various resources on the application platform. For example, resource operation records may include but are not limited to the first user's listening records, video viewing records, live broadcast viewing records, chat object records, etc. on the application platform. Associated user information may be the personal basic information corresponding to other users (such as the second user) associated with the first user. The second user may be another user who has had a chat behavior with the first user in the past.
[0076] (3) Historical chat content, i.e., the specific content of the historical chat records between the first user and other users. For example, the historical chat records may be message records between the first user and the second user in the historical chat session. Using the above data as the main content source of user personality labels and extracting personality based on multi-dimensional data can effectively solve the long-term memory problem of generating chat content.
[0077] In one embodiment of the present disclosure, for step S220, the user-related information is subjected to personality extraction processing to obtain a first personality label corresponding to the first user, including: constructing at least one task prompt text according to the user-related information; based on the task prompt text, performing corpus extraction processing on the user-related information to obtain a task extraction result; inputting the task extraction result into a pre-constructed large language model to obtain a first personality label, and the first personality label includes one or more of topic preference, personality portrait, chat style, user relationship and emotional understanding.
[0078] The task prompt text can be a natural language text input to the chat large language model to guide the model to complete a specific task. The prompt word can be a question, command, or other form of natural language expression, the purpose of which is to guide the model to generate the desired output. The prompt word contains several key elements, including instructions, context, input data, and output instructions. The task extraction result can be the result obtained by LLM after extracting the user-related information using the task prompt text.
[0079] refer to Figure 4 , Figure 4 The process diagram of the user persona extraction stage according to some embodiments of the present disclosure is schematically shown. The task prompt text is constructed based on the acquired user association information, such as Figure 4 As shown, task prompt texts are constructed based on user personal information, on-site interest behaviors and historical chat records as prompt words for the multi-task prompt word project; then the multi-task prompt word project is used to extract corpus from the above user-related information to obtain task extraction results.
[0080] For example, the first user chats with other users in the application platform, such as exchanging food, movies and other contents. A corpus extraction task can be generated for the historical chat records. In addition, the first user can listen to music or browse videos on the application platform. At this time, a corpus extraction task can be generated based on the user's interest behavior on the site. Different tasks corresponding to different user behaviors in the application platform are generated.
[0081] For the above tasks, we can construct the corresponding task prompt texts, and the multi-task prompt word project can extract the user-related information based on the task prompt text to obtain the task extraction results. For example, we can generate the corresponding topic preference corpus based on the historical chat records, and generate the character portrait corpus based on the user's interest behavior. The above corpus data is used as the task extraction result.
[0082] Continue to refer Figure 4 , summarize the content of the task extraction results and input them into a pre-built large language model (such as a persona LLM), which returns a first persona label and stores it in a database. The first persona label may include but is not limited to one or more of topic preference, persona portrait, chat style, user relationship and emotional understanding. Among them, topic preference can be the degree of preference of platform users for different topics. Persona portrait is the character setting of the application platform for platform users. The purpose of constructing a persona portrait is to distinguish and classify users and analyze individual problem solving. Chat style may refer to the specific methods and habits displayed by users during communication. User relationship may be a specific relationship between different users. Emotional understanding may be the result of emotion detection on the content of user conversational chats.
[0083] Through the above steps, multi-dimensional information can be used in the process of extracting personality labels, making the recommended reply content more personalized, and making the subsequently generated recommended reply content have the long-term memory of historical chat records.
[0084] In one embodiment of the present disclosure, based on the task prompt text, corpus extraction processing is performed on user association information to obtain a task extraction result, including: based on the historical chat content, determining the second user corresponding to the first user; based on the task prompt text, corpus extraction processing is performed on the historical chat content to obtain the user relationship corpus and conversation emotion corpus between the first user and the second user; the user relationship corpus is used to generate user relationships, and the conversation emotion corpus is used to generate emotion understanding.
[0085] The second user may be another user in the application platform who has established a chat session with the first user in the past. The user relationship corpus may be a data set for performing a user relationship extraction task. The conversation emotion corpus may be a data set for performing a conversation emotion extraction task.
[0086] In the user character extraction stage, all historical chat contents related to the first user are obtained from the database, and the second user corresponding to the first user in the historical chat contents is determined. The second user can be one user or multiple users. When the second user is multiple users, personalized analysis is performed on each user to generate relevant information matching each user.
[0087] Continue to refer Figure 4 ,exist Figure 4 In the multi-task prompt project, the task prompt text is input into each task in the multi-task prompt project for corpus extraction. For the historical chat content, the prompt words of the historical chat content are input into the corresponding user persona extraction task. The user persona extraction task performs data mining and corpus extraction on the historical chat content, and then obtains corpus data for generating persona label information, such as the user relationship corpus and conversation emotion corpus or other corpus data between the first user and the second user.
[0088] The above corpus data is input into the persona LLM, which generates the first persona label based on the above corpus data, where the user relationship corpus is used to generate user relationships and the conversation emotion corpus is used to generate emotion understanding. In the user persona extraction stage, the large language model uses multi-dimensional information extraction to obtain the persona label, which can effectively solve the long-term memory and personalization problems in the chat reply implementation process.
[0089] For example, a specific example of the user persona extraction stage is as follows. User-related information may include: 1) User 1 personal information: gender female, city Shanghai, age 28. 2) User 1's interest behavior on the site: Most of the browsing records are videos tagged with "food". 3) User 1's historical chat records: The depth of the chat records with other users is relatively shallow, and the chat content is more daily.
[0090] After the character extraction stage, the results obtained include: 1) User 1 character - chat topics: Shanghai - regional characteristics, daily life inquiries, food; 2) User 1 character - chat style: passive response type, tends to give short answers, and rarely takes the initiative to expand topics; 3) User 1 character - chat intention: establish social connections, but avoid in-depth or sensitive topics; 4) User 1 character - character personality: cautious, does not easily disclose personal information, and keeps a certain distance from strangers.
[0091] In one embodiment of the present disclosure, the extraction results may also include the user relationship between the first user and the second user and the emotional understanding in the historical chat, the user relationship is used to characterize the user association relationship between the first user and the second user, and the emotional understanding is used to characterize the emotions of the first user and the second user in the historical chat content.
[0092] For example, the user relationship between user 1 and user 2 may be ordinary friends, and the emotional understanding of the historical chat records between user 1 and user 2 may include chat emotions, such as happiness, excitement, frustration, sadness, etc. By analyzing the historical chat records between the first user and the second user, the tag information between the first user and the other user can be determined as a data basis for generating recommended reply content.
[0093] In one embodiment of the present disclosure, for step S230, session identification processing is performed on the current session context to obtain a session identification result of the current session of the first user, including: performing topic extraction processing on the current session context to obtain a topic extraction result of the current session; performing intent identification processing on the current session context to obtain an intent identification result of the current session; performing perfunctory detection processing on the current session context to obtain a perfunctory detection identification result of the current session.
[0094] The topic extraction result may be the topic tag corresponding to the current session. The intention recognition result may be the recognition result of the purpose or intention expressed by the speech after semantic understanding of the sentence input by the user in the current session. The perfunctory detection recognition result may be the recognition result of the intensity of the user's willingness to chat in the current session.
[0095] When the application platform detects that the first user is currently chatting with other users, the context information of the current conversation can be obtained, and the current conversation recognition process can be performed on the obtained context information, and the conversation recognition result can be used as the data basis of the multi-task prompt project.
[0096] refer to Figure 5 , Figure 5 The process diagram of the session content generation stage according to some embodiments of the present disclosure is schematically shown. The session content generation stage first needs to perform session identification based on the context content of the current chat session, such as Figure 5 As shown in the figure, conversation recognition includes the processes of topic extraction, intent recognition, and perfunctory detection. This step mainly uses the conversation understanding LLM to perform chat topics, intent recognition, perfunctory detection, etc. on the current conversation context and obtain the corresponding recognition results. Using a large language model to recognize the current conversation context can more accurately match the conversation context and user emotional needs.
[0097] The following is the session identification result of the current session of the first user.
[0098] Chat session context:
[0099] User 1: Hello!
[0100] User 2: Hello~
[0101] User 1: Oh.
[0102] Session identification results:
[0103] Topic extraction: None.
[0104] Intent recognition: A new topic.
[0105] Perfunctory detection: It is detected that user 1 has low willingness to chat.
[0106] In one embodiment of the present disclosure, for step S240, the recommended reply content of the current session is determined based on the first personal tag and the conversation identification result, including: determining the conversation object user in the current session, the conversation object user is the user who has a conversation with the first user in the current session; obtaining the second personal tag corresponding to the conversation object user; and determining the recommended reply content based on the first personal tag, the second personal tag and the conversation identification result.
[0107] The conversation object user may be a user who is chatting with the first user in the current conversation, and the conversation object user may be a user among the second users. The second person setting tag may be a person setting tag corresponding to the conversation object user.
[0108] When generating recommended reply content, the user who chats with the first user in the current session is used as the session object user, and the second personality label corresponding to the session object user is obtained. Specifically, the second personality label is generated in the same way as the first personality label, and this disclosure will not go into details. After obtaining the second personality label, the recommended reply content is determined based on the first personality label, the second personality label and the session recognition result of the current session. Automatically generating recommended reply content based on the above content can effectively solve the system performance problem of using preset reply suggestions and long-term historical chat content for retrieval and storage.
[0109] In one embodiment of the present disclosure, determining recommended reply content based on a first personality tag, a second personality tag, and a conversation recognition result includes: determining a current conversation prompt text corresponding to the current conversation; inputting the current conversation prompt text, the first personality tag, the second personality tag, and the conversation recognition result into a large language model; and outputting the recommended reply content by the large language model.
[0110] The current session prompt text may be a prompt word input to the LLM for generating a recommended reply content for the current session by the LLM. The recommended reply content may be a chat reply suggestion generated by the LLM for the first user for the current session, and the recommended reply content may include one or more.
[0111] Continue to refer Figure 5After performing session recognition for the context of real-time chat session content, the recognition result label of the session recognition and the personality labels of both chat users are used as input data for the reply content determination task in the multi-task prompt project. In addition, the current session prompt text corresponding to the current session, that is, the current session prompt word, needs to be determined, and all the above content is input into the chat LLM. Finally, the chat LLM generates chat reply suggestions that can be returned to the user as recommended reply content.
[0112] The following are recommended reply contents generated for the current session of the first user.
[0113] User 1 personality tag:
[0114] Chat topics: Shanghai-regional characteristics, daily life inquiries, food;
[0115] Chatting style: Passive response type, tends to give brief answers and rarely takes the initiative to start a topic;
[0116] Chat Intent: Build social connections, but avoid deep or sensitive topics;
[0117] Personality: Cautious, not easily revealing personal information, keeping a certain distance from strangers;
[0118] User 2 personality tags:
[0119] Chat topics: reading novels, liking sports, born in the 90s;
[0120] Chat style: humor;
[0121] Chat intention: share personal life status and seek resonance;
[0122] Personality: optimistic and open;
[0123] Chat reply suggestions:
[0124] Response 1: Are you from Shanghai? What Shanghainese food can you recommend?
[0125] Reply 2: I love sports and reading novels. Do you have any favorite sports?
[0126] Reason for reply: The conversation between the two parties has just begun and the content is simple. Recommending new topics will promote communication.
[0127] For the generated reply content, the first user can select a reply content and send it to the conversation partner user (i.e. user 2). Through the above steps, users who are not good at chatting can be provided with personalized chat reply suggestions that meet the user's emotional needs for chatting, which can improve the depth of the application chat session and user retention.
[0128] In summary, the method for determining the conversation content of the present disclosure obtains the user association information of the first user; performs a persona extraction process on the user association information to obtain the first persona label corresponding to the first user; obtains the current conversation context corresponding to the first user, performs a conversation identification process on the current conversation context, and obtains the conversation identification result of the current conversation of the first user; and determines the recommended reply content of the current conversation based on the first persona label and the conversation identification result. On the one hand, the conversation reply content is generated based on the user persona label content and the context information of the current conversation, which can solve the query performance problem that may exist when the reply suggestion is determined based on the preset reply content. On the other hand, the persona label content is generated based on the user association information, and the conversation reply content is generated in combination with the context information of the current conversation, so that the generated conversation reply content can better match the conversation context and better meet the personalized needs of the user. On the other hand, when generating chat reply suggestions, the conversation context content is identified based on the large language model, which can more accurately match the conversation context and the user's emotional needs.
[0129] Exemplary Devices
[0130] After introducing the method of the exemplary embodiment of the present disclosure, next, refer to Figure 6 A conversation content determination device according to an exemplary embodiment of the present disclosure is described.
[0131] exist Figure 6 In the embodiment, the conversation content determination device 600 may include: an associated information determination module 610, a first person setting determination module 620, a conversation identification module 630 and a reply content determination module 640.
[0132] Among them, the associated information determination module 610 is used to obtain the user associated information of the first user; the first personality determination module 620 is used to perform personality extraction processing on the user associated information to obtain the first personality label corresponding to the first user; the session identification module 630 is used to obtain the current session context corresponding to the first user, perform session identification processing on the current session context, and obtain the session identification result of the current session of the first user; the reply content determination module 640 is used to determine the recommended reply content of the current session based on the first personality label and the session identification result.
[0133] In one embodiment of the present disclosure, the associated information determination module 610 includes an associated information determination unit, which is used to: obtain user personal information of the first user; obtain user behavior information of the first user in the application platform, the user behavior information including resource operation records of the first user and one or more of the associated user information; obtain the historical chat content of the first user, and use the user personal information, user behavior information and historical chat content as user associated information.
[0134] In one embodiment of the present disclosure, the first personality determination module 620 includes a first personality determination unit, which is used to: construct at least one task prompt text based on user-related information; based on the task prompt text, perform corpus extraction processing on the user-related information to obtain a task extraction result; input the task extraction result into a pre-constructed large language model to obtain a first personality label, and the first personality label includes one or more of topic preference, personality portrait, chat style, user relationship and emotional understanding.
[0135] In one embodiment of the present disclosure, user association information includes historical chat content. Based on the task prompt text, the first person determination unit includes a corpus extraction subunit, which is used to: determine the second user corresponding to the first user based on the historical chat content; perform corpus extraction processing on the historical chat content based on the task prompt text to obtain user relationship corpus and conversation emotion corpus between the first user and the second user; the user relationship corpus is used to generate user relationships, and the conversation emotion corpus is used to generate emotion understanding.
[0136] In one embodiment of the present disclosure, the conversation recognition result includes a topic extraction result, an intention recognition result and a perfunctory detection recognition result; the conversation recognition module 630 includes a conversation recognition unit, which is used to: perform topic extraction processing on the current conversation context to obtain a topic extraction result of the current conversation; perform intention recognition processing on the current conversation context to obtain an intention recognition result of the current conversation; perform perfunctory detection processing on the current conversation context to obtain a perfunctory detection recognition result of the current conversation.
[0137] In one embodiment of the present disclosure, the reply content determination module 640 includes a reply content determination unit, which is used to: determine the conversation object user in the current session, where the conversation object user is the user who has a conversation with the first user in the current session; obtain the second personality label corresponding to the conversation object user; and determine the recommended reply content based on the first personality label, the second personality label and the conversation recognition result.
[0138] In one embodiment of the present disclosure, the reply content determination unit includes a reply content determination subunit, which is used to: determine the current session prompt text corresponding to the current session; input the current session prompt text, the first person setting label, the second person setting label and the session recognition result into the large language model; and output the recommended reply content by the large language model.
[0139] Since the various functional modules of the session content determination device of the example embodiment of the present disclosure correspond to the steps of the example embodiment of the session content determination method described above, for details not disclosed in the embodiment of the device of the present disclosure, please refer to the embodiment of the session content determination method described above, which will not be repeated here.
[0140] It should be noted that although several modules or units of the session content determination device are mentioned in the above detailed description, this division is not mandatory. In fact, according to the 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.
[0141] Exemplary Media
[0142] After introducing the device of the exemplary embodiment of the present disclosure, next, refer to Figure 7 A storage medium according to an exemplary embodiment of the present disclosure is described.
[0143] In some embodiments, various aspects of the present disclosure may also be implemented as a medium on which program code is stored, which, when executed by a processor of a device, is used to implement the steps in the method for determining the content of a session according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification.
[0144] For example, when the processor of the device executes the program code, the following may be implemented: Figure 2 In step S210, user association information of the first user is obtained; in step S220, a persona extraction process is performed on the user association information to obtain a first persona label corresponding to the first user; in step S230, a current session context corresponding to the first user is obtained, and a session identification process is performed on the current session context to obtain a session identification result of the current session of the first user; in step S240, a recommended reply content of the current session is determined based on the first persona label and the session identification result.
[0145] refer to Figure 7 As shown, a program product 700 for implementing the above-mentioned method for determining the content of a conversation or implementing the above-mentioned method for determining the content of a conversation according to an embodiment of the present disclosure is described, which may adopt a portable compact disk read-only memory (CD-ROM) and include program codes, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto.
[0146] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0147] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Readable signal media may also be any readable medium other than a readable storage medium.
[0148] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, 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 may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN).
[0149] Exemplary Computing Devices
[0150] After introducing the session content determination method, session content determination device, and storage medium according to the exemplary embodiments of the present disclosure, the following will refer to Figure 8 An electronic device according to an exemplary embodiment of the present disclosure is described.
[0151] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware embodiments, complete software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0152] In some possible embodiments, the electronic device according to the present disclosure may include at least one processing unit and at least one storage unit. The storage unit stores program code, and when the program code is executed by the processing unit, the processing unit executes the steps of the method for determining the content of a session according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit may execute the following steps: Figure 2 In step S210 shown in the figure, user association information of the first user is obtained; in step S220, a persona extraction process is performed on the user association information to obtain a first persona label corresponding to the first user; in step S230, a current session context corresponding to the first user is obtained, and a session identification process is performed on the current session context to obtain a session identification result of the current session of the first user; in step S240, recommended reply content of the current session is determined based on the first persona label and the session identification result.
[0153] Refer to the following Figure 8 An electronic device 800 according to an example embodiment of the present disclosure is described. Figure 8 The electronic device 800 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0154] like Figure 8 As shown, the electronic device 800 is in the form of a general computing device. The components of the electronic device 800 may include but are not limited to: at least one processing unit 801, at least one storage unit 802, a bus 803 connecting different system components (including the storage unit 802 and the processing unit 801), and a display unit 807.
[0155] Bus 803 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.
[0156] The storage unit 802 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 821 and / or a cache memory 822 , and may further include a read-only memory (ROM) 823 .
[0157] The storage unit 802 may also include a program / utility 825 having a set (at least one) of program modules 824, such program modules 824 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0158] The electronic device 800 may also communicate with one or more external devices 804 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 800, and / or may communicate with any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication may be performed through an input / output (I / O) interface 805. In addition, the electronic device 800 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 806. As shown, the network adapter 806 communicates with other modules of the electronic device 800 through a bus 803. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0159] It should be noted that although several units / modules or sub-units / modules of the session content determination device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be concretized in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided to be concretized by multiple units / modules.
[0160] In addition, although the operations of the disclosed method are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0161] Although the spirit and principle of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.
Claims
1. A method for determining conversation content, characterized in that: include: Obtaining user association information of the first user; Performing a persona extraction process on the user-related information to obtain a first persona label corresponding to the first user; Acquire a current session context corresponding to the first user, perform session identification processing on the current session context, and obtain a session identification result of the current session of the first user; Determine recommended reply content for the current conversation according to the first personality tag and the conversation identification result.
2. The method according to claim 1, characterized in that The obtaining of user association information of the first user includes: Obtaining user personal information of the first user; Acquire user behavior information of the first user in the application platform, where the user behavior information includes one or more of resource operation records of the first user and associated user information; The historical chat content of the first user is obtained, and the user personal information, the user behavior information and the historical chat content are used as the user association information.
3. The method according to claim 1 or 2, characterized in that: The performing a persona extraction process on the user association information to obtain a first persona label corresponding to the first user includes: Constructing at least one task prompt text according to the user association information; Based on the task prompt text, performing corpus extraction processing on the user-related information to obtain a task extraction result; The task extraction result is input into a pre-built large language model to obtain the first personality label, which includes one or more of topic preference, personality portrait, chat style, user relationship and emotional understanding.
4. The method according to claim 3, characterized in that The user-related information includes historical chat content, and the corpus extraction process is performed on the user-related information based on the task prompt text to obtain a task extraction result, including: Based on the historical chat content, determining a second user corresponding to the first user; Based on the task prompt text, the historical chat content is subjected to corpus extraction processing to obtain the user relationship corpus and conversation emotion corpus between the first user and the second user; the user relationship corpus is used to generate the user relationship, and the conversation emotion corpus is used to generate emotion understanding.
5. The method according to claim 1, characterized in that The conversation recognition results include topic extraction results, intention recognition results and perfunctory detection and recognition results; The performing session identification processing on the current session context to obtain a session identification result of the current session of the first user includes: Performing topic extraction processing on the current conversation context to obtain a topic extraction result of the current conversation; Performing intent recognition processing on the current session context to obtain an intent recognition result of the current session; Perform perfunctory detection processing on the current session context to obtain a perfunctory detection recognition result of the current session.
6. The method according to claim 1, characterized in that The determining, according to the first person setting tag and the conversation recognition result, the recommended reply content of the current conversation includes: Determine a session object user in the current session, where the session object user is a user having a session with the first user in the current session; Obtaining a second personality tag corresponding to the conversation object user; The recommended reply content is determined according to the first personality tag, the second personality tag and the conversation recognition result.
7. The method according to claim 6, characterized in that The determining the recommended reply content according to the first personality tag, the second personality tag and the conversation recognition result includes: Determine a current session prompt text corresponding to the current session; Inputting the current conversation prompt text, the first person setting label, the second person setting label and the conversation recognition result into a large language model; The recommended reply content is output by the large language model.
8. A device for determining conversation content, characterized in that: include: An associated information determination module, used to obtain user associated information of a first user; A first person setting determination module, configured to perform person setting extraction processing on the user association information to obtain a first person setting label corresponding to the first user; a session identification module, configured to obtain a current session context corresponding to the first user, perform session identification processing on the current session context, and obtain a session identification result of the current session of the first user; A reply content determination module is used to determine the recommended reply content of the current conversation according to the first personality label and the conversation recognition result.
9. An electronic device, characterized in that: include: processor; as well as A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the method for determining the content of a conversation as claimed in any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for determining the content of a conversation according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
system
JP2026155591A
system
JP2026155734A