User portrait generation method, device, electronic device, and computer program medium

By generating user feature vectors and utilizing pre-trained machine learning models, the problem of inaccurate user portraits due to lack of behavioral data is solved, and more accurate user portraits and business recommendations are achieved.

CN114912009BActive Publication Date: 2025-09-23TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110184908.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-10
Publication Date
2025-09-23
Estimated Expiration
2041-02-10

AI Technical Summary

Technical Problem

When existing technologies generate user portraits, users who lack behavioral data find it difficult to obtain accurate user portraits, which affects business accuracy.

Method used

By obtaining the user feature information of the target user, generating a user feature vector, and inputting it into a pre-trained machine learning model, the machine learning model is used to output the target user's preference level label under the target classification attribute to generate a user portrait.

Benefits of technology

It improves the accuracy of user portraits and the precision of business recommendations, more comprehensively represents user preferences through user feature vectors, and improves the accuracy of preference level labels for target objects under specific classification attributes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114912009B_ABST
    Figure CN114912009B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a method, device, electronic device and computer program medium for generating object description data, which relate to the field of artificial intelligence technology. The method in the embodiments of the present application includes: obtaining object feature information of a target object; based on the object feature information, generating multiple object feature vectors of the target object under the object feature dimension respectively; inputting the multiple object feature vectors into a pre-trained machine learning model; obtaining the preference level label of the target object under the target classification attribute output by the pre-trained machine learning model; if the obtained preference level label matches the preset preference level label, then generating object description data of the target object based on the target classification attribute. The technical solution of the embodiments of the present application improves the accuracy of the obtained object description data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to a method, device, electronic device, and computer program medium for generating a user portrait. Background Art

[0002] With the development of Internet technology, obtaining user portraits based on big data and then realizing various businesses through user portraits has become one of the core technologies of the Internet. User portraits, that is, the structuring and labeling of user information, accurately portray and analyze all aspects of user information by depicting data in various dimensions such as user demographic attributes, social attributes, interest preferences, and explore potential value.

[0003] In related technologies, when generating user profiles, profile tags are generally extracted from user behavior data, the profile tags involved in the user behavior data are counted, and each user's profile tag is scored according to the frequency of the statistics. The user profile is then obtained based on the profile tag scores. However, for users who have not taken any action, due to the limited behavioral data, it is difficult to obtain a user profile based on the tag statistics, or the user profile obtained based on the tag statistics is less accurate, which in turn affects the accuracy of related services based on the user profile. Summary of the Invention

[0004] Embodiments of the present application provide a method, apparatus, electronic device, and computer program medium for generating a user portrait, for improving the accuracy of the obtained user portrait.

[0005] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by practice of the present application.

[0006] According to one aspect of an embodiment of the present application, a method for generating a user portrait is provided, comprising: obtaining user feature information of a target user, the user feature information including user attribute information and historical behavior data of the target user; generating a plurality of user feature vectors of the target user under a user feature dimension based on the user feature information, the user feature dimension referring to a feature dimension composed of the category of the user attribute information, and the category of operation events and classification attributes of operation objects contained in the historical behavior data; inputting the plurality of user feature vectors into a pre-trained machine learning model, the pre-trained machine learning model including the plurality of user feature vectors of sample users under the user feature dimension and the preference level label of the sample users for the target objects under the target classification attributes; obtaining the preference level label of the target user for the target objects under the target classification attributes output by the pre-trained machine learning model; if the obtained preference level label matches the preset preference level label, generating a user portrait of the target user based on the target classification attributes.

[0007] According to one aspect of an embodiment of the present application, a device for generating a user portrait is provided, comprising: a first acquisition unit for acquiring user feature information of a target user, wherein the user feature information includes user attribute information and historical behavior data of the target user; a first generation unit for generating, based on the user feature information, a plurality of user feature vectors of the target user under a user feature dimension, wherein the user feature dimension refers to a feature dimension composed of the category of the user attribute information, the category of operation events contained in the historical behavior data, and the classification attributes of the operation objects; an input unit for inputting the plurality of user feature vectors into a pre-trained machine learning model, wherein the pre-trained machine learning model includes a plurality of user feature vectors of sample users under the user feature dimension and a preference level label of the sample users for the target objects under the target classification attributes; an output unit for acquiring the preference level label of the target user for the target objects under the target classification attributes output by the pre-trained machine learning model; and a second generation unit for generating a user portrait of the target user based on the target classification attributes if the acquired preference level label matches the preset preference level label.

[0008] In some embodiments of the present application, based on the aforementioned scheme, the user portrait generation device also includes: a third generation unit, used to convert the multiple user feature vectors respectively to generate first feature vectors corresponding to the multiple user feature vectors, and the first feature vectors corresponding to the multiple user features are vectors of the same dimension; an aggregation unit, used to aggregate the first feature vectors corresponding to the multiple user feature vectors based on the preset association relationship between the multiple user feature information, and generate multiple aggregated second feature vectors; a prediction unit, used to predict the target user's preference level label for the target object under the target classification attribute based on the multiple aggregated second feature vectors, and the first feature vectors corresponding to the multiple user features are vectors of the same dimension.

[0009] In some embodiments of the present application, based on the aforementioned scheme, the user portrait generation device also includes: a second acquisition unit, used to obtain training set sample data for training the machine learning model to be trained, each sample data in the training set sample data includes multiple user feature vectors of the sample user under the user feature dimension and the sample user's preference level label for the target object under the target classification attribute; a training unit, used to train the machine learning model to be trained through the training set sample data to obtain a pre-trained machine learning model.

[0010] In some embodiments of the present application, based on the aforementioned scheme, the second acquisition unit is configured to: obtain user feature information of candidate users in the candidate user set; for each candidate user in the candidate user set, determine a first category of candidate users and a second category of candidate users based on the historical behavior data in the user feature information of the candidate user, the first category of candidate users being candidate users that include target operation events, and the second category of candidate users being candidate users that do not include target operation events, and the target operation events are operation events that operate on the target objects under the target classification attributes; based on the user feature information of the first category of candidate users, generate multiple user feature vectors of the first category of candidate users under the user feature dimension, and add preference level labels with high preference levels to the first category of candidate users to obtain sample data of positive sample users; based on the user feature information of the second category of candidate users, generate multiple user feature vectors of the second category of candidate users under the user feature dimension, and add preference level labels with low preference levels to the second category of candidate users to obtain sample data of negative sample users; based on the sample data of the positive sample users and the sample data of the negative sample users, obtain training set sample data for training the machine learning model to be trained.

