A user screening model training, user push method and related device
Through the separation training and update method of user screening models, the problem of overall retraining of multimedia data models is solved, and the training of low computational volume and high real-time user screening models is achieved.
Patent Information
- Application Number
- CN202110518824.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-12
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2041-05-12
AI Technical Summary
In the prior art, the overall retraining of the multimedia data model produced by the user is time-consuming and cost-effective, resulting in low efficiency.
A training method for user screening models is proposed, including feature extractor, clustering and sampler. By extracting features from user data, clustering and sampling, optimizing indicators to update the model, realizing feature extractor and clustering and sampler separation training and update to reduce the amount of calculation.
By separating training and updating feature extractors, clusterers and samplers, the computational cost and time of model updates are reduced, and the efficiency and real-time performance of user filtering models are improved.
Smart Images

Figure CN113190696B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of multimedia processing, and in particular to a user screening model training, user push method and related devices. Background Art
[0002] With the rapid development of science and technology, especially the widespread popularity of mobile communication networks and mobile terminals, a variety of multimedia data have appeared on the Internet. Many users can produce multimedia data anytime and anywhere. Different manufacturers provide platforms. On the one hand, they collect the multimedia data produced by some users. On the other hand, they screen high-quality multimedia data in different ways and push them to other users for display, thereby reducing the difficulty for other users to obtain high-quality multimedia data.
[0003] Since the multimedia data produced by a high-quality user has guaranteed quality, the platform usually screens some high-quality users who produce multimedia data through a specific model and pushes these users to another group of users.
[0004] Since user data is updated quickly, the model iteration is also fast. Since most models are holistic, most models need to be retrained as a whole each time they are iterated, which is time-consuming and costly. Summary of the invention
[0005] The embodiment of the present invention proposes a method for training a user screening model and pushing users to solve the problem of time-consuming and high cost of retraining the entire model for screening users.
[0006] In a first aspect, an embodiment of the present invention provides a method for training a user screening model, wherein the user screening model includes a feature extractor, a clusterer, and a sampler, and the method includes:
[0007] Determine a first user who produces multimedia data and a second user who consumes the multimedia data;
[0008] In the feature extractor, extracting a first user feature from the user data of the first user and extracting a second user feature from the user data of the second user;
[0009] In the clusterer, clustering the first user using the first user feature to obtain a plurality of clusters;
[0010] In the sampler, a first user is sampled from the cluster using the second user feature as a target user;
[0011] Calculating an indicator for evaluating the target user;
[0012] The clusterer and / or the sampler are updated with the goal of optimizing the indicator.
[0013] In a second aspect, an embodiment of the present invention further provides a user push method, characterized by comprising:
[0014] When receiving a request sent by the client, loading a user screening model, the user screening model including a feature extractor, a clusterer, and a sampler, and the second user logs in to the client;
[0015] In the feature extractor, extracting a first user feature from the user data of the first user and extracting a second user feature from the user data of the second user;
[0016] In the clusterer, clustering the first user using the first user feature to obtain a plurality of clusters;
[0017] In the sampler, the first user is sampled from the cluster using the second user feature as a target user, and the target user satisfies a preset evaluation index;
[0018] The target user's information is pushed to the client for display.
[0019] In a third aspect, an embodiment of the present invention further provides a training device for a user screening model, wherein the user screening model includes a feature extractor, a clusterer, and a sampler, and the device includes:
[0020] A user determination module, used to determine a first user who produces multimedia data and a second user who consumes the multimedia data;
[0021] a feature extraction module, configured to extract, in the feature extractor, a first user feature from the user data of the first user and a second user feature from the user data of the second user;
[0022] A user clustering module, configured to cluster the first user using the first user feature in the clusterer to obtain a plurality of clusters;
[0023] A user sampling module, configured to sample a first user from the cluster as a target user using the second user feature in the sampler;
[0024] An evaluation index calculation module, used to calculate an index for evaluating the target user;
[0025] The cluster sampling update module is used to update the clusterer and / or the sampler with the goal of optimizing the indicator.
[0026] In a fourth aspect, an embodiment of the present invention further provides a user push device, comprising:
[0027] A user screening model loading model, used to load a user screening model when receiving a request sent by a client, the user screening model including a feature extractor, a clusterer, and a sampler, and the second user logs in to the client;
[0028] a feature extraction module, configured to extract, in the feature extractor, a first user feature from the user data of the first user and a second user feature from the user data of the second user;
[0029] A user clustering module, configured to cluster the first user using the first user feature in the clusterer to obtain a plurality of clusters;
[0030] A user sampling module, configured to, in the sampler, use the second user feature to sample a first user from the cluster as a target user, wherein the target user satisfies a preset evaluation index;
[0031] The user information push module is used to push the target user's information to the client for display.
[0032] In a fifth aspect, an embodiment of the present invention further provides a computer device, including:
[0033] A feature extractor, configured to extract a first user feature from user data of a first user and a second user feature from user data of a second user; the first user is configured to produce multimedia data and the second user is configured to consume the multimedia data;
[0034] a clusterer, configured to cluster the first user using the first user feature to obtain a plurality of clusters;
[0035] A sampler is used to sample a first user from the cluster using the second user feature as a target user, where the target user meets a preset evaluation index.
[0036] In a sixth aspect, an embodiment of the present invention further provides a computer device, the computer device comprising:
[0037] one or more processors;
[0038] a memory for storing one or more programs,
[0039] When the one or more programs are executed by the one or more processors, the one or more processors implement the training of the user screening model as described in the first aspect or the user push method as described in the second aspect.
[0040] In the seventh aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the training of the user screening model as described in the first aspect or the user push method as described in the second aspect is implemented.
[0041] In this embodiment, a first user who produces multimedia data and a second user who consumes multimedia data are determined. In a feature extractor, a first user feature is extracted from the user data of the first user, and a second user feature is extracted from the user data of the second user. In a clusterer, the first user is clustered using the first user feature to obtain multiple clusters. In a sampler, the first user is sampled from the cluster using the first user feature as a target user, and an indicator for evaluating the target user is calculated. With the goal of optimizing the indicator, the clusterer and / or the sampler are updated. The feature extractor, the clusterer, and the sampler are separated from each other, so that the feature extractor, the clusterer, and the sampler can be trained and updated separately. Therefore, the feature extractor can be directly migrated from an existing model and the amount of calculation can be reduced by sharing with other models. At the same time, the update of the feature extractor is not synchronized with the subsequent update of the clusterer and the sampler. A user screening model with low computational complexity and high real-time requirements can be implemented by updating the feature extractor at a low frequency and updating the clusterer and the sampler at a high frequency. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A flowchart of a method for training a user screening model provided in Embodiment 1 of the present invention;
[0043] Figure 2 A schematic diagram of the structure of a user screening model provided in the first embodiment of the present invention;
[0044] Figure 3 A flowchart of a method for training a user screening model provided in Embodiment 2 of the present invention;
[0045] Figure 4 is a flow chart of a user push method provided by Embodiment 3 of the present invention;
[0046] Figure 5 A schematic diagram of the structure of a training device for a user screening model provided in a fourth embodiment of the present invention;
[0047] Figure 6 A schematic diagram of the structure of a user push device provided in Embodiment 5 of the present invention;
[0048] Figure 7 A schematic diagram of the structure of a computer device provided in Embodiment 6 of the present invention;
[0049] Figure 8A schematic diagram of the structure of a computer device provided in Embodiment 7 of the present invention. DETAILED DESCRIPTION
[0050] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0051] Embodiment 1
[0052] Figure 1 This is a flow chart of a method for training a user screening model provided in the first embodiment of the present invention. This embodiment is applicable to the case where a model for screening users is constructed by separating and extracting features, clustering, and sampling. The method can be executed by a training device for a user screening model. The training device for a user screening model can be implemented by software and / or hardware and can be configured in a computer device, such as a server, a workstation, a personal computer, etc., and specifically includes the following steps:
[0053] Step 101: Determine a first user who produces multimedia data and a second user who consumes multimedia data.
[0054] On a multimedia platform, a large amount of multimedia data is usually stored to form a multimedia library. The formats of these multimedia data may include video data, audio data, image data, text data, etc., and their forms vary in different business scenarios, for example, live programs, short videos, songs, comics, audio novels, novels, news, articles, etc.
[0055] In addition to purchasing multimedia data from copyright holders, users registered on the multimedia platform can use mobile terminals, personal computers and other electronic devices to produce multimedia data and upload the multimedia data to the multimedia platform.
[0056] For different business platforms, the forms of producing multimedia data are different. For example, in the live broadcast business scenario, users can use cameras to collect video data, and perform operations such as beautification and microphone connection on the video data to generate live broadcast programs. In the short video business scenario, users can use cameras to collect video data, and perform operations such as beautification, editing, and adding special effects to the video data to generate short videos. In the news business scenario, users can use the keyboard to edit text, use image editing tools to edit pictures, and layout text and pictures to generate news, and so on.
[0057] After reviewing the legality of the multimedia data, the multimedia platform will store the multimedia data in the multimedia library and publish the multimedia data. Other users registered on the multimedia platform can use mobile terminals, personal computers and other electronic devices to consume the multimedia data, for example, to watch live programs, short videos, listen to songs, audio novels, read news, articles, etc.
[0058] like Figure 2 As shown, for the sake of distinction, the user who produces multimedia data can be called the first user, and the user who consumes multimedia data can be called the second user. For some multimedia platforms, the registered users can both produce and consume multimedia data, that is, the user is both the first user and the second user. This embodiment does not impose any restrictions on this.
[0059] Generally, the first user and the second user may be natural persons, or groups, studios, enterprises, institutions, etc., which are not limited in this embodiment.
[0060] In different business scenarios, the meanings of the first user and the second user are also different. For example, in the live broadcast business scenario, the first user is the anchor and the second user is the audience. In the self-media business scenario, the first user is the editor and the second user is the reader. In the music business scenario, the first user is the singer and the second user is the fan, and so on.
[0061] In this embodiment, a user screening model can be trained for the multimedia platform, and the user screening model can be used to screen the first user who produces multimedia data for the second user who consumes the multimedia data, thereby pushing the information of the first user to the second user for browsing, making it convenient for the second user to follow the first user of interest and / or consume the multimedia data produced by the first user.
[0062] The user screening model may be trained with a first user whose second user has positive behavior as a positive sample, or with a first user whose second user has negative behavior as a negative sample, and this embodiment does not impose any limitation on this.
[0063] Furthermore, if Figure 2 As shown, the user screening model can be a separate structure, including a feature extractor 210, a clusterer 220, and a sampler 230, that is, the feature extractor 210, the clusterer 220, and the sampler 230 are independent modules, and the feature extractor 210, the clusterer 220, and the sampler 230 can be independently trained and updated, that is, the update frequencies of the feature extractor 210, the clusterer 220, and the sampler 230 can be the same or different.
[0064] Feature extractors can be generated using a variety of neural networks, are flexible to adjust, and can also be migrated and used using existing models to reduce computational costs.
[0065] Since the first user and its user data, and the second user and its user data change dynamically, the user screening model can be updated periodically, such as once every 5-7 days. When updating the user screening model, the encoder can be updated at a lower frequency, and the clusterer can be updated at a higher frequency, or even only the sampler can be updated, thereby reducing the time and cost of updating the user screening model.
[0066] Step 102: In a feature extractor, extract a first user feature from the user data of the first user, and extract a second user feature from the user data of the second user.
[0067] In this embodiment, the feature extractor can be used to extract features of users (first user, second user) (i.e., first user features, second user features), and map the features of users (first user, second user) (i.e., first user features, second user features) into the same vector space, thereby providing the clusterer with the first user features in a standard format (length, meaning of features at different positions, etc.), and providing the sampler with the first user features and the second user features in a standard format (length, meaning of features at different positions, etc.).
[0068] Specifically, the structure of the feature extractor may include one or more neural networks, such as CNN (Convolutional Neural Network), DNN (Deep Neural Networks), and the like.
[0069] In the multimedia platform, user data of each user may be stored. The user data may be attribute data of the user itself, such as ID (Identity document), country, gender, age, language, etc., or may be behavior data of the user, such as the total login time, the average login time of each login, the time of login, interaction with other users (such as sending virtual gifts, liking, posting barrage, commenting, etc.), etc. This embodiment does not limit this.
[0070] On the one hand, the user data of the first user is input into the feature extractor, and the feature extractor processes the user data of the first user according to its own logic and outputs features as the first user features. On the other hand, the user data of the second user is input into the feature extractor, and the feature extractor processes the user data of the second user according to its own logic and outputs features as the second user features.
[0071] It should be noted that, considering that the meanings of the first user and the second user are different in different business scenarios, a specific feature extractor can be trained for the first user and a specific feature extractor can be trained for the second user. The feature extractor trained for the first user and the feature extractor trained for the second user can have completely different structures, or can have partially different structures and partially the same structures, so that the user data of the first user is input into the feature extractor trained for the first user to extract the first user's features, and the user data of the second user is input into the feature extractor trained for the second user to extract the second user's features.
[0072] Of course, the first user and the second user may also share a feature extractor, that is, the feature extractor generates multiple instances, so that the user data of the first user is input into one of the instances to extract the first user features, and the user data of the second user is input into other instances to extract the second user features. This embodiment does not limit this.
[0073] In one embodiment of the present invention, Figure 2 As shown, the feature extractor 210 includes an encoder 211 and a deep neural network 212, wherein the encoder 211 is used to encode the user data of the user (the first user, the second user) into a vector (i.e., a first user vector, a second user vector), and the deep neural network 212 is used to extract higher-level features (i.e., first user features, second user features) from the vector (i.e., the first user vector, the second user vector).
[0074] In this embodiment, step 102 includes the following steps:
[0075] Step 1021: Obtain user data of the first user and user data of the second user.
[0076] If the feature extractor is trained using similarity, in order to facilitate calculation of similarity, the meaning of the user data of the first user is the same as the meaning of the user data of the second user.
[0077] In an example of user data, such as Figure 2 As shown, the user data of the first user includes the user ID of the first user, the country to which the first user belongs, and the gender of the first user. The user data of the second user includes the user ID of the first user associated with the second user, the country to which the second user belongs, and the gender of the second user. The user ID, country, and gender are basic attribute data of the user. Compared with behavioral data, the attribute data records are more complete and the method of obtaining them is relatively simple. Compared with extended attribute data such as age and language, basic attribute data has better performance in screening users.
[0078] In an example of constructing user data, for the user data of the dimension of the user ID of the first user associated with the second user, the behavior data of each second user can be counted, so as to query the first candidate user and the second candidate user respectively, wherein the first candidate user is the first user who generates positive behavior with the second user, and the second candidate user is the first user who generates negative behavior with the second user.
[0079] In different business scenarios, the definitions of positive and negative behaviors are different. For example, for live broadcast business scenarios, positive behaviors include following, liking, giving virtual gifts, etc., while negative behaviors include not following, short viewing time, turning off recommendations, throwing eggs, etc.
[0080] Exemplarily, for business scenarios such as live broadcast and short video, the second candidate user includes at least one of the following:
[0081] The first user does not generate positive behavior (such as not following) the second user.
[0082] A second user whose first user browses multimedia data for a time period less than a threshold value (such as 10 seconds) within a preset time period (such as 30 days).
[0083] On the one hand, the first candidate users are sorted according to the time when the second user generates positive behavior, and the user sequence (F t , F t-1 , F t-2 , ..., F1).
[0084] If the sorting is completed, a window is added to the first candidate user, and the length of the window is N (N is a positive integer).
[0085] In the process of sliding the window, the first candidate user ranked at the top in the window is taken as a positive example, and the first candidate user ranked not at the top is taken as a subsequence while maintaining the original sorting order.
[0086] On the other hand, the second candidate user is randomly selected as a negative example.
[0087] For the subsequences, positive examples and negative examples, the subsequences, positive examples and negative examples may be combined in a certain combination manner, and the user IDs corresponding to the subsequences, positive examples and negative examples are set as user data of the second user.
[0088] Taking live broadcast as an example, the anchors followed by the audience are 1, 2, 3, 4, 5, 6, 7, 9, and 10 in chronological order. The anchors that the audience does not follow are A, B, C, and D. The anchors whose live broadcasts the audience watched for less than 10 seconds within 30 days are one, two, three, and four. Assuming that the window is 4, when sliding the window, the anchors in the window are 1, 2, 3, and 4. 4 is selected as the positive example, and 1, 2, and 3 are the subsequences. A and B are randomly selected as negative examples, and two and three are randomly selected as negative examples. Then the anchor users associated with the audience are 1, 2, 3|4|A, B, Two, Three.
[0089] Of course, the above user data and the construction method thereof are only used as examples. When implementing the embodiment of the present invention, other user data and the construction method thereof may be set according to actual conditions. For example, if other methods are used to train the feature extractor, the meaning of the user data of the first user may be different from the meaning of the user data of the second user, etc. The embodiment of the present invention does not limit this. In addition, in addition to the above user data and the construction method thereof, those skilled in the art may also use other user data and the construction method thereof according to actual needs, and the embodiment of the present invention does not limit this.
[0090] Step 1022: In the encoder, encode the user data of the first user into a first user vector and encode the user data of the second user into a second user vector.
[0091] The user data of the first user are encoded and input into the encoder for encoding respectively, and the vector Embedding obtained by encoding is concatenated into the first user vector V i raw .
[0092] The user data of the second user are encoded and input into the encoder for encoding respectively, and the vector Embedding obtained by encoding is concatenated into the second user vector V u raw .
[0093] In one example, if Figure 2 As shown, if the user data of the first user includes a user ID, a country, and a gender, then in this example, in the encoder 211, the user IDs of multiple first users are encoded into multiple first candidate vectors Embedding 241, the country to which the first user belongs is encoded into a second candidate vector Embedding 242, and the gender of the first user is encoded into a third candidate vector Embedding 243. According to certain specifications, the first candidate vector Embedding, the second candidate vector Embedding and the third candidate vector Embedding are concatenated to obtain a first user vector.
[0094] If the user data of the second user includes the user ID, country, and gender of multiple first users associated with the second user, then in this example, Figure 2 As shown, in the encoder 211, the user IDs of the first users associated with the multiple second users are respectively encoded into multiple fourth candidate vectors Embedding 244, and the average pooling operation (Average Pooling) is performed on the multiple fourth candidate vectors Embedding to obtain a fifth candidate vector Embedding 245. The fourth candidate vector Embedding 244 and the fifth candidate vector Embedding 245 are still in the same vector space. The country to which the second user belongs is encoded as a sixth candidate vector Embedding 246, and the gender of the second user is encoded as a seventh candidate vector Embedding 247. According to certain specifications, the fifth candidate vector Embedding 245, the sixth candidate vector Embedding 246 and the seventh candidate vector Embedding 247 are spliced to obtain the second user vector.
[0095] Step 1023: In the deep neural network, the first user vector is mapped to a first user feature, and the second user vector is mapped to a second user feature.
[0096] In this embodiment, the deep neural network set for the first user and the deep neural network set for the second user can share weights (also called weight replication).
[0097] like Figure 2 As shown, the first user vector V of the first user can be respectively i raw Input into the deep neural network 212 for processing, which can be mapped into the first user feature V i 248.
[0098] The second user vector V of the second user u raw Input into the deep neural network 212 for processing, which can be mapped into the second user feature V u 249.
[0099] Of course, the above feature extractors are only used as examples. When implementing the embodiment of the present invention, other feature extractors can be set according to actual conditions, and it is sufficient to ensure that the similarity between the second user and the first user of the positive sample is much greater than the similarity between the second user and the first user as the negative sample. The embodiment of the present invention does not limit this. In addition, in addition to the above feature extractors, those skilled in the art can also use other feature extractors according to actual needs, and the embodiment of the present invention does not limit this.
[0100] Step 103: In a clusterer, cluster the first user using the first user feature to obtain multiple clusters.
[0101] In this embodiment, the clusterer may be used to cluster the first users to obtain a plurality of clusters, each of which has a plurality of similar first users.
[0102] like Figure 2 As shown, the first user feature 248 of the first user may be input into the clusterer 220 , and the clusterer 220 performs clustering according to its own logic, thereby outputting a plurality of clusters.
[0103] The source of features used by the clusterer is highly flexible, and content-related features, such as features of multimedia data produced by the second user, can be used, thereby realizing a user screening model that takes content into consideration and improving the performance of the user screening model.
[0104] In one embodiment of the present invention, the K-Means algorithm may be applied in the clusterer. The K-Means algorithm can ensure good scalability when processing large data sets. When the clusters are approximately Gaussian distributed, the clustering effect is better and the computational complexity is low. The K-Means algorithm is suitable for clustering the first user who produces multimedia data. In this embodiment, step 103 may include the following steps:
[0105] Step 1031: Set a specified number of clusters.
[0106] In this embodiment, the number of clusters K may be set by random method, elbow method, gap statistic, etc., or the number of clusters K may be set by a technician based on experience, which is not limited in this embodiment.
[0107] Furthermore, the number of clusters K is an adjustable variable, and adjusting the number of clusters can be used to optimize the indicators for evaluating target users.
[0108] Step 1032: For each first user, calculate the distance between the first user feature and all center points.
[0109] Each cluster has a center point located at the first user feature V i In the vector space of , the dimension of the center point is the same as the dimension of the first user feature of the first user.
[0110] For each first user, the distance between the first user feature of the first user and all the center points, such as the Euclidean distance, etc., may be calculated.
[0111] Step 1033: divide the first user into a cluster with the smallest distance.
[0112] For the same first user, the distances of the first user are compared, the distance with the smallest value is screened out, and the first user is divided into the cluster corresponding to the distance with the smallest value.
[0113] Step 1034, determine whether the target value converges; if so, execute step 1035, if not, execute step 1036.
[0114] For the clusterer, you can set the conditions for stopping iteration. When the conditions for stopping iteration are met, the iteration stops and the cluster is output. When the conditions for stopping iteration are not met, the next iteration is entered.
[0115] In this embodiment, the condition for stopping iteration may be set to convergence of the target value, wherein the sum of squares of the differences between the first user features of each first user and the center point of each cluster is expressed as follows:
[0116]
[0117] Among them, J is the target value, x i is the first user feature of the i-th first user among the n first users, u k Represents the center point of the kth cluster among K clusters.
[0118] Target value convergence refers to minimizing the target value, for example, the target value is less than a preset threshold, or, for m consecutive (m is a positive integer) generations, the change amplitude of the target value is less than a preset threshold, etc. This embodiment does not impose any restrictions on this.
[0119] Step 1035: Determine whether clustering is completed.
[0120] If the target value converges, it can be determined that the clustering is completed, and the cluster is output, thereby obtaining a mapping relationship from the first user to the cluster.
[0121] Step 1036 : In each cluster, calculate the average value of all first user features as the new center point, and return to execute step 1032 .
[0122] If the target value converges, the center point of each cluster is updated, and the new position of the center point is the average value calculated among all the first user features.
[0123] Of course, the above clusterers are only used as examples. When implementing the embodiments of the present invention, other clusterers may be set according to actual conditions, for example, DBSCAN (Density-Based Spatial Clustering of Applications with Noise), mean shift clustering, Gaussian mixture model clustering, etc., which are not limited in the embodiments of the present invention. In addition, in addition to the above clusterers, those skilled in the art may also use other clusterers according to actual needs, which are not limited in the embodiments of the present invention.
[0124] Step 104: In the sampler, use the second user feature to sample the first user from the cluster as the target user.
[0125] In this embodiment, the sampler may be used to sample the first user to obtain a plurality of first users that may be of interest to the second users. For the sake of distinction, the first user may be referred to as a target user.
[0126] like Figure 2 As shown, the second user feature 249 of the second user may be input into the sampler 230 , and the sampler 230 performs sampling in the cluster according to its own logic, thereby outputting the target user.
[0127] In one embodiment of the present invention, the first user is sampled in a cluster within the neighborhood of the second user as the center. This method is called u2i. In this embodiment, step 104 includes the following steps:
[0128] Step 1041: Determine a cluster adjacent to the second user as a first target cluster.
[0129] For each second user feature of the second user, the distance to the center points of all clusters (such as Euclidean distance) is calculated, and multiple clusters with the closest distances are selected as clusters adjacent to the second user. For ease of distinction, the cluster adjacent to the second user can be recorded as the first target cluster.
[0130] Furthermore, the number of the first target clusters is an adjustable variable, and the value can be initially calculated in a certain manner. When the sampler is updated, the initial value is adjusted to obtain the new number of the first target clusters.
[0131] Step 1042: assign a first target value to each first target cluster respectively.
[0132] For each first target cluster, a first target value may be configured according to the importance of the first target cluster, and the first target value is an upper limit on the number of first users sampled in the first target cluster.
[0133] Among them, the distance from the second user to the first target cluster is positively correlated with the first target value, that is, the greater the distance from the second user to the first target cluster, the greater the first target value, and conversely, the smaller the distance from the second user to the first target cluster, the smaller the first target value.
[0134] In one example, a first total number to be sampled may be determined, and a distance (such as Euclidean distance) between a second user feature of the second user and a center point of the first target cluster may be calculated to determine a distance from the second user to the first target cluster.
[0135] The distance from the second user to the first target cluster is normalized as a weight, and for each first target cluster, a first product between the first total number and the weight is calculated as a first target value.
[0136] Step 1043: In each first target cluster, first users whose number of quality value samples is less than or equal to the first target value are selected as target users.
[0137] In this embodiment, user data of the first user may be counted to obtain relevant indicators for quality control, which are mapped to quality values in a certain manner.
[0138] In each first target cluster, under the constraints of quality (expressed as a quality value) and quantity (expressed as a first target value), first users are sampled as target users, wherein the number of target users sampled in each first target cluster is less than or equal to the first target value of the first target cluster.
[0139] The quality value may be different for different business scenarios. For example, in the live broadcast business scenario, the quality value may be the number of followed viewer users, the average viewing time of viewer users, the attention conversion rate of new viewer users, etc. In the news business scenario, the quality value may be the number of followed viewer users, the average number of article readings, the number of article forwardings and shares, etc.
[0140] In a sampling manner, in each first target cluster, the first users may be sorted in descending order according to the quality value, and the first users with the highest sorting and the number of which is the first target value are selected as the target users.
[0141] In another sampling method, in each first target cluster, the first users can be sorted in descending order according to the quality value, and the first users with the highest sorting and the first target value are selected, and the first users with quality values higher than the threshold are screened among these first users as target users. At this time, the number of sampled first users may be less than the first target value. In order to ensure that the sampling meets the first total number of first users, the remaining places for the first target value can be reserved for the next first target cluster.
[0142] If sampling has been completed for all first target clusters and the number of sampled first users is less than the first total number, first users may be sampled in other clusters adjacent to the second user based on quality values until the first total number is reached.
[0143] Furthermore, the threshold is an adjustable variable, and a value can be initially calculated in a certain manner. When the sampler is updated, the initial value is adjusted to obtain a new threshold.
[0144] In another embodiment of the present invention, the first user preferred by the second user is taken as the center, and the first user is sampled in a cluster within the neighborhood of the center. This method is called i2i. In this embodiment, step 104 includes the following steps:
[0145] Step 1044: Determine the cluster where the first user preferred by the second user is located as the second target cluster.
[0146] In this embodiment, a condition indicating preference may be set for the second user, and behavior data triggered by the second user for the first user may be counted. If the behavior data meets the preference condition, it may be considered that the second user prefers the first user.
[0147] The preference conditions may be different for different business scenarios. For example, in a live broadcast business scenario, the quality value may be the number of followed viewer users, the average viewing time of viewer users, the attention conversion rate of new viewer users, etc. In a news business scenario, the quality value may be the number of followed viewer users, the average number of article readings, the number of article forwardings and shares, etc.
[0148] If the first user preferred by the second user is screened out, the cluster where the first user preferred by the second user belongs can be obtained according to the mapping relationship between the cluster and the first user, and used as the second target cluster.
[0149] Step 1045: assign a second target value to each second target cluster respectively.
[0150] For each second target cluster, a first target value may be configured according to the importance of the second target cluster, and the second target value is an upper limit on the number of first users sampled in the second target cluster.
[0151] Among them, the number of first users who include the second user's preference in the second target cluster is positively correlated with the second target value. The more first users who include the second user's preference in the second target cluster, the larger the second target value. Conversely, the fewer first users who include the second user's preference in the second target cluster, the smaller the second target value.
[0152] Furthermore, the second target value is an adjustable variable, and the value can be initially calculated in a certain manner, and when the sampler is updated, the initial value is adjusted.
[0153] In an example of calculating an initial value, the second total number to be sampled can be determined, the behavioral data triggered by the second user for the first user can be counted, and the behavioral data can be used to calculate the degree to which the second user prefers the first user in a certain way as the preference value. For example, in a live broadcast business scenario, the behavioral data such as the length of time the second user watches the live broadcast program hosted by the first user, the value of the virtual gift given by the second user to the first user, and the number of likes given by the second user to the first user can be combined and mapped to the degree to which the second user prefers the first user after normalization as the preference value.
[0154] The preference values are normalized as user weights. In each second target cluster, the sum of the user weights is calculated as the cluster weight. For each second target cluster, the second product between the second total number and the cluster weight is calculated as the second target value.
[0155] Step 1046: In each second target cluster, first users whose number of quality value samples is less than or equal to the second target value are selected as target users.
[0156] In this embodiment, user data of the first user may be counted to obtain relevant indicators for quality control, which are mapped to quality values in a certain manner.
[0157] In each second target cluster, under the constraints of quality (expressed by a quality value) and quantity (expressed by a first target value), second users are sampled as target users.
[0158] In a sampling manner, in each second target cluster, the first users may be sorted in descending order according to the quality value, and the first users with the highest sorting and the quantity being the first target value are selected as the target users.
[0159] In another sampling method, in each second target cluster, the first users can be sorted in descending order according to the quality value, and the first users with the highest sorting and the second target value are selected. Among these first users, the first users with quality values higher than the threshold are screened as target users. At this time, the number of first users may be less than the second target value. In order to ensure that the sampling meets the second total number of first users, the remaining places for the second target value can be reserved for the next second target cluster.
[0160] If sampling has been completed for all second target clusters and the number of sampled first users is less than the second total number, first users may be sampled in other clusters adjacent to the second users based on quality values until the second total number is reached.
[0161] Furthermore, the threshold is an adjustable variable, and a value can be initially calculated in a certain manner. When the sampler is updated, the initial value is adjusted to obtain a new threshold.
[0162] In the sampler, whether it is u2i or i2i, the indicators used to calculate the quality value can be flexibly adjusted, so that there is no need to modify the previous vital sign extractor and clusterer, and it can be flexibly used in different business scenarios.
[0163] Of course, the above samplers are only used as examples. When implementing the embodiment of the present invention, other samplers may be set according to actual conditions, and the embodiment of the present invention does not limit this. In addition, in addition to the above samplers, those skilled in the art may also use other samplers according to actual needs, and the embodiment of the present invention does not limit this.
[0164] Step 105: Calculate an index for evaluating the target user.
[0165] like Figure 2 As shown, in the stage of training the user screening model, the effect of the user screening model can be evaluated. In this embodiment, the user screening model is used to screen the first user who may be interested in the second user as the target user. Therefore, the evaluation can be performed on various indicators for evaluating multiple target users.
[0166] It should be noted that for different business scenarios, the scale for evaluating the effectiveness of the user screening model is different. In some business scenarios, the effect of the user screening model is more inclined to accuracy, in some business scenarios, the effect of the user screening model is more inclined to correctness, and so on. Therefore, in different business scenarios, the indicators for evaluating target users are different, and this embodiment does not impose any restrictions on this.
[0167] In one example, the target user evaluation index includes at least one of the following:
[0168] 1. Accuracy
[0169] In business scenarios such as live broadcasting, considering that the area in the client logged in by the second user that displays the information of the first user is generally limited, the effectiveness of the user screening model can be evaluated with an eye toward accuracy.
[0170] In this example, the number of target users preferred by the second user may be counted, and a ratio between the number and the number of target users may be calculated as an indicator for evaluating the accuracy of the target users.
[0171] The accuracy is expressed as follows:
[0172]
[0173] Wherein, R(u) is the target user, U is the number of target users, P(u) is the first user preferred by the second user, and U is the number of the first users preferred by the second user.
[0174] 2. Diversity
[0175] In business scenarios such as live streaming, considering that the information of the first user of the same category is pushed to the second user, the second user has fewer options, which has a certain impact on the conversion effects of the second user's attention, subscription, payment, etc. Therefore, the effectiveness of evaluating the user screening model can tend to be diverse.
[0176] In this example, for the cluster where the target user is located (i.e., the cluster where the first user has been sampled), the distance between clusters (represented by the distance between center points), such as the Euclidean distance (L2 norm) is calculated, the average of the distances between clusters is calculated, the average is multiplied by the number of target users in the cluster to obtain the dispersion, and the sum of the dispersions is calculated as an indicator for evaluating the diversity of target users.
[0177] Diversity is expressed as follows:
[0178]
[0179] Where C is the set of clusters where the target user is located, N(i) is the number of target users in the cluster, N(C) refers to the number of clusters, V(i) is the center point (vector) of the ith cluster, V(j) is the center point (vector) of the ith cluster, and ||V(i),V(j)||2 is the distance between V(i) and V(i).
[0180] 3. Quality
[0181] In business scenarios such as live streaming, considering that the capabilities of the first users are different, the first users with different capabilities have a certain impact on the conversion effects of the second users such as attention, subscription, and payment. Therefore, the effectiveness of the user screening model can be evaluated in terms of quality.
[0182] In this example, the quality value of the target user is calculated, and the average value of the quality value of the target user is calculated as an indicator for evaluating the quality of the target user.
[0183] Quality is expressed as follows:
[0184]
[0185] Where R is the number of target users, N(R) is the target user, and Q(i) refers to the quality value of the i-th target user.
[0186] Of course, the above indicators for evaluating target users are only examples. When implementing the embodiments of the present invention, other indicators for evaluating target users may be set according to actual conditions, such as recall rate, F value (F1-scores), PR curve, ROC curve, KS curve, etc., and the embodiments of the present invention are not limited thereto. In addition, in addition to the above indicators for evaluating target users, those skilled in the art may also adopt other indicators for evaluating target users according to actual needs, and the embodiments of the present invention are not limited thereto.
[0187] In business scenarios such as live broadcast and short video, the first user with positive behavior towards the second user is often used as a positive sample for training, and the main focus is on accuracy. It is generally difficult to take into account indicators such as diversity and quality. In this embodiment, the first user with positive behavior towards the second user can be used as a positive sample for training, and the first user with negative behavior towards the second user can be used as a negative sample for training. In addition to accuracy, indicators such as diversity and quality can also be taken into account. Ultimately, the target user of interest can be pushed to the second user, the second user's interest can be expanded, and at the same time, the high quality of the content can be guaranteed.
[0188] Step 106: Update the clusterer and / or sampler with the optimization index as the goal.
[0189] In this embodiment, if Figure 2 As shown, if the evaluation index of the target user does not achieve the expected effect, the parameters in the clusterer 220 and / or the sampler 230 can be adjusted according to the evaluation index of the target user, so as to optimize the evaluation index of the target user and enter the next iteration (i.e., execute steps 102-106).
[0190] If the evaluation index of the target user reaches the expected effect, it can be determined that the user screening model training is completed, and the structures of the feature extractor 210, clusterer 220, sampler 230 and the parameters of the feature extractor 210, clusterer 220, sampler 230 are stored.
[0191] Generally, technical personnel in the multimedia platform can observe the indicators and determine whether the indicators have achieved the expected results. If not, the operation of updating the clusterer and / or sampler is triggered, and the parameters in the clusterer and / or sampler and the update amplitude are selected to update and enter the next iteration.
[0192] Of course, in addition to the multimedia platform technicians triggering the operation of updating the clusterer and / or sampler, one or more conditions can also be set in advance for the indicators, for example, whether a certain indicator is greater than a certain threshold, whether a certain indicator is within a certain range, whether the weighted sum of multiple indicators is less than a certain threshold, and so on. Each condition can map the parameters to be updated in the clusterer and / or sampler and the magnitude of their update. If the indicator does not meet a certain condition, the parameters to be updated in the clusterer and / or sampler mapped by the condition and the magnitude of their update can be determined to update the clusterer and / or sampler. This embodiment does not limit this.
[0193] In one example, for the following evaluation indicators of the target user, at least the following update operations may be triggered:
[0194] 1. Accuracy
[0195] To improve the accuracy of evaluating the target user, at least one of the following update operations may be performed:
[0196] 1.1. Increase the number of clusters in the clusterer.
[0197] If the clusterer uses the K-Means algorithm, the value of the number of clusters K can be increased by a certain amount.
[0198] 1.2. Increase the number of first target clusters in the sampler.
[0199] If the sampler uses u2i, the number of first target clusters can be increased, and the first target cluster is a cluster adjacent to the second user.
[0200] 1.3. Increase the number of first users sampled in the second target cluster in the sampler
[0201] If the sampler uses i2i, the number of the first user sampled in the second target cluster can be increased, and the second target cluster is the cluster where the first user preferred by the second user is located.
[0202] Generally, increasing the number of sampled first users in the second target cluster with the largest second target value can reduce the number of sampled first users in other second target clusters, thereby keeping the second total number unchanged.
[0203] 2. Diversity
[0204] With the goal of increasing the indicators for evaluating the diversity of target users, at least one of the following update operations may be performed:
[0205] 2.1. Increase the number of clusters in the clusterer.
[0206] If the clusterer uses the K-Means algorithm, the value of the number of clusters K can be increased by a certain amount.
[0207] 2.2. Increase the number of first target clusters in the sampler.
[0208] If the sampler uses u2i, the number of first target clusters can be increased, and the first target cluster is a cluster adjacent to the second user.
[0209] 2.3. Reduce the number of first users sampled in the second target cluster in the sampler
[0210] If the sampler uses i2i, the number of first users sampled in the second target cluster can be reduced, and the second target cluster is the cluster where the first user preferred by the second user is located.
[0211] 3. Quality
[0212] With the goal of increasing the indicator for evaluating the quality of the target user, perform at least one of the following update operations:
[0213] 3.1. Add a new threshold in the sampler.
[0214] Whether the sampler uses u2i or i2i, in the absence of a threshold, a threshold can be set, and the threshold is used to filter the first user, that is, to filter the first user whose quality value is less than or equal to the threshold, and sample the first user whose quality value is greater than the threshold.
[0215] 3.2. Increase the threshold in the sampler.
[0216] Whether the sampler uses u2i or i2i, when there is a threshold, the threshold value can be increased by a certain amplitude. The threshold is used to filter the first user, that is, to filter the first user whose quality value is less than or equal to the threshold, and the first user whose sampling quality value is greater than the threshold.
[0217] Of course, the above-mentioned operation of updating the clusterer and / or sampler is only used as an example. When implementing the embodiment of the present invention, other operations of updating the clusterer and / or sampler can be set according to actual conditions, and the embodiment of the present invention does not limit this. In addition, in addition to the above-mentioned operation of updating the clusterer and / or sampler, those skilled in the art can also adopt other operations of updating the clusterer and / or sampler according to actual needs, and the embodiment of the present invention does not limit this.
[0218] In this embodiment, a first user who produces multimedia data and a second user who consumes multimedia data are determined. In a feature extractor, a first user feature is extracted from the user data of the first user, and a second user feature is extracted from the user data of the second user. In a clusterer, the first user is clustered using the first user feature to obtain multiple clusters. In a sampler, the first user is sampled from the cluster using the first user feature as a target user, and an indicator for evaluating the target user is calculated. With the goal of optimizing the indicator, the clusterer and / or the sampler are updated. The feature extractor, the clusterer, and the sampler are separated from each other, so that the feature extractor, the clusterer, and the sampler can be trained and updated separately. Therefore, the feature extractor can be directly migrated from an existing model and the amount of calculation can be reduced by sharing with other models. At the same time, the update of the feature extractor is not synchronized with the subsequent update of the clusterer and the sampler. A user screening model with low computational complexity and high real-time requirements can be implemented by updating the feature extractor at a low frequency and updating the clusterer and the sampler at a high frequency.
[0219] Embodiment 2
[0220] Figure 3 This is a flow chart of a method for training a user screening model provided in the second embodiment of the present invention. This embodiment is based on the previous embodiment and further adds an operation of training a feature extractor. The method specifically includes the following steps:
[0221] Step 301: Determine a first user who produces multimedia data and a second user who consumes multimedia data.
[0222] Step 302: In a feature extractor, extract a first user feature from the user data of the first user, and extract a second user feature from the user data of the second user.
[0223] Step 303: Calculate the similarity between the second user feature and the first user feature as a positive sample and the first user feature as a negative sample.
[0224] like Figure 2 As shown, in the process of training the user screening model, the feature extractor is initially trained, and multiple first users can be prepared for the second user, with some of the first users being positive samples and some of the first users being negative samples.
[0225] In order to improve the efficiency of training the feature extractor, the number of first user features of the first user as a positive sample is less than the number of first user features of the first user as a negative sample. For example, 1 first user feature of the first user as a positive sample and 6 first user features of the first user as negative samples are prepared.
[0226] The similarity between the second user feature and the first user feature as a positive sample is calculated by a dot product or the like, and the similarity between the second user feature and the first user feature as a negative sample is calculated by a dot product or the like.
[0227] Step 304: Calculate the loss value according to the similarity.
[0228] In this embodiment, if Figure 2 As shown, the similarity between the first user feature 248 and the second user feature 249 is substituted into a preset loss function. In the loss function, the influence of positive samples and negative samples can be referred to to calculate the loss value LOSS.
[0229] Among them, the loss value is negatively correlated with the similarity corresponding to the positive sample and positively correlated with the similarity of the negative sample, that is, the greater the similarity between the second user feature and the first user feature as the positive sample (the more similar the second user is to the first user as the positive sample), the smaller the loss value LOSS; conversely, the smaller the similarity between the second user feature and the first user feature as the positive sample (the less similar the second user is to the first user as the positive sample), the larger the loss value LOSS; and, the greater the similarity between the second user feature and the first user feature as the negative sample (the more similar the second user is to the first user as the negative sample), the larger the loss value LOSS; conversely, the smaller the similarity between the second user feature and the first user feature as the negative sample (the more dissimilar the second user is to the first user as the negative sample), the smaller the loss value LOSS.
[0230] In one way of implementing the loss function, the similarity can be substituted into a preset activation function, such as Sigmoid function (S-type growth function), Tanh function (hyperbolic tangent function), ReLU function (The Rectified Linear Unit), etc., to activate the similarity.
[0231] Taking the Sigmoid function as an example, the activation similarity is expressed as follows:
[0232]
[0233] Among them, p is the similarity after activation, and logits is the similarity before activation.
[0234] If the activation is successful, the cross entropy is calculated for each first user based on the similarity, positive samples, and negative samples, as shown below:
[0235] L=-[y*lnp+(1-y)ln(1-P)]
[0236] Among them, L is the cross entropy, y is the label label, the positive sample is 1, and the negative sample is 0.
[0237] The sum of all cross entropies is calculated as the loss value. In the process of minimizing the loss value, the similarity between the second user (represented by the second user's features) and the first user (represented by the first user's features) as a positive sample can be maximized, and the similarity between the second user and the first user as a negative sample can be minimized. In this way, the first user preferred by the second user is closer to the second user in the vector space, which meets the requirements of clustering.
[0238] Step 305: Update the feature extractor according to the loss value.
[0239] In this embodiment, if Figure 2 As shown, according to the loss value LOSS, the parameters in the feature extractor 210, including the parameters in the deep neural network 212 and the encoder 211, can be back-propagated in the feature extractor 210 by stochastic gradient descent, gradient descent, etc., to update the loss value.
[0240] If the training feature extractor is completed, the trained feature extractor may be applied to extract first user features from the user data of the first user, extract second user features from the user data of the second user, and update the clusterer and / or sampler.
[0241] Step 306: In the clusterer, cluster the first user using the first user feature to obtain multiple clusters.
[0242] Step 307: In the sampler, use the first user feature to sample the first user from the cluster as the target user.
[0243] Step 308: Calculate the index for evaluating the target user;
[0244] Step 309: Update the clusterer and / or sampler with the optimization index as the goal.
[0245] Embodiment 3
[0246] Figure 4 This is a flow chart of a user push method provided in Embodiment 3 of the present invention. This embodiment can be applied to separating and extracting features, clustering, sampling and constructing a model for screening users, thereby screening users. The method can be executed by a user push device, which can be implemented by software and / or hardware and can be configured in a computer device, such as a server, a workstation, a personal computer, etc., and specifically includes the following steps:
[0247] Step 401: When a request sent by a client is received, a user screening model is loaded.
[0248] In the multimedia platform, a large amount of multimedia data is stored to form a multimedia library. Some of the multimedia data is produced by the first user. The second user logs in to the client, and the client sends a request to the multimedia platform. When the multimedia platform receives the request from the client, it can load the user screening model into the memory and apply its parameters, waiting to screen the first users that the second user may be interested in.
[0249] It should be noted that the client's request may be actively triggered by the first user. For example, the second user enters a keyword in the client and requests the multimedia platform to search for first users related to the keyword, the second user pulls down the list of existing first users and requests the multimedia platform to refresh the first users, etc. The client's request may not be actively triggered by the first user. For example, when displaying the homepage, the client requests the multimedia platform to push the first user that the second user may be interested in, the client requests the multimedia platform to push the related first user before the current multimedia data finishes playing, etc. This embodiment does not limit this.
[0250] In this embodiment, the user screening model may be a separate structure, including a feature extractor, a clusterer, and a sampler. The user screening model may be trained using any training method for the user screening model in the present invention.
[0251] Step 402: In a feature extractor, extract a first user feature from the user data of the first user, and extract a second user feature from the user data of the second user.
[0252] In the specific implementation, Figure 2 As shown, the feature extractor 210 can be called offline at preset intervals to extract the first user feature 248 from the user data of the first user and the second user feature 249 from the user data of the second user, and the first user feature 248 and the second user feature 249 are stored in a database. During servicing, the first user feature 248 and the second user feature 249 are read from the database.
[0253] In one embodiment of the present invention, the feature extractor includes an encoder and a deep neural network. In this embodiment, step 402 includes the following steps:
[0254] Step 4021: Obtain user data of the first user and user data of the second user.
[0255] For the user data of the first user, a first candidate user and a second candidate user may be queried. The first candidate user is the first user who generates positive behavior with the second user, and the second candidate user is the first user who generates negative behavior with the second user.
[0256] The first candidate users are sorted according to the time when the second user generates the positive behavior. If the sorting is completed, a window is added to the first candidate user.
[0257] In the process of sliding the window, the first candidate user ranked at the top in the window is taken as a positive example, and the first candidate user not ranked at the top is taken as a subsequence.
[0258] Randomly select the second candidate user as a negative example;
[0259] The user IDs corresponding to the subsequences, positive examples, and negative examples are set as user data of the second user.
[0260] Step 4022: In the encoder, the user data of the first user is encoded into a first user vector, and the user data of the second user is encoded into a second user vector.
[0261] In one example, the user data of the first user includes a user ID, a country, and a gender, and the user data of the second user includes a plurality of user IDs, countries, and genders of the first user associated with the second user.
[0262] On the one hand, the user ID of the first user is encoded as a first candidate vector, the country to which the first user belongs is encoded as a second candidate vector, the gender of the first user is encoded as a third candidate vector, and the first candidate vector, the second candidate vector and the third candidate vector are concatenated to obtain a first user vector.
[0263] On the other hand, the user IDs of the first users associated with the multiple second users are respectively encoded into multiple fourth candidate vectors, and an average pooling operation is performed on the multiple fourth candidate vectors to obtain a fifth candidate vector. The country to which the second user belongs is encoded as a sixth candidate vector, and the gender of the second user is encoded as a seventh candidate vector. The fifth candidate vector, the sixth candidate vector and the seventh candidate vector are concatenated to obtain a second user vector.
[0264] Step 4023: In the deep neural network, the first user vector is mapped to a first user feature, and the second user vector is mapped to a second user feature.
[0265] Step 403: In the clusterer, cluster the first user using the first user feature to obtain multiple clusters.
[0266] In the specific implementation, Figure 2 As shown, the clusterer 220 can be called offline at preset intervals, the first user 248 can be clustered using the first user characteristics to obtain multiple clusters, and the mapping relationship between the cluster and the first user can be stored in the database. When serving, the mapping relationship between the cluster and the first user can be read from the database.
[0267] In one embodiment of the present invention, step 403 includes the following steps:
[0268] Step 4031: Set a specified number of clusters.
[0269] Among them, a cluster has a center point.
[0270] Step 4032: For each first user, calculate the distance between the first user feature and all center points.
[0271] Step 4033: divide the first user into a cluster with the smallest distance.
[0272] Step 4034, determine whether the target value converges; if so, execute step 4035, if not, execute step 4036.
[0273] The target value is the sum of squares of differences between each first user feature and each center point.
[0274] Step 4035: Determine whether clustering is completed.
[0275] Step 4036: In each cluster, calculate the average value of all first user features as the new center point, and return to execute step 4032.
[0276] Step 404: In the sampler, use the first user feature to sample the first user from the cluster as the target user.
[0277] In this embodiment, if Figure 2 As shown, during servicing, the second user feature 249 of the second user may be input into the sampler 230, and the sampler 230 performs sampling in the cluster according to its own logic, thereby outputting the target user.
[0278] Because the clusterer and / or sampler are updated with multiple evaluation indicators of the target users when the user screening model is first trained, the target users screened using the clusterer and sampler can meet multiple evaluation indicators, such as accuracy, diversity, quality, etc.
[0279] In one embodiment of the present invention, step 404 includes the following steps:
[0280] Step 4041: Determine a cluster adjacent to the second user as a first target cluster.
[0281] Step 4042: assign a first target value to each first target cluster respectively.
[0282] Among them, the distance from the second user to the first target cluster is positively correlated with the first target value.
[0283] Exemplarily, a first total number to be sampled is determined, a distance from the second user to the first target cluster is determined, the distance from the second user to the first target cluster is normalized as a weight, and for each first target cluster, a first product between the first total number and the weight is calculated as the first target value.
[0284] Step 4043: In each first target cluster, first users whose number of quality value samples is less than or equal to the first target value are selected as target users.
[0285] In another embodiment of the present invention, step 404 includes the following steps:
[0286] Step 4044: Determine the cluster where the first user preferred by the second user belongs, as the second target cluster.
[0287] Step 4045: assign a second target value to each second target cluster respectively.
[0288] The number of first users in the second target cluster who have the second user's preference is positively correlated with the second target value.
[0289] Exemplarily, the second total number to be sampled is determined, the degree to which the second user prefers the first user is calculated as the preference value, the preference value is normalized as the user weight, in each second target cluster, the sum of the user weights is calculated as the cluster weight, and for each second target cluster, the second product between the second total number and the cluster weight is calculated as the second target value.
[0290] Step 4046: In each second target cluster, first users whose number of quality value samples is less than or equal to the second target value are selected as target users.
[0291] Step 405: Push the target user's information to the client for display.
[0292] If the sampling of target users is completed, the target users can be sorted, deduplicated (remove the target users that the second user has browsed), and other processing can be performed, and the target user's information (such as name, avatar, etc.) can be sent to the client. The client displays the information of each target user in order for the second user to browse.
[0293] If the second user finds a target user of interest, the target user's information can be triggered by mouse clicks, touch clicks, etc. The client requests the target user's page from the multimedia platform, for example, the page where the target user is hosting a live program, the page that aggregates multimedia data published by the target user, etc., and loads the page for further browsing by the second user.
[0294] In the embodiment of the present invention, since the application of the feature extractor, clusterer, and sampler is basically similar to that of Embodiments 1 and 2, the description is relatively simple. For the relevant parts, please refer to the partial description of Embodiments 1 and 2. The embodiment of the present invention will not be described in detail here.
[0295] In this embodiment, when a request sent by a client is received, a user screening model is loaded. The user screening model includes a feature extractor, a clusterer, and a sampler. The second user logs in to the client. In the feature extractor, the first user feature is extracted from the user data of the first user, and the second user feature is extracted from the user data of the second user. In the clusterer, the first user is clustered using the first user feature to obtain multiple clusters. In the sampler, the first user is sampled from the cluster using the first user feature as the target user. The target user meets the preset evaluation index, and the information of the target user is pushed to the client for display. The feature extractor, the clusterer, and the sampler are separated from each other, so that the feature extractor, the clusterer, and the sampler can be trained and updated separately. Therefore, the feature extractor can be directly migrated from the existing model and the amount of calculation can be reduced by sharing with other models. At the same time, the update of the feature extractor is not synchronized with the subsequent update of the clusterer and the sampler. The user screening model with low calculation amount and high real-time requirements can be realized by updating the feature extractor at a low frequency and updating the clusterer and the sampler at a high frequency.
[0296] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0297] Embodiment 4
[0298] Figure 5 This is a structural block diagram of a training device for a user screening model provided in Embodiment 4 of the present invention. The user screening model includes a feature extractor, a clusterer, and a sampler. The device may specifically include the following modules:
[0299] A user determination module 501, used to determine a first user who produces multimedia data and a second user who consumes the multimedia data;
[0300] A feature extraction module 502, configured to extract, in the feature extractor, a first user feature from the user data of the first user and a second user feature from the user data of the second user;
[0301] A user clustering module 503, configured to cluster the first user using the first user feature in the clusterer to obtain a plurality of clusters;
[0302] A user sampling module 504, configured to sample a first user from the cluster as a target user using the second user feature in the sampler;
[0303] An evaluation index calculation module 505, used to calculate an index for evaluating the target user;
[0304] The cluster sampling update module 506 is used to update the clusterer and / or the sampler with the goal of optimizing the indicator.
[0305] In one embodiment of the present invention, the feature extractor includes an encoder and a deep neural network; the feature extraction module 502 includes:
[0306] A user data acquisition module, used to acquire user data of the first user and user data of the second user;
[0307] A user vector encoding module, configured to encode the user data of the first user into a first user vector and the user data of the second user into a second user vector in the encoder;
[0308] The user vector mapping module is used to map the first user vector to a first user feature and the second user vector to a second user feature in the deep neural network.
[0309] In an example of an embodiment of the present invention, the user data acquisition module includes:
[0310] A candidate user query module, used to query a first candidate user and a second candidate user, wherein the first candidate user is the first user who has generated positive behavior with the second user, and the second candidate user is the first user who has generated negative behavior with the second user;
[0311] A candidate user sorting module, used to sort the first candidate users according to the time when the second user generates positive behavior;
[0312] a window adding module, configured to add a window to the first candidate user if the sorting is completed;
[0313] A first user extraction module is used to select the first candidate user ranked first in the window as a positive example and the first candidate user not ranked first as a subsequence in the process of sliding the window;
[0314] A second user extraction module, used for randomly extracting the second candidate user as a negative example;
[0315] The ID setting module is used to set the user ID corresponding to the subsequence, the positive example and the negative example as the user data of the second user.
[0316] In an example of the embodiment of the present invention, the user data of the first user includes a user ID, a country, and a gender, and the user data of the second user includes a plurality of user IDs, countries, and genders of the first users associated with the second user;
[0317] The user vector encoding module comprises:
[0318] A first candidate vector encoding module, configured to encode the user ID of the first user into a first candidate vector;
[0319] A second candidate vector encoding module, configured to encode the country to which the first user belongs as a second candidate vector;
[0320] A third candidate vector encoding module, configured to encode the gender of the first user into a third candidate vector;
[0321] A first user vector concatenation module, configured to concatenate the first candidate vector, the second candidate vector and the third candidate vector to obtain a first user vector;
[0322] a fourth candidate vector encoding module, configured to respectively encode user IDs of the first users associated with a plurality of the second users into a plurality of fourth candidate vectors;
[0323] a fifth candidate vector encoding module, configured to perform an average pooling operation on the plurality of fourth candidate vectors to obtain a fifth candidate vector;
[0324] a sixth candidate vector encoding module, configured to encode the country to which the second user belongs as a sixth candidate vector;
[0325] a seventh candidate vector encoding module, configured to encode the gender of the second user into a seventh candidate vector;
[0326] The second user vector concatenation module is configured to concatenate the fifth candidate vector, the sixth candidate vector and the seventh candidate vector to obtain a second user vector.
[0327] In one embodiment of the present invention, it also includes:
[0328] A similarity calculation module, used to calculate the similarity between the second user feature and the first user feature as a positive sample and the first user feature as a negative sample;
[0329] A loss value calculation module, used to calculate a loss value according to the similarity, wherein the loss value is negatively correlated with the similarity corresponding to the positive sample and positively correlated with the similarity of the negative sample;
[0330] A feature extractor updating module is used to update the feature extractor according to the loss value.
[0331] In one embodiment of the present invention, the loss value calculation module includes:
[0332] An activation module, used for activating the similarity;
[0333] a cross entropy calculation module, configured to calculate the cross entropy for each of the first users based on the similarity, the positive samples, and the negative samples if the activation is successful;
[0334] The cross entropy sum calculation module is used to calculate the sum of all the cross entropies as the loss value.
[0335] In one embodiment of the present invention, the user clustering module 503 includes:
[0336] A cluster setting module, used for setting a specified number of clusters, wherein the clusters have center points;
[0337] A feature distance calculation module, used for calculating, for each first user, the distance between the first user feature and all the center points;
[0338] A user division module, configured to divide the first user into the cluster with the smallest distance;
[0339] A convergence judgment module is used to judge whether a target value converges, wherein the target value is the sum of squares of differences between each of the first user features and each of the center points; if so, a clustering completion determination module is called; if not, a center point update module is called;
[0340] A clustering completion determination module, used to determine that the clustering is completed;
[0341] The center point updating module is used to calculate the average value between all the first user features in each cluster as a new center point, and return to call the distance calculation module.
[0342] In one embodiment of the present invention, the user sampling module 504 includes:
[0343] A first target cluster determining module, configured to determine a cluster adjacent to the second user as a first target cluster;
[0344] A first target value allocation module, configured to allocate a first target value to each of the first target clusters respectively, wherein the distance between the second user and the first target cluster is positively correlated with the first target value;
[0345] The first target cluster sampling module is used to select, in each of the first target clusters, first users whose number of quality value sampling is less than or equal to the first target value as target users.
[0346] In one embodiment of the present invention, the first target value allocation module includes:
[0347] A first total number determination module, used to determine a first total number to be sampled;
[0348] A first user distance calculation module, used to determine the distance from the second user to the first target cluster;
[0349] a weight calculation module, used for normalizing the distance from the second user to the first target cluster as a weight;
[0350] The first product calculation module is used to calculate, for each of the first target clusters, a first product between the first total number and the weight as a first target value.
[0351] In another embodiment of the present invention, the user sampling module 504 includes:
[0352] A second target cluster determination module, configured to determine a cluster where the first user, which is preferred by the second user, belongs, as a second target cluster;
[0353] A second target value allocation module, used to allocate a second target value to each of the second target clusters respectively, wherein the number of the first users in the second target cluster that include the second user preference is positively correlated with the second target value;
[0354] The second target cluster sampling module is used to select, in each of the second target clusters, first users whose number of quality value sampling is less than or equal to the second target value as target users.
[0355] In one embodiment of the present invention, the second target value allocation module includes:
[0356] A second total number determination module, used to determine a second total number to be sampled;
[0357] A preference value calculation module, used to calculate the degree to which the second user prefers the first user as a preference value;
[0358] A user weight calculation module, used to normalize the preference value as the user weight;
[0359] A cluster weight calculation module, used for calculating the sum of the user weights in each of the second target clusters as a cluster weight;
[0360] The second product calculation module is used to calculate, for each of the second target clusters, a second product between the second total number and the cluster weight as a second target value.
[0361] In one embodiment of the present invention, the evaluation index calculation module 505 includes:
[0362] A preference quantity preference module, used to count the number of the target users preferred by the second user;
[0363] An accuracy index calculation module, used to calculate the ratio between the number and the number of target users as an index for evaluating the accuracy of the target users;
[0364] and / or,
[0365] An inter-cluster distance calculation module, used for calculating the distance between the clusters where the target user is located;
[0366] An average value calculation module, used for calculating the average value of the distances between the clusters;
[0367] a dispersion calculation module, configured to multiply the average value by the number of the target users in the cluster to obtain a dispersion;
[0368] A diversity index calculation module, used to calculate the sum of the dispersions as an index for evaluating the diversity of the target users;
[0369] and / or,
[0370] A quality value calculation module, used to calculate the quality value of the target user;
[0371] The quality index calculation module is used to calculate the average value of the quality value of the target user as an index for evaluating the quality of the target user.
[0372] In one embodiment of the present invention, the cluster sampling update module 506 includes:
[0373] The accuracy updating module is used to perform at least one of the following updating operations with the goal of improving the accuracy of evaluating the target user:
[0374] increasing the number of clusters in the clusterer;
[0375] Increasing the number of first target clusters in the sampler, the first target cluster being a cluster adjacent to the second user;
[0376] In the sampler, increase the number of the first user sampled in a second target cluster, where the second target cluster is a cluster where the first user, which is preferred by the second user, is located;
[0377] and / or,
[0378] A diversity update module is used to perform at least one of the following update operations with the goal of increasing the index for evaluating the diversity of the target users:
[0379] increasing the number of clusters in the clusterer;
[0380] Increasing the number of first target clusters in the sampler, the first target cluster being a cluster adjacent to the second user;
[0381] In the sampler, reducing the number of the first user sampled in a second target cluster, where the second target cluster is a cluster where the first user preferred by the second user is located;
[0382] and / or,
[0383] The quality update module is used to perform at least one of the following update operations with the goal of increasing the indicator for evaluating the quality of the target user:
[0384] Adding a new threshold value in the sampler;
[0385] increasing a threshold in the sampler;
[0386] The threshold is used to filter the first user.
[0387] The training device for the user screening model provided in the embodiment of the present invention can execute the training method for the user screening model provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0388] Embodiment 5
[0389] Figure 6 This is a structural block diagram of a user push device provided in Embodiment 5 of the present invention, which may specifically include the following modules:
[0390] A user screening model loading model 601 is used to load a user screening model when receiving a request sent by a client, the user screening model including a feature extractor, a clusterer, and a sampler, and the second user logs in to the client;
[0391] A feature extraction module 602, configured to extract, in the feature extractor, a first user feature from the user data of the first user and a second user feature from the user data of the second user;
[0392] A user clustering module 603, configured to cluster the first user using the first user feature in the clusterer to obtain a plurality of clusters;
[0393] A user sampling module 604, configured to, in the sampler, use the second user feature to sample a first user from the cluster as a target user, wherein the target user meets a preset evaluation index;
[0394] The user information push module 605 is used to push the target user's information to the client for display.
[0395] The user push device provided in the embodiment of the present invention can execute the user push method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0396] Embodiment 6
[0397] Figure 7 A structural block diagram of a computer device provided in Embodiment 6 of the present invention may specifically include the following modules:
[0398] A feature extractor 701 is used to extract a first user feature from user data of a first user and a second user feature from user data of a second user; the first user is used to produce multimedia data and the second user is used to consume the multimedia data;
[0399] A clusterer 702, configured to cluster the first user using the first user feature to obtain a plurality of clusters;
[0400] The sampler 703 is configured to use the second user feature to sample a first user from the cluster as a target user, where the target user meets a preset evaluation indicator.
[0401] In one embodiment of the present invention, the feature extractor 701 includes:
[0402] An encoder, configured to encode user data of a first user into a first user vector and encode user data of a second user into a second user vector;
[0403] A deep neural network is used to map the first user vector to a first user feature and the second user vector to a second user feature.
[0404] In one embodiment of the present invention, the user data of the second user includes a subsequence, a user ID corresponding to a positive example and a negative example;
[0405] The positive example is to add a window after sorting the first candidate users according to the time when the second user generates positive behavior, and the first candidate user ranked first in the window, and the subsequence is the first candidate user not ranked first in the window;
[0406] The negative example is a randomly selected second candidate user;
[0407] The first candidate user is the first user who generates positive behavior towards the second user, and the second candidate user is the first user who generates negative behavior towards the second user.
[0408] In one embodiment of the present invention, the user data of the first user includes a user ID, a country, and a gender, and the user data of the second user includes a plurality of user IDs, countries, and genders of the first users associated with the second user;
[0409] The encoder is also used for:
[0410] Encoding the user data of the first user into a first user vector and encoding the user data of the second user into a second user vector respectively includes:
[0411] Encoding the user ID of the first user into a first candidate vector;
[0412] Encode the country to which the first user belongs as a second candidate vector;
[0413] Encode the gender of the first user as a third candidate vector;
[0414] Concatenate the first candidate vector, the second candidate vector and the third candidate vector to obtain a first user vector;
[0415] respectively encoding the user IDs of the first users associated with the plurality of the second users into a plurality of fourth candidate vectors;
[0416] Performing an average pooling operation on the plurality of fourth candidate vectors to obtain a fifth candidate vector;
[0417] Encode the country to which the second user belongs as a sixth candidate vector;
[0418] Encode the gender of the second user as a seventh candidate vector;
[0419] The fifth candidate vector, the sixth candidate vector and the seventh candidate vector are concatenated to obtain a second user vector.
[0420] In one embodiment of the present invention, the clusterer 702 is further used for:
[0421] Set a specified number of clusters, each of which has a center point;
[0422] For each first user, calculating the distance between the first user feature and all the center points;
[0423] dividing the first user into the cluster with the smallest distance;
[0424] Determine whether a target value converges, the target value being the sum of squares of differences between each of the first user features and each of the center points;
[0425] If yes, it is determined that the clustering is completed;
[0426] If not, then in each of the clusters, the average value of all the first user features is calculated as a new center point, and the step of calculating the distance between the first user feature and all the center points for each first user is returned to be executed.
[0427] In one embodiment of the present invention, the sampler 703 is further used for:
[0428] determining a cluster adjacent to the second user as a first target cluster;
[0429] assigning a first target value to each of the first target clusters respectively, wherein the distance from the second user to the first target cluster is positively correlated with the first target value;
[0430] In each of the first target clusters, first users whose number of quality value samples is less than or equal to the first target value are respectively selected as target users.
[0431] In an example of the embodiment of the present invention, the sampler 703 is further used for:
[0432] determining a first total number of samples to be sampled;
[0433] determining a distance from the second user to the first target cluster;
[0434] Normalizing the distance from the second user to the first target cluster as a weight;
[0435] For each of the first target clusters, a first product between the first total number and the weight is calculated as a first target value.
[0436] In another embodiment of the present invention, the sampler 703 is further used for:
[0437] determining a cluster where the first user, which is preferred by the second user, belongs, as a second target cluster;
[0438] assigning a second target value to each of the second target clusters respectively, wherein the number of the first users in the second target cluster that include the second user preference is positively correlated with the second target value;
[0439] In each of the second target clusters, first users whose number of quality value samples is less than or equal to the second target value are respectively selected as target users.
[0440] In an example of the embodiment of the present invention, the sampler 703 is further used for:
[0441] determining a second total number of samples to be sampled;
[0442] calculating the degree to which the second user prefers the first user as a preference value;
[0443] Normalizing the preference value as a user weight;
[0444] In each of the second target clusters, calculating the sum of the user weights as a cluster weight;
[0445] For each of the second target clusters, a second product between the second total number and the cluster weight is calculated as a second target value.
[0446] In a specific implementation, the indicator includes at least one of the following:
[0447] An indicator for evaluating the accuracy of the target user;
[0448] An indicator for evaluating the diversity of the target users;
[0449] An indicator for evaluating the quality of the target user.
[0450] Accordingly, in the clusterer 702, when the number of clusters increases, it is used to improve the accuracy index of evaluating the target user;
[0451] In the sampler 703, when the number of the first target clusters increases, the indicator for improving the accuracy of evaluating the target user is used; when the number of the first user is increased in the second target cluster, the indicator for improving the accuracy of evaluating the target user is used; the first target cluster is a cluster adjacent to the second user, and the second target cluster is a cluster preferred by the second user where the first user is located;
[0452] and / or,
[0453] In the clusterer 702, when the number of the clusters increases, an indicator for evaluating the diversity of the target users is increased;
[0454] In the sampler 703, when the number of the first target clusters increases, the index for evaluating the diversity of the target users is targeted, and when the number of the first user sampled in the second target cluster decreases, the index for evaluating the diversity of the target users is targeted, the first target cluster is a cluster adjacent to the second user, and the second target cluster is a cluster where the first user, which is preferred by the second user, is located;
[0455] and / or,
[0456] In the sampler 703,
[0457] With the goal of increasing the indicator for evaluating the quality of the target user, at least one of the following update operations is performed:
[0458] When a threshold is added or increased, it is used to increase the indicator for evaluating the quality of the target user;
[0459] The threshold is used to filter the first user.
[0460] The computer device provided in the embodiment of the present invention can execute the training method of the user screening model and the user push method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0461] Embodiment 7
[0462] Figure 8 A schematic diagram of the structure of a computer device provided in Embodiment 7 of the present invention. Figure 8 A block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 8 The computer device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0463] like Figure 8 As shown, the computer device 12 is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0464] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0465] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0466] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 8 not shown, usually called a "hard drive"). Although Figure 8 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0467] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0468] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the computer device 12, and / or may communicate with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the computer device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the computer device 12, including, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0469] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the training of the user screening model and the user push method provided in the embodiment of the present invention.
[0470] Embodiment 8
[0471] Embodiment 8 of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the various processes of the above-mentioned user screening model training and user push method, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0472] Among them, computer-readable storage media may include, for example, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: 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 or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device.
[0473] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for training a user screening model, characterized in that: The user screening model includes a feature extractor, a clusterer, and a sampler, and the method includes: Determine a first user who produces multimedia data and a second user who consumes the multimedia data; In the feature extractor, extracting a first user feature from the user data of the first user and extracting a second user feature from the user data of the second user; In the clusterer, clustering the first user using the first user feature to obtain a plurality of clusters; In the sampler, a first user is sampled from the cluster using the second user feature as a target user; Calculating an indicator for evaluating the target user; With the goal of optimizing the indicator, updating the clusterer and / or the sampler; The feature extractor includes an encoder and a deep neural network; in the feature extractor, extracting a first user feature from the user data of the first user and extracting a second user feature from the user data of the second user include: Acquire user data of the first user and user data of the second user; In the encoder, the user data of the first user is encoded into a first user vector, and the user data of the second user is encoded into a second user vector; In the deep neural network, the first user vector is mapped to a first user feature, and the second user vector is mapped to a second user feature; The acquiring the user data of the first user and the user data of the second user includes: Querying a first candidate user and a second candidate user, wherein the first candidate user is the first user who generates positive behavior towards the second user, and the second candidate user is the first user who generates negative behavior towards the second user; sorting the first candidate users according to the time when the second user generated the positive behavior; If the sorting is completed, adding a window for the first candidate user; In the process of sliding the window, taking the first candidate user ranked first in the window as a positive example, and taking the first candidate user ranked not first as a subsequence; Randomly select the second candidate user as a negative example; Setting the user IDs corresponding to the subsequence, the positive example, and the negative example as user data of the second user; The method further comprises: Calculating the similarity between the second user feature and the first user feature as a positive sample and the first user feature as a negative sample respectively; Calculating a loss value according to the similarity, wherein the loss value is negatively correlated with the similarity corresponding to the positive sample and positively correlated with the similarity corresponding to the negative sample; Updating the feature extractor according to the loss value; The step of calculating the loss value according to the similarity includes: activating the similarity; If the activation is successful, for each of the first users, a cross entropy is calculated based on the similarity, the positive samples, and the negative samples; The sum of all the cross entropies is calculated as the loss value.
2. The method according to claim 1, characterized in that The user data of the first user includes a user ID, a country, and a gender, and the user data of the second user includes a plurality of user IDs, countries, and genders of the first users associated with the second user; The step of encoding the user data of the first user into a first user vector and encoding the user data of the second user into a second user vector in the encoder comprises: Encoding the user ID of the first user into a first candidate vector; Encode the country to which the first user belongs as a second candidate vector; Encode the gender of the first user as a third candidate vector; Concatenate the first candidate vector, the second candidate vector and the third candidate vector to obtain a first user vector; respectively encoding the user IDs of the first users associated with the plurality of the second users into a plurality of fourth candidate vectors; Performing an average pooling operation on the plurality of fourth candidate vectors to obtain a fifth candidate vector; Encode the country to which the second user belongs as a sixth candidate vector; Encode the gender of the second user as a seventh candidate vector; The fifth candidate vector, the sixth candidate vector and the seventh candidate vector are concatenated to obtain a second user vector.
3. The method according to claim 1, characterized in that The clustering of the first user using the first user feature to obtain a plurality of clusters in the clusterer includes: Set a specified number of clusters, each of which has a center point; For each first user, calculating the distance between the first user feature and all the center points; dividing the first user into the cluster with the smallest distance; Determine whether a target value converges, the target value being the sum of squares of differences between each of the first user features and each of the center points; If yes, it is determined that the clustering is completed; If not, then in each of the clusters, the average value of all the first user features is calculated as a new center point, and the step of calculating the distance between the first user feature and all the center points for each first user is returned to be executed.
4. The method according to claim 1, characterized in that: The step of sampling the first user from the cluster as the target user using the second user feature in the sampler includes: determining a cluster adjacent to the second user as a first target cluster; assigning a first target value to each of the first target clusters respectively, wherein the distance from the second user to the first target cluster is positively correlated with the first target value; In each of the first target clusters, first users whose number of quality value samples is less than or equal to the first target value are respectively selected as target users.
5. The method according to claim 4, characterized in that The assigning a first target value to each of the first target clusters respectively includes: determining a first total number of samples to be sampled; determining a distance from the second user to the first target cluster; Normalizing the distance from the second user to the first target cluster as a weight; For each of the first target clusters, a first product between the first total number and the weight is calculated as a first target value.
6. The method according to claim 1, characterized in that The step of sampling the first user from the cluster as the target user using the second user feature in the sampler includes: determining a cluster where the first user, which is preferred by the second user, belongs, as a second target cluster; assigning a second target value to each of the second target clusters respectively, wherein the number of the first users in the second target cluster that include the second user preference is positively correlated with the second target value; In each of the second target clusters, first users whose number of quality value samples is less than or equal to the second target value are respectively selected as target users.
7. The method according to claim 6, characterized in that The assigning a second target value to each of the second target clusters respectively includes: determining a second total number of samples to be sampled; calculating the degree to which the second user prefers the first user as a preference value; Normalizing the preference value as a user weight; In each of the second target clusters, calculating the sum of the user weights as a cluster weight; For each of the second target clusters, a second product between the second total number and the cluster weight is calculated as a second target value.
8. The method according to claim 1, characterized in that The calculation is used to evaluate the target user's index, including: Counting the number of the target users preferred by the second user; Calculating a ratio between the number and the number of target users as an indicator for evaluating the accuracy of the target users; and / or, For the cluster where the target user is located, calculating the distance between the clusters; Calculate the average of the distances between the clusters; Multiplying the average value by the number of the target users in the cluster to obtain dispersion; Calculating a sum of the dispersions as an indicator for evaluating the diversity of the target users; and / or, Calculating the quality value of the target user; An average value of the quality values of the target user is calculated as an indicator for evaluating the quality of the target user.
9. The method according to any one of claims 1 to 8, characterized in that The updating of the clusterer and / or the sampler with the goal of optimizing the indicator includes: With the goal of improving the accuracy of evaluating the target user, at least one of the following update operations is performed: increasing the number of clusters in the clusterer; Increasing the number of first target clusters in the sampler, the first target cluster being a cluster adjacent to the second user; In the sampler, increase the number of the first user sampled in a second target cluster, where the second target cluster is a cluster where the first user, which is preferred by the second user, is located; and / or, With the goal of increasing the index for evaluating the diversity of the target users, at least one of the following update operations is performed: increasing the number of clusters in the clusterer; Increasing the number of first target clusters in the sampler, the first target cluster being a cluster adjacent to the second user; In the sampler, reducing the number of the first user sampled in a second target cluster, where the second target cluster is a cluster where the first user preferred by the second user is located; and / or, With the goal of increasing the indicator for evaluating the quality of the target user, at least one of the following update operations is performed: Adding a new threshold value in the sampler; increasing a threshold in the sampler; The threshold is used to filter the first user.
10. A user push method, characterized in that: include: When receiving a request sent by the client, loading a user screening model, the user screening model including a feature extractor, a clusterer, and a sampler, and the second user logs in to the client; In the feature extractor, extracting a first user feature from the user data of the first user and extracting a second user feature from the user data of the second user; In the clusterer, clustering the first user using the first user feature to obtain a plurality of clusters; In the sampler, a first user is sampled from the cluster using the second user feature as a target user, and the target user satisfies a preset evaluation index; The target user's information is pushed to the client for display; wherein the feature extractor includes an encoder and a deep neural network; in the feature extractor, extracting a first user feature from the user data of the first user and extracting a second user feature from the user data of the second user include: Acquire user data of the first user and user data of the second user; In the encoder, the user data of the first user is encoded into a first user vector, and the user data of the second user is encoded into a second user vector; In the deep neural network, the first user vector is mapped to a first user feature, and the second user vector is mapped to a second user feature; The acquiring the user data of the first user and the user data of the second user includes: Querying a first candidate user and a second candidate user, wherein the first candidate user is the first user who generates positive behavior towards the second user, and the second candidate user is the first user who generates negative behavior towards the second user; sorting the first candidate users according to the time when the second user generated the positive behavior; If the sorting is completed, adding a window for the first candidate user; In the process of sliding the window, taking the first candidate user ranked first in the window as a positive example, and taking the first candidate user ranked not first as a subsequence; Randomly select the second candidate user as a negative example; Setting the user IDs corresponding to the subsequence, the positive example, and the negative example as user data of the second user; The feature extractor is updated as follows: Calculating the similarity between the second user feature and the first user feature as a positive sample and the first user feature as a negative sample respectively; Calculating a loss value according to the similarity, wherein the loss value is negatively correlated with the similarity corresponding to the positive sample and positively correlated with the similarity corresponding to the negative sample; Updating the feature extractor according to the loss value; The step of calculating the loss value according to the similarity includes: activating the similarity; If the activation is successful, for each of the first users, a cross entropy is calculated based on the similarity, the positive samples, and the negative samples; The sum of all the cross entropies is calculated as the loss value.
11. A training device for a user screening model, characterized in that: The user screening model includes a feature extractor, a clusterer, and a sampler, and the device includes: A user determination module, used to determine a first user who produces multimedia data and a second user who consumes the multimedia data; a feature extraction module, configured to extract, in the feature extractor, a first user feature from the user data of the first user and a second user feature from the user data of the second user; A user clustering module, configured to cluster the first user using the first user feature in the clusterer to obtain a plurality of clusters; A user sampling module, configured to sample a first user from the cluster as a target user using the second user feature in the sampler; An evaluation index calculation module, used to calculate an index for evaluating the target user; A cluster sampling update module, used to update the clusterer and / or the sampler with the goal of optimizing the indicator; Wherein, the feature extractor includes an encoder and a deep neural network; the feature extraction module includes: A user data acquisition module, used to acquire user data of the first user and user data of the second user; A user vector encoding module, configured to encode the user data of the first user into a first user vector and the user data of the second user into a second user vector in the encoder; A user vector mapping module, used to map the first user vector to a first user feature and the second user vector to a second user feature in the deep neural network; The user data acquisition module includes: A candidate user query module, used to query a first candidate user and a second candidate user, wherein the first candidate user is the first user who has generated positive behavior with the second user, and the second candidate user is the first user who has generated negative behavior with the second user; A candidate user sorting module, used to sort the first candidate users according to the time when the second user generates positive behavior; a window adding module, configured to add a window to the first candidate user if the sorting is completed; A first user extraction module is used to select the first candidate user ranked first in the window as a positive example and the first candidate user not ranked first as a subsequence in the process of sliding the window; A second user extraction module, used for randomly extracting the second candidate user as a negative example; An ID setting module, configured to set the user IDs corresponding to the subsequence, the positive example and the negative example as user data of the second user; The device also includes: A similarity calculation module, used to calculate the similarity between the second user feature and the first user feature as a positive sample and the first user feature as a negative sample; A loss value calculation module, used to calculate a loss value according to the similarity, wherein the loss value is negatively correlated with the similarity corresponding to the positive sample and positively correlated with the similarity of the negative sample; A feature extractor updating module, used for updating the feature extractor according to the loss value; Wherein, the loss value calculation module includes: An activation module, used for activating the similarity; a cross entropy calculation module, configured to calculate the cross entropy for each of the first users based on the similarity, the positive samples, and the negative samples if the activation is successful; The cross entropy sum calculation module is used to calculate the sum of all the cross entropies as the loss value.
12. A user push device, characterized in that: include: A user screening model loading model, used to load a user screening model when receiving a request sent by a client, the user screening model including a feature extractor, a clusterer, and a sampler, and the second user logs in to the client; a feature extraction module, configured to extract, in the feature extractor, a first user feature from the user data of the first user and a second user feature from the user data of the second user; A user clustering module, configured to cluster the first user using the first user feature in the clusterer to obtain a plurality of clusters; A user sampling module, configured to, in the sampler, use the second user feature to sample a first user from the cluster as a target user, wherein the target user satisfies a preset evaluation index; A user information push module, used to push the target user's information to the client for display; Wherein, the feature extractor includes an encoder and a deep neural network; the feature extraction module includes: A user data acquisition module, used to acquire user data of the first user and user data of the second user; A user vector encoding module, configured to encode the user data of the first user into a first user vector and the user data of the second user into a second user vector in the encoder; A user vector mapping module, used to map the first user vector to a first user feature and the second user vector to a second user feature in the deep neural network; The user data acquisition module includes: A candidate user query module, used to query a first candidate user and a second candidate user, wherein the first candidate user is the first user who has generated positive behavior with the second user, and the second candidate user is the first user who has generated negative behavior with the second user; A candidate user sorting module, used to sort the first candidate users according to the time when the second user generates positive behavior; a window adding module, configured to add a window to the first candidate user if the sorting is completed; A first user extraction module is used to select the first candidate user ranked first in the window as a positive example and the first candidate user not ranked first as a subsequence in the process of sliding the window; A second user extraction module, used for randomly extracting the second candidate user as a negative example; An ID setting module, configured to set the user IDs corresponding to the subsequence, the positive example and the negative example as user data of the second user; The feature extractor calls the following module updates: A similarity calculation module, used to calculate the similarity between the second user feature and the first user feature as a positive sample and the first user feature as a negative sample; A loss value calculation module, used to calculate a loss value according to the similarity, wherein the loss value is negatively correlated with the similarity corresponding to the positive sample and positively correlated with the similarity of the negative sample; A feature extractor updating module, used for updating the feature extractor according to the loss value; Wherein, the loss value calculation module includes: An activation module, used for activating the similarity; a cross entropy calculation module, configured to calculate the cross entropy for each of the first users based on the similarity, the positive samples, and the negative samples if the activation is successful; The cross entropy sum calculation module is used to calculate the sum of all the cross entropies as the loss value.
13. A computer device, characterized in that: include: A feature extractor, configured to extract a first user feature from user data of a first user and a second user feature from user data of a second user; the first user is configured to produce multimedia data and the second user is configured to consume the multimedia data; a clusterer, configured to cluster the first user using the first user feature to obtain a plurality of clusters; A sampler, configured to sample a first user from the cluster using the second user feature as a target user, wherein the target user satisfies a preset evaluation indicator; Wherein, the feature extractor comprises: An encoder, configured to encode user data of a first user into a first user vector and encode user data of a second user into a second user vector; A deep neural network, used for mapping the first user vector to a first user feature and mapping the second user vector to a second user feature; The user data of the second user includes a subsequence, a user ID corresponding to a positive example and a negative example; The positive example is to add a window after sorting the first candidate users according to the time when the second user generates positive behavior, and the first candidate user ranked first in the window, and the subsequence is the first candidate user not ranked first in the window; The negative example is a randomly selected second candidate user; The first candidate user is the first user who generates positive behavior towards the second user, and the second candidate user is the first user who generates negative behavior towards the second user; The feature extractor is updated as follows: Calculating the similarity between the second user feature and the first user feature as a positive sample and the first user feature as a negative sample respectively; Calculating a loss value according to the similarity, wherein the loss value is negatively correlated with the similarity corresponding to the positive sample and positively correlated with the similarity corresponding to the negative sample; Updating the feature extractor according to the loss value; The step of calculating the loss value according to the similarity includes: activating the similarity; If the activation is successful, for each of the first users, a cross entropy is calculated based on the similarity, the positive samples, and the negative samples; The sum of all the cross entropies is calculated as the loss value.
14. A computer device, characterized in that: The computer device comprises: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the user screening model training method as described in any one of claims 1 to 9 or the user push method as described in claim 10.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the training method for the user screening model according to any one of claims 1 to 9 or the user push method according to claim 10 is implemented.
