User portrait construction method and device, electronic equipment and storage medium

By breaking down user-customer conversations into sample data, user descriptions are iteratively generated and encoded into feature vectors. This solves the problem of low accuracy in user profiling in existing technologies, and achieves high-precision user profiling construction and improved personalized recommendations.

CN122240915APending Publication Date: 2026-06-19MASHANG CONSUMER FINANCE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
MASHANG CONSUMER FINANCE CO LTD
Filing Date
2026-03-04
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies for building user profiles rely on hard-coded discrete labels, resulting in low accuracy and an inability to accurately understand why users are mapped to labels. Furthermore, the feature vectors are ambiguous in terms of dimension.

Method used

Through N rounds of dialogue between the user and customer service, the user profile is broken down into N samples, user descriptions are generated iteratively, and finally a semantically complete text description user profile is synthesized and encoded into a feature vector.

Benefits of technology

The generated user profiles are clear, easy to understand, and highly interpretable. The feature vectors are complete and unambiguous in their expression, accurately representing user characteristics and improving the accuracy of personalized recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240915A_ABST
    Figure CN122240915A_ABST
Patent Text Reader

Abstract

This application discloses a user profile construction method, apparatus, electronic device, and storage medium. The method includes: constructing N examples corresponding one-to-one with N rounds of dialogue between a user, wherein the i-th example includes the user's question in the i-th round of dialogue corresponding to the i-th example and the preceding i-1 rounds of dialogue, where i is less than or equal to N; determining the user description corresponding to the i-th example based on the user description corresponding to the first example, the question, and the preceding i-1 rounds of dialogue, wherein the first example is one of the preceding i-1 examples; determining the user description corresponding to each example based on the user description corresponding to the i-th example; and obtaining a first text based on the user description corresponding to each example, wherein the first text is used to describe the user's profile. This application helps improve the accuracy of user profiles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, specifically to a user profile construction method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the rapid development of the digital economy and the widespread application of artificial intelligence technology, personalized services have become a key element for various industries to enhance their competitiveness. The key to providing personalized services is understanding the user. Current user understanding technologies mainly focus on the collection and analysis of user behavior data, using user profiles to achieve personalized recommendations and service optimization.

[0003] Currently, user behavior is mainly analyzed using predefined rules or keywords. Users are then tagged based on the rules or keywords they match, thus building user profiles, such as labeling them as "high-value users." These tags are then hard-coded to generate feature vectors that represent the user profile, completing the profile construction. However, the current method of building user profiles through hard-coding tags results in relatively low accuracy. Summary of the Invention

[0004] This application provides a user profile construction method, apparatus, electronic device, and storage medium, which construct user profiles through user descriptions to improve the accuracy of user profile construction.

[0005] In a first aspect, embodiments of this application provide a user profile construction method, including: Based on the user's N rounds of dialogue, N sample cases are constructed, each corresponding to one of the N rounds of dialogue. The i-th sample case includes the user's question from the i-th round of dialogue corresponding to the i-th sample case. The dialogue continues with the first i-1 rounds, where i is less than or equal to N; Based on the user description corresponding to the first instance, the aforementioned problem And the first i-1 rounds of dialogue, to determine the user description corresponding to the i-th sample, wherein the first sample is one of the first i-1 samples; Based on the user description corresponding to the i-th sample, determine the user description corresponding to each sample; Based on the user description corresponding to each sample, a first text is obtained, which is used to describe the user's profile.

[0006] Secondly, embodiments of this application provide a user profile building apparatus, comprising: The acquisition unit is used to acquire N rounds of dialogue from the user; The processing unit is configured to construct N sample instances corresponding one-to-one with the N rounds of dialogue between the user, wherein the i-th sample instance includes the user's question in the i-th round of dialogue corresponding to the i-th sample instance. The dialogue continues with the first i-1 rounds, where i is less than or equal to N; Based on the user description corresponding to the first instance, the aforementioned problem And the first i-1 rounds of dialogue, to determine the user description corresponding to the i-th sample, wherein the first sample is one of the first i-1 samples; Based on the user description corresponding to the i-th sample, determine the user description corresponding to each sample; Based on the user description corresponding to each sample, a first text is obtained, which is used to describe the user's profile.

[0007] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory, the processor being connected to the memory, the memory being used to store a computer program, and the processor being used to execute the computer program stored in the memory, so that the electronic device performs the method as described in the first aspect.

[0008] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.

[0009] Fifthly, embodiments of this application provide a computer program product, the computer program product including a computer program, which, when executed by a processor, implements the method described in the first aspect.

[0010] Implementing the embodiments of this application has the following beneficial effects: As can be seen in this embodiment, when constructing a user profile, N rounds of dialogue between the user and customer service are obtained, and then the N rounds of dialogue are split into N corresponding examples. For each example, the user description generated from the previous examples is used to iteratively generate the user description for that example. In this way, a corresponding user description is generated for each example, where the user description for each example describes the user characteristics of the user in the dialogue corresponding to that example. Finally, the N user descriptions corresponding to the N examples are fused to generate a text used to describe the user profile. In the prior art, users are mapped to multiple discrete labels through rule mapping, and then the discrete labels are hard-coded. The hard-coded vectors are then concatenated to obtain the user's feature vector to construct the user profile. In this way, it is difficult for users to understand why they are mapped to these discrete labels. Moreover, the labels are inherently isolated from each other, and the encoded vectors are also independent of each other. The information expressed cannot be mutually referenced or constrained. The hard-concatenated feature vectors will have ambiguity in dimension, thus the hard-concatenated feature vectors have accuracy problems when expressing user profiles. Compared to existing technologies, this application describes user profiles using a smooth and complete text. This results in clearer and more understandable user profiles, making it easier to understand why a user has such a profile and enhancing interpretability. Furthermore, because the profile is described using semantically complete and coherent text, the feature vector generated by encoding this text is a semantically complete feature vector, eliminating vector concatenation issues. The entire vector is clear and complete in both understanding and expression. Therefore, the feature vector encoded from this text can accurately represent the user profile; in other words, this application can accurately construct user profiles. Attached Figure Description

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

[0012] Figure 1 A schematic diagram illustrating user profile construction provided in an embodiment of this application; Figure 2 A schematic diagram illustrating a personalized recommendation provided in an embodiment of this application; Figure 3 A flowchart illustrating a user profile construction method provided in an embodiment of this application; Figure 4 A schematic diagram of a user profile building device provided in an embodiment of this application; Figure 5This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

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

[0014] The terms "first," "second," "third," and "fourth," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0015] In this document, the term "embodiment" means that a particular feature, result, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0016] See Figure 1 , Figure 1 This is a schematic diagram illustrating a user profile construction method provided in an embodiment of this application.

