A user portrait construction method and related apparatus

By adopting a multi-agent collaborative model, the problem of low efficiency and insufficient accuracy in user profile construction in existing technologies is solved, and the efficient generation of accurate multi-dimensional user profiles is achieved, which has the capabilities of deep semantic understanding, multi-modal data fusion and dynamic updating.

CN121350362BActive Publication Date: 2026-06-02BEIJING SOHU NEW MEDIA INFORMATION TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING SOHU NEW MEDIA INFORMATION TECH
Filing Date
2025-12-19
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing technologies suffer from low processing efficiency and unsatisfactory results when building user profiles, especially in the case of single-model processing, which makes it difficult to generate accurate multi-dimensional user profiles.

Method used

A multi-agent collaborative model is adopted, including a decision-making and coordination agent, a user interest point extraction agent, a user social attribute analysis agent, and an interest point divergent association agent. These agents respectively perform the tasks of extracting user interests, social attributes, and generating extended related interests, and generate user profiles through a collaborative model that combines parallel and serial processes.

Benefits of technology

It improves the efficiency and accuracy of user profile construction, generates more accurate multi-dimensional user profiles, takes into account deep semantic understanding, multi-modal data fusion and dynamism, and provides good interpretability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121350362B_ABST
    Figure CN121350362B_ABST
Patent Text Reader

Abstract

The application discloses a user portrait construction method and related device, relates to the field of artificial intelligence, and divides user portrait construction into multiple tasks by calling a decision coordination agent, a user interest point extraction agent executes a first task, extracts the interest of a user from user behavior data, a user social attribute analysis agent executes a second task, extracts the social attribute of the user from the user behavior data, an interest point divergent association agent executes a third task, generates an extended associated interest according to the interest of the user, and the decision coordination agent generates a user portrait according to the interest, the social attribute and the extended associated interest of the user. Each agent improves the user portrait construction efficiency through a cooperation mode combining parallel and serial modes, each agent focuses on a specific task, the task execution effect is better, and finally, a more accurate multidimensional user portrait is generated.
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, and in particular to a user profile construction method and related apparatus. Background Technology

[0002] User profiling aims to abstract users' interests, preferences, behavioral patterns, and demographic characteristics through in-depth mining and analysis of user data, thereby forming a typical description of the user group and providing data support for subsequent business decisions. It has become a core technology in modern information systems, especially in fields such as recommendation systems, precision marketing, and personalized services.

[0003] With the development of large language models and deep learning technology, user profiles have begun to be built using large language models. However, the processing efficiency of a single model is low and the results are not ideal. Summary of the Invention

[0004] In view of the above problems, this application provides a user profile construction method and related apparatus to achieve the goal of generating more accurate multi-dimensional user profiles. The specific solution is as follows:

[0005] The first aspect of this application provides a method for constructing user profiles, including:

[0006] The decision-making and coordination agent is invoked to obtain user behavior data and generate the first task, the second task, and the third task.

[0007] The user interest point extraction agent is invoked to perform the first task, extracting the user's interests from the user behavior data;

[0008] The user social attribute analysis agent is invoked to perform the second task, extracting the user's social attributes from the user behavior data;

[0009] The interest-point divergent association agent is invoked to perform the third task, generating extended related interests based on the user's interests;

[0010] The decision-coordination agent is invoked to generate a user profile based on the user's interests, social attributes, and extended related interests.

[0011] In one possible implementation, the invocation of the decision-coordinating agent to generate a user profile based on the user's interests, social attributes, and extended related interests includes:

[0012] The decision-coordination agent is invoked to verify the logical consistency between the user's interests and social attributes;

[0013] The decision-coordination agent is invoked to verify the temporal rationality of the user's interest evolution.

[0014] The decision-coordination agent is invoked to verify the semantic relevance between the user's interests and extended related interests;

[0015] The decision-coordination agent is invoked to perform weighted fusion of the user's interests, social attributes, and extended related interests to generate a user profile.

[0016] In one possible implementation, the invocation of the decision-coordinating intelligent agent performs a weighted fusion of the user's interests, social attributes, and extended related interests to generate a user profile, including:

[0017] Encode users’ interests and extended related interests into sparse vectors;

[0018] Encode social attributes as dense vectors;

[0019] The attention weight of the sparse vector relative to the dense vector is determined based on the dot product of the sparse vector and the dense vector.

[0020] The sparse vector and the dense vector are weighted and fused according to the attention weights to obtain a user profile represented by a fused feature vector.

[0021] In one possible implementation, after invoking the decision-coordinating agent to generate a user profile based on the user's interests, social attributes, and extended related interests, the user profile construction method further includes:

[0022] Generate natural language descriptions based on users' interests, social attributes, and extended related interests;

[0023] User behavior data and its natural language description are displayed in chronological order.

[0024] In one possible implementation, the user profile construction method further includes:

[0025] Obtaining user information;

[0026] Adjust search strategies based on users' interests and social attributes;

[0027] Based on the retrieval strategy, obtain multiple search results corresponding to the user's question;

[0028] The semantic similarity between each search result and the user's question, the interest matching degree between each search result and the user's interest points, and the attribute fit degree between each search result and social attributes are determined respectively.

[0029] The target search results are filtered based on the semantic similarity between each search result and the user's question, the interest matching degree between each search result and the user's points of interest, and the attribute fit degree between each search result and the social attributes.