[0011] In some embodiments of the present application, based on the aforementioned scheme, the second acquisition unit is configured to: extract candidate users from the second category of candidate users; generate multiple user feature vectors of the extracted candidate users under the user feature dimension based on the user feature information of the extracted candidate users, and add a preference level label with a low preference degree to the extracted candidate users to obtain sample data of negative sample users.

[0012] In some embodiments of the present application, based on the aforementioned scheme, the second acquisition unit is configured to: determine the portrait density of the second category candidate users based on the frequency of historical behavior data contained in the user feature information of the second category candidate users, and the portrait density is positively correlated with the frequency; among the second category candidate users whose portrait density is higher than a predetermined portrait density threshold, extract candidate users at a first ratio, and among the second category candidate users whose portrait density is lower than or equal to the predetermined portrait density threshold, extract candidate users at a second ratio, and the first ratio is greater than the second ratio.

[0013] In some embodiments of the present application, based on the aforementioned scheme, the second acquisition unit is configured to: obtain a configuration file, wherein the configuration file is used to configure the attribute category of the acquired user attribute information, and the operation event category and classification attribute of the operation object of the acquired historical behavior data; for each candidate user in the candidate user set, based on the category of the user attribute information configured in the configuration file, obtain the user attribute information of the candidate user under the configured attribute category; for each candidate user in the candidate user set, based on the operation event category and classification attribute of the operation object configured in the configuration file, obtain the historical behavior data of the candidate user under the operation event category and classification attribute of the operation object.

[0014] According to one aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for generating a user portrait as described in the above embodiment is implemented.

[0015] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating a user portrait as described in the above embodiment.

[0016] According to one aspect of an embodiment of the present application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the user profile generation method provided in the various optional embodiments described above.

[0017] In the technical solutions provided in some embodiments of the present application, user feature information of a target user is obtained, the user feature information including user attribute information and historical behavior data of the target user; based on the user feature information, multiple user feature vectors of the target user under the user feature dimension are generated, the user feature dimension being a feature dimension composed of the category of the user attribute information, the category of the operation event contained in the historical behavior data, and the classification attribute of the operation object; the multiple user feature vectors are input into a pre-trained machine learning model, the pre-trained machine learning model is obtained by including multiple user feature vectors of sample users under the user feature dimension and the preference level label of the sample users for the target object under the target classification attribute; the preference level label of the target user for the target object under the target classification attribute output by the pre-trained machine learning model is obtained; if the obtained preference level label matches the preset preference level label, a user profile of the target user is generated based on the target classification attribute. Compared with obtaining a user profile based on label statistics, the user feature vector can more comprehensively represent the user's preferences, thereby improving the accuracy of predicting the user's preference level label for the target object under a specific classification attribute, thereby facilitating the identification of target users with specific user profiles, so as to improve the accuracy of related business recommendations.

[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings are incorporated into and constitute a part of the specification, illustrating embodiments consistent with the present application and, together with the specification, explaining the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can derive other drawings based on these drawings without inventive effort. In the drawings:

[0020] Figure 1 A schematic diagram shows an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied.

[0021] Figure 2 A flowchart of a method for generating a user portrait according to an embodiment of the present application is shown.

[0022] Figure 3 A flowchart of a method for generating a user portrait according to an embodiment of the present application is shown.

[0023] Figure 4 A schematic structural diagram of a pre-trained machine learning model according to one embodiment of the present application is shown.

[0024] Figure 5 A schematic diagram of the specific structure of the capsule layer in the pre-trained machine learning model according to one embodiment of the present application is shown.

[0025] Figure 6 A flowchart of a method for generating a user portrait according to an embodiment of the present application is shown.

[0026] Figure 7 A specific flow chart of step S610 of the method for generating a user portrait according to an embodiment of the present application is shown.

[0027] Figure 8 A specific flow chart of step S710 of the method for generating a user portrait according to an embodiment of the present application is shown.

[0028] Figure 9 A specific flow chart of step S740 of the method for generating a user portrait according to an embodiment of the present application is shown.

[0029] Figure 10 A specific flow chart of step S910 of the method for generating a user portrait according to an embodiment of the present application is shown.

[0030] Figure 11 A block diagram of a device for generating a user portrait according to an embodiment of the present application is shown.

[0031] Figure 12 A schematic diagram of the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0032] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art.

[0033] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner.In the following description, many specific details are provided so as to provide a full understanding of the embodiments of the present application. However, it will be appreciated by those skilled in the art that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps etc. can be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0034] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0035] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0036] Artificial Intelligence (AI) is the theory, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.

[0037] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. Artificial intelligence software technology mainly includes several major directions, such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning. For example, in an embodiment of the present application, multiple user feature vectors of a target user under a user feature dimension are determined by artificial intelligence technology, and based on the multiple user feature vectors of the target user under the user feature dimension, the target user's preference level label for the target object under the target classification attribute is determined, and then the target user's preference level label for the target object under the target classification attribute is generated to generate a user portrait of the target user.

[0038] User portraits: User portraits are a tagged user model abstracted from information such as a user's social attributes, lifestyle habits, and consumer behavior. The core task of building user portraits is to "label" users. Labels are highly refined feature identifiers derived from analyzing user information.

[0039] Machine learning (ML) is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.

[0040] Figure 1 A schematic diagram shows an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied.

[0041] like Figure 1 As shown, the system architecture may include a user portrait demander platform 101, a network 102, and a user portrait provider platform 103. The user portrait demander platform 101 and the user portrait provider platform 103 are connected via the network 102 and perform data exchange based on the network 102. The network may include various connection types, such as wired communication links, wireless communication links, etc.

[0042] It should be understood that Figure 1 The number of user portrait demander platforms 101, networks 102, and user portrait provider platforms 103 is merely illustrative. Depending on the implementation requirements, there may be any number of user portrait demander platforms 101, networks 102, and user portrait provider platforms 103. For example, the user portrait provider platform 103 may be a server cluster that provides user portrait generation services, the user portrait demander platform 101 may be a server cluster or client that needs to obtain user portraits, and the client may be one or more of a mobile phone, a tablet, a portable computer, and a desktop computer, but of course, it is not limited thereto. The user portrait provider platform 103 may be a platform that provides a variety of business services to users, such as a social application or an instant messaging application, which may contain user attribute information and historical behavior data of a large number of users.