[0017] For example, such as Figure 1 As shown, a user chats with an agent on a client-side platform. The user profiling device then captures N rounds of dialogue between the user and the agent, each round including the user's question and the agent's response. The device then breaks down these N rounds into N corresponding examples, where the i-th example contains the user's question from the i-th round of dialogue. The dialogue continues from the previous i-1 rounds. (For example...) Figure 1 As shown, the first round of dialogue corresponds to the first example, and the first example includes the user's questions from the first round of dialogue. Since there are no prior dialogues before the first round, the first i-1 rounds of dialogue corresponding to the first example are empty (NULL). The second round of dialogue corresponds to the second example, and the second example includes the user's questions from the second round of dialogue. The first round of dialogue corresponds to the first example; ...; the Nth round of dialogue corresponds to the Nth example, and the Nth example includes the user's question from the Nth round of dialogue. The dialogue proceeds through the first N-1 rounds. For the i-th example, the user profile building device, based on the user description corresponding to the first example and the stated question... The user description corresponding to the i-th sample is determined by the first i-1 rounds of dialogue, where the first sample is one of the first i-1 samples. Then, for each sample, the user profile building device performs a similar operation to that of the i-th sample to obtain the user description corresponding to each sample. Specifically, for each sample, the user description iterated from the previous sample, the user's questions in the current sample's corresponding round of dialogue, and the dialogue preceding that round are used to determine the user description corresponding to that sample, thus obtaining the user description corresponding to each sample. For example, as... Figure 1 As shown, for the first example, since there are no examples before it, the user's question from the first round of dialogue contained in the first example is used directly. Iterate to generate user description 1 corresponding to the first example. For the second example, use the user's questions from the second round of dialogue contained in the second example. The first round of dialogue and user description 1 are used to iterate and generate user description 2 corresponding to the second example, and so on, to iterate and generate user description N corresponding to the Nth example.

[0018] Finally, the user profile building device obtains a first text based on the user description corresponding to each example, namely, user description 1, user description 2, ..., user description N. This first text is used to describe the user's profile. The first text can essentially be understood as the user's profile.

[0019] Furthermore, the user profile building device encodes the first text to obtain a feature vector corresponding to the user, wherein the feature vector is used to indicate the user's profile, and the user's feature vector is stored in a database for use in subsequent tasks.

[0020] See Figure 2 , Figure 2 This is a schematic diagram illustrating a personalized recommendation provided in an embodiment of this application.

[0021] For example, such as Figure 2As shown, the recommendation device obtains the user's user identifier from the user's terminal. For example, the user's user identifier can be obtained when the user logs into the application; or, the user's user identifier can be obtained when the user enters a customer service session. This application does not limit the method of obtaining the user identifier. Then, the recommendation device uses the user identifier to obtain the feature vector corresponding to the user from the database, and matches the user's feature vector with the feature vectors of the materials in the material library one by one to obtain the material that matches the user, and recommends material 2 to the user, thereby realizing personalized recommendations for the user. For example, as Figure 2 As shown, the user's feature vector is matched with the feature vectors of material 1, material 2, ..., material M respectively. If the material that matches the user is material 2, then material 2 is recommended to the user.

[0022] Because the user profile constructed in this application has high accuracy, it can find materials that match the user with high precision during personalized recommendations, thereby improving the accuracy of personalized recommendations and enhancing the user experience.

[0023] Optionally, the personalized recommendations in this application may include, but are not limited to: stocks, financial products, commodities, coupons, etc.

[0024] See Figure 3 , Figure 3 This is a flowchart illustrating a user profile construction method provided in an embodiment of this application. The method is applied to the aforementioned user profile construction apparatus. The method includes, but is not limited to, the following steps: 301: Based on the user's N rounds of dialogue, construct N sample cases that correspond one-to-one with the N rounds of dialogue, wherein the i-th sample case includes the user's question in the i-th round of dialogue corresponding to the i-th sample case. The dialogue continues with the previous i-1 rounds, where i is less than or equal to N.

[0025] Where N is an integer greater than or equal to 1.

[0026] Optionally, the aforementioned N rounds of dialogue are dialogues between the user and the agent, and each round includes the user's question and the agent's response to that question. For example, the complete dialogue between the user and the agent is acquired, and then filtered to obtain the aforementioned N rounds of dialogue. For instance, the opening remarks, information introductions, etc., are filtered out to obtain the truly effective dialogue between the user and the agent, thus obtaining the aforementioned N rounds of dialogue. For example, the user profiling device directly acquires the complete dialogue between the user and the agent; or, it acquires the call audio between the user and the agent, performs speech-to-speech conversion on the call audio, and obtains the aforementioned complete dialogue. In general, this application does not limit the method of acquiring the aforementioned N rounds of dialogue.

[0027] Then, according to the dialogue order (or dialogue sequence) of the above N rounds of dialogue, the above N rounds of dialogue are split to construct N examples that correspond one-to-one with the N rounds of dialogue. Therefore, the order of the N examples is determined by the order of the N rounds of dialogue corresponding to the N examples, that is, the example corresponding to the first round of dialogue is the first example among the N examples, and so on. Specifically, the user's question in each round of dialogue and the dialogue preceding that round are combined together to obtain the example corresponding to that round of dialogue. It should be noted that when constructing each example, all dialogues preceding the dialogue corresponding to each example can be combined to obtain the example, or only some of the preceding dialogues can be combined; this application does not limit this. For example, for the i-th example, the i-th example includes all dialogues preceding the i-th round of dialogue (i.e., the first i-1 rounds of dialogue), and it can also include all dialogues preceding the i-th round of dialogue (i.e., some of the dialogues in the first i-1 rounds of dialogue). For the sake of convenience, this application mainly uses all dialogues as an example for explanation.

[0028] 302: Based on the user description corresponding to the first instance, the aforementioned problem And the first i-1 rounds of dialogue, determining the user description corresponding to the i-th sample, wherein the first sample is one of the first i-1 samples.

[0029] First, it should be noted that the user description mentioned in this application refers to text used to describe user characteristics or user psychology. For example, a user description could be "The user is a woman whose personality trait is a strong dominance," which describes a woman with strong personality traits.

[0030] Then, when determining the description corresponding to the sample, this application iterates through the samples sequentially according to their order to obtain the user description corresponding to each sample. The user description for each sample describes the user's characteristics or psychology. For ease of explanation, this application primarily uses the example of a user description describing user characteristics. Therefore, the user description corresponding to the i-th sample is also used to describe user characteristics.

[0031] Furthermore, when iterating over each sample, the user descriptions of the previous samples are referenced. Therefore, for the i-th sample, based on the first sample among the first i-1 samples, the problem... And the first i-1 rounds of dialogue determine the user description corresponding to the i-th sample.

[0032] Secondly, when determining the user description corresponding to each sample, this application generates the user description corresponding to the sample through one or more iterations. The iteration process of this application is described below using the i-th sample as an example.

[0033] Optionally, in one embodiment of this application, when performing the j-th iteration on the i-th example, the question corresponding to the i-th example in the j-th iteration is determined based on the user description corresponding to the j-th iteration and the previous i-1 rounds of dialogue. Wherein, when j=1, the user description corresponding to the j-th iteration is the user description corresponding to the first sample.

[0034] For example, based on the user description corresponding to the j-th iteration and the previous (i-1) rounds of dialogue, a third prompt word corresponding to the i-th example in the j-th iteration is determined. The third prompt word is used to indicate the user's question in the i-th round of dialogue based on the user description corresponding to the (j-1)-th iteration and the previous (i-1) rounds of dialogue.

[0035] Specifically, based on the third prompt word template, the user description corresponding to the j-th iteration, and the first i-1 rounds of dialogue, the third prompt word corresponding to the i-th example in the j-th iteration is constructed. This involves replacing the placeholders in the third prompt word template corresponding to the user description with the user description corresponding to the j-th iteration, and replacing the placeholders corresponding to the dialogue with the first i-1 rounds of dialogue, thus obtaining the aforementioned third prompt word. Then, the third prompt word is input into the Large Language Model (LLM) to predict the user's question in the i-th round of dialogue, thereby obtaining the question corresponding to the i-th example in the j-th iteration. .