[0030] In one possible implementation, after filtering the target retrieval results, the user profile construction method further includes:

[0031] Based on the user question, the target search results, the user profile, and the prompt word template, prompt words are generated. The prompt word template includes a basic information layer, a user profile layer, a personalized instruction layer, and a generation constraint layer. The basic information layer includes the user question and search results. The user profile layer includes the user's interests, social attributes, and extended related interests. The personalized instruction layer includes: focus, answer depth, and language style. The generation constraint layer includes the constraints on the prompt words.

[0032] A second aspect of this application provides a user profile building apparatus, comprising:

[0033] The first invocation unit is used to invoke the decision-coordination intelligent agent to obtain user behavior data and generate the first task, the second task, and the third task.

[0034] The second invocation unit is used to invoke the user interest point extraction agent to execute the first task and extract the user's interests from the user behavior data.

[0035] The third invocation unit is used to invoke the user social attribute analysis agent to perform the second task and extract the user's social attributes from the user behavior data.

[0036] The fourth invocation unit is used to invoke the interest-point divergent association agent to execute the third task and generate extended related interests based on the user's interests;

[0037] The fifth invocation unit is used to invoke the decision-coordination intelligent agent to generate a user profile based on the user's interests, social attributes, and extended related interests.

[0038] A third aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the user profile construction method described in the first aspect or any implementation thereof.

[0039] A fourth aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:

[0040] The memory is used to store computer programs;

[0041] The processor is used to execute the computer program so that the electronic device can implement the user profile construction method of the first aspect or any implementation thereof.

[0042] The fifth aspect of this application provides a computer storage medium carrying one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement the user profile construction method described in the first aspect or any implementation thereof.

[0043] By employing the aforementioned technical solutions, this application provides a user profile construction method and related apparatus. The method involves calling a decision-coordination intelligent agent to divide user profile construction into multiple tasks. A user interest extraction intelligent agent performs the first task, extracting user interests from user behavior data. A user social attribute analysis intelligent agent performs the second task, extracting user social attributes from user behavior data. An interest point divergent association intelligent agent performs the third task, generating extended related interests based on user interests. The decision-coordination intelligent agent then generates a user profile based on the user's interests, social attributes, and extended related interests. Through a collaborative mode combining parallel and serial processes, the efficiency of user profile construction is improved. Furthermore, because each intelligent agent focuses on a specific task, the task execution effect is better, ultimately generating a more accurate multi-dimensional user profile. Attached Figure Description

[0044] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0045] Figure 1 A flowchart illustrating a user profile construction method provided in an embodiment of this application;

[0046] Figure 2 This application provides a schematic diagram of a multi-agent collaborative process.

[0047] Figure 3 A flowchart of the dynamic update engine provided in the embodiments of this application;

[0048] Figure 4 This application provides a flowchart for generating an enhanced search application that combines user profiles, as shown in the embodiments of this application.

[0049] Figure 5 This is a schematic diagram of a user profile building device provided in an embodiment of this application;

[0050] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0051] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0052] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0053] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0054] User profiling aims to abstract users' interests, preferences, behavioral patterns, and demographic characteristics through in-depth data mining and analysis, thereby forming a typical description of a user group. User profiling construction schemes include the following:

[0055] 1. Real-time update scheme based on collaborative filtering:

[0056] This scheme primarily updates user profiles in real time by analyzing the similarity of interactions between users and items (e.g., "users who viewed item A also viewed item B"). Its core idea is to infer individual user preferences using commonalities in group behavior and then make recommendations or update user profiles accordingly. This method typically does not directly construct explicit user attribute tags, but rather creates implicit profiles through the similarity of the user-item interaction matrix.

[0057] However, this method relies heavily on large-scale user behavior data and is not effective for new users or users with sparse behavior; it focuses on group behavior rather than in-depth individual analysis, making it difficult to capture deep, fine-grained user attributes; and it lacks interpretability, making it difficult to intuitively understand the reasons for the formation of user profiles.

[0058] 2. Knowledge Graph-Enhanced User Profile Solution:

[0059] This approach enriches the semantic information of user profiles by associating user behavior data with a pre-defined knowledge graph. A knowledge graph typically contains entities (such as diseases, occupations, and interests) and the relationships between them (e.g., the relationship between "diabetes" and "middle-aged and elderly" or "pension"). By mapping user behavior to nodes in the knowledge graph, deeper user attributes and potential needs can be inferred.

[0060] However, knowledge graphs are expensive to build, requiring a lot of manual or semi-automated work; they have poor scalability and are difficult to adapt quickly to new domains or changing user interests; and their inference ability is limited for new knowledge or relationships not included in the knowledge graph.

[0061] 3. Large-scale model vectorization user profiling solution:

[0062] With the development of Large Language Models (LLMs) and deep learning techniques, some approaches have begun to utilize LLMs to generate dense semantic vectors for users or items. User behavior sequences or text descriptions are input into the LLM to generate a low-dimensional vector representation, and then user profiles or recommendations are constructed based on the similarity between vectors. This method encodes user features into continuous numerical vectors, facilitating mathematical operations and model training.

[0063] However, the vectors generated by LLM are usually "black box" representations, lacking intuitive interpretability (for example, "user vector similarity" cannot directly explain "why pension articles are recommended"), making it difficult for business personnel to understand users or investigate recommendation anomalies; the ability to describe user attributes in a fine-grained manner is limited, making it difficult to directly output human-understandable profile tags.