[0043] The user portrait demander platform 101 provides the identification information of the target user whose user portrait needs to be generated, and the user portrait provider platform 103 obtains the user feature information of the target user based on the user identification information. The user feature information includes the user attribute information and historical behavior data of the target user; based on the user feature information, a plurality of user feature vectors of the target user under the user feature dimension are generated respectively, and the user feature dimension refers to the feature dimension composed of the category of the user feature information, the category of the operation event contained in the historical behavior data, and the classification attribute of the operation object; the plurality of user feature vectors are input into the pre-trained machine learning model, and the pre-trained machine learning model includes the plurality of user feature vectors of the sample user under the user feature dimension and the preference level label of the sample user for the target object under the target classification attribute; the preference level label of the target user for the target object under the target classification attribute output by the pre-trained machine learning model is obtained; if the obtained preference level label matches the preset preference level label, the user portrait of the target user is generated based on the target classification attribute.

[0044] From the above, we can see that compared with obtaining user profiles based on label statistics, user feature vectors can more comprehensively represent user preferences, thereby improving the accuracy of predicting user preference level labels for target objects under specific classification attributes, and thus making it easier to find target users with specific user profiles, so as to improve the accuracy of related business recommendations.

[0045] It should be noted that the user portrait generation method provided in the embodiments of the present application is generally executed by the user portrait provider platform 103. Accordingly, the user portrait generation device is generally set in the user portrait provider platform 103. However, in other embodiments of the present application, the user portrait demander platform 101 can also have similar functions to the user portrait provider platform 103, thereby executing the user portrait generation method provided in the embodiments of the present application. The following details the implementation of the technical solution of the embodiments of the present application are elaborated in detail.

[0046] Figure 2 A flowchart of a method for generating a user portrait according to an embodiment of the present application is shown. The method for generating a user portrait can be executed by a user portrait provider platform. The server can be Figure 1 The user portrait provider platform 103 shown in FIG. Figure 2 As shown, the method for generating a user portrait includes at least steps S210 to S250, which are described in detail as follows.

[0047] In step S210 , user characteristic information of the target user is obtained, where the user characteristic information includes user attribute information and historical behavior data of the target user.

[0048] In one embodiment of the present application, user feature information refers to characteristic information of a user in multiple dimensions, which specifically includes user attribute information and historical behavior data. The target user refers to the user for whom a user portrait needs to be generated.

[0049] In one embodiment of the present application, the user characteristic information of the target user can be obtained by the user portrait provider platform from the registration information of the target user. The user attribute information of the target user can include multiple categories of attribute information, such as age, date of birth, gender, address and position, etc., of course, it is not limited to this.

[0050] In one embodiment of the present application, the target user's historical behavior data includes the target user's historical behavior data on the user profile provider's platform. The behavior data includes operation events and attribute information of the operation objects. Operation events can be clicks, views, favorites, comments, and forwarding. The operation objects can be product advertisements or content, and the classification attributes of the operation objects can include topics, categories, tags, etc.

[0051] Optionally, when the operation object is a product advertisement, the operation event can be a browsing event, and its classification attribute can be a category; when the operation object is content, the operation event can be a click event, a browsing event, a collection event, a comment event, or a forwarding event, and its classification attribute can be a topic, a category, or a tag.

[0052] In step S220, based on the user feature information, multiple user feature vectors are generated for the target user under the user feature dimension. The user feature dimension refers to the feature dimension composed of the category of user attribute information, the category of operation events contained in the historical behavior data, and the classification attributes of the operation objects.

[0053] In one embodiment of the present application, the user feature dimension refers to a feature dimension composed of the category of user attribute information, and the category of operation events and classification attributes of operation objects included in the historical behavior data.

[0054] In one embodiment of the present application, for the feature dimensions constituted by the categories of user attribute information, a user feature vector will be generated for each category of user attribute information. For example, if the user attribute information includes age and gender, then age and gender constitute two feature dimensions, and thus a user feature vector will be generated according to age and gender respectively.

[0055] In one embodiment of the present application, with respect to the feature dimensions composed of the categories of operation events and the classification attributes of operation objects included in the historical behavior data, there may be multiple implementation methods.

[0056] In one embodiment, the feature dimensions can be determined based on the classification attributes of the operation object. For example, if the operation object is content, and the classification attributes of the content include subject, category, and tag, then the subject, category, and tag are each used as a feature dimension, thereby generating a user feature vector with three feature dimensions.

[0057] In another embodiment, the feature dimensions can be determined based on the classification attributes of the operation object and the operation event category. Taking the operation object as an example, when the classification attributes of the content include topics, categories, and tags, and the operation event category includes click events and comment events, then the click event for the topic, the comment event for the topic, the click event for the category, the comment event for the category, the click event for the tag, and the comment event for the tag are each used as a feature dimension, thereby generating a user feature vector with six feature dimensions.

[0058] It should be noted that the implementation method of feature dimension division is not limited to the above implementation method, and other implementation methods are also possible. This application does not make specific limitations on this.

[0059] In step S230, multiple user feature vectors are input into a pre-trained machine learning model, which includes multiple user feature vectors of sample users under user feature dimensions and preference level labels of sample users for target objects under target classification attributes.

[0060] In one embodiment of the present application, multiple user feature vectors of the target user under the user feature dimension can be input into a pre-trained machine learning model, and the pre-trained machine learning model labels the target user's preference level for the target object under the target classification attribute, wherein the pre-trained machine learning model can be a look-alike model, etc., or a deep neural network model, a CNN (Convolutional Neural Network) model. The preference level label can reflect the target user's preference for the target object under the target classification attribute. The preference level label can include two levels of "interested" and "not interested" from high to low. Specifically, the preference level label can also include four levels of "particularly interested", "interested", "not interested" and "particularly not interested" from high to low. The higher the level, the higher the target user's preference for the target object under the target classification attribute.

[0061] refer to Figure 3 , Figure 3 A flowchart of a method for generating a user portrait according to an embodiment of the present application is shown. The pre-trained machine learning model determines the target user's preference level label for the target object under the target classification attribute based on the following method, which may specifically include steps S310 to S330.