[0036] For example, the third prompt word template is: A user is actively communicating with an agent. Their previous conversation is as follows: [example of conversation]. The user's psychological characteristics in the next round of conversation are described as follows: [example of psychological characteristics]. Based on the existing conversation history between the user and the agent, and combined with the user's psychological characteristics, predict what questions the user might ask in the next round of conversation. When outputting the question, do not include any information about emotions or personality; only predict the factual content that the user wants to express. [Example of question] is a placeholder.

[0037] Therefore, the third prompt word mentioned above is: "A user is actively communicating with an agent. Their historical dialogue is as follows: (i-1) rounds of dialogue. The user's psychological characteristics in the next round of dialogue are described as follows: (user description corresponding to the j-th iteration). Based on the existing historical dialogue between the user and the agent, and combined with the user's psychological characteristics, predict what kind of questions the user might ask in the next round of dialogue. When outputting the questions, do not include any information about emotions or personality; only predict the factual content that the user wants to express."

[0038] Optionally, in one embodiment of this application, when performing the j-th iteration on the i-th example, based on the user description corresponding to the (j-1)-th iteration and the problem... And the first i-1 rounds of dialogue determine the question corresponding to the i-th sample in the j-th iteration. .

[0039] For example, based on the aforementioned problem Determine the relevant issue The corresponding summary. Specifically, based on the aforementioned problem. Construction and the problem The corresponding first prompt word, where the first prompt word is used to indicate the generation and question. The corresponding summary. Then, the first prompt word is input into the Large Language Model (LLM), which then uses the first prompt word to generate a response to the question. The corresponding summary. Specifically, based on the first prompt word template, and the question... Construct the first prompt word mentioned above.

[0040] For example, the first prompt word template is: Please generate a summary of the content corresponding to the following question. The summary should extract and summarize each part of the paragraph in order, and provide a concise description. Do not include any information about emotions or personality in the description; only include the factual parts. Question: xx.

[0041] For example, in relation to the above issues The corresponding first prompt word is: "Please generate a summary of the content corresponding to the following question. The summary should extract and summarize each part of the paragraph in order and provide a concise description. Do not include any information about emotions or personality in the description, only the factual parts." Question: Question ".

[0042] Further, based on the user description corresponding to the j-th iteration, the previous (i-1) rounds of dialogue, and the summary, a second prompt word corresponding to the i-th example in the j-th iteration is constructed. This second prompt word indicates how to predict the user's question in the i-th round of dialogue based on the previous (i-1) rounds of dialogue, the user description corresponding to the j-th iteration, and the summary. Then, the second prompt word is input into the Large Language Model (LLM) to predict the user's question in the i-th round of dialogue, thus obtaining the question corresponding to the i-th example in the j-th iteration. .

[0043] Similarly, replace the placeholders in the second prompt word template corresponding to the user description with the user description corresponding to the j-th iteration, and replace the placeholders corresponding to the summary with the question. The summary, and the placeholders corresponding to the dialogue are replaced with the first i-1 rounds of dialogue to obtain the second prompt word.

[0044] For example, the second prompt word template is: A user is actively communicating with an agent. Their previous conversation is as follows: xxx. The user's psychological characteristics in the next round of conversation are described as follows: xxx (user description). Furthermore, the user wants to express the following key information points in the next round of conversation in sequence: xxx (summary). Based on the existing conversation history between the user and the agent, and combining the user's psychological characteristics and the key information points in the next round of conversation, predict what questions the user might ask in the next round of conversation. When outputting the questions, do not include any information about emotions or personality; only predict the factual content that the user wants to express. Here, xxx is a placeholder.

[0045] For example, the second prompt word is: A user is actively communicating with an agent. Their historical dialogue is as follows: After the first i-1 rounds of dialogue, the user's psychological characteristics in the next round are described as follows: The user description corresponding to the j-th iteration, and the key information points the user wants to express in the next round of dialogue in the following order: Question Summary: Based on the existing dialogue history between the user and the agent, and combining the user's psychological characteristics and key information points for the next round of dialogue, predict what questions the user might ask in the next round of dialogue. When outputting the questions, do not include any information about emotions or personality; only predict the factual content that the user wants to express. Here, xxx is a placeholder.

[0046] As can be seen, in the implementation method, when predicting the questions that the user may ask in the next round of dialogue, the key points of the user's actual expression in the next round of dialogue are also used, thereby accurately predicting the user's questions and improving iteration efficiency.

[0047] Furthermore, based on the aforementioned problem and the aforementioned problem Determine the user description corresponding to the i-th sample.

[0048] For example, determining the problem With regard to the problem The first similarity between them.

[0049] For example, in response to a first similarity greater than or equal to a first threshold, it indicates that the predicted question asked by the user in the i-th round of the dialogue is very close to the user's actual question in the i-th round of the dialogue. This means that the user description corresponding to the j-th iteration can accurately predict the question the user might ask in the i-th round of the dialogue. In other words, the user description used in the j-th iteration can accurately characterize the user's features and psychology in the i-th round of the dialogue. Therefore, the user description corresponding to the j-th iteration can accurately describe the user's user characteristics. Thus, the user description corresponding to the j-th iteration can be directly used as the user description corresponding to the i-th example.

[0050] For example, if the first similarity is less than the first threshold, it indicates that the predicted question from the user in the i-th round of the dialogue differs significantly from the user's actual question in the i-th round of the dialogue. In other words, the user description corresponding to the j-th iteration does not accurately depict the user's characteristics and psychology in the i-th round of the dialogue; that is, the user description used in the j-th iteration cannot accurately describe the user's features. Therefore, the user description corresponding to the j-th iteration needs to be updated to obtain the user description required for the (j+1)-th iteration, so that the (j+1)-th example can be iterated upon.

[0051] For example, based on the aforementioned problem The user description corresponding to the (j+1)th iteration is determined by the first (i-1)th rounds of dialogue and the user description corresponding to the j-th iteration.

[0052] For example, based on the aforementioned problem Construction and the problem The corresponding first prompt word; based on the first prompt word, generate the question. The corresponding summary, including the generation of questions. The corresponding summary is generated in a similar way to the one described above, and will not be described again.

[0053] Optionally, in one embodiment of this application, the user description corresponding to the (j+1)th iteration is determined based on the summary, the first (i-1)th rounds of dialogue, and the user description corresponding to the j-th iteration.

[0054] For example, based on the summary, the first i-1 rounds of dialogue, and the user description corresponding to the j-th iteration, a fourth prompt word corresponding to the j+1-th iteration is constructed. This fourth prompt word instructs the user description corresponding to the j-th iteration to be updated based on the summary and the first i-1 rounds of dialogue, resulting in a new user description. Then, the fourth prompt word is input into the large language model, and the new user description is output. This new user description is then used as the user description corresponding to the j+1-th iteration. Specifically, based on the fourth prompt word template, the summary, the first i-1 rounds of dialogue, and the user description corresponding to the j-th iteration, the fourth prompt word is determined by replacing the placeholder corresponding to the summary in the fourth prompt word template with a question. The corresponding summary, and replacing the placeholders in the fourth prompt word template corresponding to the dialogue with the first i-1 rounds of dialogue, and replacing the placeholders in the fourth prompt word template corresponding to the user description with the user description corresponding to the j-th iteration, yields the fourth prompt word.