[0064] 4. Traditional structured feature splicing scheme:

[0065] This approach directly concatenates various structured features of a user (such as keywords, category tags, demographic information, etc.) into a user vector. These features are typically extracted from raw data using predefined rules, statistical methods, or shallow machine learning models. The process of building a user profile mainly involves the engineering and combination of features.

[0066] However, this approach ignores the value of unstructured features (such as deep attributes described in natural language); the feature dimensions are fixed and the semantics are simple, making it difficult to capture the deep semantic relationships and dynamic changes in user behavior; for the newly added user attribute dimensions, the features need to be redefined and the model needs to be trained, resulting in poor scalability.

[0067] In summary, the aforementioned user profiling construction schemes still have limitations to varying degrees in terms of semantic understanding depth, multimodal data fusion, balance between dynamism and interpretability, and scalability.

[0068] This application provides a user profile construction method. The user profile construction method of this application embodiment will be described in detail below with reference to the accompanying drawings.

[0069] Reference Figure 1 , Figure 1 This is a flowchart illustrating a user profile construction method provided in an embodiment of this application, as shown below. Figure 1 As shown in the embodiment of this application, a user profile construction method may include steps 101 to 105, which are described in detail below.

[0070] 101: Invoke the decision-coordination intelligent agent to obtain user behavior data and generate the first task, the second task, and the third task;

[0071] An intelligent agent is an entity that perceives and performs actions in a specific environment to achieve a goal. These agents interact through standardized communication protocols, forming an efficient collaborative network.

[0072] The decision-coordination agent acts as the overall controller and task scheduler. It receives user behavior data, performs preliminary analysis and quality assessment on the user behavior data, and generates the first, second, and third tasks if the user behavior data passes the quality assessment.

[0073] 102: Call the user interest point extraction agent to perform the first task: extract the user's interests from the user behavior data;

[0074] The decision-making and coordination agent triggers the user interest extraction agent to perform the first task. The user interest extraction agent is equipped with a large language model. After training on training samples labeled with interest keywords and fine-tuning with LoRA, it can extract interest keywords from user behavior data. Interest keywords represent the user's interests.

[0075] The structured features of user interests mainly originate from explicit and quantifiable user behavioral data, such as click records, browsing time, and article categories. This embodiment uses high-dimensional sparse feature vectors to encode these structured features and innovatively leverages the powerful capabilities of Large Language Models (LLM) to enhance keyword extraction, ranking, and association.

[0076] In one possible implementation, the user interest extraction agent can also intelligently rank interest keywords based on their relevance to the user's behavioral context, semantic depth, and core importance within the user's interest system, ensuring that the most representative interest keywords receive higher weights. Simultaneously, the agent will distinguish between short-term trending interests and long-term stable interests, establishing an interest time-series model.

[0077] 103: Call the user social attribute analysis agent to perform the second task: extract the user's social attributes from the user behavior data;

[0078] A user's social attributes are unstructured characteristics that are difficult to quantify precisely using traditional structured methods, such as a user's gender, approximate age group, family members, and physical health status.

[0079] A large language model is deployed on the user social attribute analysis agent. After training with training samples labeled with social attributes and fine-tuning using LoRA, it infers natural language descriptions of users' unstructured characteristics, representing social attributes, based on browsing behavior, interaction content, and other information in user behavior data. For example, it infers basic demographic characteristics such as age group, gender, and region based on behavioral patterns in user behavior data; analyzes users' health status and lifestyle through browsing patterns of health-related content in user behavior data; infers users' family structure and social relationships from content preferences and time patterns in user behavior data; assesses economic level and consumption capacity based on consumption-related behaviors and content preferences in user behavior data; and infers professional background and education level through attention to professional content and knowledge depth in user behavior data.

[0080] In one possible implementation, the natural language description of a user's unstructured features can be transformed into dense vectors. For each user's unstructured feature description, a high-performance pre-trained embedding model (such as the Qwen3Embedding model) is used to encode it into a dense semantic vector. These dense vectors can capture the rich semantic information in the text description and map it into a continuous, low-dimensional vector space, which facilitates subsequent numerical computation and model fusion.

[0081] 104: Call the interest-point divergent association agent to perform the third task, and generate extended related interests based on the user's interests;

[0082] The user interest point extraction agent triggers an interest point divergent association agent. Based on the user's historical interest keywords and the interest keywords output by the user interest point extraction agent, the interest point divergent association agent generates semantically related associative words using a large language model deployed on the interest point divergent association agent. These associative words represent extended related interests. The large language model deployed on the interest point divergent association agent is trained on training samples labeled with associative words and fine-tuned using LoRA.

[0083] In one possible implementation, the association strategy used by the interest-point divergent association agent to output associated words includes at least one of the following: direct semantic association based on similarity calculation in the word vector space, multi-hop association through entity relationships in the knowledge graph, collaborative association based on the behavioral patterns of similar users, and trend association based on the historical evolution of interest points.

[0084] Interest-based divergent association agents go beyond simple word co-occurrence, capturing deep semantic connections. For example, they can associate "retirement" with "pension" and "senior tourism." This helps supplement missing keywords in user behavior data that users are highly likely to be interested in, thereby enriching the dimensions of user profiles and improving their comprehensiveness.