[0062] refer to Figure 4 , Figure 4 FIG2 shows a schematic diagram of the structure of a pre-trained machine learning model according to an embodiment of the present application. Figure 4 The pre-trained machine learning model shown may specifically include a projection layer 402 , a capsule layer 403 , and a capsule attention layer 405 .

[0063] refer to Figure 5 , Figure 5 The specific structural diagram of the capsule layer in the pre-trained machine learning model according to one embodiment of the present application is shown below. Figure 5 Steps S310 to S330 are described in detail.

[0064] In step S310 , a plurality of user feature vectors are converted to generate first feature vectors corresponding to the plurality of user feature vectors. The first feature vectors corresponding to the plurality of user features are vectors of the same dimension.

[0065] In one embodiment of the present application, Figure 4 As shown, after multiple user feature vectors 401 are input into the pre-trained machine learning model, the multiple user feature vectors are converted through the projection layer (Projection Layer) 402 to generate first feature vectors corresponding to the multiple user feature vectors. It should be pointed out that the first feature vectors corresponding to the multiple user features are vectors of the same dimension.

[0066] Specifically, when the projection layer 402 converts the multiple user feature vectors to generate the first feature vectors corresponding to the multiple user feature vectors, the formula can be used to achieve is the i-th user feature vector, is the first eigenvector corresponding to the i-th user eigenvector, e and m are fixed parameters, W d The transformation matrix used to transform multiple user feature vectors. By using the Projection Layer to transform multiple user feature vectors into vectors of the same dimension, the data processing efficiency of the pre-trained machine learning model can be improved.

[0067] In step S320, based on the preset association relationship between multiple user feature information, the first feature vectors corresponding to the multiple user feature vectors are aggregated to generate multiple aggregated second feature vectors, and the first feature vectors corresponding to the multiple user features are vectors of the same dimension.

[0068] In one embodiment of the present application, for the first feature vectors corresponding to the multiple user feature vectors obtained by the projection layer, the capsule layer 403 aggregates the first feature vectors corresponding to the multiple user feature vectors according to the correlation between the multiple user feature information to generate multiple aggregated second feature vectors. The first feature vectors corresponding to the multiple user features are vectors of the same dimension.

[0069] Specifically, for the first feature vector i input to the capsule layer 403 It can be based on a predetermined formula Aggregate it and generate the corresponding vector And By formula Normalize to generate unit vector

[0070] I u It represents the sequence number of the first eigenvector, S is the transformation matrix, w ij is the weight when the first eigenvector of the i-th layer is aggregated with the first eigenvector of the j-th layer, b ij It is the parameter initialized when the capsule layer (Capsule Layer) 403 performs forward propagation calculation, which can be obtained by w ij ←softmax(b ij ) Determine w ij , that is, b ij Normalize to get w ij It should be noted that when training the machine learning model to be trained, when performing forward propagation calculations and updating the parameters in the machine learning model to be trained, b ij According to the formula To update, For When the machine learning model to be trained reaches the convergence condition, the weight w of the first eigenvector when it is aggregated is ij It was also immediately confirmed that Squash was The transformation matrix to be normalized.

[0071] In step S330 , based on the aggregated plurality of second feature vectors, the target user's preference level label for the target object under the target classification attribute is predicted.

[0072] In one embodiment of the present application, the capsule attention layer 405 analyzes and processes the aggregated plurality of second feature vectors to predict the target user's preference score for the target object under the target classification attribute, and predicts the target user's preference level label for the target object under the target classification attribute based on the correspondence between the preference score and the preference level label. It is understood that a higher preference score corresponds to a higher preference level label.

[0073] Specifically, when the capsule attention layer 405 aggregates the input multiple aggregated second feature vectors, it can first be based on the formula Calculate to get high-order feature intersection And through the formula Come to Perform normalization to obtain the normalized a ij , based on a ij To predict the target user's preference score for the target object under the target classification attribute. Where b is a fixed parameter, W∈R t×k , b∈R t , h∈R t , t represents the hidden dimension of the capsule attention layer 405, k represents the vector dimension of the second eigenvector, h T It represents the set of multiple second eigenvectors after the input aggregation, v i and v j are the i-th second eigenvector and the j-th second eigenvector in the set of multiple second eigenvectors after aggregation, v i ·v j is the scalar product between the i-th second eigenvector and the j-th second eigenvector.

[0074] refer to Figure 6 , Figure 6 A flowchart of a method for generating a user portrait according to an embodiment of the present application is shown. The method for generating a user portrait in this embodiment may further include steps S610 to S620, which are described in detail as follows.

[0075] In step S610, training set sample data is obtained for training the machine learning model to be trained, and each sample data in the training set sample data includes multiple user feature vectors of the sample user under the user feature dimension and the preference level label of the sample user for the target object under the target classification attribute.

[0076] In one embodiment of the present application, the training set sample data is a sample data containing a large amount of sample data for training the machine learning model to be trained. When generating the sample data in the training set sample data, existing users in the user portrait provider platform can be used as sample users, and the user attribute information and historical behavior data of the sample users are obtained, and multiple user feature vectors of the sample users under the user feature dimension are generated based on the user attribute information and historical behavior data of the sample users. In addition, for each sample user, it is also necessary to determine the preference of the target object under the target classification attribute of the sample user based on its specific user attribute information and historical behavior data, and then generate the preference level label of the sample user for the target object under the target classification attribute based on the determined preference.

[0077] refer to Figure 7 , Figure 7 A specific flow chart of step S610 of the method for generating a user portrait according to an embodiment of the present application is shown. Step S610 may include steps S710 to S750, which are described in detail as follows.

[0078] In step S710 , user feature information of candidate users in the candidate user set is obtained.

[0079] In one embodiment, the candidate user set is a set of existing users in the user portrait provider platform, which includes a large number of candidate users that can be selected as sample users.

[0080] refer to Figure 8 , Figure 8 A specific flow chart of step S710 of the method for generating a user portrait according to an embodiment of the present application is shown. Step S710 may include steps S810 to S830, which are described in detail as follows.

[0081] In step S810 , a configuration file is obtained, and the configuration file is used to configure the attribute categories of the obtained user attribute information, the operation event categories of the obtained historical behavior data, and the classification attributes of the operation objects.

[0082] In one embodiment of the present application, when obtaining user feature information of candidate users, in order to facilitate the generation of specific user portraits according to specific business scenario requirements, the attribute categories of the user attribute information to be obtained, the operation event categories of the historical behavior data, and the classification attributes of the operation objects can be configured in advance to generate a corresponding configuration file.