[0055] For example, the fourth prompt word template can be: "A user is actively communicating with an agent. Their conversation goes like this: xxx. In the next round of conversation, the user wants to express the following key information points in sequence: xxx. We want to generate an accurate description of the user's psychological and personality traits, so that you can accurately predict the user's complete next round of conversation based solely on this user description. Please use xxx as a base, adding, deleting, and modifying it to obtain a new user description that can accurately generate the closest approximation of the user's actual next round of conversation." Here, xxx is a placeholder.

[0056] Therefore, the fourth prompt is: "A user is actively communicating with an agent. Their conversation goes like this: In the first i-1 rounds of conversation, the user wants to express the following key information points in sequence in the next round: Questions..." The corresponding summary should generate an accurate depiction of the user's psychological and personality traits, allowing you to accurately predict the user's next round of conversation based solely on this user description. Using the user description from the j-th iteration as a base, add, delete, and modify it to obtain a new user description that can accurately generate the closest possible next round of conversation to the user's actual dialogue.

[0057] Optionally, in one embodiment of this application, since the user description generated in the j-th iteration still cannot accurately characterize the user's features, it means that the user descriptions generated in the first j iterations for the i-th example cannot accurately characterize the user's features. In other words, the questions predicted by the user descriptions used in the first i iterations are all deviating from the user's actual questions in the i-th round of dialogue. Therefore, the first i iterations are all failed iterations, which can also be called failed cases. Then, the failed cases of the first j iterations can be given to the large language model for reference. In this way, when updating user descriptions, the large language model can see which user descriptions are inaccurate or failed, and thus can update user descriptions accurately.

[0058] For example, based on the summary, the first i-1 rounds of dialogue, and the question... The user description corresponding to the j+1th iteration is determined by considering the user description corresponding to the j-th iteration, the user description used in each of the previous j iterations, and the question predicted in each of the previous j iterations. For example, based on the summary, the previous i-1 rounds of dialogue, and the user description corresponding to the j-th iteration, a fourth prompt word corresponding to the j+1th iteration is constructed; and based on the question... The user descriptions used in each of the previous j iterations and the problems predicted in each of the previous j iterations are used to construct failure cases corresponding to each of the previous j iterations. The construction of the fourth prompt word here is similar to the method described above and will not be repeated.

[0059] For example, constructing the failure cases corresponding to each iteration can specifically involve: using the user description used in each iteration, the problem predicted in each iteration, and the problem... By concatenating the data, we obtain the failure cases corresponding to each iteration.

[0060] For example, if the user description corresponding to the j-th iteration is user description j, then the failure cases corresponding to the j-th iteration are: The user description used in the j-th iteration is: <user description j>, and the predicted problem is: <problem> > The actual issues in the next round of conversation with the user: <Issues The gap is significant.

[0061] Finally, the fourth prompt word is combined with the failure cases corresponding to each of the previous j iterations to obtain the fifth prompt word for the j-th iteration. This fifth prompt word instructs the user description for the j-th iteration to be updated based on the summary, the previous (i-1) rounds of dialogue, and the failure cases, resulting in a new user description. Then, the fifth prompt word is input into the large language model, which outputs the new user description. This new user description is then used as the user description for the (j+1)-th iteration.

[0062] For example, the fifth prompt word could be: "A user is proactively communicating with an agent. Their conversation goes like this: In the first i-1 rounds of conversation, the user wants to express the following key information points in sequence in the next round: Questions" The corresponding summary should generate an accurate depiction of the user's psychological and personality traits, allowing you to accurately predict the user's next round of conversation based solely on this user description. Previous iteration failures are illustrated below: The user description used in the first iteration was: <User Description 1>, and the predicted problem was: <Problem> > The actual issues in the next round of conversation with the user: <Issues The gap is significant. ... The user description used in the j-th iteration is: <user description j>, and the predicted problem is: <problem> > The actual issues in the next round of conversation with the user: <Issues The gap is significant. Please refer to the failed cases above. Based on the user description corresponding to the j-th iteration, add, delete, and modify it to obtain a new user description that can accurately generate the next round of dialogue that is closest to the user's actual situation.

[0063] As can be seen, in this implementation, when updating the user descriptions used in the previous iteration, failed user descriptions and predicted problems from the previous iteration are also used to construct failed cases. In this way, when the large language model updates the user descriptions used in the previous iteration using prompt words, it knows what the failed user descriptions are. Moreover, the failed cases also contain the problems predicted by each failed user description. Therefore, the large language model knows that the user descriptions predicted by these problems are also inaccurate. So when updating user descriptions again, it will avoid these failed user descriptions, that is, avoid the failed update direction, thereby accurately and efficiently updating the user descriptions to be used in the next round, improving the accuracy and efficiency of user profile construction.

[0064] Optionally, in one embodiment of this application, for the i-th example, as the number of iterations increases, i.e., the value of j becomes larger, the number of failed cases also increases. Many of these failed cases may be very similar. If all j failed cases from the first i iterations are given to the large language model, the large model would need to extract key information from a large number of failed cases, which would reduce its processing efficiency. Furthermore, the large number of failed cases might make the large language model more cautious and hesitant when updating user descriptions, resulting in more simplistic and limited updated user descriptions.

[0065] Therefore, for example, in response to the number of iterations for the i-th sample being greater than or equal to a second threshold, i.e., j being greater than the second threshold, then based on the problem predicted in each of the previous j iterations and the problem... The similarity between the iterations is used to group the first j iterations into k iteration groups. This means that iterations with similarity within the same similarity interval are grouped into the same iteration group. Then, the problem predicted by all iterations in each iteration group is similar to the problem in question. The similarity between the pairs lies within the same similarity interval, where k is less than or equal to j. The similarity interval is a pre-configured interval.

[0066] Then, one iteration is selected from each iteration group to obtain k iterations. Of course, more iterations can be selected, but this application only uses the selection of one iteration as an example and does not limit the number of iterations selected.

[0067] Furthermore, based on the summary, the first i-1 rounds of dialogue, and the question... The user description corresponding to the (j+1)th iteration is determined by considering the user description corresponding to the j-th iteration, the questions generated in each of the k iterations, the user description used in each of the k iterations, and the questions generated in each of the k iterations.

[0068] Similarly, based on the summary, the first i-1 rounds of dialogue, and the user description corresponding to the j-th iteration, a fourth prompt word is constructed. Then, for each iteration in k iterations, the user description used in each iteration, the question generated in each iteration, and the question... First, construct the failure cases corresponding to each iteration. Finally, combine the fourth prompt word with the failure cases corresponding to each iteration to obtain the sixth prompt word corresponding to the (j+1)th iteration. Then, input the sixth prompt word into the large language model, output a new user description, and use this new user description as the user description corresponding to the (j+1)th iteration.

[0069] As can be seen, in this implementation, when the number of iteration failures reaches the second threshold, representative failure cases are selected from similar iterations across multiple iterations and fed to the large language model to guide its update process. This implementation reduces the number of failure cases while maintaining the guiding role of these cases in updating user descriptions, thus ensuring the processing efficiency of the large language model. Furthermore, because the number of failure cases is reduced, the large language model is less affected by the number of failure cases when extracting information from them, and it doesn't extract too many influencing factors. This allows it to update user descriptions boldly in the correct direction, ensuring the diversity of user descriptions and enhancing the richness of user descriptions generated from different examples, thereby comprehensively uncovering user characteristics.