[0085] 105: Invoke the decision-making and coordination intelligent agent to generate user profiles based on the user's interests, social attributes, and extended related interests.

[0086] In one possible implementation, the decision-coordinating agent is invoked to generate a user profile by using the user's interests, social attributes, and extended related interests as labels for the user profile.

[0087] In another possible implementation, a decision-coordination agent is invoked to cross-validate the outputs of other agents. The cross-validation includes at least one of the following: verification of the logical consistency between the user's interests and social attributes, verification of the temporal rationality of the evolution of the user's interests, and verification of the semantic relevance between the user's interests and extended related interests. If the cross-validation results indicate that there is a conflict between the outputs of other agents, a weighted fusion is performed based on the credibility score to generate a user profile.

[0088] This embodiment provides a user profile construction method that divides user profile construction into multiple tasks by calling a decision-coordination intelligent agent. The user interest point extraction intelligent agent performs the first task, extracting user interests from user behavior data. The user social attribute analysis intelligent agent performs the second task, extracting user social attributes from user behavior data. The interest point divergent association intelligent agent performs the third task, generating extended related interests based on user interests. The decision-coordination intelligent agent then generates a user profile based on user interests, social attributes, and extended related interests. The various intelligent agents improve the efficiency of user profile construction through a collaborative mode that combines parallel and serial processes. Furthermore, since each intelligent agent focuses on a specific task, the task execution effect is better, ultimately generating a more accurate multi-dimensional user profile.

[0089] In one possible implementation, step 105 in the above embodiments includes the following steps 1051-1054:

[0090] 1051: Invoke the decision-coordination intelligent agent to verify the logical consistency between the user's interests and social attributes;

[0091] In one possible implementation, user interests are represented by high-dimensional sparse vectors, constructed from structured features (such as article keywords clicked by the user, like "playoffs" and "red carpet," and category tags like "sports" and "entertainment"). These vectors capture specific, discrete behavioral information about the user. The sparse vectors are typically n-dimensional, for example, 100,000-dimensional, depending on the size of the keyword dictionary or the number of category tags. Due to their sparsity, most elements are zero.

[0092] Social attributes are represented using dense vectors, generated by encoding natural language descriptions (e.g., "The user is likely a 50-60 year old woman, financially well-off, and likely lives in an urban area. She may have cardiovascular disease, her partner may smoke, she has an infant in her family, and she is interested in baby food preparation.") using the Qwen3 Embedding model. These vectors capture deep, abstract semantic information about the user. Dense vectors are typically... Dimension, which represents the complexity of the semantic space.

