GB2641595A - Session processing method, apparatus, electronic device, and storage medium - Google Patents
Session processing method, apparatus, electronic device, and storage mediumInfo
- Publication number
- GB2641595A GB2641595A GB2500312.0A GB202500312A GB2641595A GB 2641595 A GB2641595 A GB 2641595A GB 202500312 A GB202500312 A GB 202500312A GB 2641595 A GB2641595 A GB 2641595A
- Authority
- GB
- United Kingdom
- Prior art keywords
- session
- user
- historical
- current
- topic
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09F—DISPLAYING; ADVERTISING; SIGNS; LABELS OR NAME-PLATES; SEALS
- G09F9/00—Indicating arrangements for variable information in which the information is built-up on a support by selection or combination of individual elements
- G09F9/30—Indicating arrangements for variable information in which the information is built-up on a support by selection or combination of individual elements in which the desired character or characters are formed by combining individual elements
- G09F9/33—Indicating arrangements for variable information in which the information is built-up on a support by selection or combination of individual elements in which the desired character or characters are formed by combining individual elements being semiconductor devices, e.g. diodes
-
- H—ELECTRICITY
- H10—SEMICONDUCTOR DEVICES; ELECTRIC SOLID-STATE DEVICES NOT OTHERWISE PROVIDED FOR
- H10H—INORGANIC LIGHT-EMITTING SEMICONDUCTOR DEVICES HAVING POTENTIAL BARRIERS
- H10H20/00—Individual inorganic light-emitting semiconductor devices having potential barriers, e.g. light-emitting diodes [LED]
- H10H20/80—Constructional details
- H10H20/85—Packages
- H10H20/857—Interconnections, e.g. lead-frames, bond wires or solder balls
-
- H10W70/611—
-
- H10W70/65—
-
- H10W90/00—
-
- H—ELECTRICITY
- H10—SEMICONDUCTOR DEVICES; ELECTRIC SOLID-STATE DEVICES NOT OTHERWISE PROVIDED FOR
- H10H—INORGANIC LIGHT-EMITTING SEMICONDUCTOR DEVICES HAVING POTENTIAL BARRIERS
- H10H29/00—Integrated devices, or assemblies of multiple devices, comprising at least one light-emitting semiconductor element covered by group H10H20/00
- H10H29/80—Constructional details
- H10H29/85—Packages
- H10H29/857—Interconnections
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P70/00—Climate change mitigation technologies in the production process for final industrial or consumer products
- Y02P70/50—Manufacturing or production processes characterised by the final manufactured product
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Machine Translation (AREA)
Abstract
Provided are a dialogue processing method and apparatus, and an electronic device, a storage medium, a computer program product and a computer program, which relate to the technical field of computers and specifically relate to the technical fields of artificial intelligence such as large language models, natural language processing, knowledge graphs, and deep learning. The specific implementation scheme comprises: acquiring a topic of the current dialogue of a first user and a first historical dialogue library associated with the first user; determining the similarity between the topic of the current dialogue and each historical dialogue in the first historical dialogue library; on the basis of the similarities, acquiring a plurality of candidate historical dialogues from the first historical dialogue library; on the basis of the forgetting coefficient and weight of each candidate historical dialogue, acquiring a reference dialogue from the plurality of candidate historical dialogues; and generating a reply statement on the basis of the reference dialogue and the topic of the current dialogue.
Description
[0001] SESSION PROCESSING METHOD, APPARATUS, ELECTRONIC DEVICE, AND STORAGE MEDIUM
[0002] CROSS REFERENCE TO RELATED APPLICATIONS
[0003] This application claims priority to Chinese patent application No. 2024101715645, filed on February 6, 2024, the entire contents of which is incorporated herein by reference.
[0004] TECHNICAL FIELD
[0005] The disclosure relates to the field of computer technology, more particularly to the field of artificial intelligence (Al) technology such as large language model, natural language processing, knowledge graph and deep learning, specifically, relates to a session processing method and a session processing apparatus, an electronic device, a storage medium, a computer program product, and a computer program.
[0006] BACKGROUND
[0007] With the development of artificial intelligence technology, the large language model and its applications have received widespread attention. Therefore, how to improve the personalization and accuracy of reply sentences generated by the large language model in session has become a problem to be solved urgently, such as improving user experience and increasing the core competitiveness of the applications.
[0008] SUMMARY
[0009] Embodiments of the disclosure aim to solve one of the technical problems in the related art at least to some extent.
[0010] The embodiments of the disclosure aims to provide a session processing method, a session processing apparatus, an electronic device, a storage medium, a computer program product and a computer program, which improves the reliability and personalization of generated reply sentences, improves session quality and increases user satisfaction in chatting.
[0011] According to a first aspect of embodiments of the disclosure, a session processing method is provided. The method includes: obtaining a topic of a current session of a first user and a first historical session library associated with the first user; determining a similarity between the topic of the current session and a topic of each historical session in the first historical session library; obtaining a plurality of candidate historical sessions from the first historical session library according to the similarity; obtaining a reference session from the plurality of candidate historical sessions based on a forgetting coefficient and a weight of each candidate historical session; and generating a reply sentence based on the reference session and the topic of the current session. According to a second aspect of embodiments of the disclosure, a session processing apparatus is provided. The apparatus includes: a first obtaining module, configured to obtain a topic of a current session of a first user and a first historical session library associated with the first user; a first determining module, configured to determine a similarity between the topic of the current session and a topic of each historical session in the first historical session library; a second obtaining module, configured to obtain a plurality of candidate historical sessions from the first historical session library according to the similarity; a third obtaining module, configured to obtain a reference session from the plurality of candidate historical sessions based on a forgetting coefficient and a weight of each candidate historical session; and a generating module, configured to generate a reply sentence based on the reference session and the topic of the current session.
[0012] According to a third aspect of embodiments of the disclosure, an electronic device is provided. The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; in which the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to cause the at least one processor to perform the session processing method of the first aspect.
[0013] According to a fourth aspect of embodiments of the disclosure, a non-transitory computer-readable storage medium having computer instructions stored thereon is provided. The computer instructions are used to cause a computer to perform the session processing method of the first aspect.
[0014] According to a fifth aspect of embodiments of the disclosure, a computer program product including a computer instruction is provided. When the computer instruction is executed by a processor, the steps of the session processing method of the first aspect are implemented.
[0015] According to a sixth aspect of embodiments of the disclosure, a computer program including a computer program code is provided. The computer program code is executed by a computer to cause the computer to perform the session processing method of the first aspect.
[0016] The session processing method, the session processing apparatus, the electronic device, the storage medium, the computer program product and the computer program provided by the embodiments of the disclosure have the following beneficial effects.
[0017] In the embodiment of the disclosure, firstly, the topic of the current session of the first user and the first historical session library associated with the first user are obtained. The similarity between the topic of the current session and that of each historical session in the first historical session library is determined. According to the similarity, the plurality of candidate historical sessions are obtained from the first historical session library. The reference session is obtained from the plurality of candidate historical sessions based on the forgetting coefficient and the weight of each candidate historical session. Finally, the reply is generated based on the reference session and the topic of the current session. Therefore, historical sentences with high timeliness and having topics similar to the topic of the current session are selected from the historical session library associated with the user as reference information to assist in generating the reply, which improves the reliability and personalization of reply, improves the quality of session, and increases user satisfaction in chatting.
[0018] It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of the disclosure, nor is it intended to limit the scope of the disclosure. Additional features of the disclosure will be easily understood from the following description.
[0019] BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above-mentioned and/or additional aspects and advantages of the disclosure will be apparent and easily understood from the following description of the embodiments taken in combination with the accompanying drawings, and the the accompanying drawings are used to better understand the scheme and do not constitute a limitation of the disclosure, in which: FIG. 1 is a flowchart of a session processing method according to an embodiment of the disclosure.
[0021] FIG. 2 is a schematic diagram of a user portrait graph according to an embodiment of the disclosure.
[0022] FIG. 3 is a flowchart of a session processing method according to another embodiment of the disclosure.
[0023] FIG. 4 is a flowchart of a session processing method according to yet another embodiment of the disclosure.
[0024] FIG. 5 is a schematic diagram of an updated user portrait graph according to an embodiment of the disclosure.
[0025] FIG. 6 is a flowchart of a session processing method according to a further embodiment of the disclosure.
[0026] FIG. 7 is a schematic diagram of a session processing apparatus according to an embodiment of the disclosure.
[0027] FIG. 8 is a block diagram of an exemplary electronic device suitable for mplementing embodiments of the disclosure.
[0028] DETAILED DESCRIPTION
[0029] The following description of exemplary embodiments of the disclosure is provided in combination with the accompanying drawings, which includes various details of the embodiments of the disclosure to aid in understanding, and should be considered merely exemplary. Those skilled in the art understood that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the disclosure. For the sake of clarity and brevity, descriptions of well-known functions and structures are omitted from the following description.
[0030] The embodiments of the disclosure relates to the field of artificial intelligence technology such as large language model, natural language understanding, knowledge graph, deep learning, etc. Artificial Intelligence (AI), as a new technical science, studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence.
[0031] Large Language Model (LLM), i.e., large model, is a deep learning model trained based on massive text data. The LLM can not only generate natural language texts, but also can deeply understand the meaning of these text and handle various natural language tasks, such as text summarization, question and answer, translation and so on.
[0032] Natural language understanding (NLU), commonly known as human-computer session, is a branch study of the AI. The NLU studies to simulate the human language communication process by electronic computers, so that the computers can understand and use natural languages of human society, such as Chinese and English, to realize natural language communication between human and computer to replace some human brain labors, including querying data, answering questions, excerpting literature, compiling data and all processing of information about natural language.
[0033] Knowledge graph, which is also called knowledge domain visualization or knowledge domain mapping map in the field of library and information, is a series of different graphs showing knowledge development processes and structural relationships, and describes the knowledge resources and their carriers by visualization technology, mining, analyzing, constructing, drawing and displaying knowledge and interrelationships between knowledge.
[0034] Deep learning is to learn the inherent laws and representation levels of sample data, and the information obtained in these learning processes is of great help to the interpretation of data such as words, images and sounds. The ultimate goal of the deep learning is to enable machines to have analytical learning ability like human beings, and to recognize data such as words, images and sounds.
[0035] In the technical solutions of the embodiments of the disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user's private information involved are all in compliance with the provisions of relevant laws and regulations, and do not violate public order and good customs.
[0036] A session processing method, a session processing apparatus, an electronic device, a storage medium, a computer program product and a computer program of embodiments of the disclosure are described below with reference to the attached drawings.
[0037] It should be noted that the execution subject of the session processing method in this embodiment is a session processing apparatus, which can be realized by software and/or hardware, and can be configured in an electronic device. The electronic device includes but is not limited to a terminal, a server end and the like.
[0038] In the embodiment of the disclosure, the session processing apparatus can be configured in a session system of any application or website. The session system can generate reply content to dialogue with a user through the session processing method according to the embodiment of the disclosure.
[0039] FIG. 1 is a flowchart of a session processing method according to an embodiment of the disclosure.
[0040] As illustrated in FIG. 1, the session processing method includes steps S101-S105.
[0041] At step S101, a topic of a current session of a first user and a first historical session library associated with the first user are obtained.
[0042] The first user can be any user that triggers a session system. The operation of triggering the session system may include clicking into a chat interface of the session system, or clicking on a specific control in a program or a website having a session function, etc., which can be preset according to actual application needs and is not limited in the embodiments of the disclosure.
[0043] In the embodiment of the disclosure, when the current session interface contains the session content of the first user chatting with the system, the topic of the current session can be obtained after analyzing and summarizing the session content in the interface.
[0044] It should be noted that in the embodiment of this disclosure, the current session can be initiated not only by the first user, but also by the session system. That is, when the first user triggers the session system, but there is no session content in the current session interface, the session system analyzes behavior habits of the first user according to a pre-constructed user portrait graph, to determine the topic that the first user is most likely to be interested in currently as the topic of this current session, and then initiates a session based on this topic.
[0045] How to construct a user portrait graph will be described next with reference to FIG. 2, and FIG. 2 is a schematic diagram of a user portrait graph.
[0046] In the embodiment of the disclosure, behavior data of each user in the application or website to which the session system is applied can be collected offline. Behavior tags associated with each user can be extracted from the behavior data, such as post bar name, interest point, consumption classification, post tag and so on. For example, after collecting the behavior habits of user a and user b, and extracting the behavior tags from the behavior habits of the user a and user b respectively, it can be determined that the behavior tags associated with the user a include an interest point a, an interest point b, a consumption classification b, and post contents corresponding to a tagl and a tag2, and the behavior tags associated with the user b include a hot post a and a hot topic b within a post bar a, an interest point b, a consumption classification b, and post contents corresponding to a tag3, a tag4, and a tag5.
[0047] User identifications (IDs) a and b, and the associated behavior tags are taken as nodes in the user portrait graph, and the connection relationships between user ID nodes and behavior tag nodes are determined according to click, consumption and other behaviors of the user, and thus the user portrait graph as shown in FIG. 2 is constructed. As illustrated in FIG. 2, vector representations of the user ID node for each behavior tag node can be obtained based on weights determined based on user behaviors such as a click number of the user on the interest point, a consumption number of the consumption classification, and a viewing duration and a liking behavior on post contents or post bars.
[0048] In the embodiment of the disclosure, a similarity of vectors between the first user and the behavior tag can be calculated according to the vector representation of each node in the user portrait graph. A plurality of candidate topics are determined according to the similarities in a descending order. According to the latest hot topics obtained from the post bar or the like and the new behavior habits of the user, the plurality of candidate topics are sorted and selected, to determine a candidate topic with the highest similarity can be determined as the topic that the first user is most likely to be interested in currently.
[0049] In the embodiment of the disclosure, the historical session library associated with each user may be pre-constructed according to the historical session content associated with the user. During the session, the first historical session library associated with the first user can be found according to the ID (such as a user name, an account number, etc.) of the first user.
[0050] At step S102, a similarity between the topic of the current session and each historical session in the first historical session library is determined.
[0051] It should be noted that the first historical session library may include abstracts, keywords, and the like corresponding to each historical session. Therefore, the similarity calculated, between the topic of the current session and each historical session in the first historical session library, may be a similarity between the topic of the current session and the keyword of each historical session, or a similarity between the topic of the current session and the abstract of each historical session, which is not limited in the embodiments of the disclosure.
[0052] At step S103, a plurality of candidate historical sessions are obtained from the first historical session library according to the similarity.
[0053] In the embodiment of the disclosure, the first N historical sessions are determined as candidate historical sessions in descending order of similarities. N can be any positive integer, such as 5, 10, etc., which is not limited in the embodiments of the disclosure.
[0054] At step 5104, a reference session is obtained from the plurality of candidate historical sessions based on a forgetting coefficient and a weight of each candidate historical session.
[0055] The forgetting coefficient represents an influence degree of each historical session on the current reply content, which can be determined according to an emotion fluctuation degree of the user in the historical session and a time interval between the corresponding generation time and the current time. The greater the emotion fluctuation of the user, the shorter the time interval, and the greater the forgetting coefficient, and the greater the influence degree on the current reply content.
[0056] It should be noted that the forgetting coefficient is updated with time, the longer the time interval between the generation time of the historical session and the current time, the smaller the forgetting coefficient. When the forgetting coefficient of the historical session is less than a certain value, the historical session can be deleted in the first historical session library.
[0057] The weight of the candidate historical session can be a value determined according to the occurrence frequency of keywords expressing a session intention in the historical session and the emotion fluctuation degree of the user during the session. The weight is used to describe the importance degree of each historical session in the historical session library.
[0058] It should be noted that when a historical session is stored in the first historical session library, the weight and a forgetting rate of the historical session can be determined and stored in association with the historical session. Therefore, when selecting the reference session, the forgetting coefficient and the weight of each candidate historical session can be directly obtained from the first historical session library.
[0059] In some embodiments, at least one historical session with the maximum forgetting coefficient and/or the maximum weight can be selected from a plurality of candidate historical sessions at first. A historical session is determined from the at least one historical session as the reference session, in which the time interval between a generation time of the determined historical session and a current time is the minimal and less than a time threshold.
[0060] It should be noted that when the time interval between the generation time of the historical session and the current time is less than the time threshold, the historical session has a high timeliness and may have a good reference value for generating the reply sentence. The time threshold can be a value determined according to service requirements, for example, 10 days, 30 days, etc., which is not limited in the embodiments of the disclosure.
[0061] In the embodiment of the disclosure, the reference session used to assist in generating the reply sentence is determined based on the forgetting coefficient, the weight and the generation time of the historical session, so that it is ensured that the selected reference session is more reliable and has good reference value, thereby improving the quality and personalization of the reply sentence.
[0062] At step 5105, a reply sentence is generated based on the reference session and the topic of the current session.
[0063] In the embodiment of the disclosure, the topics of the reference session and the current session are input into the language model of the session system, and then the language model generates the reply sentence.
[0064] It should be noted that the language model can be a LLM, such as GPT, ERNIE Bot, etc., or other language models that can generate the reply sentence, which is not limited in this embodiment of the disclosure.
[0065] In some embodiments, in response to the time interval between the generation time of each of the at least one historical session and the current time being greater than the time threshold, the reply sentence is generated based on the topic of the current session.
[0066] It is understood that when the time interval between the generation time of the historical session and the current time is greater than the time threshold, the historical session may not accurately reflect a current session preference of the user, which may lead to deviation and semantic errors of the reply sentence. Therefore, when generating the reply sentence, the reply sentence related to the topic of the current session can be generated directly without referring to the historical session information. Therefore, it is possible to avoid using the historical session that has been generated for a long time as reference information to generate the sentence, and further ensure the accuracy and timeliness of the reply sentence.
[0067] In the embodiment, firstly, the topic of the current session of the first user and the first historical session library associated with the first user are obtained firstly. The similarity between the topic of the current session and the topic of each historical session in the first historical session library is determined. According to the similarity, the plurality of candidate historical sessions are obtained from the first historical session library. The reference session is obtained from the plurality of candidate historical sessions based on the forgetting coefficient and the weight of each candidate historical session. Finally, the reply sentence is generated based on the reference session and the topic of the current session. Therefore, a historical sentence with high timeliness and having topics similar to the topic of the current session is selected from the historical session library associated with the user as reference information, to assist in generating the reply sentence, which improves the reliability and personalization of the reply sentence, improves a quality of session, and increases user satisfaction in chatting.
[0068] FIG. 3 is a flowchart of a session processing method according to another embodiment of the disclosure.
[0069] As illustrated in FIG. 3, the session processing method includes steps S301-S306.
[0070] At step S301, a topic of a current session of a first user and a first historical session library associated with the first user are obtained.
[0071] At step S302, a similarity between the topic of the current session and a topic of each historical session in the first historical session library is determined.
[0072] At step 5303, a plurality of candidate historical sessions are obtained from the first historical session library according to the similarity.
[0073] At step 5304, a reference session is obtained from the plurality of candidate historical sessions based on a forgetting coefficient and a weight of each candidate historical session.
[0074] The descriptions of steps S301-S304 can be referred to the above embodiments in detail, and will not be repeated here.
[0075] It should be noted that in some application scenarios, such as games, creative cultural products, etc., it may be necessary for a session system to simulate speaking characteristics of a character to have a session with the user. Therefore, a role simulated by a target needs to be determined before a reply sentence is generated.
[0076] At step S305, a role type of a session system in the current session is determined.
[0077] The role type can be classified according to at least one of a gender, an age range, a profession, a speaking tone or a habit, or a character relationship. Alternatively, the roles in the session system may also include certain specific roles set by movies, games, etc., which is not
[0078] limited in the embodiment of the disclosure.
[0079] It should be noted that the role type played by the session system in a round of session is fixed and determined before the start of each round of session. The role type played by the session system in a round of session can be selected by the first user as needed, or can be selected by the session system according to historical preferences associated with the first user. After selecting the role type to play, the role type is stored in the system, and then the stored role type is called each time a reply sentence is generated.
[0080] In some embodiments, if the first user has not selected a role type, the session system determines the role type with the highest chat frequency as the role type in the current session according to role types historically used by the first user and the chat frequency with each role type.
[0081] In some embodiments, in the case that the first user does not have a historical role type, the role type in the current session is determined according to role types historically used by a second user similar to the first user and the chat frequency with each role type.
[0082] In the embodiment of the disclosure, the role type with the highest historical usage frequency is determined as a target role type of the current session, which can better meet the preferences and needs of the user, reduce the time cost in selecting roles, and improve the satisfaction rate of the user.
[0083] In some embodiments, the second user similar to the first user can be determined according to behavior tags associated with each user in the user portrait graph.
[0084] It is understood that if different users have similar behavior habits, they are likely to like the same role types. Therefore, a candidate topic corresponding to the first user is determined according to the behavior tags associated with the first user in the user portrait graph, and then the behavior tags of other users in the graph are viewed and matched with the candidate topic, and the user with the highest similarity is determined as the second user similar to the first user.
[0085] Therefore, the second user similar to the first user can be determined by the behavior tags associated with each user in the user portrait graph, which can improve the accuracy and reliability of determining the second user and provide conditions for improving the accuracy of determining the role type preferred by the first user.
[0086] It should be noted that the role type recently used by the first user or the second user can be determined as the role type of the session system in the current session, which is not limited in
[0087] the embodiment of the disclosure.
[0088] At step S306, a reply sentence is generated based on the reference session, the topic of the current session and prompt information associated with the role type.
[0089] The prompt information associated with the role type may include description information corresponding to a gender, an age range, a profession, a speaking tone or habit, or a character relationship. For example, the prompt information may be "middle-aged woman, teacher, strict", or "male, father, kind" and so on.
[0090] In this embodiment, after determining the reference session generated by the sentence, the role type of the session system in the current session is determined at first, and then the reply sentence is generated based on the reference session, the topic of the current session and the prompt information associated with the role type. Therefore, the reply sentence with a role-personalized style is generated based on the prompt information corresponding to the target role type, which can further improve the diversity and quality of the reply sentence, and enhance the sense of interaction of the user.
[0091] FIG. 4 is a flowchart of a session processing method provided by yet another embodiment of the disclosure.
[0092] As illustrated in FIG. 4, the session processing method includes steps S401-S403.
[0093] At step 5401, user incremental data in a current cycle is obtained.
[0094] The user incremental data contains a user ID and associated behavior tags.
[0095] It is understood that a user portrait graph is constructed based on historical user behavior data, but new user behavior data are constantly generated, and the influence of historical data on analyzing preferences of the user decreases with time, so that the effect of the previously constructed user portrait graph on determining session topic preferences of a target user may be reduced. Therefore, it is necessary to update the user portrait graph regularly to ensure that the currently used user portrait graph is the latest and most complete, so as to ensure the accuracy of the session topic determined by the session system.
[0096] In the embodiment of the disclosure, an update cycle can be preset, and behavior tags are extracted from the newly generated user behavior data in the current cycle and are associated with the user ID as the user incremental data to update the user portrait graph.
[0097] It should be noted that the update cycle can be determined according to actual situation. For example, if the magnitude of the newly added user behavior data is large, the cycle can be shortened, which is not limited in the embodiment of the disclosure.
[0098] At step S402, a current user portrait graph is traversed based on a user ID and behavior tags.
[0099] In the embodiment of the disclosure, it is possible to first search the current user portrait graph according to each user ID in the user incremental data in turn, to determine whether the user ID in the user incremental data is included in the current user portrait graph. Then, according to the behavior tags associated with the user ID in the user incremental data, it is determined whether these behavior tags are the same as the behavior tags associated with the user ID in the current user portrait graph.
[0100] At step 5403, in the case where the current user portrait graph includes the user ID, but does not include at least one behavior tag in the user incremental data, an updated user portrait graph is obtained by updating behavior tags in the current user portrait graph based on the at least one behavior tag.
[0101] In the embodiment of the disclosure, in a case where the user portrait graph includes any user ID in the user incremental data, it is possible to search the current user portrait graph to determine whether the behavior tags associated with the user ID in the current user portrait graph correspond to the behavior tags associated with the user ID in the user incremental data. In a case where the current user portrait graph does not include at least one behavior tag in the user incremental data, the behavior tag which is not included in the current user portrait graph can be used as adjacent nodes of the user ID and added to the current user portrait graph, and an association relationship is established with the user ID. Then an aggregation function is used to train the newly added nodes and edges in the user portrait graph to complete the update of the user portrait graph.
[0102] In some embodiments, in a condition where the current user portrait graph does not include any user ID in the user incremental data, the current user portrait graph is updated based on the any user ID and behavior tags associated with the any user ID to obtain the updated user portrait graph.
[0103] In the embodiment of the disclosure, when the user portrait graph does not include any user ID in the user incremental data, a local graph can be constructed based on the any user ID and behavior tags associated with the any user ID, and then the local graph is combined with the current user portrait graph by using the aggregation function to complete the update of the user portrait graph. Therefore, by adding the local graph, corresponding to the new user ID and behavior tags associated with the new user ID, to the existing user portrait graph, the user portrait graph can be updated, which can reduce resources and costs required for incremental composition and online training of the user portrait graph, and improve a data integrity and reliability of the user portrait graph.
[0104] An update of a user portrait graph is descripted as follows in combination with FIG. 5. FIG. 5 is a schematic diagram of an updated user portrait graph. In FIG. 5, a local graph corresponding to user incremental data is defined with dotted lines, and outside the area framed by the dotted lines is a current user portrait graph.
[0105] New data in the current cycle includes a consumption type b which is associated with user a, and a hot post a and a hot topic b in a post bar a, interest point b, and post contents corresponding to a tag6, a tag7 and a tag8 which are associated with user k.
[0106] As illustrated in FIG. 5, user IDs in the current user portrait graph includes the user a, but does not include the consumption type b associated with the user a, thus, a behavior tag "consumption type b" can be added to the local graph, and the behavior tag "consumption type b" can be associated with the user a in the current user portrait graph. Moreover, user IDs in the current user portrait graph does not include the user k, a third-order local graph can be constructed according to the hot post a and the hot topic b in the post bar a, the interest point b, and the post contents corresponding to the tag6, the tag7 and the tag8 which are associated with the user k. The interest point b, the post bar a, and the hot post a and the hot topic b corresponding to the post bar a are combined with the same behavior tags in the current user portrait graph, to obtain the updated user portrait graph.
[0107] In this embodiment, the user portrait graph is updated based on the user incremental data, which can not only enhance a timeliness, a data integrity and reliability of the user portrait graph, but also provide conditions for further improving a quality of session.
[0108] FIG. 6 is a flowchart of a session processing method provided by a further embodiment of the disclosure.
[0109] As illustrated in FIG. 6, the session processing method includes steps S601-S604.
[0110] At step 5601, a keyword set corresponding to a historical session library is determined by performing keyword extraction on the historical session library.
[0111] In the embodiment of the disclosure, the LLM can be configured to extract keywords from each historical session library, and then the keyword set corresponding to the historical session library can be constructed according to all the extracted keywords.
[0112] It should be noted that, in order to save a storage space required by the historical session library, according to a generation time of each historical session, in a case where a time interval between the generation times of any two adjacent historical sessions is greater than a preset value (such as 2 minutes, etc.), the two historical sessions can be determined as in different rounds of session. Therefore, all the historical sessions can be divided into session contents in multiple rounds. Then, the LLM is used to summarize an abstract and extract a keyword from the session contents in each round and store the abstract and the keyword in the historical session library.
[0113] At step S602, a frequency of occurrence of each keyword in the keyword set in each historical session, and a sentiment type of each historical session are determined.
[0114] In the embodiment of the disclosure, the sentiment types of the historical sessions can be different types determined by grading according to degrees of emotional fluctuation of the user in the processes of historical chatting. For example, the sentiment types can be classified into level 1, level 2, level 3, etc. according to the degrees of emotional fluctuation in an ascending order, which is not limited in the embodiment of the disclosure.
[0115] In the embodiment of the disclosure, the frequency of occurrence of each keyword in each historical session can be counted, and the sentiment type of the historical session can be determined by using the LLM to identify words describing emotions in the historical session and analyze the degree of emotional fluctuation of the user. For example, when the historical session does not contain words that reflect emotions or contains words that reflect an emotion stability of the user, such as "boring", it can be determined that the sentiment type of this historical session is level 1. Or, when the historical session contains a variety of words describing emotions such as "happy", "angry" or the like, it can be recognized that the sentiment level of this historical session is high, and the sentiment type can be determined as level 2 or level 3 according to the actual service needs.
[0116] At step 5603, a weight of each historical session is determined according to the frequency of occurrence of each keyword in each historical session, and the sentiment type of each historical session.
[0117] The weight of historical session refers to an importance of each historical session in the historical session library.
[0118] In the embodiment of the disclosure, influence coefficients of the frequency of occurrence is of the keyword and the sentiment type on the weight of the historical session can be determined by experience. A product of the frequency of occurrence and corresponding influence coefficient and a product of a level of the sentiment type and corresponding influence coefficient are calculated respectively, and the two products are added to obtain the weight of historical session.
[0119] At step 5604, a forgetting coefficient of each historical session is determined according to the sentiment type of each historical session, and a time interval between a generation time of the historical session and the current time.
[0120] In the embodiment of the disclosure, update coefficients of historical sessions, that occurred at different times, when updating the forgetting coefficients can be determined according to the time interval between the generation time of each historical session and the current time. The value of the update coefficient is from 0 to 1. The longer the time interval corresponding to the historical session, the closer update coefficient corresponding to the time interval is to 0. Instead, the shorter the time interval corresponding to the historical session, the closer update coefficient corresponding to the historical session is to 1.
[0121] In the embodiment of the disclosure, the calculation equation of the forgetting coefficient of historical session can be shown as the following equation (1): f (0) = (e * r) where f(0) represents a forgetting coefficient corresponding to a historical session when storing it in a historical session library, e represents a level corresponding to a sentiment type of a historical session, such as level 1, level 2 or level 3, and r represents an update coefficient corresponding to a historical session.
[0122] It is understood that as time progresses, the user continues to generate historical session data with the session system, it is necessary to update the historical session library based on the new historical sessions, and to appropriately delete old session contents from the historical session library, so as to control a storage cost of the historical session library and improve a data quality in the historical session library. Therefore, the forgetting coefficients of all historical sessions can be updated every time the historical session library is called. The equation for calculating the updated forgetting coefficient can be shown in the following equation (2): f (t) = f (t -1) * (e * r) where f (t -1) represents a forgetting coefficient of a historical session after the last update (i.e., the t-lst update), and f (t) represents a forgetting coefficient of the historical session after this update and the tth update.
[0123] It should be noted that if the forgetting coefficient of a historical session is less than the threshold, the historical session can be deleted in the historical session library. The threshold can be determined according to the actual application condition, which is not limited in the embodiment of the disclosure.
[0124] In this embodiment, the weight and the forgetting coefficient of the historical session are determined based on the frequency of occurrence, the sentiment type and the generation time of the keyword in the historical session, so that the efficiency of calling and managing historical session data is improved, and the storage cost of historical session library can be controlled, which provides conditions for improving an efficiency and quality of processing session.
[0125] FIG. 7 is a schematic diagram of a session processing apparatus 700 provided by an embodiment of the disclosure.
[0126] As illustrated in FIG. 7, the session processing apparatus 700 includes: a first obtaining module 701, configured to obtain a topic of a current session of a first user and a first historical session library associated with the first user; a first determining module 702, configured to determine a similarity between the topic of the current session and a topic of each historical session in the first historical session library; a second obtaining module 703, configured to obtain a plurality of candidate historical sessions from the first historical session library according to the similarity; a third obtaining module 704, configured to obtain a reference session from the plurality of candidate historical sessions based on a forgetting coefficient and a weight of each candidate historical session; and a generating module 705, configured to generate a reply sentence based on the reference session and the topic of the current session.
[0127] In some embodiments, the third obtaining module 704 is further configured to: determine at least one historical session corresponding to the maximum forgetting coefficient and/or the maximum weight among the plurality of candidate historical sessions; and determine a historical session from the at least one historical session as the reference session, in which the time interval between a generation time of the determined historical session and a current time is the minimal and less than a time threshold.
[0128] In some embodiments, the third obtaining module 704 is further configured to: in response to a time interval between a generation time of each of the at least one historical session and the current time being greater than the time threshold, generate the reply sentence based on the topic of the current session.
[0129] In some embodiments, the generating module 705 is further configured to: determine a role type of a session system in the current session; and generate the reply sentence based on the reference session, the topic of the current session and prompt information associated with the role type.
[0130] In some embodiments, the generating module 705 is further configured to: determine a role type in the current session according to role types historically used by the first user and a chat frequency with each role type; or determine a role type in the current session according to role types historically used by a second user similar to the first user and a chat frequency with each role type.
[0131] In some embodiments, the generating module 705 is further configured to: determine the second user similar to the first user according to behavior tags associated with each user in a user portrait graph.
[0132] In some embodiments, the session processing apparatus 700 also includes: a fourth obtaining module, configured to obtain user incremental data in a current cycle, in which the user incremental data includes a user ID and associated behavior tags; a traversing module, configured to traverse a current user portrait graph based on the user ID and the behavior tags; and an updating module, configured to, in the case where the current user portrait graph includes the user ID, but does not include at least one behavior tag in the user incremental data, update behavior tags in the current user portrait graph based on the at least one behavior tag to obtain an updated user portrait graph.
[0133] In some embodiments, the updating module is further configured to: in the case where the current user portrait graph does not comprise any user ID in the user incremental data, update the current user portrait graph based on the any user ID and behavior tags associated with the any user ID to obtain the updated user portrait graph.
[0134] In some embodiments, the session processing apparatus 700 also includes: a second determining module, configured to determine a keyword set corresponding to the historical session library by performing keyword extraction on the historical session library; a third determining module, configured to determine a frequency of occurrence of each keyword in the keyword set in each historical session, and a sentiment type of each historical session; and a fourth determining module, configured to determine a weight of each historical session according to the frequency of occurrence of each keyword in each historical session, and the sentiment type of each historical session.
[0135] It should be noted that the above explanation of the session processing method is also applicable to the session processing apparatus of this embodiment, and will not be repeated here.
[0136] In the embodiment, firstly, the topic of the current session of the first user and the first historical session library associated with the first user are obtained firstly. The similarity between the topic of the current session and the topic of each historical session in the first historical session library is determined. According to the similarity, the plurality of candidate historical sessions are obtained from the first historical session library. The reference session is obtained from the plurality of candidate historical sessions based on the forgetting coefficient and the weight of each candidate historical session. Finally, the reply sentence is generated based on the reference session and the topic of the current session. Therefore, a historical sentence with high timeliness and having topics similar to the topic of the current session is selected from the historical session library associated with the user as reference information, to assist in generating the reply sentence, which improves the reliability and personalization of the reply sentence, improves a quality of session, and increases user satisfaction in chatting.
[0137] According to the embodiment of the disclosure, the disclosure also provides an electronic device, a readable storage medium, a computer program product and a computer program.
[0138] According to the embodiment of the disclosure, the disclosure provides an electronic device, including at least one processor and a memory communicatively connected to the at least one processor. The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to cause the at least one processor to execute the session processing method according to any of the above embodiments.
[0139] According to the embodiment of the disclosure, the disclosure provides a non-transitory computer-readable storage medium having computer instructions stored thereon, the computer instructions are used to cause a computer to execute the session processing method as described in any of the above embodiments.
[0140] According to the embodiment of the disclosure, the disclosure provides a computer program product including computer instructions. When the computer instructions are executed by a processor, the steps of the session processing method as described in any of the above embodiments are implemented.
[0141] According to the embodiment of the disclosure, the disclosure provides a computer program including computer program codes. When the computer program codes are run by a computer, the computer is caused to execute the session processing method as described in any of the above embodiments.
[0142] FIG. 8 is a schematic diagram of an exemplary electronic device 800 used to implement the embodiments of the disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown here, their connections and relations, and their functions are merely examples, and are not intended to limit the implementation of the disclosure described and/or required herein.
[0143] As illustrated in FIG. 8, the device 800 includes a computing unit 801 for performing various appropriate actions and processes based on computer programs stored in a Read-Only Memory (ROM) 802 or computer programs loaded from a storage unit 808 to a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 are stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
[0144] Components in the device 800 are connected to the I/O interface 805, including: an input unit 806, such as a keyboard, a mouse; an output unit 807, such as various types of displays, speakers; a storage unit 808, such as a disk, an optical disk; and a communication unit 809, such as network cards, modems, and wireless communication transceivers. The communication unit 809 allows the device 800 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.
[0145] The computing unit 801 may be various general-purpose and/or dedicated processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated AI computing chips, various computing units that run machine learning (ML) model algorithms, a Digital Signal Processor (DSP), and any appropriate processor, controller and microcontroller. The computing unit 801 executes the various methods and processes described above, such as the session processing method. For example, in some embodiments, the session processing method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer programs may be loaded and/or installed on the device 800 via the ROM 802 and/or the communication unit 809. When the computer program is loaded on the RAM 803 and executed by the computing unit 801, one or more steps of the session processing method described above may be executed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the session processing method in any other suitable manner (for example, by means of firmware).
[0146] Various implementations of the systems and techniques described above may be implemented by a digital electronic circuit system, an integrated circuit system, a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a System on Chip (SOC), a Complex Programmable Logic Device (CPLD), a computer hardware, a firmware, a software, and/or a combination thereof These various implementations may be implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general programmable processor for receiving data and instructions from a storage system, at least one input device and at least one output device, and transmitting the data and instructions to the storage system, the at least one input device and the at least one output device.
[0147] The program code configured to implement the method of the disclosure may be written in any combination of one or more programming languages. These program codes may be provided to the processors or controllers of general-purpose computers, dedicated computers, or other programmable data processing devices, so that the program codes, when executed by the processors or controllers, enable the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may be executed entirely on the machine, partly executed on the machine, partly executed on the machine and partly executed on the remote machine as an independent software package, or entirely executed on the remote machine or server.
[0148] In the context of the disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in combination with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage medium include electrical connections based on one or more wires, portable computer disks, hard disks, RAMs, ROMs, Electrically Programmable Read-OnlyMemories (EPROM), flash memories, fiber optics, Compact Disc Read-Only Memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0149] In order to provide interaction with a user, the systems and techniques described herein may be mplemented on a computer having a display device (e.g., a Cathode Ray Tube (CRT) or a Liquid Crystal Display (LCD) monitor for displaying information to a user); and a keyboard and pointing device (such as a mouse or trackball) through which the user can provide input to the computer. Other kinds of devices may also be used to provide interaction with the user. For example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or haptic feedback), and the input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0150] The systems and technologies described herein can be implemented in a computing system that includes background components (for example, a data server), or a computing system that includes middleware components (for example, an application server), or a computing system that includes front-end components (for example, a user computer with a graphical user interface or a web browser, through which the user can interact with the implementation of the systems and technologies described herein), or include such background components, intermediate computing components, or any combination of front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: Local Area Network (LAN), Wide Area Network (WAN), the Internet and a block-chain network.
[0151] The computer system may include a client and a server. The client and server are generally remote from each other and interacting through a communication network. The client-server relation is generated by computer programs running on the respective computers and having a client-server relation with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host. The server is a host product in a cloud computing service system to solve difficult management and poor business expansion of traditional physical hosting and Virtual Private Server (VPS) services. The server may be a server of a distributed system, or a server combined with a block-chain.
[0152] It should be noted that the above explanations of the method embodiments and device embodiments are also applicable to the electronic device, the computer-readable storage medium, the computer program product and the computer program of the above embodiments, and will not be repeated here.
[0153] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the disclosure could be performed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in the disclosure is achieved, which is not limited herein.
[0154] In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the feature defined with "first" or "second" can explicitly or implicitly include at least one of the feature. In the description of this disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined. In the description of this disclosure, the term "if. used can be interpreted as "when", "while", "in response to determining", or "in the case that-.
[0155] The above specific implementations do not constitute a limitation on the protection scope of the disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent replacement and improvement made within the spirit and principle of this application shall be included in the protection scope of this application.
[0156] Each of the embodiments of the disclosure can be executed alone or in combination with other embodiments, which are regarded as within the protection scope of the disclosure.
Claims (22)
1. WHAT IS CLAIMED IS: 1. A session processing method, comprising: obtaining a topic of a current session of a first user and a first historical session library associated with the first user; determining a similarity between the topic of the current session and a topic of each historical session in the first historical session library; obtaining a plurality of candidate historical sessions from the first historical session library according to the similarity; obtaining a reference session from the plurality of candidate historical sessions based on a forgetting coefficient and a weight of each candidate historical session; and generating a reply sentence based on the reference session and the topic of the current session.
2. The method of claim 1, wherein obtaining the reference session from the plurality of candidate historical sessions based on the forgetting coefficient and the weight of each candidate historical session, comprises: determining at least one historical session corresponding to the maximum forgetting coefficient and/or the maximum weight among the plurality of candidate historical sessions; and determining a historical session from the at least one historical session as the reference session, wherein the time interval between a generation time of the determined historical session and a current time is the minimal and less than a time threshold.
3. The method of claim 2, wherein after determining at least one historical session corresponding to the maximum forgetting coefficient and/or the maximum weight among the plurality of candidate historical sessions, the method comprises: in response to a time interval between a generation time of each of the at least one historical session and the current time being greater than the time threshold, generating the reply sentence based on the topic of the current session.
4. The method of any one of claims 1-3, wherein generating the reply sentence based on the reference session and the topic of the current session, comprises: determining a role type of a session system in the current session; and generating the reply sentence based on the reference session, the topic of the current session and prompt information associated with the role type.
5. The method of claim 4, wherein determining the role type of the session system in the current session, comprises: determining a role type in the current session according to role types historically used by the first user and a chat frequency with each role type; or determining a role type in the current session according to role types historically used by a second user similar to the first user and a chat frequency with each role type.
6. The method of claim 5, wherein before determining the role type in the current session according to the role types historically used by the second user similar to the first user and the chat frequency with each role type, the method further comprises: determining the second user similar to the first user according to behavior tags associated with each user in a user portrait graph.
7. The method of any one of claims 1-6, further comprising: obtaining user incremental data in a current cycle, wherein the user incremental data comprises a user identification (ID) and associated behavior tags; traversing a current user portrait graph based on the user ID and the behavior tags; and in the case where the current user portrait graph comprises the user ID, but does not comprise at least one behavior tag in the user incremental data, obtaining an updated user portrait graph by updating behavior tags in the current user portrait graph based on the at least one behavior tag.
8. The method of claim 7, wherein after traversing the current user portrait graph based on the user ID and the behavior tags, the method further comprises: in the case where the current user portrait graph does not comprise any user ID in the user incremental data, obtaining the updated user portrait graph by updating the current user portrait graph based on the any user ID and behavior tags associated with the any user ID.
9. The method of any one of claims 1-8, further comprising: determining a keyword set corresponding to the historical session library by performing keyword extraction on the historical session library; determining a frequency of occurrence of each keyword in the keyword set in each historical session, and a sentiment type of each historical session; determining a weight of each historical session according to the frequency of occurrence of each keyword in each historical session, and the sentiment type of each historical session; and determining a forgetting coefficient of each historical session according to the sentiment type of each historical session, and a time interval between a generation time of the historical session and the current time.
10. A session processing apparatus, comprising: a first obtaining module, configured to obtain a topic of a current session of a first user and a first historical session library associated with the first user; a first determining module, configured to determine a similarity between the topic of the current session and a topic of each historical session in the first historical session library; a second obtaining module, configured to obtain a plurality of candidate historical sessions from the first historical session library according to the similarity; a third obtaining module, configured to obtain a reference session from the plurality of candidate historical sessions based on a forgetting coefficient and a weight of each candidate historical session; and a generating module, configured to generate a reply sentence based on the reference session and the topic of the current session.
11. The apparatus of claim 10, wherein the third obtaining module is further configured to: determine at least one historical session corresponding to the maximum forgetting coefficient and/or the maximum weight among the plurality of candidate historical sessions; and determine a historical session from the at least one historical session as the reference session, wherein the time interval between a generation time of the determined historical session and a current time is the minimal and less than a time threshold.
12. The apparatus of claim 11, wherein the third obtaining module is further configured to: in response to a time interval between a generation time of each of the at least one historical session and the current time being greater than the time threshold, generate the reply sentence based on the topic of the current session.
13. The apparatus of any one of claims 10-12, wherein the generating module is further configured to: determine a role type of a session system in the current session; and generate the reply sentence based on the reference session, the topic of the current session and prompt information associated with the role type.
14. The apparatus of claim 13, wherein the generating module is further configured to: determine a role type in the current session according to role types historically used by of the first user and a chat frequency with each role type; or determine a role type in the current session according to role types historically used by of a second user similar to the first user and a chat frequency with each role type.
15. The apparatus of claim 14, wherein the generating module is further configured to: determine the second user similar to the first user according to behavior tags associated with each user in a user portrait graph.
16. The apparatus of any one of claims 10-15, further comprising: a fourth obtaining module, configured to obtain user incremental data in a current cycle, wherein the user incremental data comprises a user identification (ID) and associated behavior tags; a traversing module, configured to traverse a current user portrait graph based on the user ID and the behavior tags; and an updating module, configured to, in the case where the current user portrait graph comprises the user ID, but does not comprise at least one behavior tag in the user incremental data, update behavior tags in the current user portrait graph based on the at least one behavior tag to obtain an updated user portrait graph.
17. The apparatus of claim 16, wherein the updating module is further configured to: in the case where the current user portrait graph does not comprise any user ID in the user incremental data, update the current user portrait graph based on the any user ID and behavior tags associated with the any user ID to obtain the updated user portrait graph.
18. The apparatus of any one of claims 10-17, further comprising: a second determining module, configured to determine a keyword set corresponding to the historical session library by performing keyword extraction on the historical session library; a third determining module, configured to determine a frequency of occurrence of each keyword in the keyword set in each historical session, and a sentiment type of each historical session; a fourth determining module, configured to determine a weight of each historical session according to the frequency of occurrence of each keyword in each historical session, and the sentiment type of each historical session; and a fifth determining module, configured to determine a forgetting coefficient of each historical session according to the sentiment type of each historical session, and a time interval between a generation time of the historical session and the current time.
19. An electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to cause the at least one processor to perform the session processing method of any one of claims 1-9.
20. A non-transitory computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are used to cause a computer to perform the session processing method of any one of claims 1-9.
21. A computer program product comprising a computer program, wherein when the computer program is executed by a processor, the session processing method of any one of claims 1-9 is implemented.
22. A computer program comprising a computer program code, wherein the computer program code is executed by a computer to cause the computer to perform the session processing method of any one of claims 1-9.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410171564.5A CN117932036A (en) | 2024-02-06 | 2024-02-06 | Dialogue processing method, device, electronic device and storage medium |
| PCT/CN2024/107330 WO2025167001A1 (en) | 2024-02-06 | 2024-07-24 | Dialogue processing method and apparatus, and electronic device and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| GB202500312D0 GB202500312D0 (en) | 2025-02-26 |
| GB2641595A true GB2641595A (en) | 2025-12-10 |
Family
ID=94690542
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| GB2500312.0A Pending GB2641595A (en) | 2024-02-06 | 2024-07-24 | Session processing method, apparatus, electronic device, and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| GB (1) | GB2641595A (en) |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115309877A (en) * | 2022-08-03 | 2022-11-08 | 北京百度网讯科技有限公司 | Dialogue generation method, dialogue model training method and device |
| CN115617958A (en) * | 2021-07-12 | 2023-01-17 | 阿里巴巴新加坡控股有限公司 | Generation of dialogue content, device, equipment and computer storage medium |
| CN115658858A (en) * | 2022-09-28 | 2023-01-31 | 平安科技(深圳)有限公司 | Dialogue recommendation method and related equipment based on artificial intelligence |
| KR20230100255A (en) * | 2021-12-28 | 2023-07-05 | 주식회사 엔씨소프트 | Method and apparatus for generating a conversation based on a user's persona and knowledge data |
| CN116955546A (en) * | 2023-02-02 | 2023-10-27 | 腾讯科技(深圳)有限公司 | Reply information generation method, device, equipment and storage medium |
| CN117932036A (en) * | 2024-02-06 | 2024-04-26 | 百度在线网络技术(北京)有限公司 | Dialogue processing method, device, electronic device and storage medium |
-
2024
- 2024-07-24 GB GB2500312.0A patent/GB2641595A/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115617958A (en) * | 2021-07-12 | 2023-01-17 | 阿里巴巴新加坡控股有限公司 | Generation of dialogue content, device, equipment and computer storage medium |
| KR20230100255A (en) * | 2021-12-28 | 2023-07-05 | 주식회사 엔씨소프트 | Method and apparatus for generating a conversation based on a user's persona and knowledge data |
| CN115309877A (en) * | 2022-08-03 | 2022-11-08 | 北京百度网讯科技有限公司 | Dialogue generation method, dialogue model training method and device |
| CN115658858A (en) * | 2022-09-28 | 2023-01-31 | 平安科技(深圳)有限公司 | Dialogue recommendation method and related equipment based on artificial intelligence |
| CN116955546A (en) * | 2023-02-02 | 2023-10-27 | 腾讯科技(深圳)有限公司 | Reply information generation method, device, equipment and storage medium |
| CN117932036A (en) * | 2024-02-06 | 2024-04-26 | 百度在线网络技术(北京)有限公司 | Dialogue processing method, device, electronic device and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| GB202500312D0 (en) | 2025-02-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20210342549A1 (en) | Method for training semantic analysis model, electronic device and storage medium | |
| EP4113357A1 (en) | Method and apparatus for recognizing entity, electronic device and storage medium | |
| US10733197B2 (en) | Method and apparatus for providing information based on artificial intelligence | |
| US9524291B2 (en) | Visual display of semantic information | |
| US12386891B2 (en) | Information search method and device, electronic device, and storage medium | |
| US11907863B2 (en) | Natural language enrichment using action explanations | |
| EP3961426A2 (en) | Method and apparatus for recommending document, electronic device and medium | |
| WO2025167001A1 (en) | Dialogue processing method and apparatus, and electronic device and storage medium | |
| CN113190746B (en) | Recommended model evaluation methods, devices and electronic equipment | |
| CN118981527A (en) | Question answering method, device, electronic device, storage medium, intelligent agent and program product based on large model | |
| CN112926308B (en) | Methods, devices, equipment, storage media and program products for matching text | |
| US20210390258A1 (en) | Systems and methods for identification of repetitive language in document using linguistic analysis and correction thereof | |
| CN114461749A (en) | Data processing method, device, electronic device and medium for dialogue content | |
| WO2010132062A1 (en) | System and methods for sentiment analysis | |
| CN114118937A (en) | Task-based information recommendation method, device, electronic device and storage medium | |
| JP7511036B2 (en) | Application testing method, device, electronic device, and storage medium | |
| CN117573817A (en) | Model training method, correlation determining method, device, equipment and storage medium | |
| CN116361638A (en) | Question answer search method, device and storage medium | |
| CN119760074B (en) | Model distillation methods, apparatus, electronic equipment and storage media | |
| JP2023554210A (en) | Sort model training method and apparatus for intelligent recommendation, intelligent recommendation method and apparatus, electronic equipment, storage medium, and computer program | |
| CN112329429B (en) | Text similarity learning method, device, equipment and storage medium | |
| CN114880498A (en) | Event information display method and device, device and medium | |
| US12197463B2 (en) | Creating descriptors for business analytics applications | |
| CN113505889A (en) | Processing method and device of atlas knowledge base, computer equipment and storage medium | |
| CN114647739B (en) | Entity chain finger method, device, electronic equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 789A | Request for publication of translation (sect. 89(a)/1977) |
Ref document number: 2025167001 Country of ref document: WO |