[0070] Optionally, in one embodiment of this application, since the predicted problem and problem are calculated in each iteration... The similarity between them. Therefore, when constructing failure cases for each iteration, it is possible to base them on the user descriptions used in each iteration, the problems predicted in each iteration, and the similarity between the predicted problems and the actual problems. The similarity between them is used to construct the failure cases corresponding to each iteration in the previous j iterations.

[0071] For example, the failure case corresponding to the j-th iteration is: The user description used in the j-th iteration is: <user description j>, and the predicted problem is: <problem> > The actual issues in the next round of conversation with the user: <Issues The gap is significant, and there are problems. With the question The similarity between them is .

[0072] Therefore, whether using the first j iterations or constructing failure cases using the first k iterations mentioned above, it is possible to add iterated problems and issues to the cases. The similarity between them.

[0073] As can be seen in this implementation, in the case of failure, the similarity between the predicted problem and the real problem is also constructed into the failure case. In this way, when the large language model extracts information from the failure case, it can see the similarity between the predicted problem and the real problem in each iteration. By using the order of similarity from small to large, the large model can learn that it is the correct approach to oriented user descriptions towards a direction with greater similarity, that is, it can learn the correct update approach, thereby further improving the update efficiency and accuracy of user descriptions and improving the accuracy and efficiency of user profile construction.

[0074] Furthermore, after obtaining the user description corresponding to the (j+1)th iteration, the (j+1)th iteration is performed on the i-th sample using the user description corresponding to the (j+1)th iteration. The implementation method of the (j+1)th iteration is similar to that of the j-th iteration described above, and will not be repeated. If the (j+1)th prediction problem... If the problem still deviates from the actual problem, the iteration continues, and so on. When the number of iterations for the i-th sample is less than a preset value, the predicted new problem is related to the original problem. If the similarity between the two is greater than or equal to the first threshold, meaning the correct question can be predicted before the number of iterations reaches a preset value, then the user description used when predicting the new question can be used as the user description corresponding to the i-th sample. Alternatively, in response to the number of iterations for the i-th sample reaching a preset value, the predicted new question and the question... When the similarity between the predicted problem and the predicted problem is less than the first threshold, meaning the number of iterations has reached a preset value, the predicted problem is similar to the predicted problem. If the similarity between the samples is still less than the first threshold, then the empty text is used as the user description corresponding to the i-th sample.

[0075] It is understandable that if the number of iterations for the sample reaches a preset value, the measured problems and issues will be... If the similarity between the samples is still less than the first threshold, it means that no matter how many times the sample is iterated, a correct user description cannot be obtained. Therefore, using this sample will not yield a user description that matches the user, making it a failed sample. Theoretically, such samples should be discarded. However, for the smooth implementation of this application, the sample is not directly discarded; instead, the user description corresponding to such a sample is set to empty text (NULL). It's important to understand that setting the user description of a sample to empty text means that when the user description of such a sample is used for profile construction, it is also empty text, contributing nothing to the user profile construction. Therefore, a sample with an empty user description is essentially equivalent to discarding the sample. These two understandings are similar and do not need to be distinguished.

[0076] In layman's terms, when iterating over the i-th sample, the first iteration uses the user description from the first sample to predict the problem corresponding to the first iteration. And calculate the problem With the question The similarity between them. If the similarity is less than a first threshold, then the problem is used. The user description is updated based on the first i-1 rounds of dialogue to obtain the user description needed for the second iteration. Based on the user description needed for the second iteration, the question corresponding to the second iteration is predicted. In other words, each iteration first predicts the problem corresponding to the current iteration, and if the predicted problem is different from the current problem... If the similarity between the predicted questions and the predicted questions is less than the first threshold, the user description is updated to obtain the user description needed for the next iteration. The iteration continues until the predicted questions and questions are found to be similar. If the similarity between the samples is greater than or equal to the first threshold, the user description used at this time will be used as the description corresponding to the i-th sample.

[0077] Optionally, the first example mentioned above can be any of the first i-1 examples; or, the first example can be the (i-1)th example among the first i-1 examples; or, it should be noted that, due to the possibility of example iteration failure, there may be failed examples among the first i-1 examples. Such examples ultimately fail to iterate to the correct user description, meaning the user description of such examples is empty text. Referencing the user description of such failed examples is meaningless. Therefore, the first example mentioned above can also be the example among the first i-1 examples where the user description is not empty text and is closest to the i-th example. That is, when iterating over each example, the closest example that can iterate to the correct user description is referenced. Referencing the truly effective user description can improve the iteration efficiency of the i-th example. For ease of description, this application mainly uses the example where the (i-1)th example iterates successfully, and the first example is the (i-1)th example, for illustration.

[0078] It should be noted that since the user description corresponding to the i-th sample can accurately predict the user's questions in the i-th round of the conversation, it can accurately describe the user's psychological activities in the i-th round of the conversation. Therefore, the user characteristics described in the user description corresponding to the i-th sample may be the user characteristics exhibited by the user in the i-th round of the conversation. Moreover, since the user description of the (i-1)-th sample is referenced when iterating over the i-th sample, and the user description of the (i-1)-th sample is referenced when iterating over the i-th sample, the i-th sample is essentially referencing the user descriptions of the previous (i-1)-th samples. Therefore, the user description corresponding to the i-th sample also describes the user's psychological activities in the previous (i-1)-th rounds of the conversation. Thus, the user characteristics described in the user description corresponding to the i-th sample may also be the user characteristics exhibited by the user in the previous (i-1)-th rounds of the conversation. Of course, when predicting user descriptions, the large language model may also predict the user's behavior in future rounds of dialogue. It can combine the user's future behavior and mental activity to predict their mental activity in the i-th round. Therefore, the user characteristics described in the user description corresponding to the i-th example may also be the user characteristics exhibited by the user throughout the entire dialogue; that is, the user characteristics described in the user description corresponding to the i-th example may be the user characteristics exhibited by the user in N rounds of dialogue. In practical applications, the final form of the user characteristics described in the user description corresponding to the i-th example depends on the information extracted and decision-making behavior determined by the large language model during the prediction process. This application does not limit the form of the user characteristics described in the user description corresponding to the i-th example. As long as the N user descriptions corresponding to the N examples are ultimately integrated to obtain the complete user characteristics, they are all within the scope of protection of this application.

[0079] As can be seen, when iterating over each example, this application utilizes the user descriptions that have already been iterated over by previous examples, i.e., the user descriptions accumulated by previous examples, to iterate over the example. In this way, when iterating over the example for the first time, the user descriptions that have already been accumulated can be directly reused. Thus, when iterating over the example for the first time, there is a user description that can be referenced and learned from, instead of using random user descriptions for the initial iteration. This allows for the rapid iteration to generate the user description corresponding to the example, thereby improving the efficiency of user profile construction.

[0080] It should be noted that in practical applications, when iterating over the i-th example, the user descriptions of multiple examples from the previous i-1 examples can also be referenced. That is, the user descriptions of multiple examples are used as the user descriptions used in the first iteration of the i-th example. This application is only for the sake of convenience, and the user description of the first example is used as an example for illustration.

[0081] It should be noted that for the first example, there are no other examples to refer to before. Therefore, in the first iteration of this example, there is no user description from other examples to use. So, for the first example, the user description corresponding to the first iteration is generated in advance. For example, the user description is generated randomly; or, empty text, i.e., NULL, is used as the user description of the first example in the first iteration.