[0093] The sparse vector is transferred through a linear layer from Dimension mapping to The dimension is adjusted to match the dimension of the dense vector. This step transforms sparse discrete features into a dense continuous representation using a dense vector (Query, ) and sparse feature mapping vector (Key, The semantic relevance between two entities is measured by the dot product of their values. A larger dot product indicates a stronger semantic connection, thus measuring the logical consistency between a user's interests and social attributes. The mapped vector is denoted as... (Sparse feature mapping vector). This mapping vector It serves as both the "key" and the "value" in the attention mechanism. As a "key," it is used to calculate similarity with the query; as a "value," it provides semantic information about the structured features during the weighted fusion stage.

[0094] In another possible implementation, a large model can be used to verify the logical consistency between a user's interests and social attributes. The user's social attributes and interest keywords are input into the large model, which then outputs a matching score and rating for the user's interests and social attributes. The user's social attributes can include categories such as elderly men, young women, etc., and age ranges can also be added. Interest keywords can be separated by commas. The large model is pre-trained using training samples, which include the correspondence between interest keywords and social attributes labeled based on general group characteristics. In other words, the large model verifies the logical consistency between a user's interests and social attributes based on general group characteristics, without addressing extreme cases.

[0095] For example, taking a number of interest keywords of 3 as an example, the scoring criteria (out of 10) for the large model is as follows:

[0096] Rating: High (9-10 points), indicating a perfect match for the interest keywords;

[0097] Rating: High (7-8 points), indicating that 2 interest keywords match and 1 interest keyword shows individual differences;

[0098] Rating: Medium (5-6 points), indicating a match for 1 interest keyword and a weak association with 2 interest keywords;

[0099] Rating: Low (1-4 points), indicating that the interest keywords do not match or conflict at all.

[0100] The large model can also output the matching degree between each interest keyword and social attribute, as well as the rationality of the overall combination.

[0101] 1052: Invoke the decision-making and coordination agent to verify the temporal rationality of the user's interest evolution;

[0102] A time decay algorithm is used to assign differentiated time weights to different types of features.

[0103] Time decay algorithm formula:

[0104] ;

[0105] in:

[0106] Indicates the first 1 browsing record at the current time The weight of the profile. This weight decays over time, reflecting the principle that recent behavior has a greater impact on user profiles;

[0107] This indicates the initial weight of the record. It is typically set to a default value of 1, representing the record's original importance at the time of occurrence.

[0108] (lambda) represents the decay coefficient, which is a positive real number. This coefficient determines the rate at which the weight decays over time. The larger the value, the faster the decay rate, which means that the timeliness of the feature is stronger; The smaller the value, the slower the decay rate, meaning the stronger the stability of the feature. Its value range is usually adjusted according to the business scenario and feature type, for example, 0.001-0.1;

[0109] Represents the current timestamp, usually in Unix timestamp format (seconds or milliseconds);

[0110] Indicates the first The timestamp of each browsing record, and Use the same unit of time.

[0111] Attenuation coefficient Differentiation settings: To more accurately capture the dynamics of user interests, differentiated decay coefficients are set for different types of features:

[0112] Short-term interest characteristics: For characteristics reflecting users' short-term interests or hot topics (such as news headlines and current affairs commentary), their timeliness is strong, and their decay rate should be relatively fast. Therefore, Relatively large values ​​can be used, such as 0.05-0.1. This means that the impact of these features on user profiles will decrease rapidly.

[0113] Long-term interest characteristics: For characteristics that reflect a user's long-term attributes or stable preferences (such as age group, health status, and family member information), their stability should be high, and their decay rate should be slow. Therefore, Relatively small values ​​are acceptable, such as 0.001-0.01. This means that the impact of these features on user profiles will last for a relatively long time.

[0114] The above formula can be further extended to a piecewise function or combined with periodic automatic adjustments based on user behavior. This mechanism aims to improve time-series adaptability. For example, for users who consistently browse a certain type of content each week, the system can learn their behavioral cycles and adjust the decay coefficients of relevant features accordingly, increasing their weight during periodic behaviors and decreasing it normally during non-periodic periods. This requires introducing more complex machine learning models to dynamically learn and predict optimal behavior. This ensures that the dynamic nature of user profiles can capture instantaneous changes while maintaining long-term stability.

[0115] If a user's long-term interest characteristics change frequently, or if a user's short-term interest characteristics remain stable, the decision-making and coordination agent will output a low confidence score when verifying the temporal rationality of the user's interest evolution.

[0116] 1053: Invoke the decision-coordination agent to verify the semantic relevance between the user's interests and extended related interests;

[0117] For example, a user's interests and extended related interests are represented by high-dimensional sparse vectors. By calculating the similarity between the high-dimensional sparse vectors corresponding to the user's interests and extended related interests, the semantic relevance between the user's interests and extended related interests is determined.

[0118] 1054: Invoke the decision-coordination intelligent agent to perform weighted fusion of the user's interests, social attributes, and extended related interests to generate a user profile.

[0119] For example, user interests and extended related interests are represented using high-dimensional sparse vectors, while social attributes are represented using dense vectors.

[0120] Use dense vectors (Query, ) and sparse feature mapping vector (Key, The semantic relevance between two things is measured by the dot product of their components. The larger the dot product, the stronger the semantic relationship between them.

[0121] Attention score calculation formula:

[0122] ;

[0123] in:

[0124] Dense vector, dimension 1 .

[0125] The transpose of the sparse feature mapping vector, with dimension 1. .

[0126] :express and The dot product.

[0127] : Scaling factor, used to avoid the gradient vanishing problem in the Softmax function when calculating the gradient due to the excessively large dot product result, thereby ensuring the stability of training.

[0128] The attention scores are normalized using Softmax to obtain the "semantic association weights" of sparse features relative to dense features. These weights are scalars between 0 and 1, and their sum is 1, representing the degree of contribution of different structured features to the current unstructured semantics.

[0129] The weight calculation formula is as follows:

[0130] ;

[0131] The output is a scalar weight (range 0-1) representing the overall semantic matching degree between sparse and dense features. This weight intuitively reflects the strength of the association between unstructured descriptions and users' actual structured behaviors.

[0132] Using the calculated attention weights on the sparse vector (Value, The sparse vector is weighted and then fused with the dense vector to obtain the final fused feature vector.

[0133] Formula for calculating fused vector:

[0134] ;

[0135] in:

[0136] The sparse feature mapping vector is used as the "value" in the weighting. In this scheme, and They are the same vector.

[0137] : Represents a sparse feature mapping vector It is weighted by its corresponding attention weight.

[0138] This indicates that the weighted sparse features are added to and fused with the original dense vector. This fusion method can preserve the original information of both modalities and strengthen semantically relevant parts through an attention mechanism.

[0139] If richer feature interaction information needs to be preserved, a concatenation method can also be used for fusion:

[0140] ;

[0141] This method will and weighted When concatenated, the resulting fusion vector will have its dimension expanded to... The dimensions can then be compressed back using an additional linear layer. To adapt to the input requirements of downstream tasks.

[0142] Please see Figure 2 The diagram illustrates the multi-agent collaboration process. In the process of generating a user profile, the user interest point extraction agent and the user social attribute analysis agent process in parallel, while the user interest point extraction agent and the interest point divergent association agent process in sequence. By cross-validating and fusing the output results of each agent, a user profile is generated.

[0143] In one possible implementation, this embodiment provides fast update streams and slow update streams for user profiles; please refer to [link to relevant documentation]. Figure 3 The flowchart of the dynamic update engine shown illustrates how user behavior triggers the update flow selection, real-time click events trigger the fast update flow, and daily cycles trigger the slow update flow.

[0144] 1. Real-time Update Stream:

[0145] Response time: Real-time processing, response time less than 5 seconds.

[0146] Processing content: Primarily handles real-time click events generated by users. When a user makes a new click, the system immediately triggers the following operations:

[0147] Keyword extraction and updating: LLM is used to extract keywords from newly clicked content and write them into user profiles. These keywords are sorted by time by default to ensure timely reflection of the latest interests.

[0148] Related keyword generation: Based on newly added keywords and contextual information such as clicked titles, LLM generates new related keywords, further enriching the real-time dimensions of the user profile.

[0149] Objective: To quickly capture users' instantaneous changes in interest and behavior, and to ensure that recommendation systems and other applications can respond promptly to users' latest preferences.

[0150] 2. Slow Update Stream (Batch Update Stream):

[0151] Update frequency: Deep feature reorganization is performed daily.

[0152] Processing content: Primarily involves more time-consuming and complex feature optimization and inference tasks, including:

[0153] User profile keyword ranking: Periodically rank all keywords in the user profile globally, taking into account long-term behavioral patterns and the overall importance of keywords.

[0154] Unstructured feature reasoning and extraction: Conduct more comprehensive analysis of users' historical behavior data, and use LLM to perform deeper unstructured feature reasoning and extraction, such as updating users' long-term attributes (such as health status, occupational changes, etc.).

[0155] Model fine-tuning and optimization: Based on the latest user data and profile feedback, the LLM is periodically fine-tuned to continuously improve its performance in user profiling tasks.

[0156] Objective: To optimize the long-term accuracy and stability of user profiles, ensure the comprehensiveness and depth of the profiles, and compensate for the shortcomings of fast update streams in deep analysis.

[0157] By establishing a dual-stream update engine that combines a fast update stream (real-time response) and a slow update stream (deep reorganization), the system can perform periodic deep feature optimization while ensuring real-time updates of user profiles, thus balancing system response speed and profile accuracy.

[0158] To address the "black box" problem of traditional user profiling, this embodiment provides an intuitive and easy-to-understand display of user profiles, thereby assisting in business decision-making and problem troubleshooting.

[0159] In one possible implementation, a user-friendly front-end display page is built, allowing business personnel or analysts to query detailed user profile information based on user ID. The front-end display page shows the user's click history and multi-dimensional user profile. The click history includes user behavior data arranged chronologically, such as the user's browsing and click records. The multi-dimensional user profile includes natural language descriptions (e.g., the user might be a 50-60 year old woman with a good economic situation, likely living in an urban area, possibly with cardiovascular disease, and a partner who may smoke; has an infant in the family and is interested in baby food preparation) and structured features (such as keywords, category tags, click time, etc.) generated based on the user's interests, social attributes, and extended related interests.

[0160] The aforementioned front-end display page achieves an organic unity of deep semantic understanding, efficient multimodal fusion, dynamic real-time updates, and good interpretability, providing a solid technical foundation for building accurate, comprehensive, and practical user profiles.

[0161] The user profiles generated in the above embodiments can be applied to enhanced retrieval, specifically including the following steps A1-A3:

[0162] A1: Problem understanding and user profile matching.

[0163] When a user asks a question, the system first analyzes the intent and domain of the question, and then matches it with relevant user profile information:

[0164] Question Intent Recognition: Using natural language understanding technology to identify the core intent of a question;

[0165] Domain association analysis: mapping questions to relevant points of interest in user profiles;

[0166] Personalized weight calculation: Adjusting search weights based on the user's interest intensity and social attributes;

[0167] A2: Adjustment of personalized search strategy.

[0168] Dynamically adjust search strategies based on user profile information:

[0169] Interest-based weighting: Documents related to the user's interests are given higher search weight;

[0170] Social attribute filtering: Filtering inappropriate content based on user attributes such as age and occupation;

[0171] Deep-level adaptation: Adjusting the professionalism of the search content based on the user's knowledge background;

[0172] A3: Personalized relevance ranking.

[0173] Traditional RAG systems primarily rank systems based on semantic similarity. This embodiment introduces user profile relevance:

[0174] Ranking score = α × semantic similarity + β × user interest matching degree + γ × social attribute fit degree;

[0175] in:

[0176] α, β, γ are adjustable parameters that are dynamically optimized based on user feedback;

[0177] Semantic similarity is the semantic similarity between each search result and the user's question;

[0178] User interest matching score is calculated based on the results of the interest point extraction agent, which is the interest matching score between each search result and the user's interest points;

[0179] The social attribute fit is calculated based on the reasoning results of the social attribute analysis agent, and is the attribute fit between each search result and the social attribute.

[0180] Filter the target search results based on the above ranking scores.

[0181] Furthermore, the user profiles provided in the above embodiments can also be applied to prompt construction scenarios. For example, a prompt template is as follows:

[0182] Basic information layer:

[0183] User question: {user_question};

[0184] Search results: {retrieved_documents};

[0185] User profile layer:

[0186] User interest points: {interest_points} # Agent extracted from interest points;

[0187] User social attributes: {social_attributes} # From the social attribute analysis agent;

[0188] Extended interests: {extended_interests} # From Lenovo Smart Agent;

[0189] Personalized instruction layer:

[0190] Focus areas: Based on the user's {primary_interests}, prioritize relevant content;

[0191] Answer depth: Adjust the level of expertise according to the user's {knowledge_level};

[0192] Language style: Adjust the expression based on the user's {age_group} and {background};

[0193] Generate constraint layer:

[0194] Highlight information relevant to the user's interests;

[0195] Use language that is appropriate for the user's level of understanding;

[0196] Provide practical suggestions related to users' social attributes.

[0197] like Figure 4 The flowchart shown illustrates the application process for enhanced retrieval generation based on user profiles. After the retrieval results are output, i.e., the target retrieval results are filtered, prompts are constructed based on the above prompt template, and the prompts are optimized according to the following optimization mechanism.

[0198] The dynamic Prompt optimization mechanism includes at least one of the following B1-B3:

[0199] B1: Interest Relevance Calculation: Calculates the correlation strength between the question and each of the user's interests, dynamically adjusts the weight of related interests in the Prompt, filters out interest information with low relevance, and avoids interference.

[0200] B2: Personalized instruction generation: Adjusting language complexity based on the user's age group, adjusting the use of professional terminology based on professional background, and providing targeted and practical suggestions based on family situation.

[0201] B3: Context length optimization: Adjust the Prompt length according to the complexity of the question and the richness of the user profile, balance the proportion of personalized information and basic search results, and ensure that the input of the generated model is within a reasonable range.

[0202] After generating the final prompts, user-adapted answers are generated, including style adaptation and depth adaptation. Based on the output of the intelligent agent, relevant content is highlighted in the answer, providing more detailed explanations and expansions on topics of interest to the user, and automatically linking related information that the user may be interested in. Style adaptation includes: age adaptation (adjusting language style for users of different age groups), knowledge background adaptation (adjusting the use of professional terminology based on inferred education level), and professional background adaptation (providing corresponding practical suggestions for users in different professions). Depth adaptation includes: adjusting the level of detail in the answer based on the user's knowledge level and interest depth, providing more in-depth technical details for professional users and easy-to-understand explanations for ordinary users.

[0203] Furthermore, after generating an answer, a consistency check can be performed between the answer and the user profile to ensure that the generated answer is consistent with the user profile information and to avoid providing suggestions or information that conflict with user attributes.

[0204] It can also collect user feedback on the quality and personalization of answers, and adjust user profiles and generation strategies based on the feedback.

[0205] Privacy protection is implemented for sensitive user attributes to ensure the security of user profile information during the generation process and avoid directly exposing sensitive user attributes in responses.

[0206] The above describes a user profile construction method provided by the embodiments of this application. The following will describe the apparatus for performing the above user profile construction method.

[0207] Please see Figure 5 , Figure 5 This is a schematic diagram of a user profile building device provided in an embodiment of this application. Figure 5 As shown, the user profile building device 500 includes:

[0208] The first calling unit 501 is used to call the decision coordination agent to obtain user behavior data and generate the first task, the second task and the third task;

[0209] The second invocation unit 502 is used to invoke the user interest point extraction agent to perform the first task and extract the user's interests from the user behavior data.

[0210] The third invocation unit 503 is used to invoke the user social attribute analysis agent to perform the second task and extract the user's social attributes from the user behavior data.

[0211] The fourth invocation unit 504 is used to invoke the interest-point divergent association agent to execute the third task and generate extended related interests based on the user's interests;

[0212] The fifth invocation unit 505 is used to invoke the decision coordination agent to generate a user profile based on the user's interests, social attributes, and extended related interests.

[0213] In one possible implementation, the fifth calling unit 505 includes:

[0214] The first verification subunit is used to call the decision coordination agent to verify the logical consistency between the user's interests and social attributes;

[0215] The second verification subunit is used to call the decision coordination agent to verify the temporal rationality of the user's interest evolution.

[0216] The third verification subunit is used to call the decision coordination agent to verify the semantic relevance between the user's interests and extended related interests;

[0217] The generation subunit is used to invoke the decision-coordination agent to perform weighted fusion of the user's interests, social attributes, and extended related interests to generate a user profile.

[0218] In one possible implementation, the generating subunit is specifically used to encode the user's interests and extended related interests into sparse vectors; encode social attributes into dense vectors; determine the attention weight of the sparse vector relative to the dense vector based on the dot product of the sparse vector and the dense vector; and perform weighted fusion of the sparse vector and the dense vector based on the attention weight to obtain a user profile represented by a fused feature vector.

[0219] In one possible implementation, the user profile building apparatus further includes:

[0220] The search results filtering unit is used to obtain user questions and adjust the search strategy based on the user's interests and social attributes.

[0221] Based on the retrieval strategy, multiple retrieval results corresponding to the user's question are obtained; the semantic similarity between each retrieval result and the user's question, the interest matching degree between each retrieval result and the user's points of interest, and the attribute fit degree between each retrieval result and the social attributes are determined respectively; the target retrieval results are filtered according to the semantic similarity between each retrieval result and the user's question, the interest matching degree between each retrieval result and the user's points of interest, and the attribute fit degree between each retrieval result and the social attributes.

[0222] In one possible implementation, the user profile building apparatus further includes:

[0223] The prompt word generation unit is used to generate prompt words based on the user question, the target search results, the user profile, and the prompt word template. The prompt word template includes a basic information layer, a user profile layer, a personalized instruction layer, and a generation constraint layer. The basic information layer includes the user question and search results. The user profile layer includes the user's interests, social attributes, and extended related interests. The personalized instruction layer includes: focus, answer depth, and language style. The generation constraint layer includes the constraints on the prompt words.

[0224] This application also provides an electronic device in its embodiments. (See reference...) Figure 6 The diagram illustrates a structural schematic suitable for implementing the electronic device in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 6 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0225] like Figure 6 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. When the electronic device is powered on, the RAM 603 also stores various programs and data required for the operation of the electronic device. The processing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0226] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, memory cards, hard drives, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0227] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the user profile construction methods provided in this application.

