A user multi-preference portrait construction method and device and a storage medium
By acquiring user app access behavior metrics, and using entropy weighting and KMeans clustering algorithms to generate user preference profiles, the problem of inaccurate preference attribute identification in existing technologies is solved, and the accuracy and diversity of user preference profiles are quantified.
Patent Information
- Application Number
- CN202311174717.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-12
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2043-09-12
AI Technical Summary
In existing technologies, operators determine users' preference attributes by identifying the frequency of their access to different APP applications, ignoring the differences in the importance of each user's preference attribute. This results in inaccurate preference determination and low precision in product recommendations and services.
By acquiring user access behavior metrics for various apps, multiple preference categories are identified. The entropy weight method is used to calculate preference category scores and preference degree scores. Combined with the KMeans clustering algorithm, clustering is performed to generate a more accurate user preference profile.
It enables accurate identification of user preference attributes, improves the accuracy of product recommendations and services, quantifies the differences between user preferences, and supports personalized marketing strategies.
Smart Images

Figure CN117216610B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and more specifically, to a method, apparatus, and storage medium for constructing a user multi-preference profile. Background Technology
[0002] With the rapid development of the mobile internet, various APP applications targeting different user groups have emerged on the market. Determining the preferences of each user is of great significance for the development and promotion of APP applications.
[0003] Operators can analyze users' internet browsing history, resolve the domain names and paths of the URLs linked to by users to identify the apps they are using, and identify user preferences by their access behavior to these apps.
[0004] However, in existing technologies, operators only determine users' preference attributes by identifying the frequency of their access to different APP applications, ignoring the differences in the importance of each user's preference attribute. This makes the determination of user preferences inaccurate. Product recommendations and services based solely on preference tags determined by the frequency of users' access to APP applications can easily lead to problems such as inaccurate target group segmentation, unclear marketing priorities, and low product acceptance success rates. Summary of the Invention
[0005] This application provides a method, apparatus, and storage medium for constructing a user multi-preference profile, aiming to generate a more accurate user preference profile.
[0006] In a first aspect, embodiments of this application provide a method for constructing a user multi-preference profile, applied on a server side, the method comprising:
[0007] Obtain access behavior metrics for each app for each user among multiple users, and determine multiple preference categories for each user;
[0008] Based on the access behavior metrics of multiple apps corresponding to each user's each preference category, determine the preference category score corresponding to each user's multiple preference categories;
[0009] Based on the access behavior metrics of multiple apps corresponding to multiple users in each preference category, determine the preference score for each preference category corresponding to each user;
[0010] Based on the preference scores of each user, the users corresponding to the multiple preference categories are clustered and graded to determine the preference level label of each user in different preference categories.
[0011] The preference category score, preference degree score, and preference degree level label in different preference categories corresponding to each user are used as the preference profile of each user.
[0012] Optionally, the access behavior metrics of each app for each user among multiple users are obtained to determine multiple preference categories corresponding to each user, including:
[0013] Obtain the internet URL data of each user and determine the names of the multiple apps accessed by each user;
[0014] Based on the URL data packet of each user accessing any APP, determine the access behavior indicators of each of the multiple APPs accessed by each user.
[0015] Based on the names of the multiple apps and the preset app category information, multiple preference categories are determined for each user. The preset app category information stores the correspondence between app names and preference categories.
[0016] Optionally, based on the names of the various apps and preset app category information, multiple preference categories corresponding to each user are determined, including:
[0017] When the name of any APP matches the name of an APP in the preset APP category information, the preference category corresponding to the APP with the same name in the preset APP category information is taken as the preference category of each user.
[0018] When no app name has a matching name in the preset app category information, cosine similarity is calculated for the vectorized app name and the app names in the preset app category information. The preference category corresponding to the app name in the app category information with the highest cosine similarity is taken as the preference category for each user.
[0019] Optionally, based on the access behavior metrics of multiple apps corresponding to each user's preference category, a preference category score is determined for each user's multiple preference categories, including:
[0020] Based on the access behavior metrics of multiple apps corresponding to any one preference category of each user, determine the total access behavior metrics of apps in that preference category;
[0021] The entropy weight method is used to calculate the first weight of the total APP access behavior index for each user's preference category, and the normalized values of the total APP access behavior index corresponding to each preference type are weighted and summed to obtain the preference category score for each user's multiple preference categories.
[0022] Optionally, based on the access behavior metrics of multiple apps corresponding to multiple users in each preference category, a preference score for each preference category corresponding to each user is determined, including:
[0023] For any preference category, the total access behavior index of each user for that preference category is determined based on the access behavior index of each user for multiple apps corresponding to that preference category.
[0024] The entropy weight method is used to calculate the second weight of the total APP access behavior index of multiple users under any preference category, and the normalized value of the total APP access behavior index of each user under the preference category is weighted and summed to obtain the preference degree score of each user in the preference category.
[0025] This process continues until all preference categories have been traversed, at which point the preference score for each user in each preference category is determined.
[0026] Optionally, based on the preference scores of each of the multiple users, clustering and classifying the multiple users corresponding to the multiple preference categories is performed to determine the preference level label of each user in different preference categories, including:
[0027] Based on the preference scores of each user in multiple preference categories, the KMeans clustering algorithm is used to cluster and classify the multiple users corresponding to the multiple preference categories to determine the preference level label of each user in different preference categories.
[0028] Optionally, obtain access behavior metrics for each app for each user among multiple users, including:
[0029] The number of visits, clicks, traffic, and days of access for each user for any given app are obtained, and the number of visits, clicks, traffic, and days of access for that app are used as access behavior metrics for that app.
[0030] Optionally, the process of determining the total app access behavior metrics for each user across any preference category includes:
[0031] The total number of visits and clicks for each user in any preference category is obtained by summing the number of visits and clicks for each user in that preference category across multiple APP access behavior metrics.
[0032] The total access traffic of each user in any preference category is obtained by summing the access traffic of each user in multiple APP access behavior metrics.
[0033] The maximum number of access days for each user across multiple APP access behavior metrics corresponding to any preference category is taken as the total number of access days for each user in that preference category.
[0034] The total number of visits and clicks, total traffic, and total number of days of visits for each user in this preference category will be used as the total APP access behavior indicators for each user in this preference category.
[0035] Secondly, embodiments of this application provide a user multi-preference profile construction apparatus, applied on a server side, the apparatus comprising:
[0036] The preference category determination module is used to obtain access behavior indicators of each APP for each user among multiple users, and determine multiple preference categories corresponding to each user.
[0037] The preference category score determination module is used to determine the preference category score corresponding to each user's multiple preference categories based on the access behavior indicators of multiple apps corresponding to each user's preference category.
[0038] The preference score determination module is used to determine the preference score for each user in each preference category based on the access behavior indicators of multiple apps corresponding to multiple users in each preference category.
[0039] The preference level label determination module is used to cluster and classify multiple users corresponding to multiple preference categories based on the preference level scores of each user, and determine the preference level label of each user in different preference categories.
[0040] The preference profile determination module is used to use the preference category score, preference degree score, and preference degree level label in different preference categories for each user as the preference profile of each user.
[0041] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the user multi-preference profile construction method as described in the first aspect of the embodiments.
[0042] Beneficial effects:
[0043] The process involves: acquiring access behavior metrics for each app for each user across multiple users; determining multiple preference categories for each user; determining preference category scores for each preference category based on the access behavior metrics for each app for each user; determining preference intensity scores for each preference category based on the access behavior metrics for each app for each user within each preference category; clustering and classifying the multiple users corresponding to the multiple preference categories based on their respective preference intensity scores; and using the preference category scores, preference intensity scores, and preference intensity level labels for each user as the preference profile for each user.
[0044] This method determines the preference category score for each user in each preference category, as well as the preference degree score for different users under each preference. This can reflect the user's preferences and determine the degree of liking for different preferences. It also determines the preference differences among different users under the same preference type. By measuring user preferences from multiple perspectives, a more accurate user preference profile can be obtained. Attached Figure Description
[0045] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a flowchart of the steps of a user multi-preference profile construction method proposed in an embodiment of this application;
[0047] Figure 2 This is a schematic diagram illustrating the calculation of user preference category scores based on the entropy weight method according to an embodiment of this application;
[0048] Figure 3 This is a schematic diagram illustrating the calculation of user preference scores based on the entropy weight method according to an embodiment of this application;
[0049] Figure 4 This is a functional block diagram of a user multi-preference profile construction device proposed in an embodiment of this application. Detailed Implementation
[0050] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0051] Currently, when determining user preferences, the frequency of a user's access to different apps is used to determine their preference attributes. This ignores the differences between different user preferences and the degree of difference between different users of the same preference. As a result, the user preference profile is not accurate enough, which leads to problems such as inaccurate marketing target segmentation and low product recommendation accuracy. Therefore, this application provides a method for constructing a multi-preference profile of users, which can obtain a more accurate user preference profile.
[0052] Reference Figure 1 This document illustrates a flowchart of a user multi-preference profile construction method according to an embodiment of this application, applied to a server. The method specifically includes the following steps:
[0053] S101: Obtain access behavior metrics for each app corresponding to each user among multiple users, and determine multiple preference categories corresponding to each user.
[0054] In one feasible implementation, the internet URL data of each user can be obtained first, and then the names of the multiple apps accessed by each user can be determined.
[0055] A URL (Uniform Resource Locator) is a concise representation of the location and access method of a resource that can be obtained from the Internet. It is the address of a standard resource on the Internet, and every file on the Internet has a unique URL.
[0056] A basic URL includes a pattern (or protocol), server name (or IP address), path, and filename, such as "protocol: / / authorization / path?query"; a complete Uniform Resource Identifier (URI) with the authorization part has the following syntax: protocol: / / username:password@subdomain.domain.top-level domain:port / directory / filename.file extension?parameter=value#flag.
[0057] By obtaining each user's internet URL data, the domain name information in the URL can be used to parse the various apps accessed by the user. In actual implementation, an app access list can also be created for each user. Each user's app access list records the user's access data for each app within a preset time period. By parsing each user's app access list, based on the URL data packet of each user accessing any app, such as the file memory usage of the URL data packet, the access behavior indicators of each app accessed by each user can be determined.
[0058] In actual implementation, the internet URL data of each user within a preset time period can be obtained and processed. For example, the preset time period can be each month or each quarter.
[0059] In one feasible implementation, APP classification information can be pre-built, which can reflect the mapping relationship between each APP and the preference type.
[0060] Specifically, the operator's terminal equipment, such as servers, can pre-crawl app category information from app information aggregation websites, such as iResearch's mobile app index website. Based on the position and format of the app category information in the HTML source code of the app information aggregation website, a web crawler code based on the Requests or Scrapy library is written using the Python programming language. This web crawler code sends HTTP requests and retrieves the web page content of the app information aggregation website. The web page content is then parsed using HTML parsing libraries, such as Beautiful Soup or lxml, to extract the app category information and store it in the terminal device's database. The app category information includes the specific app name, internet category, and the corresponding preference category for that app. For example, the app category information can be stored in the database in the form of a table, as shown in Table 1.
[0061] Table 1. App Category Information
[0062]
[0063]
[0064] The primary and secondary categories of the Internet for an app are category information crawled from an app information aggregation website. The preference category dimension table corresponding to the Internet category can be stored in the database of the server in advance. For example, the preference category dimension table corresponding to the Internet category is shown in Table 2.
[0065] Table 2. Dimensional table of preference categories corresponding to Internet categories
[0066]
[0067]
[0068] For an app, the app's preference category can be determined based on the app's primary and secondary internet categories and the preset preference category dimension table corresponding to the internet categories. The app's classification information is then updated in Table 1.
[0069] For example, APP1 is named "Taobao", and its primary internet category is "e-commerce". According to the corresponding preference category dimension table for internet categories, such as the correspondence stored in Table 2, it can be determined that the "Taobao" APP belongs to the "iShopping" preference category; APP2 is named "Tencent Video", and its primary internet category is "video service". According to the correspondence in Table 2, it can be determined that the APP belongs to the "iVideo" preference category.
[0070] By parsing the URL data of each app in each user's app access list, the name of each app accessed by the user can be obtained. Then, based on the names of the multiple apps and the preset app category information, multiple preference categories corresponding to each user can be determined.
[0071] Specifically, when the name of any APP accessed by a user matches the name of an APP in the preset APP category information, the preference category corresponding to the APP with the same name in the preset APP category information is taken as the preference category of each user.
[0072] For example, when the name of an app in a user's app access list is "Taobao", the user can directly map the preference category corresponding to "Taobao" to "iShopping Online" based on the app category information. "iShopping Online" can then be used as a preference category for the user and stored in the user's app access list.
[0073] However, since the APP names in the APP category information crawled from the web may not be completely consistent with the APP names in the APP access list obtained by parsing URL data, in a feasible implementation, word vector conversion can be performed on the APP names in the APP category information and the APP names in the APP access list to obtain the word vector corresponding to each APP name.
[0074] Specifically, when the name of any APP accessed by a user does not have a matching name in the preset APP category information, cosine similarity is calculated for the vectorized name of the APP and the APP names in the preset APP category information, and the preference category corresponding to the APP name in the APP category information with the highest cosine similarity is taken as the preference category of each user.
[0075] For example, when vectorizing the app name, a pre-trained Word2Vec model can be used. Word2Vec is a neural network-based word vector learning method that can convert words into vector representations, thereby quantitatively measuring the relationship between words. In practice, the app name is first segmented using the lcut method of the jieba library in Python, resulting in a segmentation list. Then, a Word2Vec object model is instantiated based on the Word2Vec class of the gensim library. The weights of the pre-trained Word2Vec model are loaded into the model object. The wv method of the model object is used to perform vector transformation on each word in the segmentation list of the app name. Finally, the average of the word vectors of all words in the segmentation list is taken to obtain the word vector of the app name.
[0076] Suppose the word vector of the APP name in the APP category information is X(x1,x2,…,x…). n The word vector of the APP name in the APP access list is Y(y1,y2,…,y). n ); where n is the dimension of the word vector, calculated using the cosine similarity formula:
[0077]
[0078] The cosine similarity between the word vectors of the APP name in the APP category information and the APP name in the APP access list can be calculated, and its value ranges from [-1, 1].
[0079] Finally, the preference category corresponding to the APP in the APP category information with the highest cosine similarity is determined as the preference category corresponding to the APP in the APP access list, and the preference category information is updated in the APP access list and stored in the database.
[0080] For example, if the word vector corresponding to the name of APP-a in the APP access list has a cosine similarity of 0.9 with the word vector corresponding to the name of APP-1 in the APP category information, and the cosine similarity with the word vectors corresponding to the names of the other APPs in the APP category information is all below 0.9, then the preference category corresponding to APP-1 in the APP category information is determined as the preference category corresponding to APP-a in the APP access list.
[0081] By using the highest cosine similarity as the matching principle, the app's user preference category can be accurately matched, avoiding errors caused by manual sorting, improving the accuracy of app preference category classification, and thus improving the reliability of user preference tags.
[0082] S102: Based on the access behavior metrics of multiple apps corresponding to each user's multiple preference categories, determine the preference category score corresponding to each user's multiple preference categories.
[0083] Reference Figure 2 The diagram illustrates a method for calculating user preference category scores based on the entropy weight method provided in this application embodiment. First, based on the access behavior indicators of multiple apps corresponding to any preference category of each user, the total access behavior indicators of apps in that preference category are determined.
[0084] Each user's preference category may correspond to access behavior metrics for multiple apps. For example, the preference category "Love Online Shopping" includes access behavior metrics for the "Taobao" app and the "JD.com" app respectively. Based on the access behavior metrics of multiple apps in each preference category, the total access behavior metrics for the apps in that preference category are determined.
[0085] In one feasible implementation, the app's access behavior metrics may include: access click count, access traffic, and access days. When determining the total app access behavior metrics for each user across any preference category, the access click count for each user across multiple app access behavior metrics corresponding to that preference category is summed to obtain the total access click count for that user in that preference category; the access traffic for each user across multiple app access behavior metrics corresponding to that preference category is summed to obtain the total access traffic for that user in that preference category; the maximum value of the access days for each user across multiple app access behavior metrics corresponding to that preference category is taken as the total access days for that user in that preference category; and the total access click count, total access traffic, and total access days for each user in that preference category are used as the total app access behavior metrics for that user in that preference category. In other implementations, the app's access behavior metrics can also be defined according to actual needs.
[0086] In practice, a first-dimensional statistical table of "user-preference-metric" can be constructed for the total APP access behavior metrics corresponding to each user's each preference category.
[0087] Then, the entropy weight method is used to calculate the first weight of the total APP access behavior index for each user's preference category. The entropy weight method is an objective weighting method. In practical use, the entropy weight of each index is calculated using information entropy based on the data dispersion of each index, thereby obtaining the objective index weight. Then, the normalized values of the total APP access behavior index corresponding to each preference type are weighted and summed to obtain the preference category score corresponding to each user's multiple preference categories. In actual implementation, the multiple preference categories of the same user can be sorted in descending order according to the obtained preference category scores, which more intuitively reflects the different preferences of users.
[0088] Specifically, suppose X ij This represents the total access behavior metrics for the j-th app within the i-th preference category of a user, where i = 1, 2, ..., n, n is the number of the user's preference categories, and j = 1, 2, ..., m, m is the total number of app access behavior metrics; for example, X 12 The second metric for the user's first preference category.
[0089] First, we perform index normalization or standardization on each of the m indicators for multiple preference categories to obtain Z. ij Z ij Let be the standard value of the total access behavior metric for the j-th app in the i-th preference category.
[0090] The normalization process can be performed using a positive index, as shown in the following formula:
[0091]
[0092] Normalization can also be achieved using a negative index, as shown in the following formula:
[0093]
[0094] Then, calculate the proportion P of the i-th preference category among all preference categories under the standard value of the j-th app's total access behavior index. ij The formula is as follows:
[0095]
[0096] Then, calculate the entropy value E of the j-th APP total access behavior metric. j The formula is as follows:
[0097]
[0098] In the formula, k = 1 / ln(n), if P ij =0, then directly set P ij ln(Pij If n = 1, then set k to 0 directly, and set each E j All are greater than 0.
[0099] Then, calculate the information entropy redundancy D of the j-th APP total access behavior metric. j As shown in the following formula:
[0100] D j =1-E j ;
[0101] Then, calculate the first weight W of the j-th APP total access behavior metric. j As shown in the following formula:
[0102]
[0103] like Then W j =1 / m.
[0104] Finally, the normalized values of the total app access behavior metrics corresponding to the user's i-th preference type are weighted and summed to calculate the preference category score S for the i-th preference category. i As shown in the following formula:
[0105]
[0106] When calculating the preference category score for each user's preference category, the access behavior indicators of all apps within the same preference category are aggregated based on the preference category of the apps used by the user. Then, the entropy weight method is used to calculate the first weight of the aggregated access behavior indicators of apps within the preference category. This can objectively reflect the differences and importance between different access behavior indicators, eliminate the influence of subjective factors, and thus improve the accuracy of the weights. After indicator normalization, the normalized indicators of each user's preference category are weighted and summed to obtain a comprehensive score. This enables comparability between different preference categories of the same user and improves the reliability of the obtained preference category score for each preference category.
[0107] S103: Determine the preference score for each preference category for each user based on the access behavior metrics of multiple apps corresponding to multiple users in each preference category.
[0108] Reference Figure 3This illustration shows a schematic diagram of calculating user preference scores based on the entropy weight method provided in an embodiment of this application. In one feasible implementation, preference categories are used as the granularity. For any preference category, the total access behavior index of each user for that preference category is determined based on the access behavior index of each user for multiple apps corresponding to that preference category.
[0109] The app access behavior metrics can still be used to measure the degree of difference between different users within a preference category, including the number of access clicks, access traffic, and access days. For each preference category, the access behavior metrics of each app for each user are aggregated to determine the total app access behavior metrics for each user.
[0110] For example, for a preference category called "Love Online Shopping," which includes multiple users such as User A, User B, etc., User A's "Love Online Shopping" preference category corresponds to access behavior metrics for multiple apps. Therefore, the "number of visits / clicks," "traffic," and "number of visits" for all apps corresponding to User A can be summed. Specifically, the "number of visits / clicks" and "traffic" for all apps are directly summed, and the "number of visits" for all apps is taken as the maximum value. This yields the total access behavior metrics for the apps corresponding to User A under the "Love Online Shopping" preference category. Similarly, the total access behavior metrics for apps for other users such as User B under this preference category can be calculated.
[0111] In practice, a second multidimensional statistical table of "preference-user-metric" can be constructed for the total APP access behavior metrics corresponding to each user under each preference category.
[0112] Then, the entropy weight method is used to calculate the second weight of the total APP access behavior index of multiple users under any preference category, and the normalized value of the total APP access behavior index of each user under the preference category is weighted and summed to obtain the preference degree score of each user in the preference category; until all preference categories are traversed, the preference degree score of each user in each preference category is determined, that is, for the user dimension, the preference degree score of each preference category corresponding to each user is determined.
[0113] Specifically, suppose X′ ij Let X be the j-th metric for the i-th user within a preference category, where i = 1, 2, ..., n, n is the number of users within that preference category, and j = 1, 2, ..., m, m is the total number of app access behavior metrics; for example, X... 12 This represents the combined access behavior metrics for the first user's second app.
[0114] First, normalize or standardize the m metrics for multiple users to obtain Z′. ij Z′ ij Let be the standard value of the total access behavior metric for the j-th app of the i-th user.
[0115] The normalization process can be performed using a positive index, as shown in the following formula:
[0116]
[0117] Normalization can also be achieved using a negative index, as shown in the following formula:
[0118]
[0119] Then, calculate the proportion P′ of the i-th user among all users under the standard value of the j-th app's total access behavior metric. ij As shown in the following formula:
[0120]
[0121] Then, calculate the entropy value E′ of the j-th APP total access behavior metric. j As shown in the following formula:
[0122]
[0123] Where k = 1 / ln(n), if P′ ij =0, then directly set P′ ij ln(P′ ij If n = 1, then k is set to 0 directly, and each E' j All are greater than 0.
[0124] Then, calculate the information entropy redundancy D′ of the j-th APP total access behavior metric. j As shown in the following formula:
[0125] D′ j =1-E′ j ;
[0126] Then, calculate the second weight W' of the j-th APP total access behavior metric. j As shown in the following formula:
[0127]
[0128] like Then W' j =1 / m.
[0129] Finally, the normalized values of the total APP access behavior metrics corresponding to the i-th user of this preference type are weighted and summed to calculate the preference score S′ of the i-th user. i As shown in the following formula:
[0130]
[0131] S104: Based on the preference scores of the multiple users, cluster and classify the multiple users corresponding to the multiple preference categories to determine the preference level label of each user in different preference categories.
[0132] In this embodiment, based on the preference score of each user in multiple preference categories, the KMeans clustering algorithm is used to perform clustering and classification to determine the preference level label of each user in different preference categories.
[0133] KMeans clustering is a distance-based clustering algorithm, such as Euclidean distance, used to divide data samples into several clusters. In KMeans clustering, the number of clusters needs to be given in advance. The goal of the algorithm is to minimize the sum of the distances from a sample point to the center of its cluster, so that the distance between data points within the same cluster is minimized and the distance between data points in different clusters is maximized.
[0134] In practical implementation, the KMeans clustering model can be built using the Python programming language based on the scikit-learn library. In one feasible implementation, the number of clusters (n_clusters) can be set to 5, that is, the data samples are clustered into 5 clusters. Then, users under each preference category are clustered based on their preference scores, so that the same preference category can be divided into 5 preference levels. For example, if there are 21 preference categories, multiple users in each preference category will be subjected to KMeans clustering calculation once based on their preference scores. Therefore, 21 KMeans clustering calculations are required for 21 preference categories.
[0135] For example, taking multiple users of any preference category as an example, the KMeans clustering calculation process for the preference level of each user in that preference category is as follows:
[0136] Suppose the user training sample set for this preference category used for clustering is D = {x1, x2, ..., x...} m}, x i Score the degree of preference for each user in this preference category;
[0137] A1: Randomly select k initial centroids, U = {u1, u2, ..., u...} kThe corresponding cluster is denoted as C = {C1, C2, ..., C}. k};
[0138] A2: For each sample point, iterate through all k centroids and calculate the distance x from that sample point. i Recent centroid u j , take sample point x i The cluster is set to centroid u j The corresponding cluster C j , to obtain x i The corresponding cluster C' j ,Right now:
[0139]
[0140] A3: After updating the clusters corresponding to all sample points, calculate the mean of all sample points within each cluster to obtain the new centroids U′={u′1,u′2,...,u′ k},Right now:
[0141]
[0142] Where I(x) i ∈C′ j ) represents the indicator function, when the sample point x i Belongs to u′ j Cluster C′ j When, I(x) i ∈C′ j ) = 1, otherwise I(x) i ∈C′ j ) = 0;
[0143] A4: Repeat steps A2 and A3 until the centroids of the k clusters no longer change. Finally, for each sample point x... i They will all belong to a certain cluster Recorded as Each of them Let j represent a preference level, j = 1, 2, ..., k. In one implementation, k can be 5. In other implementations, the number of clusters in the KMeans clustering algorithm can be adjusted according to the situation, and this invention does not impose specific limitations.
[0144] Users within a cluster with higher preference scores are defined as those with higher preference levels in that preference category, and users within a cluster with lower preference scores are defined as those with lower preference levels in that preference category. That is, for the above... Calculate each All sample points x within the cluster i mean get Assume that:
[0145]
[0146] but Corresponding The highest level of preference is indicated by the number of levels, and so on. Corresponding This represents the lowest level of preference.
[0147] This allows us to determine the preference level label for each user within the same preference category. After clustering all preference categories, we can obtain the preference level label for each user in different preference categories.
[0148] In this embodiment, in addition to determining the preference category scores of different preference categories of the same user to reflect the differences between different preference categories of the same user, the preference degree level differences of multiple users in the same preference category are also determined.
[0149] When calculating the difference in preference levels among multiple users with the same preference, directly clustering and classifying based on the original user APP access behavior indicators results in the same weight across different indicators. However, this embodiment employs a fusion scheme of "entropy weight method + KMeans clustering". First, the entropy weight method is used to calculate the second weight of the total APP access behavior indicator for each user within the same preference category. Then, after indicator normalization, the normalized values of the total APP access behavior indicator for each user within the same preference category are weighted and summed to obtain the preference level score for each user within that preference category. Finally, the KMeans clustering algorithm is used to cluster and classify users based on the preference level score. This can more accurately quantify the relative difference in preference levels among different users for the same preference, achieving precise classification of preference levels.
[0150] S105: The preference category score, preference degree score, and preference degree level label in different preference categories corresponding to each user are used as the preference profile of each user.
[0151] Finally, the preference category score, preference degree score, and preference degree level label in different preference categories corresponding to each user are used as the preference profile of each user, which can more comprehensively measure the user's preference profile.
[0152] This method has at least the following beneficial effects:
[0153] 1. By calculating the preference category score for each user's preference category, as well as the preference degree score for different users under each preference category, it is possible to identify multiple user preference information, and at the same time, quantitatively compare the degree of liking between different user preferences and the degree of difference between different users in the same preference category. This not only enables automatic sorting of multiple preferences for each user, but also distinguishes the relative degree of difference between different users in the same preference. The generated user preference profile is more comprehensive and detailed, thereby enabling personalized product differentiation strategy configuration and improving the accuracy of marketing and services.
[0154] 2. From the user's perspective, this method calculates the differences between different preferences of the same user, including the ranking method of multiple preferences of the same user. After calculating the first weight of the total APP access behavior index of each user's preference category using the entropy weight method, it objectively reflects the differences and importance between different access behavior indicators, improving the accuracy of indicator weights. After indicator normalization, the normalized indicators of each user's preference category are weighted and summed to obtain the preference category score, realizing the comparability between different user preferences. Since the first weight is automatically calculated, this method can automatically adjust the ranking of multiple preferences according to the user's APP behavior.
[0155] 3. From the perspective of preference categories, this paper proposes a fusion scheme of "entropy weight method + KMeans clustering" to calculate the differences between different users in the same preference category. First, the entropy weight method is used to calculate the preference degree score of different users in the same preference category. Then, the KMeans clustering algorithm is used to cluster and classify users based on the preference degree score. This can accurately quantify the relative differences in preference degree between different users in the same preference category and achieve accurate classification of user preference degree levels.
[0156] Reference Figure 4 This diagram illustrates a functional block diagram of a user multi-preference profile construction device provided in an embodiment of this application, applied to a server. The device includes:
[0157] The preference category determination module 100 is used to obtain access behavior indicators of each APP corresponding to each user among multiple users, and determine multiple preference categories corresponding to each user.
[0158] The preference category score determination module 200 is used to determine the preference category score corresponding to each of the multiple preference categories of each user based on the access behavior indicators of multiple APPs corresponding to each user's preference category;
[0159] The preference score determination module 300 is used to determine the preference score of each user for each preference category based on the access behavior indicators of multiple apps corresponding to multiple users in each preference category.
[0160] The preference level label determination module 400 is used to cluster and classify multiple users corresponding to multiple preference categories according to the preference level scores of each user, and determine the preference level label of each user in different preference categories.
[0161] The preference profile determination module 500 is used to use the preference category score, the preference degree score, and the preference degree level label in different preference categories corresponding to each user as the preference profile of each user.
[0162] Optionally, the preference category determination module includes:
[0163] The acquisition unit is used to acquire the internet URL data of each user and determine the names of the multiple apps accessed by each user.
[0164] The indicator determination unit is used to determine the access behavior indicators of each user's access to multiple apps based on the URL data packets of each user accessing any app.
[0165] The preference category determination unit is used to determine multiple preference categories corresponding to each user based on the names of the multiple apps and preset app classification information. The preset app classification information stores the correspondence between app names and preference categories.
[0166] Optionally, the preference category determination unit includes:
[0167] The first determining subunit is used to determine the preference category of each user when the name of any APP is consistent with the name of the APP in the preset APP classification information.
[0168] The second determining subunit is used to calculate the cosine similarity between the vectorized name of the APP and the APP name in the preset APP classification information when there is no consistent name for any APP name in the preset APP classification information, and to take the preference category corresponding to the APP name in the APP classification information with the highest cosine similarity as the preference category of each user.
[0169] Optionally, the preference category score determination module includes:
[0170] The first total indicator calculation unit is used to determine the total access behavior indicator of apps for each user's preference category based on the access behavior indicators of multiple apps corresponding to any preference category of each user.
[0171] The preference category score calculation unit is used to calculate the first weight of the total APP access behavior index for each preference category of each user using the entropy weight method, and to perform a weighted summation of the normalized values of the total APP access behavior index corresponding to each preference type to obtain the preference category score corresponding to each user's multiple preference categories.
[0172] Optionally, the preference score determination module includes:
[0173] The second total indicator calculation unit is used to determine the total APP access behavior indicator for each user in any preference category based on the access behavior indicators of multiple APPs corresponding to that preference category for each user in that preference category.
[0174] The preference score calculation unit is used to calculate the second weight of the total APP access behavior index of multiple users under any preference category using the entropy weight method, and to perform a weighted summation of the normalized value of the total APP access behavior index of each user under the preference category to obtain the preference score of each user in the preference category; until all preference categories are traversed, the preference score of each preference category corresponding to each user is determined.
[0175] Optionally, the preference level label determination module includes:
[0176] The preference level label determination unit is used to cluster and classify multiple users corresponding to multiple preference categories according to the preference level scores of each user in multiple preference categories, and determine the preference level label of each user in different preference categories.
[0177] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the user multi-preference profile construction method as described in the embodiments of the present application.
[0178] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0179] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0180] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0181] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0182] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0183] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0184] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0185] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for constructing a user multi-preference profile, characterized in that, Applied to the server side, the method includes: Obtain access behavior metrics for each app for each user among multiple users, and determine multiple preference categories for each user; Based on the access behavior metrics of multiple apps corresponding to each user's each preference category, determine the preference category score corresponding to each user's multiple preference categories; Based on the access behavior metrics of multiple apps corresponding to multiple users in each preference category, determine the preference score for each preference category corresponding to each user; Based on the preference scores of each user, the users corresponding to the multiple preference categories are clustered and graded to determine the preference level label of each user in different preference categories. The preference category score, preference degree score, and preference degree level label in different preference categories corresponding to each user are used as the preference profile of each user; Specifically, based on the access behavior metrics of multiple apps corresponding to each user's each preference category, the preference category score corresponding to each user's multiple preference categories is determined, including: Based on the access behavior metrics of multiple apps corresponding to any one preference category of each user, determine the total access behavior metrics of apps in that preference category; The entropy weight method is used to calculate the first weight of the total APP access behavior index for each user's preference category, and the normalized values of the total APP access behavior index corresponding to each preference type are weighted and summed to obtain the preference category score for each user's multiple preference categories. Based on the access behavior metrics of multiple apps corresponding to multiple users in each preference category, determine the preference score for each preference category for each user, including: For any preference category, the total access behavior index of each user for that preference category is determined based on the access behavior index of each user for multiple apps corresponding to that preference category. The entropy weight method is used to calculate the second weight of the total APP access behavior index of multiple users under any preference category, and the normalized value of the total APP access behavior index of each user under the preference category is weighted and summed to obtain the preference degree score of each user in the preference category. This process continues until all preference categories have been traversed, at which point the preference score for each user in each preference category is determined.
2. The method according to claim 1, characterized in that, Obtain access behavior metrics for each app for each user among multiple users, and determine multiple preference categories for each user, including: Obtain the internet URL data of each user and determine the names of the multiple apps accessed by each user; Based on the URL data packet of each user accessing any APP, determine the access behavior indicators of each of the multiple APPs accessed by each user. Based on the names of the multiple apps and the preset app category information, multiple preference categories are determined for each user. The preset app category information stores the correspondence between app names and preference categories.
3. The method according to claim 2, characterized in that, Based on the names of the various apps and preset app category information, multiple preference categories are determined for each user, including: When the name of any APP matches the name of an APP in the preset APP category information, the preference category corresponding to the APP with the same name in the preset APP category information is taken as the preference category of each user. When no app name has a matching name in the preset app category information, cosine similarity is calculated for the vectorized app name and the app names in the preset app category information. The preference category corresponding to the app name in the app category information with the highest cosine similarity is taken as the preference category for each user.
4. The method according to claim 1, characterized in that, Based on the preference scores of each user, clustering and grading are performed on the users corresponding to the multiple preference categories to determine the preference level label for each user in different preference categories, including: Based on the preference scores of each user in multiple preference categories, the KMeans clustering algorithm is used to cluster and classify the multiple users corresponding to the multiple preference categories to determine the preference level label of each user in different preference categories.
5. The method according to any one of claims 1-4, characterized in that, Obtain access behavior metrics for each app for each user across multiple users, including: The number of visits, clicks, traffic, and days of access for each user for any given app are obtained, and the number of visits, clicks, traffic, and days of access for that app are used as access behavior metrics for that app.
6. The method according to claim 1, characterized in that, The process of determining the total app access behavior metrics for each user across any preference category includes: The total number of visits and clicks for each user in any preference category is obtained by summing the number of visits and clicks for each user in that preference category across multiple APP access behavior metrics. The total access traffic of each user in any preference category is obtained by summing the access traffic of each user in multiple APP access behavior metrics. The maximum number of access days for each user across multiple APP access behavior metrics corresponding to any preference category is taken as the total number of access days for each user in that preference category. The total number of visits and clicks, total traffic, and total number of days of visits for each user in this preference category will be used as the total APP access behavior indicators for each user in this preference category.
7. A user multi-preference profile construction device, characterized in that, Applied to the server side, the device includes: The preference category determination module is used to obtain access behavior indicators of each APP for each user among multiple users, and determine multiple preference categories corresponding to each user. The preference category score determination module is used to determine the preference category score corresponding to each user's multiple preference categories based on the access behavior indicators of multiple apps corresponding to each user's preference category. The preference score determination module is used to determine the preference score for each user in each preference category based on the access behavior indicators of multiple apps corresponding to multiple users in each preference category. The preference level label determination module is used to cluster and classify multiple users corresponding to multiple preference categories based on the preference level scores of each user, and determine the preference level label of each user in different preference categories. The preference profile determination module is used to use the preference category score, the preference degree score, and the preference degree level label in different preference categories for each user as the preference profile of each user. The preference category score determination module includes: The first total indicator calculation unit is used to determine the total access behavior indicator of apps for each user's preference category based on the access behavior indicators of multiple apps corresponding to any preference category of each user. The preference category score calculation unit is used to calculate the first weight of the total APP access behavior index for each preference category of each user using the entropy weight method, and to perform a weighted summation of the normalized values of the total APP access behavior index corresponding to each preference type to obtain the preference category score corresponding to each user's multiple preference categories. The preference score determination module includes: The second total indicator calculation unit is used to determine the total APP access behavior indicator for each user in any preference category based on the access behavior indicators of multiple APPs corresponding to that preference category for each user in that preference category. The preference score calculation unit is used to calculate the second weight of the total APP access behavior index of multiple users under any preference category using the entropy weight method, and to perform a weighted summation of the normalized value of the total APP access behavior index of each user under the preference category to obtain the preference score of each user in the preference category; until all preference categories are traversed, the preference score of each preference category corresponding to each user is determined.
8. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the user multi-preference profile construction method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Hadoop-based user preference evaluation method and system
CN107066512A
Customer preference determination method and device, equipment and storage medium
CN115760172A