[0082] It should be noted that when iterating over the i-th sample, this application will refer to the user descriptions of the previous samples. However, in practical applications, each sample can also be iterated independently. For example, like the first sample, in the first iteration, the user descriptions of the previous samples are not referred to. Instead, a randomly generated user description or empty text (i.e., an empty user description) is used for the first iteration. Then, the iteration continues in the same way as the i-th sample until the user description corresponding to the i-th sample is obtained.

[0083] 303: Based on the user description corresponding to the i-th sample, determine the user description corresponding to each sample.

[0084] For example, perform a similar operation as for the i-th sample to obtain the user description corresponding to each sample.

[0085] 304: Based on the user description corresponding to each sample, a first text is obtained, which is used to describe the user's profile.

[0086] For example, the N user descriptions corresponding to N samples are processed to obtain the first text, that is, the common user features in the N user descriptions are extracted to obtain the first text. It can be understood that if the iteration of user descriptions for a certain sample fails, then when constructing the user profile in step 304, the sample can be discarded without using it. For ease of description, this application mainly uses the iteration of user descriptions for each sample as an example for illustration.

[0087] Optionally, in one embodiment of this application, the user description corresponding to each sample is input into a large language model. The large language model then extracts user features from the N user descriptions to obtain the first text. The following describes how to extract features from the user descriptions using a large language model.

[0088] For example, the first text generated for a female user would be as follows: "The user is a woman whose personality traits show a strong sense of dominance. She is currently in a bad mood, things have been going wrong lately, she does not have a clear sense of optimism, her logic is not strong, her narrative jumps around and is whimsical, she is more emotional, she values ​​harmonious relationships with others and can consider the feelings of others."

[0089] For example, using a large language model, the user description corresponding to each example is segmented into words, resulting in multiple first elements (i.e., tokens) corresponding to each example. Then, these first elements are filtered to obtain multiple second elements corresponding to each example. Specifically, the first elements are filtered based on a first dictionary, meaning that first elements matching the first dictionary are removed, resulting in multiple second elements corresponding to each example. The first dictionary records business-related entity words, such as "product," "service," and "fault," etc. These words are business-related and unrelated to the user's personality; therefore, they are first filtered out from the multiple first elements.

[0090] Furthermore, feature extraction is performed on each of the multiple second elements corresponding to each example to obtain the semantic features of each second element. Based on the semantic features of each second element, the multiple second elements corresponding to each example are grouped into a first element group and a second element group. The relevance between the elements in the first element group and the user features is greater than the relevance between the elements in the second element group and the user features, meaning that the elements in the first element group are more suitable for extracting user features. For example, based on the semantic features of each second element, each second element is classified to obtain the category of each second element. Then, second elements whose category is sentiment words are assigned to the first element group, and second elements whose category is not sentiment words are assigned to the second element group.

[0091] Furthermore, based on the semantic features of each second element in the first element group, multi-head attention processing is performed on each second element in the first element group to obtain the first semantic feature corresponding to each second element in the first element group. Based on the semantic features of each second element in the second element group, grouped query attention processing is performed on each second element in the second element group to obtain the second semantic feature corresponding to each second element in the second element group. Then, according to the position of the second element in the sample, the first semantic features corresponding to each second element in the first element group and the second semantic features corresponding to each second element in the second element group are concatenated in front-to-back order to obtain the first feature matrix corresponding to each sample. Finally, the first feature matrix corresponding to each sample is decoded to output the user feature corresponding to each sample.

[0092] As can be seen, in this embodiment, for sentiment words, i.e., elements that are important for identifying user features, multi-head attention processing is used. Multi-head attention processing can capture rich semantic information of elements in different semantic subspaces, thereby extracting rich semantic features. For non-sentiment words, i.e., elements that are not as important for identifying user features, grouped query attention is used, which can efficiently extract semantic features. Therefore, this application uses different attention mechanisms for different categories of elements, so as to efficiently extract semantic features without losing semantic features, thereby improving both the accuracy and efficiency of user feature recognition.

[0093] Furthermore, based on the user features corresponding to each sample, common user features are determined. For example, the user features corresponding to each sample are merged and deduplicated to obtain multiple first user features. Then, the frequency of each first user feature is counted; the first user features with a frequency greater than a third threshold are taken as common user features.

[0094] Finally, based on common user characteristics, the aforementioned first text is generated, which is to expand the common user characteristics into a natural and fluent text, thus obtaining the first text.

[0095] Optionally, in one embodiment of this application, user features can be extracted from N user descriptions using a large language model to obtain multiple user personalities.

[0096] For example, based on multiple second elements corresponding to each of the N samples, the label matched by the user in each evaluation dimension is determined. Specifically, through the above processing mechanism, a first feature matrix corresponding to each sample is obtained, and then the first feature matrices corresponding to the N samples are concatenated to obtain a second feature matrix corresponding to the user. Based on the second feature matrix of the user pair, the user is classified in each evaluation dimension to obtain the label matched by the user in each evaluation dimension.

[0097] Alternatively, input the N user descriptions corresponding to the N samples, along with multiple evaluation dimensions and the labels corresponding to each evaluation dimension, into the large model, and request the large model to output the labels that the user matches in each evaluation dimension.

[0098] Optionally, the evaluation dimensions of this application include, but are not limited to: word choice, syntax, sentiment, logic, and style. Optionally, labels corresponding to the word choice dimension include, but are not limited to: absolute (e.g., must / never), cautious (e.g., may / to some extent), colloquial, repetitive words, hyperbole, etc. Labels corresponding to the syntax dimension include, but are not limited to: long sentences, short sentences, imperative sentences, rhetorical questions, reduplicated sentences, nested clauses, etc. Labels corresponding to the sentiment dimension include, but are not limited to: impatient, calm, optimistic, anxious, angry, aggrieved, excited, indifferent, etc. Labels corresponding to the logic dimension include, but are not limited to: logic, causal chain, leaps, enumeration, storytelling, intuitiveness, data-driven, etc. Labels corresponding to the style dimension include, but are not limited to: concise, euphemistic, imperative, ironic, cute, formal, internet slang, etc.

[0099] Finally, the tags matched by the user across each assessment dimension are mapped to obtain the user's multiple personality traits, i.e., the user's level for each personality trait. These multiple personality traits include, but are not limited to: conscientiousness, neuroticism, openness, extraversion, agreeableness, etc. The levels for each personality trait include, but are not limited to: high, medium, and low. In other words, based on the personality traits associated with each assessment dimension, the user's tags matched within that dimension are mapped to obtain the user's level within that personality trait. For example, if the personality trait associated with the word choice dimension is conscientiousness, and the user's matched tag is hyperbolic, then the user's level for conscientiousness is low, meaning the user's conscientiousness trait is very low.

[0100] Finally, the aforementioned user's personality traits are also considered as user characteristics. This allows for personalized recommendations to be made later. For example, if a user has a low level of due diligence, there is a greater risk of default when granting a loan to that user, so caution is needed when lending to them; or, the loan amount for that user can be adjusted accordingly.