[0083] Specifically, when the user profile to be generated is for a product advertisement, in the configuration file, the attribute categories of the user attribute information to be obtained may include age, gender, and address, while the operation event categories of the historical behavior data may be click events and browsing events. The classification attributes of the operation object may include the product category in the product advertisement. It should be noted that the product category may include one or more levels of classification categories. Taking the example of a product category that includes a first-level product category and a second-level product category, the first-level product category may include home appliances, food and beverages, medicine and health care, etc., while the second-level product category is a specific classification within the first-level product category. For example, the second-level product category of home appliances may include televisions, air conditioners, refrigerators, etc.

[0084] In step S820 , for each candidate user in the candidate user set, based on the category of the user attribute information configured in the configuration file, user attribute information of the candidate user under the configured attribute category is obtained.

[0085] In one embodiment of the present application, after obtaining the configuration file, for each candidate user in the candidate user set, user attribute information of the candidate user under the configured attribute category can be obtained based on the category of the user attribute information configured in the configuration file.

[0086] In step S830 , for each candidate user in the candidate user set, based on the operation event category and the classification attribute of the operation object configured in the configuration file, historical behavior data of the candidate user under the operation event category and the classification attribute of the operation object is obtained.

[0087] In one embodiment of the present application, after obtaining the configuration file, for each candidate user in the candidate user set, the historical behavior data of the candidate user under the corresponding operation event category and classification attributes of the operation object configured in the configuration file can be obtained.

[0088] Figure 8 In the technical solution of the embodiment shown, the attribute categories of the user attribute information that needs to be obtained, as well as the operation event categories and classification attributes of the operation objects of the historical behavior data that need to be obtained can be configured through the configuration file, so that user feature data of specific dimensions can be obtained according to needs, and the required feature data can be obtained in a targeted manner, thereby facilitating the generation of sample data that meets specific business scenarios.

[0089] Please continue to refer to Figure 7In step S720, for each candidate user in the candidate user set, based on the historical behavior data in the user feature information of the candidate user, a first category of candidate users and a second category of candidate users are determined. The first category of candidate users are candidate users that contain target operation events, and the second category of candidate users are candidate users that do not contain target operation events. The target operation event refers to an operation event that operates a target object under a target classification attribute.

[0090] In one embodiment of the present application, since the pre-trained machine learning model is used to predict the user's preference level label for the target object under a specific target classification attribute, the sample users for training the machine learning model may include positive sample users and negative sample users. The positive sample users are sample users who have a higher degree of preference for the target object under the specific target classification attribute, and the negative sample users are sample users who have a lower degree of preference for the target object under the specific target classification attribute. By training the machine learning model with sample data composed of positive sample users and negative sample users, the machine learning model can effectively identify whether the target user is a user who has a higher degree of preference for the target object under the specific target classification attribute.

[0091] In one embodiment of the present application, the target operation event is an operation event in which the user operates on the target object under the target classification attribute, such as a click event or a browse event for the target object under the target classification attribute. When the user's historical behavior data contains the target operation event, it can be said that the user has a high interest in the target object under the target classification attribute. Otherwise, it can be said that the user has a low interest in the target object under the target classification attribute. Therefore, for each candidate user in the candidate user set, the candidate user can be classified according to whether the candidate user's historical behavior data contains the target operation event, and a first category of candidate users including the target operation event and a second category of candidate users including the target operation event are obtained. It can be understood that the first category of candidate users are used as candidate users for generating positive sample users, and the second category of candidate users are used as candidate users for generating negative sample users.

[0092] In step S730, based on the user feature information of the first category of candidate users, multiple user feature vectors of the first category of candidate users in the user feature dimension are generated, and preference level labels with high preference levels are added to the first category of candidate users to obtain sample data of positive sample users.

[0093] In one embodiment of the present application, when generating sample data of positive sample users, multiple user feature vectors of the first category of candidate users under the user feature dimension can be generated based on the user feature information of the first category of candidate users, and preference level labels with high preference levels can be added to the first category of candidate users.

[0094] Optionally, for the first category of candidate users, all candidate users in the first category of candidate users may be selected as positive sample users.

[0095] Optionally, for the first category of candidate users, some of the first category of candidate users may be selected as positive sample users.

[0096] In step S740, based on the user feature information of the second category of candidate users, multiple user feature vectors of the second category of candidate users in the user feature dimension are generated, and preference level labels with low preference levels are added to the second category of candidate users to obtain sample data of negative sample users.

[0097] In one embodiment of the present application, when generating sample data of negative sample users, multiple user feature vectors of the second category of candidate users under the user feature dimension can be generated based on the user feature information of the second category of candidate users, and preference level labels with low preference levels can be added to the second category of candidate users.

[0098] Optionally, for the second category of candidate users, all candidate users in the second category of candidate users may be selected as negative sample users.

[0099] refer to Figure 9 , Figure 9 A specific flow chart of step S740 of the method for generating a user portrait according to an embodiment of the present application is shown. Step S740 may include steps S910 to S920, which are described in detail as follows.

[0100] In step S910 , candidate users are extracted from the second category of candidate users.

[0101] refer to Figure 10 , Figure 10 A specific flow chart of step S910 of the method for generating a user portrait according to an embodiment of the present application is shown. Step S910 may include steps S1010 to S1020, which are described in detail as follows.

[0102] In step S1010 , based on the frequency of the historical behavior data contained in the user characteristic information of the second category candidate users, the portrait density of the second category candidate users is determined, and the portrait density is negatively correlated with the frequency.

[0103] In one embodiment of the present application, for the second category of candidate users, all candidate users in the second category of candidate users may be selected as negative sample users.

[0104] In one embodiment of the present application, since the second category of candidate users are candidate users whose historical behavior data does not contain the target operation event, there are two types of candidate users: those with rich historical behavior and those with sparse historical behavior. When the candidate user's historical behavior is rich and its historical behavior data does not contain the target operation event, the confidence that the candidate user is a negative sample user is high. When the candidate user's historical behavior is sparse and its historical behavior data does not contain the target operation event, some candidate users may be selected as negative sample users due to their sparse historical behavior. Therefore, it is necessary to select candidate samples with relatively more historical behaviors as negative sample users, and select candidate samples with relatively less historical behaviors as negative sample users.

