User portrait method, device, computer-readable storage medium, and electronic device
Through clustering and tag association, the problem of thin user portraits is solved, the accuracy and richness of user portraits are improved, and the user experience is improved.
Patent Information
- Application Number
- CN201811513524.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-12-11
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2038-12-11
AI Technical Summary
In the existing technology, user portraits rely on few user-related items, and the labels are thin, making it difficult to accurately profile the user.
By determining the samples that similar users of the target user are interested in, and clustering other samples based on the samples, sample clusters are obtained, and then the target users are labeled according to the target samples in the sample clusters to ensure the relevance of the samples to the users. and richness.
It improves the accuracy and richness of user portraits, broadens the number and scope of target samples, improves user experience, and avoids confusion and inaccuracy of user portraits.
Smart Images

Figure CN109784367B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data analysis, and in particular, to a user profiling method, device, computer-readable storage medium, and electronic device. Background Art
[0002] At present, user portrait has become one of the functions that are sought after in various industries. The role of user portrait is to help merchants or customers accurately understand the needs, hobbies, interests and other aspects of users. In the prior art, the tags of items are usually delivered to users based on items related to the current user, such as items purchased by the user, to enrich the user's current user portrait. However, when there are fewer items related to the user, if the user's tags are only marked based on the items related to the user, the user portrait will be relatively thin, making it difficult to accurately portray the user. Summary of the invention
[0003] In order to solve the above problems, the purpose of the present disclosure is to provide an accurate user portrait method, device, computer-readable storage medium and electronic device.
[0004] In order to achieve the above objective, according to a first aspect of the present disclosure, a user profiling method is provided, the method comprising:
[0005] Determine at least one sample that at least one similar user of the target user is interested in as a first sample;
[0006] Performing clustering processing on samples to be clustered by taking each of the first samples as a cluster center to obtain sample clusters with the same number as the first samples, wherein the samples to be clustered are samples in the sample set excluding samples associated with the similar users and the target user;
[0007] Determine, from each of the sample clusters, a plurality of second samples that can represent the sample cluster, and determine each of the second samples as a target sample;
[0008] The target user is labeled according to the label associated with the target sample.
[0009] Optionally, the clustering process of taking each of the first samples as a cluster center to be clustered includes:
[0010] For each of the samples to be clustered, the distance between the sample to be clustered and each of the first samples is determined according to the label vector of the sample to be clustered and the user to which it belongs, and the sample to be clustered is divided into the sample cluster corresponding to the first sample with the shortest distance.
[0011] Optionally, according to the sample to be clustered and the label vector of the user to which it belongs, the distance between the sample to be clustered and each of the first samples is determined by the following formula:
[0012]
[0013] Wherein, D(X,Y) represents the distance between the sample to be clustered X and the first sample Y;
[0014] Indicates the user U to which the sample to be clustered belongs x and the user U to whom the first sample belongs y The similarity between
[0015] K represents the total number of labels associated with the sample to be clustered X and the first sample Y after duplication is removed;
[0016] x i Represents the weight of the label corresponding to the i-th dimension in the label vector of the sample to be clustered X;
[0017] y i Represents the weight of the label corresponding to the i-th dimension in the label vector of the first sample Y.
[0018] Optionally, determining a plurality of second samples that can represent each sample cluster from the sample cluster includes any one of the following:
[0019] In the corresponding sample cluster, the top T samples to be clustered and the first sample are determined as the second samples in descending order of distance from the first sample, where T is a positive integer;
[0020] In the corresponding sample cluster, the samples whose distances to the first sample are less than a preset distance threshold and the first sample are determined as the second samples.
[0021] Optionally, before the step of labeling the target user according to the label associated with the target sample, the method further includes:
[0022] Determine at least one non-similar user corresponding to the target user;
[0023] Determining a matching degree between the target sample and the target user according to a first matching degree between the target sample and the at least one similar user and a second matching degree between the target sample and the at least one non-similar user;
[0024] The step of labeling the target user according to the label associated with the target sample includes:
[0025] When the matching degree between the target sample and the target user exceeds a preset matching degree threshold, a label is added to the target user according to the label associated with the target sample.
[0026] Optionally, the first matching degree between the target sample and the at least one similar user is determined by the following formula:
[0027]
[0028] in, represents the first matching degree;
[0029] M represents the number of similar users;
[0030] P represents the label vector of the target sample;
[0031] X i Represents the label vector of the i-th similar user.
[0032] Optionally, the second matching degree between the target sample and the at least one non-similar user is determined by the following formula:
[0033]
[0034] in, represents the second matching degree;
[0035] N represents the number of non-similar users;
[0036] P represents the label vector of the target sample;
[0037] Y i Represents the label vector of the i-th non-similar user.
[0038] Optionally, determining the matching degree between the target sample and the target user according to a first matching degree between the target sample and the at least one similar user and a second matching degree between the target sample and the at least one non-similar user includes:
[0039] The difference between the weighted value of the first matching degree and the weighted value of the second matching degree is determined as the matching degree between the target sample and the target user.
[0040] Optionally, labeling the target user according to the label associated with the target sample includes:
[0041] Determine at least one label among the labels corresponding to the target sample that the target user does not currently have as a candidate label;
[0042] Determining matching parameters between each of the candidate tags and the target user;
[0043] According to the matching parameters between each candidate tag and the target user, a target tag that can be used to mark the target user is determined from the candidate tags, and the target tag is marked for the target user.
[0044] Optionally, determining a matching parameter between each candidate tag and the target user includes:
[0045] For each candidate tag, determine the proportion of the candidate tag in the tags of each similar user, and determine the proportion corresponding to each similar user as the first weight corresponding to the candidate tag and the similar user;
[0046] Determine the similarity between the tag vector formed by all candidate tags and the tag vector of each similar user, and determine the average value of the similarities as the second weight corresponding to each candidate tag;
[0047] According to the first weight and the second weight of the candidate tag, the matching parameter between the candidate tag and the target user is determined by the following formula:
[0048]
[0049] Wherein, Fit represents the matching parameter between the candidate tag and the target user;
[0050] M represents the number of similar users;
[0051] w whole A second weight representing the candidate tag w;
[0052] w i Represents the first weight corresponding to the candidate tag w and the i-th similar user.
[0053] Optionally, determining a target tag that can be used to mark the target user from the candidate tags according to a matching parameter between each of the candidate tags and the target user includes any one of the following:
[0054] Determine a candidate tag whose matching parameter with the target user is less than a preset matching threshold as the target tag;
[0055] The top S candidate tags ranked in ascending order of matching parameters with the target user are determined as the target tags, where S is a positive integer.
[0056] According to a second aspect of the present disclosure, a user portrait device is provided, the device comprising:
[0057] A first determining module, configured to determine at least one sample that is of interest to at least one similar user of the target user as a first sample;
[0058] A clustering module, configured to cluster samples to be clustered using each of the first samples as a cluster center to obtain sample clusters having the same number as the first samples, wherein the samples to be clustered are samples in the sample set excluding samples associated with the similar users and the target user;
[0059] A second determination module, configured to determine, from each of the sample clusters, a plurality of second samples that can represent the sample cluster, and determine each of the second samples as the target sample;
[0060] The labeling module is used to label the target user according to the label associated with the target sample.
[0061] Optionally, the clustering module is used to:
[0062] For each of the samples to be clustered, the distance between the sample to be clustered and each of the first samples is determined according to the label vector of the sample to be clustered and the user to which it belongs, and the sample to be clustered is divided into the sample cluster corresponding to the first sample with the shortest distance.
[0063] Optionally, the clustering module is used to determine the distance between the sample to be clustered and each of the first samples according to the label vector of the sample to be clustered and the user to which it belongs, by the following formula:
[0064]
[0065] Wherein, D(X,Y) represents the distance between the sample to be clustered X and the first sample Y;
[0066] Indicates the user U to which the sample to be clustered belongs x and the user U to whom the first sample belongs y The similarity between
[0067] K represents the total number of labels associated with the sample to be clustered X and the first sample Y after duplication is removed;
[0068] x i Represents the weight of the label corresponding to the i-th dimension in the label vector of the sample to be clustered X;
[0069] y i Represents the weight of the label corresponding to the i-th dimension in the label vector of the first sample Y.
[0070] Optionally, the second determining module includes any one of the following:
[0071] A first determination submodule is used to determine, in the corresponding sample cluster, the top T samples to be clustered and the first sample in descending order of distance from the first sample as the second sample, where T is a positive integer;
[0072] The second determination submodule is used to determine, in the corresponding sample cluster, a sample whose distance to the first sample is less than a preset distance threshold and the first sample as the second sample.
[0073] Optionally, the device further comprises:
[0074] A third determination module, configured to determine at least one non-similar user corresponding to the target user before the marking module marks a label for the target user according to the label associated with the target sample;
[0075] A fourth determination module, configured to determine a matching degree between the target sample and the target user according to a first matching degree between the target sample and the at least one similar user and a second matching degree between the target sample and the at least one non-similar user;
[0076] The marking module is used to mark a label for the target user according to the label associated with the target sample when the matching degree between the target sample and the target user exceeds a preset matching degree threshold.
[0077] Optionally, the fourth determination module is used to determine the first matching degree between the target sample and the at least one similar user by using the following formula:
[0078]
[0079] in, represents the first matching degree;
[0080] M represents the number of similar users;
[0081] P represents the label vector of the target sample;
[0082] X i Represents the label vector of the i-th similar user.
[0083] Optionally, the fourth determination module is used to determine the second matching degree between the target sample and the at least one non-similar user by using the following formula:
[0084]
[0085] in, represents the second matching degree;
[0086] N represents the number of non-similar users;
[0087] P represents the label vector of the target sample;
[0088] Y i Represents the label vector of the i-th non-similar user.
[0089] Optionally, the fourth determination module is used to determine a difference between a weighted value of the first matching degree and a weighted value of the second matching degree as the matching degree between the target sample and the target user.
[0090] Optionally, the marking module includes:
[0091] A third determination submodule is used to determine at least one label that the target user does not currently have among the labels corresponding to the target sample as a candidate label;
[0092] A fourth determination submodule, used to determine matching parameters between each candidate tag and the target user;
[0093] The marking submodule is used to determine a target tag that can be used to mark the target user from the candidate tags according to the matching parameters between each candidate tag and the target user, and mark the target tag for the target user.
[0094] Optionally, the fourth determining submodule includes:
[0095] A fifth determination submodule is used to determine, for each candidate tag, the proportion of the candidate tag in the tags of each similar user, and determine the proportion corresponding to each similar user as the first weight corresponding to the candidate tag and the similar user;
[0096] A sixth determination submodule, configured to determine the similarity between the tag vector formed by all candidate tags and the tag vector of each similar user, and determine the average value of the similarities as the second weight corresponding to each candidate tag;
[0097] The seventh determination submodule is used to determine the matching parameter between the candidate tag and the target user according to the first weight and the second weight of the candidate tag by using the following formula:
[0098]
[0099] Wherein, Fit represents the matching parameter between the candidate tag and the target user;
[0100] M represents the number of similar users;
[0101] w whole A second weight representing the candidate tag w;
[0102] wi Represents the first weight corresponding to the candidate tag w and the i-th similar user.
[0103] Optionally, the marking submodule includes any one of the following:
[0104] An eighth determination submodule, configured to determine a candidate tag whose matching parameter with the target user is less than a preset matching threshold as the target tag;
[0105] The ninth determination submodule is used to determine the top S candidate tags ranked in ascending order of matching parameters with the target user as the target tag, where S is a positive integer.
[0106] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of any method described in the first aspect are implemented.
[0107] According to a fourth aspect of the present disclosure, there is provided an electronic device, including:
[0108] a memory having a computer program stored thereon;
[0109] A processor is used to execute the computer program in the memory to implement the steps of any method described in the first aspect above.
[0110] In the above technical solution, by determining the samples that are of interest to similar users of the target user, and clustering other samples based on the samples of interest, a sample cluster centered on each sample of interest is obtained, and then the target sample is determined based on each sample cluster, and the target user is labeled based on the label associated with the target sample. Through the above technical solution, on the one hand, the relevance between the target sample and the target user can be guaranteed, and on the other hand, the number and range of target samples can be effectively broadened, thereby improving the accuracy and richness of user portraits and enhancing user experience.
[0111] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0112] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:
[0113] Figure 1 is a flow chart of a user portrait method provided according to an embodiment of the present disclosure;
[0114] Figure 2is a flow chart of a user portrait method provided according to another embodiment of the present disclosure;
[0115] Figure 3 is a flow chart of a user portrait method provided according to another embodiment of the present disclosure;
[0116] Figure 4 is a flow chart of a user portrait method provided according to another embodiment of the present disclosure;
[0117] Figure 5 is a flow chart of a user portrait method provided according to another embodiment of the present disclosure;
[0118] Figure 6 is a flow chart of a user portrait method provided according to another embodiment of the present disclosure;
[0119] Figure 7 is a flow chart of a user portrait method provided according to another embodiment of the present disclosure;
[0120] Figure 8 is a block diagram of a user portrait device provided according to an embodiment of the present disclosure;
[0121] Fig. 9 is a block diagram of an electronic device according to an exemplary embodiment;
[0122] Fig.10 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0123] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.
[0124] In view of the problems described in the background technology, the present disclosure provides a user profiling method, such as Figure 1 As shown, the method includes:
[0125] In S11, at least one sample that at least one similar user of the target user is interested in is determined as a first sample. The specific content of the sample can be determined according to the actual usage scenario. For example, when a user is profiled on a shopping website, the sample can be an item; when a user is profiled on a document library website, the sample can be a text.
[0126] Among them, the similarity between users can be determined based on the label vectors of each user. For example, the label vector of the user can be determined based on the label associated with the user. For example, when calculating the similarity between user X and user Y, the label obtained after deduplication of the labels associated with user X and user Y can be determined as the vector dimension. For any dimension, if the label associated with the user contains the label corresponding to the dimension, the value of the dimension in the user's label vector is 1. If the label associated with the user does not contain the label corresponding to the dimension, the value of the dimension in the user's label vector is 0, thereby determining the user's label vector. For example, the labels associated with user U1 are {a, d, f, g, h}, and the labels associated with user U2 are {a, b, c, f}. Therefore, when users U1 and U2 are vectorized, the dimension of the label vector obtained by deduplicating the labels of users U1 and U2 is {a, b, c, d, f, g, h}. Taking user U1 as an example, the label associated with user U1 is {a, d, f, g, h}. In the label vector corresponding to user U1, the dimension values corresponding to labels a, d, f, g, and h are 1, and the dimension values corresponding to labels b and c are 0. The label vector corresponding to user U1 is {1, 0, 0, 1, 1, 1, 1}, and the label vector corresponding to user U2 is {1, 1, 1, 0, 1, 0, 0}.
[0127] After determining the user's label vector, the similarity between users can be determined by calculating the similarity between the user's label vectors. For example, when the similarity between a user and a target user characterizes that the user is similar to the target user, the user can be determined as a similar user of the target user. The similarity can be characterized based on the distance between the vectors. For example, when the distance between the user's label vectors is less than a first threshold, the two are determined to be similar; it can also be characterized based on the cosine value of the angle between the vectors. For example, when the cosine value of the angle between the user's label vectors is greater than a second threshold, the two are determined to be similar. The first threshold and the second threshold can be set according to the actual usage scenario, and the present disclosure does not limit this.
[0128] When similar users are determined, the first sample can be determined based on the similar users. In this embodiment, the samples that similar users are interested in can be samples that have been viewed more frequently by similar users in a recent period of time. For example, if the total number of first samples is preset, such as 10, the samples associated with similar users can be ranked in descending order of their total number of views, and the top 10 samples can be determined as the first samples. For another example, a viewing threshold can also be set, and samples whose total number of views by similar users exceeds the viewing threshold can be determined as the first sample.
[0129] In S12, clustering is performed on samples to be clustered with each first sample as a cluster center to obtain sample clusters with the same number as the first sample, wherein the samples to be clustered are samples in the sample set except for samples associated with the similar user and the target user. The sample set can be determined according to the actual usage scenario. For example, when profiling a user on a shopping website, the sample set can be a set formed by all items on the shopping website.
[0130] In S13, a plurality of second samples that can represent the sample cluster are determined from each sample cluster, and each second sample is determined as a target sample.
[0131] For example, after determining the first sample, the samples in the sample set can be clustered according to the first sample, so that the second sample determined in each sample cluster is determined as the target sample. As described above, the first sample is determined based on the sample of interest to the similar user of the target user. Therefore, the samples other than the sample of interest associated with the similar user have a low correlation with the target user, and the sample of interest has been clustered as the cluster center. Therefore, when clustering the samples in the sample set, the samples associated with the similar user and the target user can be directly ignored, thereby effectively improving the clustering efficiency and effectively reducing the amount of data calculation.
[0132] In S14, a label is assigned to the target user according to the label associated with the target sample.
[0133] In one embodiment, all tags associated with the target samples may be marked for the target user, thereby enriching the profile of the target user.
[0134] In another embodiment, some tags may be selected to be tagged as target users according to the tagging time of the tags associated with the target samples. For example, the tags tagged with the target samples within the past three months may be tagged as target users.
[0135] In the above technical solution, by determining the samples that are of interest to similar users of the target user, and clustering other samples based on the samples of interest, a sample cluster centered on each sample of interest is obtained, and then the target sample is determined based on each sample cluster, and the target user is labeled based on the label associated with the target sample. Through the above technical solution, on the one hand, the relevance between the target sample and the target user can be guaranteed, and on the other hand, the number and range of target samples can be effectively broadened, thereby improving the accuracy and richness of user portraits and enhancing user experience.
[0136] Optionally, the clustering process of taking each of the first samples as a cluster center to be clustered includes:
[0137] For each of the samples to be clustered, the distance between the sample to be clustered and each of the first samples is determined according to the label vector of the sample to be clustered and the user to which it belongs, and the sample to be clustered is divided into the sample cluster corresponding to the first sample with the shortest distance.
[0138] Among them, a sample can be associated with multiple users. When determining the user to which the sample belongs, the user who is most compatible with the sample among the users associated with the sample can be determined as the user to which the sample belongs. Among them, the degree of matching between the sample and the user can be determined based on the similarity between the label vector of the sample and the label vector of the user associated with the sample. Among them, the method for determining the label vector of the sample and the label vector of the user is similar to the method for determining the label vector described above, and will not be repeated here. When the degree of matching is characterized by distance, if the distance between the label vector of the user and the label vector of the sample is the smallest, the user is determined to be the user to which the sample belongs; when the degree of matching is characterized by cosine value, if the cosine value of the angle between the label vector of the user and the label vector of the sample is the largest, the user is determined to be the user to which the sample belongs.
[0139] Optionally, according to the sample to be clustered and the label vector of the user to which it belongs, the distance between the sample to be clustered and each of the first samples is determined by the following formula:
[0140]
[0141] Wherein, D(X,Y) represents the distance between the sample to be clustered X and the first sample Y;
[0142] Indicates the user U to which the sample to be clustered belongs x and the user U to whom the first sample belongs y If the similarity is represented by distance, the user U to which the sample to be clustered belongs can be directly x and the user U to whom the first sample belongs y The distance between them is determined as the similarity; if the similarity is represented by a cosine value, the reciprocal of the cosine value can be determined as the similarity.
[0143] K represents the total number of labels associated with the sample to be clustered X and the first sample Y after duplication is removed;
[0144] x i Represents the weight of the label corresponding to the i-th dimension in the label vector of the sample to be clustered X;
[0145] y i Represents the weight of the label corresponding to the i-th dimension in the label vector of the first sample Y.
[0146] When calculating the similarity between the user to which the sample to be clustered belongs and the user to which the first sample belongs, the dimension of the corresponding label vector can be determined according to the labels associated with the two to ensure that the dimensions of the label vectors of the two are the same. The method for determining the label vector has been described in detail above and will not be repeated here.
[0147] Optionally, determining a plurality of second samples that can represent each sample cluster from each sample cluster includes any one of the following:
[0148] 1) In the corresponding sample cluster, the top T samples to be clustered and the first sample are determined as the second samples in descending order of distance from the first sample, where T is a positive integer.
[0149] Among them, the samples in the sample cluster that can represent the sample cluster are the samples near the virtual center of the sample cluster. For example, for any sample cluster, the first sample is the center of the corresponding sample cluster, and the first sample can be directly determined as the second sample; for the samples other than the first sample in the sample cluster, they can be sorted from large to small according to the distance between them and the first sample, thereby determining the samples near the virtual center of the sample cluster by selecting the top-ranked samples to be clustered, thereby determining each second sample.
[0150] 2) In the corresponding sample cluster, a sample whose distance to the first sample is less than a preset distance threshold and the first sample are determined as the second sample.
[0151] In another embodiment, each second sample may be determined by setting a distance threshold, wherein the distance threshold may be set according to actual usage.
[0152] Therefore, through the above technical solution, multiple second samples that can represent the sample cluster can be accurately determined from each sample cluster, thereby providing an accurate data basis for user profiling and effectively ensuring the accuracy of user profiling based on the target sample.
[0153] In addition, the inventors analyzed the process of user profiling and found that when profiling a user based on user-related samples, the user is profiled directly based on the user-associated samples, so that the labels corresponding to the samples that do not belong to the user are also marked, which will cause confusion in the user profile.
[0154] Therefore, in order to solve this problem, the present disclosure also provides a user portrait method, such as Figure 2 As shown, the method includes:
[0155] In S21, at least one similar user and at least one non-similar user corresponding to the target user are determined.
[0156] Among them, the method of determining similar users of the target user has been described in detail above and will not be repeated here. Similarly, non-similar users of the target user can be determined in the same way. After determining the similarity between each other user and the target user, when the similarity characterizes that the user is not similar to the target user, the user is determined as a non-similar user of the target user. For example, when the distance between the label vectors of the users is greater than the third threshold, it is determined that the two are not similar; for another example, when the cosine value of the angle between the label vectors of the users is less than the fourth threshold, it is determined that the two are not similar. Among them, the third threshold and the fourth threshold can be set according to actual usage, and the present disclosure does not limit this.
[0157] In S22, the matching degree between the target sample and the target user is determined according to the first matching degree between the target sample and at least one similar user and the second matching degree between the target sample and at least one non-similar user.
[0158] Among them, in this embodiment, when determining the matching degree between the target sample and the target user, not only similar users of the target user are considered, but also non-similar users of the target user are considered, so that the matching degree between the determined target sample and the target user is more comprehensive and accurate.
[0159] In S23, when the matching degree between the target sample and the target user exceeds a preset matching degree threshold, a label is added to the target user according to the label associated with the target sample.
[0160] For example, when the matching degree between the target sample and the target user exceeds a preset matching degree threshold, it indicates that the target sample and the target user are matched, that is, the label of the target sample can be marked as the label of the user.
[0161] Optionally, when the matching degree between the target sample and the target user does not exceed the matching degree threshold, the target sample may be directly ignored, and the label of the target sample is not marked for the target user.
[0162] In the prior art, when labeling a user, all samples associated with the user's account are usually regarded as samples related to the user. In actual situations, it is common for multiple users to operate on the same account. For example, user B can use user A's account to buy a book. The information related to this book should correspond to user B. If user A is directly labeled with the label of this book, the profile of user A may be confusing. For another example, if user A directly labels an item that he purchased but then returned, the profile of user A may also be confused if the label of user A is directly labeled according to the label of the root item.
[0163] Therefore, in the above technical solution, the matching degree between the target sample and the target user is determined based on the similar users of the target user and the non-similar users of the target user, so that when it is determined that the matching degree between the target sample and the target user exceeds the preset matching degree threshold, the target user is labeled according to the label associated with the target sample. Therefore, through the above technical solution, when the target sample matches the target user, the target user is labeled according to the target sample, so that it is possible to effectively avoid labeling the user with labels of samples that are not related to the user, effectively improve the accuracy of the user portrait, and enhance the user experience.
[0164] Optionally, the first matching degree between the target sample and at least one similar user is determined by the following formula:
[0165]
[0166] in, represents the first matching degree;
[0167] M represents the number of similar users;
[0168] P represents the label vector of the target sample;
[0169] X i represents the label vector of the i-th similar user, wherein the method for determining the label vector has been described in detail above and will not be repeated here.
[0170] Optionally, the second matching degree between the target sample and at least one non-similar user is determined by the following formula:
[0171]
[0172] in, represents the second matching degree;
[0173] N represents the number of non-similar users;
[0174] P represents the label vector of the target sample;
[0175] Y i Represents the label vector of the i-th non-similar user.
[0176] Among them, the first matching degree between the target sample and similar users, and the second matching degree between the target sample and non-similar users can be determined respectively through the above formulas. The higher the first matching degree, the higher the matching degree between the target sample and the target user; the lower the second matching degree, the lower the matching degree between non-similar users of the target sample, that is, the higher the matching degree between the target sample and the target user. Therefore, through the above technical solution, the matching degree between the target sample and the target user can be accurately measured, providing accurate data support for determining the target sample that matches the target user.
[0177] Optionally, the first matching degree between the target sample and at least one similar user and the second matching degree between the target sample and at least one non-similar user, determining the matching degree between the target sample and the target user, includes:
[0178] The difference between the weighted value of the first matching degree and the weighted value of the second matching degree is determined as the matching degree between the target sample and the target user.
[0179] For example, the matching degree between the target sample and the target user can be determined according to the following formula:
[0180]
[0181] in, Indicates the matching degree between the target sample and the target user;
[0182] α represents a weighted value, and for example, the value of α may be 0.6.
[0183] For example, when multiple users operate the same account, the target sample and the target user's matching degree can be considered laterally through the target user's non-similar users. The present disclosure is based on the idea that samples with a high matching degree with the target user's non-similar users have a low matching degree with the target user. When determining the matching degree between the target sample and the target user, the similarity between the target sample and the target user is considered based not only on the matching degree between the target sample and the similar users, but also on the matching degree between the target sample and the non-similar users. This effectively and accurately determines the matching degree between the target sample and the target user, provides accurate data support to ensure the accuracy of the user portrait, meets the user's usage needs, and further improves the user experience.
[0184] Optionally, when creating a user portrait, in view of the impact on the accuracy of the user portrait caused by the fact that there are few items related to the user as mentioned above and the user portrait is created directly based on the samples associated with the user, the present disclosure provides the following embodiments, specifically, Figure 3 As shown, the method includes:
[0185] In S31, at least one sample that at least one similar user of the target user is interested in is determined as a first sample;
[0186] In S32, clustering is performed on samples to be clustered with each first sample as a cluster center to obtain sample clusters having the same number as the first samples, wherein the samples to be clustered are samples in the sample set excluding samples associated with the similar users and the target user.
[0187] In S33, a plurality of second samples that can represent the sample cluster are determined from each sample cluster, and each second sample is determined as a target sample.
[0188] In S34, at least one similar user and at least one non-similar user corresponding to the target user are determined.
[0189] In S35 , the matching degree between the target sample and the target user is determined according to the first matching degree between the target sample and at least one similar user and the second matching degree between the target sample and at least one non-similar user.
[0190] In S36, when the matching degree between the target sample and the target user exceeds a preset matching degree threshold, a label is added to the target user according to the label associated with the target sample.
[0191] Among them, the specific implementation methods of S31, S32, and S33 are the same as those of S11, S12, and S13, and the specific implementation methods of S34, S35, and S36 are the same as those of S21, S22, and S23, which will not be repeated here.
[0192] It should be noted that the sequence shown in the above flowchart is only an exemplary implementation and does not limit the present disclosure. For example, step S34 of determining similar users and dissimilar users of the target user can be performed before S31, and S34 and S31 can also be performed simultaneously, which is not limited by the present disclosure.
[0193] In the above technical solution, the target samples can be determined by clustering, so that the number and range of target samples can be increased, providing a sample basis for enriching user portraits. When the target user is profiled according to the target sample, the matching degree between the target sample and the target user can be considered, so that the accuracy of the target sample can be effectively guaranteed while the range of the target sample is expanded, thereby ensuring the accuracy of the user portrait.
[0194] In addition, the inventors analyzed the process of user profiling and found that when adding labels to users based on sample labels, all labels of the sample are usually added directly to the user, which will cause labels that do not match the user profile to be marked, resulting in inaccurate user profiles. To address this problem, the present disclosure also provides a user profiling method, such as Figure 4 As shown, the method includes:
[0195] In S41, at least one tag among the tags corresponding to the target sample that the target user does not currently have is determined as a candidate tag. The target sample may be any sample labeled for the target user.
[0196] Among them, when labeling the user according to the label corresponding to the target sample, because the labels that the user already has do not need to be re-labeled, the labels that both the target sample and the target user have can be ignored, and only the labels that the target sample has but the target user does not have need to be judged.
[0197] In S42, the matching parameters between each candidate tag and the target user are determined. The matching parameters between the candidate tag and the target user are used to indicate whether the candidate tag matches the target user, thereby determining whether to mark the candidate tag for the target user.
[0198] In S43, according to the matching parameters between each candidate tag and the target user, a target tag that can be used to mark the target user is determined from the candidate tags, and the target tag is marked for the target user.
[0199] For example, according to the matching parameters between the candidate tags and the target user, the candidate tags matching the target user are determined as the target tags, so that the tags matching the target user in the target sample can be marked for the target user.
[0200] In the above technical solution, when labeling the target user according to the target sample, the candidate tags are first determined to avoid repeatedly labeling the user and improve the labeling efficiency. Afterwards, the matching parameters of each candidate tag and the target user are determined to determine the tags that can be labeled for the target user in the candidate tags. Therefore, through the above solution, the tags that match the target user in the candidate tags can be labeled for the user to ensure the accuracy of the tags labeled for the user, and effectively avoid the phenomenon in the prior art that all the tags of the target sample are added to the user, causing confusion or even errors in the user portrait. At the same time, it is also possible to effectively enrich the user's tags, making the user portrait richer and more accurate, and improving the user experience.
[0201] Optionally, in S42, an exemplary implementation of determining a matching parameter between each candidate tag and the target user is as follows, including:
[0202] For each candidate tag, determine the proportion of the candidate tag in the tags of at least one similar user of the target user, and determine the proportion corresponding to each similar user as the first weight corresponding to the candidate tag and the similar user.
[0203] Among them, the method of determining similar users of the target user has been described in detail above and will not be repeated here. After determining the similar users of the target user, determine the corresponding proportion of the candidate tag in the tags of each similar user. For example, similar user A does not have candidate tag a, then the first weight of candidate tag a corresponding to similar user A is 0, and similar user B has 10 tags including candidate tag a, then the first weight of candidate tag a corresponding to similar user B is 0.1 (that is, 1 / 10).
[0204] Determine the similarity between the tag vector formed by all candidate tags and the tag vector of each similar user, and determine the average value of the similarities as the second weight corresponding to each candidate tag;
[0205] The method of forming a label vector based on all candidate labels is similar to the method of generating the label vector described above, and will not be described in detail here. In this embodiment, the similarity can be calculated based on the label vector formed by all candidate labels and the label vector of each similar user, and then the average value of the similarity between the determined label vector and the label vector of each similar user is determined as the second weight of the candidate label.
[0206] According to the first weight and the second weight of the candidate tag, the matching parameter between the candidate tag and the target user is determined by the following formula:
[0207]
[0208] Wherein, Fit represents the matching parameter between the candidate tag and the target user;
[0209] M represents the number of similar users;
[0210] w whole A second weight representing the candidate tag w;
[0211] w i Represents the first weight corresponding to the candidate tag w and the i-th similar user.
[0212] Among them, the smaller the matching parameter between the candidate tag and the target user, the more the candidate tag matches the target user. The first weight corresponding to the candidate tag and each similar user represents the similarity between the candidate tag itself and the similar users of the target user, and the second weight can represent the similarity between all candidate tags and similar users. Therefore, when determining the matching parameters between the candidate tag and the target user, the matching parameters between the candidate tag and the target user can be determined based on all candidate tags, thereby effectively avoiding the influence of the tags that both the target sample and the target user have on the matching parameters, ensuring the accuracy of the determined matching parameters, and providing accurate data support for the subsequent determination of the target tag.
[0213] Optionally, according to the matching parameters between each candidate tag and the target user, a target tag that can be used to mark the target user is determined from the candidate tags, including any one of the following:
[0214] Determine the candidate tag whose matching parameter with the target user is less than a preset matching threshold as the target tag;
[0215] The top S candidate tags ranked in ascending order of matching parameters with the target user are determined as target tags, where S is a positive integer.
[0216] Among them, the matching threshold can be set according to actual usage, and the present disclosure does not limit this. In one embodiment, the smaller the matching parameter between the candidate tag and the target user, the higher the matching degree between the candidate tag and the target user. Therefore, the candidate tag whose matching parameter with the target user is less than the preset matching threshold can be directly determined as the target tag, thereby improving the efficiency of candidate tag determination and effectively ensuring the processing efficiency of user portraits. In another embodiment, the target tags can also be determined in order from small to large according to the matching parameters with the target user, so as to effectively ensure the number of target tags, effectively reduce the amount of data processing in the user portrait process, and improve the marking efficiency.
[0217] In order to further ensure the accuracy of the user portrait, the present disclosure also provides the following embodiment. In this embodiment, the influence of the above-mentioned fewer items related to the user and directly adding all the labels of the sample to the user to make a portrait for the user on the accuracy of the user portrait is comprehensively considered. The specific flow chart is as follows: Figure 5 As shown below:
[0218] In S51, at least one sample that at least one similar user of the target user is interested in is determined as a first sample;
[0219] In S52, clustering is performed on samples to be clustered with each first sample as a cluster center to obtain sample clusters having the same number as the first samples, wherein the samples to be clustered are samples in the sample set except samples associated with the similar users and the target user.
[0220] In S53, a plurality of second samples that can represent the sample cluster are determined from each sample cluster, and each second sample is determined as a target sample.
[0221] In S54, at least one tag among the tags corresponding to the target sample that the target user does not currently have is determined as a candidate tag.
[0222] In S55, the matching parameters between each candidate tag and the target user are determined. The matching parameters between the candidate tag and the target user are used to indicate whether the candidate tag matches the target user, thereby determining whether to mark the candidate tag for the target user.
[0223] In S56 , according to the matching parameters between each candidate tag and the target user, a target tag that can be used to mark the target user is determined from the candidate tags, and the target tag is marked for the target user.
[0224] Among them, the specific implementation methods of S51, S52, and S53 are the same as the specific implementation methods of S11, S12, and S13 mentioned above, and the specific implementation methods of S54, S55, and S56 are the same as the specific implementation methods of S41, S42, and S43 mentioned above, which will not be repeated here.
[0225] Through the above technical solution, on the one hand, the number and scope of target samples can be effectively broadened, thereby providing a data basis for user portraits. On the other hand, the accuracy of label marking can be effectively guaranteed, user portrait confusion can be avoided, and user experience can be improved.
[0226] In another embodiment, in order to further ensure the accuracy of the user portrait, the present disclosure also provides the following embodiment. In this embodiment, the influence of directly profiling the user based on the sample associated with the user and directly adding all the labels of the sample to the user on the accuracy of the user portrait is comprehensively considered. Specifically, Figure 6 As shown, the method includes:
[0227] In S61, at least one similar user and at least one non-similar user corresponding to the target user are determined.
[0228] In S62, the matching degree between the target sample and the target user is determined according to the first matching degree between the target sample and at least one similar user and the second matching degree between the target sample and at least one non-similar user.
[0229] In S63, when the matching degree between the target sample and the target user exceeds a preset matching degree threshold, at least one tag among the tags corresponding to the target sample that the target user does not currently have is determined as a candidate tag.
[0230] In S64, matching parameters between each candidate tag and the target user are determined.
[0231] In S65 , according to the matching parameters between each candidate tag and the target user, a target tag that can be used to mark the target user is determined from the candidate tags, and the target tag is marked for the target user.
[0232] Among them, the specific implementation methods of S61 and S62 are the same as those of S21 and S22, and the specific implementation methods of S63, S64, and S65 are similar to those of S41, S42, and S43, which will not be described in detail here. It should be noted that in S63, it is necessary to first determine whether the matching degree between the target sample and the target user exceeds the preset matching degree threshold. When it is determined that the matching degree between the target sample and the target user exceeds the preset matching degree threshold, at least one label in the label corresponding to the target sample that the target user does not currently have is determined as a candidate label. The specific implementation method of determining at least one label in the label corresponding to the target sample that the target user does not currently have as a candidate label has been described in detail in S41 and will not be described in detail here.
[0233] Therefore, in the above technical solution, it is first determined whether the target sample matches the target user. When it is determined that the matching degree between the target sample and the target user exceeds the preset matching degree threshold, the target user is profiled according to the label associated with the target sample, thereby ensuring the basic accuracy of the user portrait and effectively avoiding labeling the user with a sample that does not match the user. Afterwards, when labeling the target user according to the label of the target sample, the matching degree between the label and the user is determined by determining the matching parameters between the label and the user, thereby further ensuring the accuracy of the user labeling, which can not only enrich the user portrait, but also ensure the accuracy of the user portrait, and further improve the user experience.
[0234] Optionally, when creating a user portrait, the present disclosure provides the following embodiments to address the impact on the accuracy of the user portrait caused by the above-mentioned fewer items related to the user, directly creating a user portrait based on samples associated with the user, and directly adding all labels of samples to the user to create a user portrait. Specifically, Figure 7 As shown, the method includes:
[0235] In S71, at least one sample that at least one similar user of the target user is interested in is determined as a first sample;
[0236] In S72, clustering is performed on samples to be clustered with each first sample as a cluster center to obtain sample clusters having the same number as the first samples, wherein the samples to be clustered are samples in the sample set excluding samples associated with the similar users and the target user.
[0237] In S73, a plurality of second samples that can represent the sample cluster are determined from each sample cluster, and each second sample is determined as a target sample.
[0238] In S74, at least one similar user and at least one non-similar user corresponding to the target user are determined.
[0239] In S75 , the matching degree between the target sample and the target user is determined according to the first matching degree between the target sample and at least one similar user and the second matching degree between the target sample and at least one non-similar user.
[0240] In S76, when the matching degree between the target sample and the target user exceeds a preset matching degree threshold, at least one tag among the tags corresponding to the target sample that the target user does not currently have is determined as a candidate tag.
[0241] In S77, matching parameters between each candidate tag and the target user are determined.
[0242] In S78, according to the matching parameters between each candidate tag and the target user, a target tag that can be used to mark the target user is determined from the candidate tags, and the target tag is marked for the target user.
[0243] Among them, the specific implementation methods of S71, S72, and S73 are the same as the specific implementation methods of S11, S12, and S113, the specific implementation methods of S74 and S75 are the same as the specific implementation methods of S21 and S22, and the specific implementation methods of S76, S77, and S78 are similar to the specific implementation methods of S41, S42, and S43, which will not be repeated here. It should be noted that in S76, it is necessary to first determine whether the matching degree between the target sample and the target user exceeds the preset matching degree threshold. When it is determined that the matching degree between the target sample and the target user exceeds the preset matching degree threshold, at least one label in the label corresponding to the target sample that the target user does not currently have is determined as a candidate label. The specific implementation method of determining at least one label in the label corresponding to the target sample that the target user does not currently have as a candidate label has been detailed in S41 and will not be repeated here.
[0244] Through the above technical solution, on the one hand, the number and scope of samples for marking user portraits can be effectively expanded, providing data support for enriching user portraits. At the same time, it can effectively ensure the matching degree between samples and users when marking user portraits, further ensure the accuracy of labels for user portraits, and make user portraits more accurate. In addition, when labeling users with labels based on sample associations, by considering the matching degree between labels and users, it is possible to effectively avoid the problem of confusing user portraits caused by labeling users with labels that do not match them, further improving the user experience.
[0245] The present disclosure also provides a user portrait device, such as Figure 8 As shown, the device 10 comprises:
[0246] A first determination module 100, configured to determine at least one sample that is of interest to at least one similar user of the target user as a first sample;
[0247] A clustering module 200 is used to perform clustering processing on samples to be clustered by taking each of the first samples as a cluster center to obtain sample clusters having the same number as the first samples, wherein the samples to be clustered are samples in the sample set excluding samples associated with the similar users and the target user;
[0248] A second determination module 300 is used to determine, from each of the sample clusters, a plurality of second samples that can represent the sample cluster, and determine each of the second samples as the target sample;
[0249] The labeling module 400 is used to label the target user according to the label associated with the target sample.
[0250] Optionally, the clustering module 200 is used to:
[0251] For each of the samples to be clustered, the distance between the sample to be clustered and each of the first samples is determined according to the label vector of the sample to be clustered and the user to which it belongs, and the sample to be clustered is divided into the sample cluster corresponding to the first sample with the shortest distance.
[0252] Optionally, the clustering module 200 is used to determine the distance between the sample to be clustered and each of the first samples according to the label vector of the sample to be clustered and the user to which it belongs, by the following formula:
[0253]
[0254] Wherein, D(X,Y) represents the distance between the sample to be clustered X and the first sample Y;
[0255] Indicates the user U to which the sample to be clustered belongsx and the user U to whom the first sample belongs y The similarity between
[0256] K represents the total number of labels associated with the sample to be clustered X and the first sample Y after duplication is removed;
[0257] x i Represents the weight of the label corresponding to the i-th dimension in the label vector of the sample to be clustered X;
[0258] y i Represents the weight of the label corresponding to the i-th dimension in the label vector of the first sample Y.
[0259] Optionally, the second determining module 300 includes any one of the following:
[0260] A first determination submodule is used to determine, in the corresponding sample cluster, the top T samples to be clustered and the first sample in descending order of distance from the first sample as the second sample, where T is a positive integer;
[0261] The second determination submodule is used to determine, in the corresponding sample cluster, a sample whose distance to the first sample is less than a preset distance threshold and the first sample as the second sample.
[0262] Optionally, the device further comprises:
[0263] A third determination module, configured to determine at least one non-similar user corresponding to the target user before the marking module marks a label for the target user according to the label associated with the target sample;
[0264] A fourth determination module, configured to determine a matching degree between the target sample and the target user according to a first matching degree between the target sample and the at least one similar user and a second matching degree between the target sample and the at least one non-similar user;
[0265] The marking module is used to mark a label for the target user according to the label associated with the target sample when the matching degree between the target sample and the target user exceeds a preset matching degree threshold.
[0266] Optionally, the fourth determination module is used to determine the first matching degree between the target sample and the at least one similar user by using the following formula:
[0267]
[0268] in, represents the first matching degree;
[0269] M represents the number of similar users;
[0270] P represents the label vector of the target sample;
[0271] X i Represents the label vector of the i-th similar user.
[0272] Optionally, the fourth determination module is used to determine the second matching degree between the target sample and the at least one non-similar user by using the following formula:
[0273]
[0274] in, represents the second matching degree;
[0275] N represents the number of non-similar users;
[0276] P represents the label vector of the target sample;
[0277] Y i Represents the label vector of the i-th non-similar user.
[0278] Optionally, the fourth determination module is used to determine a difference between a weighted value of the first matching degree and a weighted value of the second matching degree as the matching degree between the target sample and the target user.
[0279] Optionally, the marking module includes:
[0280] A third determination submodule is used to determine at least one label that the target user does not currently have among the labels corresponding to the target sample as a candidate label;
[0281] A fourth determination submodule, used to determine matching parameters between each candidate tag and the target user;
[0282] The marking submodule is used to determine a target tag that can be used to mark the target user from the candidate tags according to the matching parameters between each candidate tag and the target user, and mark the target tag for the target user.
[0283] Optionally, the fourth determining submodule includes:
[0284] A fifth determination submodule is used to determine, for each candidate tag, the proportion of the candidate tag in the tags of each similar user, and determine the proportion corresponding to each similar user as the first weight corresponding to the candidate tag and the similar user;
[0285] A sixth determination submodule, configured to determine the similarity between the tag vector formed by all candidate tags and the tag vector of each similar user, and determine the average value of the similarities as the second weight corresponding to each candidate tag;
[0286] The seventh determination submodule is used to determine the matching parameter between the candidate tag and the target user according to the first weight and the second weight of the candidate tag by using the following formula:
[0287]
[0288] Wherein, Fit represents the matching parameter between the candidate tag and the target user;
[0289] M represents the number of similar users;
[0290] w whole A second weight representing the candidate tag w;
[0291] w i Represents the first weight corresponding to the candidate tag w and the i-th similar user.
[0292] Optionally, the marking submodule includes any one of the following:
[0293] An eighth determination submodule, configured to determine a candidate tag whose matching parameter with the target user is less than a preset matching threshold as the target tag;
[0294] The ninth determination submodule is used to determine the top S candidate tags ranked in ascending order of matching parameters with the target user as the target tag, where S is a positive integer.
[0295] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0296] Fig. 9 FIG. 7 is a block diagram of an electronic device 700 according to an exemplary embodiment. Fig. 9 As shown, the electronic device 700 may include: a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input / output (I / O) interface 704, and a communication component 705.
[0297] Among them, the processor 701 is used to control the overall operation of the electronic device 700 to complete all or part of the steps in the above-mentioned user portrait method. The memory 702 is used to store various types of data to support the operation of the electronic device 700, which may include, for example, instructions for any application or method used to operate on the electronic device 700, and application-related data, such as contact data, messages sent and received, pictures, audio, video, etc. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, disk or optical disk. The multimedia component 703 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 702 or sent via the communication component 705. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 704 provides an interface between the processor 701 and other interface modules, and the other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more thereof, so the corresponding communication component 705 may include: Wi-Fi module, Bluetooth module, NFC module.
[0298] In an exemplary embodiment, the electronic device 700 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned user profiling method.
[0299] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned user portrait method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 702 including program instructions, and the above-mentioned program instructions can be executed by the processor 701 of the electronic device 700 to complete the above-mentioned user portrait method.
[0300] Fig.10 1 is a block diagram of an electronic device 1900 according to an exemplary embodiment. For example, the electronic device 1900 may be provided as a server. Fig.10 The electronic device 1900 includes a processor 1922, which may be one or more, and a memory 1932 for storing a computer program executable by the processor 1922. The computer program stored in the memory 1932 may include one or more modules each corresponding to a set of instructions. In addition, the processor 1922 may be configured to execute the computer program to perform the above-mentioned user profiling method.
[0301] In addition, the electronic device 1900 may further include a power supply component 1926 and a communication component 1950, wherein the power supply component 1926 may be configured to perform power management of the electronic device 1900, and the communication component 1950 may be configured to implement communication of the electronic device 1900, for example, wired or wireless communication. In addition, the electronic device 1900 may further include an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, etc.
[0302] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned user portrait method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 1932 including program instructions, and the above-mentioned program instructions can be executed by the processor 1922 of the electronic device 1900 to complete the above-mentioned user portrait method.
[0303] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.
[0304] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.
[0305] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.
Claims
1. A user profiling method, characterized in that: The method comprises: Determine at least one sample that at least one similar user of the target user is interested in as a first sample; Performing clustering processing on samples to be clustered by taking each of the first samples as a cluster center to obtain sample clusters with the same number as the first samples, wherein the samples to be clustered are samples in the sample set excluding samples associated with the similar users and the target user; Determine, from each of the sample clusters, a plurality of second samples that can represent the sample cluster, and determine each of the second samples as a target sample; Labeling the target user according to the label associated with the target sample; The step of performing clustering processing on the clustered samples by taking each of the first samples as a cluster center includes: For each of the samples to be clustered, according to the label vector of the sample to be clustered and the user to which it belongs, determine the distance between the sample to be clustered and each of the first samples, and divide the sample to be clustered into the sample cluster corresponding to the first sample with the shortest distance; According to the label vector of the sample to be clustered and the user to which it belongs, the distance between the sample to be clustered and each of the first samples is determined by the following formula: in, Represents samples to be clustered X and the first sample Y The distance between Indicates the user to which the sample to be clustered belongs and the user to whom the first sample belongs The similarity between Represents the samples to be clustered X and the first sample Y The total number of associated tags after deduplication; Represents the samples to be clustered X The label vector of i The weight of the label corresponding to the dimension; Indicates the first sample Y The label vector of i The weight of the label corresponding to the dimension.
2. The method according to claim 1, characterized in that: The step of determining, from each of the sample clusters, a plurality of second samples that can represent the sample cluster includes any one of the following: In the corresponding sample cluster, the top T samples to be clustered and the first sample are determined as the second samples in descending order of distance from the first sample, where T is a positive integer; In the corresponding sample cluster, the samples whose distances to the first sample are less than a preset distance threshold and the first sample are determined as the second samples.
3. The method according to claim 1, characterized in that Before the step of labeling the target user according to the label associated with the target sample, the method further includes: Determine at least one non-similar user corresponding to the target user; Determining a matching degree between the target sample and the target user according to a first matching degree between the target sample and the at least one similar user and a second matching degree between the target sample and the at least one non-similar user; The step of labeling the target user according to the label associated with the target sample includes: When the matching degree between the target sample and the target user exceeds a preset matching degree threshold, labeling the target user according to the label associated with the target sample; The step of determining the matching degree between the target sample and the target user according to the first matching degree between the target sample and the at least one similar user and the second matching degree between the target sample and the at least one non-similar user includes: The difference between the weighted value of the first matching degree and the weighted value of the second matching degree is determined as the matching degree between the target sample and the target user.
4. The method according to claim 3, characterized in that The first matching degree between the target sample and the at least one similar user is determined by the following formula: in, represents the first matching degree; represents the number of similar users; A label vector representing the target sample; Indicates i The label vectors of similar users.
5. The method according to claim 3, characterized in that: The second matching degree between the target sample and the at least one non-similar user is determined by the following formula: in, represents the second matching degree; represents the number of the non-similar users; A label vector representing the target sample; Indicates i The label vectors of non-similar users.
6. The method according to any one of claims 2 to 5, characterized in that: The step of labeling the target user according to the label associated with the target sample includes: Determine at least one label among the labels corresponding to the target sample that the target user does not currently have as a candidate label; Determining matching parameters between each of the candidate tags and the target user; According to the matching parameters between each candidate tag and the target user, determining a target tag that can be used to mark the target user from the candidate tags, and marking the target tag for the target user; The step of determining the matching parameters between each candidate tag and the target user includes: For each candidate tag, determine the proportion of the candidate tag in the tags of each similar user, and determine the proportion corresponding to each similar user as the first weight corresponding to the candidate tag and the similar user; Determine the similarity between the tag vector formed by all candidate tags and the tag vector of each similar user, and determine the average value of the similarities as the second weight corresponding to each candidate tag; According to the first weight and the second weight of the candidate tag, the matching parameter between the candidate tag and the target user is determined by the following formula: in, Indicates the matching parameters between the candidate tag and the target user; represents the number of similar users; Represents the candidate label w The second weight of Represents the candidate label w With i The first weight corresponding to similar users.
7. The method according to claim 6, characterized in that The determining, from the candidate tags, a target tag that can be used to mark the target user according to the matching parameters between each of the candidate tags and the target user, includes any one of the following: Determine a candidate tag whose matching parameter with the target user is less than a preset matching threshold as the target tag; The top S candidate tags ranked in ascending order of matching parameters with the target user are determined as the target tags, where S is a positive integer.
8. A user portrait device, characterized in that: The device comprises: A first determining module, configured to determine at least one sample that is of interest to at least one similar user of the target user as a first sample; A clustering module, configured to cluster samples to be clustered using each of the first samples as a cluster center to obtain sample clusters having the same number as the first samples, wherein the samples to be clustered are samples in the sample set excluding samples associated with the similar users and the target user; A second determination module, configured to determine, from each of the sample clusters, a plurality of second samples that can represent the sample cluster, and determine each of the second samples as a target sample; A labeling module, used to label the target user according to the label associated with the target sample; Wherein, the clustering module is used for: For each of the samples to be clustered, according to the label vector of the sample to be clustered and the user to which it belongs, determine the distance between the sample to be clustered and each of the first samples, and divide the sample to be clustered into the sample cluster corresponding to the first sample with the shortest distance; The clustering module is used to determine the distance between the sample to be clustered and each of the first samples according to the label vector of the sample to be clustered and the user to which it belongs, by the following formula: in, Represents samples to be clustered X and the first sample Y The distance between Indicates the user to which the sample to be clustered belongs and the user to whom the first sample belongs The similarity between Represents the samples to be clustered X and the first sample Y The total number of associated tags after deduplication; Represents the samples to be clustered X The label vector of i The weight of the label corresponding to the dimension; Indicates the first sample Y The label vector of i The weight of the label corresponding to the dimension.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 7.