[0101] As can be seen in this embodiment, when constructing a user profile, N rounds of dialogue between the user and customer service are obtained, and then the N rounds of dialogue are split into N corresponding examples. For each example, the user description generated from the previous examples is used to iteratively generate the user description for that example. In this way, a corresponding user description is generated for each example, where the user description for each example describes the user characteristics of the user in the dialogue corresponding to that example. Finally, the N user descriptions corresponding to the N examples are fused to generate a text used to describe the user profile. In the prior art, users are mapped to multiple discrete labels through rule mapping, and then the discrete labels are hard-coded. The hard-coded vectors are then concatenated to obtain the user's feature vector to construct the user profile. In this way, it is difficult for users to understand why they are mapped to these discrete labels. Moreover, the labels are inherently isolated from each other, and the encoded vectors are also independent of each other. The information expressed cannot be mutually referenced or constrained. The hard-concatenated feature vectors will have ambiguity in dimension, thus the hard-concatenated feature vectors have accuracy problems when expressing user profiles. Compared to existing technologies, this application describes user profiles using a smooth and complete text. This results in clearer and more understandable user profiles, making it easier to understand why a user has such a profile and enhancing interpretability. Furthermore, because the profile is described using semantically complete and coherent text, the feature vector generated by encoding this text is a semantically complete feature vector, eliminating vector concatenation issues. The entire vector is clear and complete in both understanding and expression. Therefore, the feature vector encoded from this text can accurately represent the user profile; in other words, this application can accurately construct user profiles.

[0102] See Figure 4 , Figure 4 This is a schematic diagram of a user profile building apparatus provided in an embodiment of this application. The user profile building apparatus 400 includes: an acquisition unit 401 and a processing unit 402, wherein: Acquisition unit 401 is used to acquire N rounds of user dialogue; Processing unit 402 is configured to construct N examples corresponding one-to-one with the N rounds of dialogue between the user, wherein the i-th example includes the user's question in the i-th round of dialogue corresponding to the i-th example. The dialogue continues with the first i-1 rounds, where i is less than or equal to N; Based on the user description corresponding to the first instance, the aforementioned problem And the first i-1 rounds of dialogue, to determine the user description corresponding to the i-th sample, wherein the first sample is one of the first i-1 samples; Based on the user description corresponding to the i-th sample, determine the user description corresponding to each sample; Based on the user description corresponding to each sample, a first text is obtained, which is used to describe the user's profile.

[0103] In one embodiment of this application, based on the user description corresponding to the first instance, the problem... In addition to the first i-1 rounds of dialogue, determining the user description aspect corresponding to the i-th sample, the processing unit 402 is specifically used for: Based on the user description corresponding to the j-th iteration, the aforementioned problem And the first i-1 rounds of dialogue determine the question corresponding to the i-th sample in the j-th iteration. Wherein, when j=1, the user description corresponding to the j-th iteration is the user description corresponding to the first sample; Based on the aforementioned problem and the aforementioned problem Determine the user description corresponding to the i-th sample.

[0104] In one embodiment of this application, based on the aforementioned problem and the aforementioned problem To determine the user description aspect corresponding to the i-th sample, the processing unit 402 is specifically used for: Determine the problem With regard to the problem The first similarity between them; In response to a first similarity greater than or equal to a first threshold, the user description corresponding to the j-th iteration is used as the user description corresponding to the ith sample. In response to a first similarity less than a first threshold, based on the problem Based on the first i-1 rounds of dialogue and the user description corresponding to the j-th iteration, the user description corresponding to the (j+1)-th iteration is determined. Based on the user description corresponding to the (j+1)-th iteration, the (j+1)-th example is iterated to predict a new question. In response to the number of iterations for the i-th example being less than a preset value, the predicted new question and the question are... If the similarity between the samples is greater than or equal to the first threshold, the user description used when predicting the new question will be used as the user description corresponding to the i-th sample. Alternatively, in response to the number of iterations for the i-th sample reaching a preset value, the predicted new problem and the problem... If the similarity between the samples is less than the first threshold, the empty text is used as the user description corresponding to the i-th sample.

[0105] In one embodiment of this application, based on the aforementioned problem The processing unit 402, specifically used for determining the user description aspect corresponding to the (j+1)th iteration based on the first (i-1)th rounds of dialogue and the user description corresponding to the j-th iteration, is as follows: Based on the aforementioned problem Construction and the problem The corresponding first prompt word; Based on the first prompt word, the question is generated. Corresponding summary; Based on the above summary, the first i-1 rounds of dialogue, and the question... The user description corresponding to the (j+1)th iteration is determined by the user description corresponding to the j-th iteration, the user description used in each of the previous j iterations, and the problem predicted in each of the previous j iterations.

[0106] In one embodiment of this application, based on the summary, the first i-1 rounds of dialogue, and the question... The processing unit 402, based on the user description corresponding to the j-th iteration, the user description used in each of the previous j iterations, and the problem predicted in each of the previous j iterations, determines the user description aspect corresponding to the (j+1)-th iteration. Specifically, the processing unit 402 is used to: Based on the problem predicted in each of the previous j iterations and the problem itself... The similarity between the two is used to group the first j iterations into k iteration groups, where the problem predicted by all iterations in each iteration group is similar to the problem. The similarity between them lies within the same similarity interval, and k is less than or equal to j; One iteration is selected from each iteration group to obtain k iterations; Based on the above summary, the first i-1 rounds of dialogue, and the question... The user description corresponding to the (j+1)th iteration is determined by considering the user description corresponding to the j-th iteration, the questions generated in each of the k iterations, the user description used in each of the k iterations, and the questions generated in each of the k iterations.

[0107] In one embodiment of this application, based on the user description corresponding to the j-th iteration, the problem... And the first i-1 rounds of dialogue determine the question corresponding to the i-th sample in the j-th iteration. In this regard, the processing unit 402 is specifically used for: Based on the aforementioned problem Construction and the problem The corresponding first prompt word; Based on the first prompt word, the question is generated. Corresponding summary; Based on the user description corresponding to the j-th iteration, the first i-1 rounds of dialogue, and the summary, construct the second prompt word corresponding to the i-th example in the j-th iteration; Based on the second prompt word, determine the problem corresponding to the i-th sample in the j-th iteration. .

[0108] In one embodiment of this application, the first sample is the sample whose user description is not empty text among the first i-1 samples and is closest to the i-th sample.

[0109] See Figure 5 , Figure 5 This is a schematic diagram of an electronic device provided in an embodiment of this application. The electronic device 500 can be the user profile building apparatus described above.

[0110] Electronic device 500 includes a memory 501, a processor 502, a communication interface 503, and a bus 504. The memory 501, processor 502, and communication interface 503 are interconnected via the bus 504.

[0111] The memory 501 can be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 501 can store programs; when the electronic device 500 is the user profile building apparatus described above, when the program stored in the memory 501 is executed by the processor 502, the processor 502 and the communication interface 503 are used to execute the various steps performed by the user profile building apparatus in the user profile building method of this application embodiment.

[0112] The processor 502 may be a general-purpose central processing unit (CPU), microprocessor, application specific integrated circuit (ASIC), graphics processing unit (GPU), or one or more integrated circuits, used to execute relevant programs to implement the user profile construction method in the method embodiments of this application.

[0113] The processor 502 can also be an integrated circuit chip with signal processing capabilities. In implementation, each step in the user profile construction method of this application can be completed by the integrated logic circuits in the hardware of the processor 502 or by instructions in software form. The aforementioned processor 502 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 501, and processor 502 reads the information in memory 501 to execute the various steps of the user profile construction method.