[0105] Portrait density is a measure that reflects whether the user's historical behavior is rich. The greater the portrait density, the richer the user's historical behavior.

[0106] The portrait density can be determined based on the frequency of historical behavior data contained in the user feature information of the second category of candidate users. The portrait density is positively correlated with the frequency of historical behavior data. The frequency of historical behavior data can be calculated in a variety of ways.

[0107] Optionally, the sum of the frequencies of operation events of various categories included in the historical behavior data may be used as the frequency of the historical behavior data.

[0108] Optionally, different weights may be assigned to various types of operation events included in the historical behavior data, and the weighted sum of the frequencies of the various types of operation events included in the historical behavior data may be used as the frequency of the historical behavior data.

[0109] In step S1020, candidate users are extracted at a first ratio from the second category of candidate users whose portrait density is higher than a predetermined portrait density threshold, and candidate users are extracted at a second ratio from the second category of candidate users whose portrait density is lower than or equal to the predetermined portrait density threshold, and the first ratio is greater than the second ratio.

[0110] In one embodiment of the present application, the portrait density threshold is a measurement value for determining whether a candidate user is a user with rich historical behavior. If the portrait density is higher than the predetermined portrait density threshold, the candidate user is a user with rich historical behavior. If the portrait density is lower than or equal to the predetermined portrait density threshold, the candidate user is a user with sparse historical behavior. Among the second category of candidate users whose portrait density is higher than the predetermined portrait density threshold, candidate users can be extracted at a first ratio. Among the second category of candidate users whose portrait density is lower than or equal to the predetermined portrait density threshold, candidate users can be extracted at a second ratio. The first ratio can be set to be greater than the second ratio.

[0111] Figure 10In the technical solution of the illustrated embodiment, by selecting candidate samples with relatively more historical behaviors as negative sample users from the second category of candidate users who are not involved in the target operation events in the historical behavior data, and selecting candidate samples with relatively fewer historical behaviors as negative sample users, the accuracy of the selected negative sample users can be improved, thereby improving the classification confidence of the pre-trained machine learning model.

[0112] Please continue to refer to Figure 9 In step S920, based on the user feature information of the extracted candidate users, multiple user feature vectors of the extracted candidate users under the user feature dimension are generated, and preference level labels with low preference levels are added to the extracted candidate users to obtain sample data of negative sample users.

[0113] In one embodiment of the present application, for candidate users extracted from the second category of candidate users, when generating their corresponding sample data, multiple user feature vectors of the extracted candidate users under the user feature dimension can be generated based on the user feature information of the extracted candidate users, and preference level labels with low preference levels can be added to the extracted candidate users, thereby generating sample data of negative sample users.

[0114] Please continue to refer to Figure 7 In step S750, based on the sample data of the positive sample users and the sample data of the negative sample users, the training set sample data for training the machine learning model to be trained is obtained.

[0115] In one embodiment, after obtaining the sample data of positive sample users and the sample data of negative sample users, the obtained sample data of positive sample users and the sample data of negative sample users can be used as training set sample data to train the machine learning model to be trained through the training set sample data.

[0116] Please continue to refer to Figure 6 In step S620, the machine learning model to be trained is trained using the training set sample data to obtain a pre-trained machine learning model.

[0117] In one embodiment of the present application, training set sample data is input into a machine learning model to be trained, and the machine learning model to be trained is trained using the training set sample data to obtain a pre-trained machine learning model. The process of training the machine learning model is to adjust the coefficients in the network layer corresponding to the machine learning model so that for multiple user feature vectors of the input target user under the user feature dimension, the coefficients in the network layer corresponding to the machine learning model are calculated, and the target user's preference level label for the target object under the target classification attribute is output.

[0118] Please continue to refer to Figure 2 In step S240, the target user's preference level label for the target object under the target classification attribute output by the pre-trained machine learning model is obtained.

[0119] In one embodiment of the present application, the target user's preference level label for the target object under the target classification attribute output by the pre-trained machine learning model is obtained to obtain the target user's preference for the target object under the target classification attribute.

[0120] In step S250 , if the obtained preference level label matches the preset preference level label, a user profile of the target user is generated based on the target classification attribute.

[0121] In one embodiment of the present application, the preset preference level label is a preference level label that represents the target user's high preference for the target attribute of the target classification attribute, such as the preference level labels of "interested" and "particularly interested", or it can be just the preference level label of "particularly interested". When the preference level label obtained from the pre-trained machine learning model matches the preset preference level label, it can be determined that the target user has a high preference level for the target object under the target classification attribute, and therefore a user profile of the target user can be generated based on the target classification attribute.

[0122] As can be seen from the above, the target user's user feature information is obtained, which includes the target user's user attribute information and historical behavior data. Based on the user feature information, multiple user feature vectors are generated for the target user under the user feature dimension. The user feature dimension refers to a feature dimension composed of the category of the user attribute information, the category of the operation event contained in the historical behavior data, and the classification attribute of the operation object. The multiple user feature vectors are input into a pre-trained machine learning model. The pre-trained machine learning model includes multiple user feature vectors of sample users under the user feature dimension and the sample users' preference level labels for the target object under the target classification attribute. The target user's preference level label for the target object under the target classification attribute is obtained from the pre-trained machine learning model. If the obtained preference level label matches the preset preference level label, a user profile of the target user is generated based on the target classification attribute. Compared to obtaining a user profile based on label statistics, the user feature vector can more comprehensively represent the user's preferences, thereby improving the accuracy of predicting the user's preference level label for the target object under a specific classification attribute, thereby facilitating the identification of target users with specific user profiles, thereby improving the accuracy of related business recommendations.

[0123] The following describes an embodiment of the device of the present application, which can be used to execute the method for generating a user portrait in the above embodiment of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method above in the present application.

[0124] Figure 11 A block diagram of a device for generating a user portrait according to an embodiment of the present application is shown.