[0228] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the user profile construction methods provided in this application.

[0229] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and 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 modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0230] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0231] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0232] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. A user portrait construction method, characterized in that, include: The decision-making and coordination agent is invoked to obtain user behavior data and generate the first task, the second task, and the third task. The user interest point extraction agent is invoked to perform the first task, extracting the user's interests from the user behavior data; The user social attribute analysis agent is invoked to perform the second task, extracting the user's social attributes from the user behavior data. The user social attribute analysis agent and the user interest point extraction agent process the data in parallel. The interest point divergent association agent is invoked to perform the third task, generating extended related interests based on the user's interests. The interest point divergent association agent and the user interest point extraction agent are processed sequentially. The decision-coordination intelligent agent is invoked to generate a user profile based on the user's interests, social attributes, and extended related interests; The step of invoking the decision-coordination intelligent agent to generate a user profile based on the user's interests, social attributes, and extended related interests includes: The decision-coordination agent is invoked to verify the logical consistency between the user's interests and social attributes; The decision-coordination agent is invoked to verify the temporal rationality of the user's interest evolution. The decision-coordination agent is invoked to verify the semantic relevance between the user's interests and extended related interests; The decision-coordination agent is invoked to perform weighted fusion of the user's interests, social attributes, and extended related interests to generate a user profile. The step of invoking the decision-coordination intelligent agent to perform weighted fusion of the user's interests, social attributes, and extended related interests to generate a user profile includes: Encode users’ interests and extended related interests into sparse vectors; Encode social attributes as dense vectors; The attention weight of the sparse vector relative to the dense vector is determined based on the dot product of the sparse vector and the dense vector. The sparse vector and the dense vector are weighted and fused according to the attention weights to obtain a user profile represented by a fused feature vector. 2.The user portrait construction method of claim 1, wherein, After invoking the decision-coordination agent to generate a user profile based on the user's interests, social attributes, and extended related interests, the user profile construction method further includes: Generate natural language descriptions based on users' interests, social attributes, and extended related interests; User behavior data and its natural language description are displayed in chronological order. 3.The user portrait construction method of claim 1, wherein, The user profile construction method also includes: Obtaining user information; Adjust search strategies based on users' interests and social attributes; Based on the retrieval strategy, obtain multiple search results corresponding to the user's question; The semantic similarity between each search result and the user's question, the interest matching degree between each search result and the user's interest points, and the attribute fit degree between each search result and social attributes are determined respectively. Target search results are filtered based on the semantic similarity between each search result and the user's question, the interest matching degree between each search result and the user's points of interest, and the attribute fit degree between each search result and social attributes. 4.The user portrait construction method of claim 3, wherein, After filtering the target search results, the user profile construction method further includes: Based on the user question, the target search results, the user profile, and the prompt word template, prompt words are generated. The prompt word template includes a basic information layer, a user profile layer, a personalized instruction layer, and a generation constraint layer. The basic information layer includes the user question and search results. The user profile layer includes the user's interests, social attributes, and extended related interests. The personalized instruction layer includes: focus, answer depth, and language style. The generation constraint layer includes the constraints on the prompt words.