[0114] The communication interface 503 can be a transceiver device such as a transceiver to enable communication between the electronic device 500 and other devices or communication networks. The communication interface 503 can also be an input-output interface to enable data transmission between the electronic device 500 and input-output devices, including but not limited to keyboards, mice, displays, USB flash drives, and hard drives. For example, the processor 502 can receive signals through the communication interface 503.

[0115] Bus 504 may include a pathway for transmitting information between various components of device electronics 500 (e.g., memory 501, processor 502, communication interface 503).

[0116] It should be noted that, although Figure 5 The illustrated electronic device 500 only shows the memory, processor, and communication interface. However, those skilled in the art should understand that in specific implementations, the electronic device 500 may also include other devices necessary for normal operation. Furthermore, depending on specific needs, those skilled in the art should understand that the electronic device 500 may also include hardware devices for implementing other additional functions. Moreover, those skilled in the art should understand that the electronic device 500 may only include the devices necessary for implementing the embodiments of this application, and may not necessarily include... Figure 5 All the devices shown.

[0117] It should be understood that the user terminal in this application may include smartphones (such as Android phones, iOS phones, Windows Phones, etc.), tablet computers, PDAs, laptops, mobile internet devices (MIDs) or wearable devices, etc. The above electronic devices are merely examples and not exhaustive, and include, but are not limited to, the electronic devices mentioned above. In practical applications, the above electronic devices may also include: intelligent in-vehicle terminals, computer equipment, etc.

[0118] The user profile construction in this application can be a server, and the server in this application can be a cloud computing server, a Content Delivery Network (CDN) server, a Network Time Protocol (NTP) server, a Domain Name System (DNS) server, or other various types of servers. The above-mentioned servers are merely examples and not exhaustive, and include but are not limited to the servers mentioned above.

[0119] This application also provides a computer-readable storage medium storing a computer program that is executed by a processor to implement some or all of the steps of any of the user profile construction methods described in the above method embodiments.

[0120] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the user profile building methods described in the above method embodiments.

[0121] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0122] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0123] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.

[0124] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0125] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software program module.

[0126] If the integrated unit is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0127] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage device, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0128] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for constructing user profiles, characterized in that, include: Based on the user's N rounds of dialogue, N sample cases are constructed, each corresponding to one of the N rounds of dialogue. The i-th sample case includes the user's question from the i-th round of dialogue corresponding to the i-th sample case. The dialogue continues with the first i-1 rounds, where i is less than or equal to N; Based on the user description corresponding to the first instance, the aforementioned problem And the first i-1 rounds of dialogue, to determine the user description corresponding to the i-th sample, wherein the first sample is one of the first i-1 samples; Based on the user description corresponding to the i-th sample, determine the user description corresponding to each sample; Based on the user description corresponding to each sample, a first text is obtained, which is used to describe the user's profile.

2. The method according to claim 1, characterized in that, The user description based on the first instance, the question And the first i-1 rounds of dialogue, determining the user description corresponding to the i-th sample, including: Based on the user description corresponding to the j-th iteration, the aforementioned problem And the first i-1 rounds of dialogue determine the question corresponding to the i-th sample in the j-th iteration. Wherein, when j=1, the user description corresponding to the j-th iteration is the user description corresponding to the first sample; Based on the aforementioned problem and the aforementioned problem Determine the user description corresponding to the i-th sample.

3. The method according to claim 2, characterized in that, The issue is as described and the aforementioned problem Determining the user description corresponding to the i-th sample includes: Determine the problem With regard to the problem The first similarity between them; In response to a first similarity greater than or equal to a first threshold, the user description corresponding to the j-th iteration is used as the user description corresponding to the ith sample. In response to a first similarity less than a first threshold, based on the problem Based on the first i-1 rounds of dialogue and the user description corresponding to the j-th iteration, the user description corresponding to the (j+1)-th iteration is determined. Based on the user description corresponding to the (j+1)-th iteration, the (j+1)-th example is iterated to predict a new question. In response to the number of iterations for the i-th example being less than a preset value, the predicted new question and the question are... If the similarity between the samples is greater than or equal to the first threshold, the user description used when predicting the new question will be used as the user description corresponding to the i-th sample. Alternatively, in response to the number of iterations for the i-th sample reaching a preset value, the predicted new problem and the problem... If the similarity between the samples is less than the first threshold, the empty text is used as the user description corresponding to the i-th sample.

4. The method according to claim 3, characterized in that, The issue is as described The user description corresponding to the (i-1)th round of dialogue and the user description corresponding to the j-th iteration is used to determine the user description corresponding to the (j+1)-th iteration, including: Based on the aforementioned problem Construction and the problem The corresponding first prompt word; Based on the first prompt word, the question is generated. Corresponding summary; Based on the above summary, the first i-1 rounds of dialogue, and the question... The user description corresponding to the (j+1)th iteration is determined by the user description corresponding to the j-th iteration, the user description used in each of the previous j iterations, and the problem predicted in each of the previous j iterations.

5. The method according to claim 4, characterized in that, Based on the summary, the first i-1 rounds of dialogue, and the question. The user description corresponding to the j-th iteration, the user description used in each of the previous j iterations, and the problem predicted in each of the previous j iterations are used to determine the user description corresponding to the (j+1)-th iteration, including: Based on the problem predicted in each of the previous j iterations and the problem itself... The similarity between the two is used to group the first j iterations into k iteration groups, where the problem predicted by all iterations in each iteration group is similar to the problem. The similarity between them lies within the same similarity interval, and k is less than or equal to j; One iteration is selected from each iteration group to obtain k iterations; Based on the above summary, the first i-1 rounds of dialogue, and the question... The user description corresponding to the (j+1)th iteration is determined by considering the user description corresponding to the j-th iteration, the questions generated in each of the k iterations, the user description used in each of the k iterations, and the questions generated in each of the k iterations.

6. The method according to any one of claims 2-5, characterized in that, The user description based on the j-th iteration, the question And the first i-1 rounds of dialogue determine the question corresponding to the i-th sample in the j-th iteration. ,include: Based on the aforementioned problem Construction and the problem The corresponding first prompt word; Based on the first prompt word, the question is generated. Corresponding summary; Based on the user description corresponding to the j-th iteration, the first i-1 rounds of dialogue, and the summary, construct the second prompt word corresponding to the i-th example in the j-th iteration; Based on the second prompt word, determine the problem corresponding to the i-th sample in the j-th iteration. .

7. The method according to any one of claims 2-6, characterized in that, The first example is the example among the first i-1 examples where the user description is not empty text and is the closest to the i-th example.

8. A user profile building device, characterized in that, include: The acquisition unit is used to acquire N rounds of dialogue from the user; The processing unit is configured to construct N sample instances corresponding one-to-one with the N rounds of dialogue between the user, wherein the i-th sample instance includes the user's question in the i-th round of dialogue corresponding to the i-th sample instance. The dialogue continues with the first i-1 rounds, where i is less than or equal to N; Based on the user description corresponding to the first instance, the aforementioned problem And the first i-1 rounds of dialogue, to determine the user description corresponding to the i-th sample, wherein the first sample is one of the first i-1 samples; Based on the user description corresponding to the i-th sample, determine the user description corresponding to each sample; Based on the user description corresponding to each sample, a first text is obtained, which is used to describe the user's profile.

9. An electronic device, characterized in that, include: A processor and a memory, the processor being connected to the memory, the memory being used to store a computer program, the processor being used to execute the computer program stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is executed by a processor to implement the method as described in any one of claims 1-7.