[0125] Reference Figure 11 As shown, the apparatus 1100 according to an embodiment of the present application includes: a first acquisition unit 1110 , a first generation unit 1120 , an input unit 1130 , an output unit 1140 and a second generation unit 1150 . Among them, the first acquisition unit 1110 is used to obtain user feature information of the target user, and the user feature information includes user attribute information and historical behavior data of the target user; the first generation unit 1120 is used to generate multiple user feature vectors of the target user under the user feature dimension based on the user feature information, and the user feature dimension refers to a feature dimension composed of the category of the user attribute information, and the category of operation events and classification attributes of operation objects contained in the historical behavior data; the input unit 1130 is used to input the multiple user feature vectors into a pre-trained machine learning model, and the pre-trained machine learning model includes multiple user feature vectors of sample users under the user feature dimension and the preference level label of the sample users for the target objects under the target classification attributes; the output unit 1140 is used to obtain the preference level label of the target user for the target objects under the target classification attributes output by the pre-trained machine learning model; the second generation unit 1150 is used to generate a user profile of the target user based on the target classification attributes if the obtained preference level label matches the preset preference level label.

[0126] In some embodiments of the present application, based on the aforementioned scheme, the user portrait generation device also includes: a third generation unit, used to convert the multiple user feature vectors respectively to generate first feature vectors corresponding to the multiple user feature vectors, and the first feature vectors corresponding to the multiple user features are vectors of the same dimension; an aggregation unit, used to aggregate the first feature vectors corresponding to the multiple user feature vectors based on the preset association relationship between the multiple user feature information, and generate multiple aggregated second feature vectors; a prediction unit, used to predict the target user's preference level label for the target object under the target classification attribute based on the multiple aggregated second feature vectors, and the first feature vectors corresponding to the multiple user features are vectors of the same dimension.

[0127] In some embodiments of the present application, based on the aforementioned scheme, the user portrait generation device also includes: a second acquisition unit, used to obtain training set sample data for training the machine learning model to be trained, each sample data in the training set sample data includes multiple user feature vectors of the sample user under the user feature dimension and the sample user's preference level label for the target object under the target classification attribute; a training unit, used to train the machine learning model to be trained through the training set sample data to obtain a pre-trained machine learning model.

[0128] In some embodiments of the present application, based on the aforementioned scheme, the second acquisition unit is configured to: obtain user feature information of candidate users in the candidate user set; for each candidate user in the candidate user set, determine a first category of candidate users and a second category of candidate users based on the historical behavior data in the user feature information of the candidate user, the first category of candidate users being candidate users that include target operation events, and the second category of candidate users being candidate users that do not include target operation events, and the target operation events are operation events that operate on the target objects under the target classification attributes; based on the user feature information of the first category of candidate users, generate multiple user feature vectors of the first category of candidate users under the user feature dimension, and add preference level labels with high preference levels to the first category of candidate users to obtain sample data of positive sample users; based on the user feature information of the second category of candidate users, generate multiple user feature vectors of the second category of candidate users under the user feature dimension, and add preference level labels with low preference levels to the second category of candidate users to obtain sample data of negative sample users; based on the sample data of the positive sample users and the sample data of the negative sample users, obtain training set sample data for training the machine learning model to be trained.

[0129] In some embodiments of the present application, based on the aforementioned scheme, the second acquisition unit is configured to: extract candidate users from the second category of candidate users; generate multiple user feature vectors of the extracted candidate users under the user feature dimension based on the user feature information of the extracted candidate users, and add a preference level label with a low preference degree to the extracted candidate users to obtain sample data of negative sample users.

[0130] In some embodiments of the present application, based on the aforementioned scheme, the second acquisition unit is configured to: determine the portrait density of the second category candidate users based on the frequency of historical behavior data contained in the user feature information of the second category candidate users, and the portrait density is positively correlated with the frequency; among the second category candidate users whose portrait density is higher than a predetermined portrait density threshold, extract candidate users at a first ratio, and among the second category candidate users whose portrait density is lower than or equal to the predetermined portrait density threshold, extract candidate users at a second ratio, and the first ratio is greater than the second ratio.

[0131] In some embodiments of the present application, based on the aforementioned scheme, the second acquisition unit is configured to: obtain a configuration file, wherein the configuration file is used to configure the attribute category of the acquired user attribute information, and the operation event category and classification attribute of the operation object of the acquired historical behavior data; for each candidate user in the candidate user set, based on the category of the user attribute information configured in the configuration file, obtain the user attribute information of the candidate user under the configured attribute category; for each candidate user in the candidate user set, based on the operation event category and classification attribute of the operation object configured in the configuration file, obtain the historical behavior data of the candidate user under the operation event category and classification attribute of the operation object.

[0132] Figure 12 A schematic diagram of the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present application is shown.

[0133] It should be noted that Figure 12 The computer system 1200 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0134] like Figure 12 As shown, the computer system 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1202 or the program loaded from the storage part 1208 to the random access memory (RAM) 1203, such as executing the method described in the above embodiment. Various programs and data required for system operation are also stored in the RAM 1203. The CPU 1201, ROM 1202 and RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0135] The following components are connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, and the like; an output section 1207 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and speakers; a storage section 1208 including a hard disk; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. Removable media 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 1210 as needed, so that computer programs read from the removable media can be installed in the storage section 1208 as needed.

[0136] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1209, and / or installed from a removable medium 1211. When the computer program is executed by the central processing unit (CPU) 1201, the various functions defined in the system of the present application are executed.

[0137] It should be noted that the computer-readable medium shown in the embodiments of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable computer program. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0138] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. Among them, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0139] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. In some cases, the names of these units do not constitute limitations on the units themselves.

[0140] As another aspect, the present application further provides a computer-readable medium, which may be included in the electronic device described in the above embodiments, or may exist independently without being incorporated into the electronic device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device implements the method described in the above embodiments.

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

[0142] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.

[0143] Those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of this application and include common knowledge or customary techniques in the art that are not disclosed herein.