5. A user profiling apparatus, characterized by comprising: include: The first invocation unit is used to invoke the decision-coordination intelligent agent to obtain user behavior data and generate the first task, the second task, and the third task. The second invocation unit is used to invoke the user interest point extraction agent to execute the first task and extract the user's interests from the user behavior data. The third calling unit is used to call the user social attribute analysis agent to perform the second task, extracting the user's social attributes from the user behavior data. The user social attribute analysis agent and the user interest point extraction agent process in parallel. The fourth invocation unit is used to invoke the interest point divergence association agent to execute the third task, generate extended related interests based on the user's interests, and the interest point divergence association agent and the user interest point extraction agent are processed in sequence. The fifth invocation unit is used to invoke the decision-coordination intelligent agent to generate a user profile based on the user's interests, social attributes, and extended related interests; The fifth invocation unit is used to invoke the decision-coordination agent to generate a user profile based on the user's interests, social attributes, and extended related interests, including: The decision-coordination agent is invoked to verify the logical consistency between the user's interests and social attributes; The decision-coordination agent is invoked to verify the temporal rationality of the user's interest evolution. The decision-coordination agent is invoked to verify the semantic relevance between the user's interests and extended related interests; The decision-coordination agent is invoked to perform weighted fusion of the user's interests, social attributes, and extended related interests to generate a user profile. The step of invoking the decision-coordination intelligent agent to perform weighted fusion of the user's interests, social attributes, and extended related interests to generate a user profile includes: Encode users’ interests and extended related interests into sparse vectors; Encode social attributes as dense vectors; The attention weight of the sparse vector relative to the dense vector is determined based on the dot product of the sparse vector and the dense vector. The sparse vector and the dense vector are weighted and fused according to the attention weights to obtain a user profile represented by a fused feature vector.

6. A computer program product, characterised in that, It includes computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the user profile construction method as described in any one of claims 1 to 4.

7. An electronic device, comprising: It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the electronic device to implement the user profile construction method as described in any one of claims 1 to 4.

8. A computer storage medium, characterized in that, The storage medium carries one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement the user profile construction method as described in any one of claims 1 to 4.