[0144] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for generating a user portrait, characterized in that: The method is executed by a user profile provider platform, and includes: Based on the identification information of the target user for which a user portrait needs to be generated, provided by the user portrait demander platform, user feature information of the target user is obtained, wherein the user feature information includes user attribute information and historical behavior data of the target user; Based on the user feature information, a plurality of user feature vectors of the target user are generated under a user feature dimension, where the user feature dimension is a feature dimension composed of the category of the user attribute information and the category of the operation event and the classification attribute of the operation object contained in the historical behavior data; The multiple user feature vectors are input into a pre-trained machine learning model, and the pre-trained machine learning model includes multiple user feature vectors of sample users under the user feature dimension and preference level labels of sample users for target objects under the target classification attributes; wherein the sample data of negative sample users used to train the pre-trained machine learning model is obtained based on user feature information of candidate users extracted from the second category of candidate users, and the second category of candidate users is a candidate user that does not include a target operation event, and the target operation event refers to an operation event of operating the target object under the target classification attribute; the candidate users are extracted from the second category of candidate users in the following manner: based on the frequency of historical behavior data included in the user feature information of the second category of candidate users, determining the portrait density of the second category of candidate users, and the portrait density is positively correlated with the frequency; from the second category of candidate users whose portrait density is higher than a predetermined portrait density threshold, extracting candidate users at a first ratio, and from the second category of candidate users whose portrait density is lower than or equal to the predetermined portrait density threshold, extracting candidate users at a second ratio, and the first ratio is greater than the second ratio; Obtaining a target user's preference level label for a target object under a target classification attribute output by the pre-trained machine learning model; If the obtained preference level label matches the preset preference level label, a user profile of the target user is generated based on the target classification attribute.

2. The method for generating a user portrait according to claim 1, wherein: The pre-trained machine learning model determines the target user's preference level label for the target object under the target classification attribute based on the following method: Performing conversion processing on the multiple user feature vectors respectively to generate first feature vectors corresponding to the multiple user feature vectors, where the first feature vectors corresponding to the multiple user features are vectors of the same dimension; Based on the preset association relationship between the multiple user feature information, aggregating the first feature vectors corresponding to the multiple user feature vectors to generate a plurality of aggregated second feature vectors, wherein the first feature vectors corresponding to the multiple user features are vectors of the same dimension; Based on the aggregated plurality of second feature vectors, a preference level label of the target user for the target object under the target classification attribute is predicted.

3. The method for generating a user portrait according to claim 1, wherein: The method for generating a user portrait further includes: Acquire training set sample data for training the machine learning model to be trained, wherein each piece of sample data in the training set sample data includes multiple user feature vectors of a sample user under a user feature dimension and a preference level label of the sample user for a target object under a target classification attribute; The machine learning model to be trained is trained using the training set sample data to obtain a pre-trained machine learning model.

4. The method for generating a user portrait according to claim 3, wherein: The obtaining of training set sample data for training the machine learning model to be trained includes: Obtain user feature information of candidate users in the candidate user set; For each candidate user in the candidate user set, determining a first category of candidate users and a second category of candidate users based on historical behavior data in the user feature information of the candidate user, wherein the first category of candidate users are candidate users that have the target operation event; Based on the user feature information of the first category of candidate users, generating multiple user feature vectors of the first category of candidate users in the user feature dimension, and adding preference level labels with high preference levels to the first category of candidate users to obtain sample data of positive sample users; Based on the user feature information of the second category of candidate users, generating multiple user feature vectors of the second category of candidate users in the user feature dimension, and adding a preference level label with a low preference degree to the second category of candidate users to obtain sample data of negative sample users; Based on the sample data of the positive sample users and the sample data of the negative sample users, training set sample data for training the machine learning model to be trained is obtained.

5. The method for generating a user portrait according to claim 4, wherein: The method of generating multiple user feature vectors of the second category candidate users in the user feature dimension based on the user feature information of the second category candidate users, and adding a preference level label with a low preference degree to the second category candidate users to obtain sample data of negative sample users includes: Selecting candidate users from the second category of candidate users; Based on the user feature information of the extracted candidate users, multiple user feature vectors of the extracted candidate users in the user feature dimension are generated, and preference level labels with low preference levels are added to the extracted candidate users to obtain sample data of negative sample users.

6. The method for generating a user portrait according to claim 4, characterized in that: The obtaining of user characteristic information of candidate users in the candidate user set includes: Obtaining a configuration file, wherein the configuration file is used to configure the attribute category of the acquired user attribute information, the operation event category of the acquired historical behavior data, and the classification attribute of the operation object; For each candidate user in the candidate user set, based on the category of the user attribute information configured in the configuration file, obtaining user attribute information of the candidate user under the configured attribute category; For each candidate user in the candidate user set, based on the operation event category and the classification attribute of the operation object configured in the configuration file, historical behavior data of the candidate user under the operation event category and the classification attribute of the operation object are obtained.

7. A user portrait generation device, characterized in that: The device is applied to a user portrait provider platform, and includes: A first acquiring unit is configured to acquire user characteristic information of a target user based on identification information of the target user for which a user profile needs to be generated, provided by a user profile demander platform, wherein the user characteristic information includes user attribute information and historical behavior data of the target user; a first generating unit, configured to generate, based on the user feature information, a plurality of user feature vectors for the target user in a user feature dimension, wherein the user feature dimension is a feature dimension composed of a category of the user attribute information and a category of an operation event and a classification attribute of an operation object included in the historical behavior data; An input unit is used to input the multiple user feature vectors into a pre-trained machine learning model, wherein the pre-trained machine learning model includes multiple user feature vectors of sample users under a user feature dimension and preference level labels of sample users for target objects under a target classification attribute; wherein the sample data of negative sample users used to train the pre-trained machine learning model is obtained based on user feature information of candidate users extracted from a second category of candidate users, wherein the second category of candidate users is a candidate user that does not include a target operation event, wherein the target operation event refers to an operation event for operating a target object under a target classification attribute; the candidate users are extracted from the second category of candidate users in the following manner: based on the frequency of historical behavior data included in the user feature information of the second category of candidate users, determining a portrait density of the second category of candidate users, wherein the portrait density is positively correlated with the frequency; from the second category of candidate users whose portrait density is higher than a predetermined portrait density threshold, extracting candidate users at a first ratio, and from the second category of candidate users whose portrait density is lower than or equal to the predetermined portrait density threshold, extracting candidate users at a second ratio, wherein the first ratio is greater than the second ratio; An output unit, configured to obtain a preference level label of a target user for a target object under a target classification attribute output by the pre-trained machine learning model; The second generating unit is configured to generate a user portrait of the target user based on the target classification attribute if the obtained preference level label matches a preset preference level label.

8. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the method for generating a user portrait as described in any one of claims 1 to 6.

9. A computer program medium having computer-readable instructions stored thereon, wherein when the computer program is executed by a processor, the method for generating a user portrait according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method for generating a user portrait as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • User label determination method and device based on artificial intelligence, and storage medium

    CN111046275A

  • User label determination method and device, computer equipment and storage medium

    CN111339443A

  • Method and device for obtaining user portrait

    CN111898031A