User grouping method and device based on user portraits, equipment and medium

By constructing the characteristics of user portraits and extracting business requirements, the groups are distributed, and the problem of low accuracy of user groups in existing technologies has been solved, and more accurate user groups and strategies are achieved.

CN119377573APending Publication Date: 2025-01-28SHENZHEN YUANQI MART INTERNET TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411468906.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

In the prior art, the user grouping method relies on user data and does not consider business needs, resulting in low user grouping accuracy.

Method used

通过获取目标用户的用户数据,构建用户画像,并根据业务需求从用户画像中提取目标特征,对待分析用户进行分群。

Benefits of technology

The accuracy of user groups has been improved, and the height of user groups and business needs have been ensured, forming a user group with similar characteristics, which helps formulate more targeted strategies and optimization solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377573A_ABST
    Figure CN119377573A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data classification, in particular to a user grouping method and device based on user portraits, equipment and a medium. The method comprises the steps of obtaining user data of a target user, wherein the target user is any user in to-be-analyzed users; constructing a target user portrait of the target user according to the user data; obtaining a service demand, and extracting a target feature from the target user portrait according to the service demand; and obtaining a target feature corresponding to each user in the to-be-analyzed users, and grouping the to-be-analyzed users according to the target feature corresponding to each user in the to-be-analyzed users to obtain a grouping result. According to the invention, the user grouping accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data classification, and in particular to a method, apparatus, device and medium for user grouping based on user portraits. Background Art

[0002] User portraits are comprehensive descriptions of user characteristics and behavior patterns formed by collecting and analyzing user data. The purpose is to better understand users so as to provide users with more accurate services and products.

[0003] In scenarios like real-time marketing, product design, and personalized recommendations, user segmentation is often necessary. User segmentation involves dividing users into different groups based on criteria such as interests, behaviors, and needs, enabling more targeted marketing strategies and services. However, existing user segmentation methods rely solely on user data and fail to consider business needs, resulting in low accuracy. Summary of the Invention

[0004] In order to solve the problem of low accuracy of user grouping in the prior art, the present application provides a user grouping method, apparatus, device and medium based on user portraits.

[0005] In the first aspect, this application provides a user grouping method based on user portraits, which adopts the following technical solutions: A user grouping method based on user portraits, comprising: Obtain user data of a target user, where the target user is any user among the users to be analyzed; Constructing a target user profile of the target user based on the user data; Obtaining business requirements, and extracting target features from the target user profile based on the business requirements; The target feature corresponding to each user in the to-be-analyzed users is obtained, and the to-be-analyzed users are grouped according to the target feature corresponding to each user in the to-be-analyzed users to obtain a grouping result.

[0006] By adopting the above technical solution, the user data of the target user is obtained, which can provide a reliable data source for building a target user portrait. The target user portrait converts user data into an understandable and operational form, which can reveal the characteristics and attributes of the target user. By building the target user portrait, the target user can be more deeply understood. The target features are extracted from the target user portrait according to business needs, ensuring that user grouping is highly consistent with business needs. Through grouping based on target features, users with similar features can be gathered together to form different user groups, which helps to better understand the differences between users, thereby formulating more targeted strategies and optimization plans to improve user experience. This application improves the accuracy of user grouping.

[0007] In a preferred example, the present application may be further configured to: construct a target user profile of the target user based on the user data, including: Cleaning and preprocessing the user data to obtain target user data, wherein the user data includes identity information, behavior data, and consumption data of the target user; extracting user features from the target user data; Labeling the user features according to preset metrics to obtain labeled data; The labeled data is integrated into a target user profile of the target user.

[0008] By adopting the above technical solutions, user data can be cleaned and preprocessed to improve the accuracy and completeness of user data. User features extracted from target user data can characterize the user's interests, preferences and behavior patterns. According to preset metrics, corresponding labels can be accurately set for user features. The obtained labeled data can be used to construct a target user portrait, so that the needs and characteristics of the target user can be better understood through the target user portrait.

[0009] In a preferred example, the present application may be further configured to extract target features from the target user portrait according to the business requirements, including: Determine a target tag corresponding to the business requirement based on the business requirement and a preset correspondence relationship, wherein the preset correspondence relationship is a correspondence relationship between the business requirement and the tag; According to the target tag, a target feature corresponding to the target tag is extracted from the target user portrait.

[0010] By adopting the above technical solution, based on business needs and preset correspondences, the target tags corresponding to the business needs can be accurately determined. The target tags represent the key elements and focus points of the business, thereby ensuring the pertinence and effectiveness of subsequent feature extraction. Based on the target tags, the target features related to the business needs can be accurately extracted from the target user portrait, reducing the interference of irrelevant information and improving the accuracy and efficiency of the analysis.

[0011] In a preferred example, the present application may be further configured to: group the users to be analyzed according to the target features corresponding to each user in the users to be analyzed, and obtain a grouping result, including: generating a data set according to the target features corresponding to each of the users to be analyzed, and marking the access status of each data point in the data set as unvisited; Perform density reachability calculation on each data point in the data set to obtain a clustering result; Among them, the density reachability calculation includes: judging whether the target data point is a core point, and the target data point is any data point in the data set whose access status is unvisited; if the target data point is a core point, creating a new cluster, adding the target data point to the created new cluster, and marking the access status of the target data point as visited; cluster expansion of the cluster corresponding to the target data point to obtain the target cluster corresponding to the target data point.

[0012] By adopting the above technical solution, by generating a data set and marking the access status of each data point as unvisited, the initialization and accuracy of the clustering process are determined, and repeated operations are avoided. By performing density reachability calculation on each data point in the data set, accurate division of user groups is achieved. By clustering the cluster corresponding to the target data point, the target cluster corresponding to the target data point is obtained, which enhances the stability and accuracy of the clustering results, ensures that users in the same cluster have a high degree of similarity and correlation, and thus improves the effectiveness and practicality of clustering.

[0013] In a preferred example, the present application may be further configured to: perform cluster expansion on the cluster corresponding to the target data point to obtain a target cluster corresponding to the target data point, including: Expansion step: determining any data point from the neighborhood of the target data point as the initial data point; determining whether the initial data point is a core point; if the initial data point is a core point, adding the initial data point and each data point in the neighborhood of the initial data point to the cluster corresponding to the target data point; recursively expanding the cluster corresponding to the target data point until no new data points are added to the cluster corresponding to the target data point; The expansion step is performed on each data point in the neighborhood of the target data point to obtain a target cluster corresponding to the target data point.

[0014] By adopting the above technical solution, the initial data point is determined from the neighborhood of the target data point, and it is judged whether the initial data point is a core point, which ensures that only data points with sufficiently large density will be included in the cluster, and can filter out data points in isolated or low-density areas, thereby improving the quality and purity of the cluster. When the initial data point is a core point, the initial data point and each data point in its neighborhood are added to the cluster corresponding to the target data point, ensuring that the data points in the cluster have high similarity and correlation. The cluster corresponding to the target data point is recursively expanded until no new data points can be added, thereby ensuring the integrity and stability of the cluster. By performing the above expansion steps on each data point in the neighborhood of the target data point, the target cluster corresponding to the target data point is finally obtained, ensuring that the target cluster contains all data points that are similar to the target data point and have sufficiently large density, thereby improving the accuracy and effectiveness of clustering.

[0015] In a preferred example, the present application may be further configured to: determine whether the target data point is a core point, including: Calculating the distance between the target data point and each data point in the data set except the target data point; Determine an area that is no more than a preset radius parameter away from the target data point as a neighborhood of the target data point; Determining the number of data points in a neighborhood of the target data point based on a distance between the target data point and each data point in the data set other than the target data point, and determining whether the number of data points is less than a preset density parameter; If the number of data points is not less than the preset density parameter, the target data point is taken as a core point.

[0016] By adopting the above technical solution and presetting the radius parameter and the density parameter, the accuracy and efficiency of the clustering results can be improved.

[0017] In a preferred example, the present application may be further configured as follows: the method further includes: Determining evaluation indicators based on the clustering results, wherein the evaluation indicators include silhouette coefficient and classification accuracy index; Cluster optimization is performed based on the silhouette coefficient and the classification suitability index.

[0018] By adopting the above technical solution, the silhouette coefficient measures the compactness between data points in the same cluster and the degree of separation between different clusters, while the classification accuracy index evaluates the compactness and separation of the obtained clusters. Clustering optimization through evaluation indicators can improve clustering quality.

[0019] In a second aspect, the present application provides a user grouping device based on user portraits, which adopts the following technical solutions: A user grouping device based on user portraits, comprising: An acquisition module, configured to acquire user data of a target user, wherein the target user is any user among the users to be analyzed; A construction module, configured to construct a target user profile of the target user based on the user data; An extraction module, configured to obtain business requirements and extract target features from the target user profile according to the business requirements; The grouping module is used to obtain the target feature corresponding to each user in the users to be analyzed, and group the users to be analyzed according to the target feature corresponding to each user in the users to be analyzed to obtain a grouping result.

[0020] In a third aspect, the present application provides an electronic device, which adopts the following technical solution: one or more processors; Memory; At least one application, wherein the at least one application is stored in a memory and configured to be executed by at least one processor, and the at least one application is configured to: execute the user portrait-based user grouping method as described in any one of the first aspects.

[0021] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution: A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the user grouping method based on user portrait as described in any one of the first aspects.

[0022] In summary, this application has the following beneficial technical effects: By obtaining the user data of the target users, this application can provide a reliable data source for building target user portraits. The target user portrait converts user data into an understandable and operational form, which can reveal the characteristics and attributes of the target users. By building the target user portrait, we can have a deeper understanding of the target users, and extract target features from the target user portrait according to business needs, ensuring that user grouping is highly consistent with business needs. Through grouping based on target features, users with similar features can be gathered together to form different user groups, which helps to better understand the differences between users, thereby formulating more targeted strategies and optimization plans to improve user experience. This application improves the accuracy of user grouping. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 This is a flow chart of a user grouping method based on user portraits provided in an embodiment of the present application; Figure 2 This is a schematic diagram of the structure of a user grouping device based on user portraits provided in an embodiment of the present application; Figure 3 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] The following is combined with Figure 1 -Attached Figure 3 This application is described in further detail.

[0025] This specific embodiment is merely an explanation of the present application and is not a limitation of the present application. After reading this specification, those skilled in the art may make non-creative modifications to the present embodiment as needed, but as long as they are within the scope of the claims of the present application, they are protected by the patent law.

[0026] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0027] In this document, the term "and / or" simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document, unless otherwise specified, generally indicates an "or" relationship between the related objects.

[0028] The present application embodiment provides a user grouping method based on user portraits, such as Figure 1 As shown, the method provided in the embodiment of the present application is performed by an electronic device, which can be a server or a terminal device, wherein the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smartphone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited thereto. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present application. The method includes steps S101 to S104, wherein: S101: Obtain user data of a target user, where the target user is any user to be analyzed.

[0029] In this embodiment, the users to be analyzed are multiple users who need to be grouped. The data source for obtaining user data can be determined first. This data source may include the shopping platform's database, log files, and API. Appropriate tools or techniques, such as database query statements, API calls, crawlers, or log file parsers, can then be used to collect user data from these defined data sources. Specifically, user data over a period of time can be obtained to obtain user data for each user to be analyzed. The user data of the target user may include the target user's identity information (e.g., name, age, gender, and geographic location), behavioral data (e.g., browsing history, search history, etc.), and consumption data (e.g., purchase history, purchase amount, purchase time, and purchased product categories).

[0030] S102. Build a target user profile of the target user based on the user data.

[0031] In this embodiment, the user data of the target user can be cleaned and preprocessed first to obtain the target user data, and then key features can be extracted from the target user data as user features. The user features are then labeled to obtain labeled data, and the labeled data can be integrated to obtain the target user portrait of the target user.

[0032] S103. Obtain business requirements, and extract target features from the target user portrait based on the business requirements.

[0033] In this embodiment, a preset correspondence can be pre-set, and a corresponding tag can be set for each business requirement. Based on the current business requirement, the corresponding target tag is determined, and then the corresponding features are extracted from the target user profile based on the target tag as the target features. Among them, business requirements may include: improving user engagement, increasing user retention rate, expanding market share, improving user conversion rate, optimizing personalized recommendations, increasing advertising revenue, etc. The preset correspondence can be set based on actual experience. For example, the tags corresponding to the business requirement of improving user engagement may include daily active users, weekly active users, page views, and number of interactions.

[0034] S104: Obtain target features corresponding to each user in the users to be analyzed, and group the users to be analyzed according to the target features corresponding to each user in the users to be analyzed to obtain a grouping result.

[0035] In this embodiment, after obtaining the target features corresponding to each user to be analyzed, data preprocessing steps can be performed on each user's target features to improve their quality and consistency. This data preprocessing step can include missing value processing, outlier detection, data standardization or normalization, etc. The target features of each user after data preprocessing steps can be stored in a dataset. Furthermore, the dataset can be input into a clustering algorithm (such as K-means clustering, hierarchical clustering, DBSCAN, etc.). The clustering algorithm will divide the users to be analyzed into different groups based on the target features in the dataset, which is the clustering result.

[0036] The embodiment of the present application can provide a reliable data source for constructing a target user portrait by obtaining user data of the target user. The target user portrait converts user data into an understandable and operational form, which can reveal the characteristics and attributes of the target user. By constructing the target user portrait, the target user can be more deeply understood. The target features can be extracted from the target user portrait according to business needs, ensuring that user grouping is highly consistent with business needs. Through grouping based on target features, users with similar features can be grouped together to form different user groups, which helps to better understand the differences between users, thereby formulating more targeted strategies and optimization plans to improve user experience. The present application improves the accuracy of user grouping.

[0037] A possible implementation of the embodiment of the present application is to construct a target user profile of a target user based on user data, including: Clean and pre-process user data to obtain target user data, which includes the target user's identity information, behavior data, and consumption data; Extract user features from target user data; According to the preset metric standards, user features are labeled to obtain labeled data; Integrate labeled data into target user profiles of target users.

[0038] In this embodiment, data cleaning includes removing duplicate data, processing missing values, and correcting erroneous data, which can improve data quality and accuracy. Data can then be preprocessed. This can include data format conversion, such as data type conversion, text data cleaning and standardization, outlier processing, and feature scaling (such as standardization or normalization) to eliminate dimensional differences between different features.

[0039] Furthermore, feature selection can be performed through machine learning algorithms, such as feature selection based on statistical tests (such as chi-square test, ANOVA F-value), model-based feature selection (such as feature importance based on tree models, in which the feature importance can be measured based on the reduction of impurity when partitioning nodes), recursive feature elimination, etc.

[0040] Preset metrics can be set based on practical experience. These metrics can be statistical values ​​(such as mean, median, standard deviation), business rules, or thresholds (e.g., users with spending exceeding a certain amount are labeled as "high spending power"). A series of correspondences between pre-set metrics and labels can be established to represent different user characteristics and attributes. Labels can be categorical (e.g., "high-value customer," "low-activity customer") or numerical (e.g., credit score, purchase frequency). Based on the pre-set metrics, each user feature of the target user can be labeled, resulting in a series of labeled data. This labeled data can include the user ID, raw feature values, and corresponding labels. Furthermore, a structure can be designed to organize the user profile. This structure can be a data model or data structure, such as a dictionary, DataFrame, or JSON object. This labeled data can then be merged with the target user's basic information data to determine that the target user's corresponding user profile contains both the target user's raw feature data and the corresponding labels. Based on the determined user profile structure, a profile framework is constructed for the target user. The framework is populated with the user's feature data and labels, thereby obtaining a target user profile for the target user.

[0041] The embodiments of the present application can improve the accuracy and completeness of user data by performing data cleaning and preprocessing on the user data. The user features extracted from the target user data can characterize the user's interests, preferences and behavior patterns. According to the preset metric standards, corresponding labels can be accurately set for the user features. The obtained labeled data can be used to construct a target user portrait, so that the needs and characteristics of the target user can be better understood through the target user portrait.

[0042] A possible implementation of the embodiment of the present application, based on business requirements, extracts target features from the target user portrait, including: Determine the target tag corresponding to the business requirement based on the business requirement and the preset correspondence. The preset correspondence is the correspondence between the business requirement and the tag. According to the target label, the target features corresponding to the target label are extracted from the target user portrait.

[0043] In this embodiment, it is possible to communicate with the business team in advance to determine business needs, such as improving user parameterization, increasing user retention rate, etc. The preset correspondence can be set in advance based on actual experience. The preset correspondence can be a mapping table that maps business needs to relevant tag sets. For example, the tag set corresponding to improving user engagement may include "daily active users", "weekly active users", "page views", "number of interactions", etc. The determined preset correspondence can be configured in the electronic device to ensure that the subsequent process can quickly determine the corresponding tag combination according to the currently determined business needs. When there is a new business need at the current moment, the electronic device can determine the target tag based on the stored preset correspondence, and then extract the target feature corresponding to the target tag from the target user portrait.

[0044] The embodiment of the present application can accurately determine the target tags corresponding to the business needs based on the business needs and the preset correspondence. The target tags represent the key elements and focus points of the business, thereby ensuring the pertinence and effectiveness of subsequent feature extraction. According to the target tags, the target features related to the business needs can be accurately extracted from the target user portrait, reducing the interference of irrelevant information and improving the accuracy and efficiency of the analysis.

[0045] A possible implementation of the embodiment of the present application is to group the users to be analyzed according to the target features corresponding to each of the users to be analyzed, and obtain a grouping result, including: Generate a data set based on the target features corresponding to each user in the user to be analyzed, and mark the access status of each data point in the data set as unvisited; Perform density reachability calculation on each data point in the data set to obtain the clustering results; The density reachability calculation includes: determining whether the target data point is a core point, where the target data point is any data point in the data set whose access status is unvisited; if the target data point is a core point, creating a new cluster, adding the target data point to the created new cluster, and marking the access status of the target data point as visited; and performing cluster expansion on the cluster corresponding to the target data point to obtain the target cluster corresponding to the target data point.

[0046] In this embodiment, if a data point's neighborhood (an area with a radius no greater than a preset radius parameter) contains at least a certain number of data points (preset density parameter), the data point is considered a core point. If the target data point is a core point, a new cluster is created and added to the new cluster. All of the target data point's neighboring points (data points within the target data point's neighborhood) are then checked to determine whether they are core points. Core points that have not yet been visited are added to the target data point's cluster, and the neighboring points of newly added data points are checked again. This process is repeated recursively until no new core points can be added to the cluster, completing cluster expansion.

[0047] In addition, during the cluster expansion process, there are data points that do not belong to any cluster and are not core points, which can be considered as noise points. Ultimately, a series of clusters can be obtained, each of which contains a set of density-reachable data points, which are organized together based on feature similarity and density.

[0048] The embodiment of the present application determines the initialization and accuracy of the clustering process by generating a data set and marking the access status of each data point as unvisited, avoiding repeated operations, and realizes accurate division of user groups by performing density reachability calculation on each data point in the data set. By clustering the cluster corresponding to the target data point, the target cluster corresponding to the target data point is obtained, thereby enhancing the stability and accuracy of the clustering results, ensuring that users in the same cluster have a high degree of similarity and correlation, and thus improving the effectiveness and practicality of clustering.

[0049] A possible implementation of the embodiment of the present application is to perform cluster expansion on the cluster corresponding to the target data point to obtain a target cluster corresponding to the target data point, including: Expansion step: Determine any data point from the neighborhood of the target data point as the initial data point; determine whether the initial data point is a core point; if the initial data point is a core point, add the initial data point and all data points in the neighborhood of the initial data point to the cluster corresponding to the target data point; recursively expand the cluster corresponding to the target data point until no new data points are added to the cluster corresponding to the target data point; An expansion step is performed on each data point in the neighborhood of the target data point to obtain the target cluster corresponding to the target data point.

[0050] In this embodiment, if the initial data point is not a core point and does not belong to any cluster, the initial data point is considered a noise point.

[0051] The embodiment of the present application determines the initial data point from the neighborhood of the target data point and determines whether the initial data point is a core point, ensuring that only data points with sufficiently large density are included in the cluster, and can filter out data points in isolated or low-density areas, thereby improving the quality and purity of the cluster. When the initial data point is a core point, the initial data point and each data point in its neighborhood are added to the cluster corresponding to the target data point, ensuring that the data points in the cluster have high similarity and correlation. The cluster corresponding to the target data point is recursively expanded until no new data points can be added, thereby ensuring the integrity and stability of the cluster. By performing the above expansion steps on each data point in the neighborhood of the target data point, the target cluster corresponding to the target data point is finally obtained, ensuring that the target cluster contains all data points that are similar to the target data point and have sufficiently large density, thereby improving the accuracy and effectiveness of clustering.

[0052] A possible implementation of the embodiment of the present application is to determine whether a target data point is a core point, including: Calculate the distance between the target data point and each data point in the data set except the target data point; The area with a distance from the target data point that does not exceed the preset radius parameter is determined as the neighborhood of the target data point; Determine the number of data points in the neighborhood of the target data point based on the distance between the target data point and each data point in the data set except the target data point, and determine whether the number of data points is less than a preset density parameter; If the number of data points is not less than the preset density parameter, the target data point is taken as a core point.

[0053] In this embodiment, the distance between the target data point and each data point in the data set except the target data point can be calculated by Euclidean distance, and the neighborhood of the target data point can be determined according to the preset radius parameter. According to the determined distance between the target data point and each data point in the data set except the target data point, the number of data points in the neighborhood of the target data point can be determined from the data set. If the number is not less than the preset density parameter, the target data point is used as the core point.

[0054] Among them, the preset radius parameter and the preset density parameter can be set according to actual experience. Optionally, the distance between every two data points in the data set can be obtained, and then the average or median of multiple distances can be used as the preset radius parameter; the total number of data points in the data set can be determined, and then the product of the total number and the preset ratio can be used as the preset density parameter. The preset ratio can be set according to actual experience. Optionally, the preset ratio is 3%.

[0055] The embodiment of the present application can improve the accuracy and efficiency of the grouping results by presetting the radius parameter and the presetting the density parameter.

[0056] In a possible implementation of the embodiment of the present application, the method further includes: Determine the evaluation indicators based on the clustering results, including the silhouette coefficient and classification accuracy index; Cluster optimization is performed based on the silhouette coefficient and classification accuracy index.

[0057] In this embodiment, the silhouette coefficient is an indicator for evaluating the clustering effect. The silhouette coefficient measures the cohesion of each data point in the cluster to which it belongs and the separation from other clusters. The range of the silhouette coefficient is between -1 and 1. The larger the value of the silhouette coefficient, the better the clustering effect. For each data point in the data set, the following steps can be performed to calculate its silhouette coefficient: take any data point in the data set as the first data point, the cluster to which the first data point belongs as the first cluster, calculate the average distance from the first data point to all other data points in the first cluster, and record it as the first average distance. The first average distance represents the cohesion of the first data point in the first cluster; for each cluster in the data set that does not contain the first data point, take any cluster that does not contain the first data point as the second cluster, calculate the average distance from the first data point to all data points in the second cluster, and thus obtain the average distance of the second quantity. The second quantity is the number of clusters corresponding to the data set minus one, and select the second quantity. The minimum value of the average distance of the quantities is obtained to obtain the second average distance, which represents the degree of separation between the first data point and other clusters that do not contain the first data point; then the silhouette coefficient can be calculated, silhouette coefficient = (second average distance - first average distance) - max{first average distance, second average distance}, where max{first average distance, second average distance} represents the larger value of the first average distance and the second average distance. The above steps of calculating the silhouette coefficient are performed for each data point in the data set to obtain the silhouette coefficient of each data point in the data set, and the average value of the silhouette coefficients of all data points in the data set is calculated to obtain the silhouette coefficient of the entire data set.

[0058] The classification accuracy index can be used to evaluate the compactness and separation of the obtained clusters. The classification accuracy index can include DBI, which measures the ratio of the average distance within a cluster to the distance between different clusters. The smaller the DBI value, the better the clustering effect, that is, the smaller the distance within the cluster and the larger the distance between clusters.

[0059] Specifically, the DBI can be calculated by the following steps: for any cluster corresponding to the data set, it is represented as the third cluster, the average distance of all data points in the third cluster to the centroid of the third cluster is calculated, recorded as the third average distance, and the distance between the third cluster and the centroid of each other cluster is recorded as the fourth distance, the ratio of the third distance to each fourth distance is calculated, and the sum of the multiple ratios obtained is used as the numerator of the third cluster. The above process is performed for each cluster to obtain the numerator corresponding to each cluster in the data set; multiple ratios corresponding to each cluster in the data set are obtained, and the maximum value of all the ratios obtained is used as the denominator. The denominator is the denominator of each cluster in the data set, DBI = numerator / denominator, thereby obtaining the DBI corresponding to each cluster in the data set.

[0060] In the embodiment of the present application, the silhouette coefficient measures the compactness between data points in the same cluster and the degree of separation between different clusters, while the classification accuracy index evaluates the compactness and separation of the obtained clusters. Clustering optimization through evaluation indicators can improve clustering quality.

[0061] The above embodiment introduces a user grouping method based on user portrait from the perspective of method flow. The following embodiment introduces a user grouping device based on user portrait from the perspective of virtual module or virtual unit. For details, please refer to the following embodiment.

[0062] The embodiment of the present application provides a user grouping device based on user portraits, such as Figure 2 As shown, the device may include: An acquisition module 201 is used to acquire user data of a target user, where the target user is any user to be analyzed; A construction module 202 is used to construct a target user profile of the target user based on the user data; Extraction module 203, used to obtain business requirements and extract target features from target user portraits based on the business requirements; The clustering module 204 is configured to obtain target features corresponding to each user in the users to be analyzed, and cluster the users to be analyzed according to the target features corresponding to each user in the users to be analyzed to obtain clustering results.

[0063] In a preferred example, the present application may be further configured as follows: when the construction module 202 constructs a target user profile of the target user based on the user data, it is specifically configured to: Clean and pre-process user data to obtain target user data, which includes the target user's identity information, behavior data, and consumption data; Extract user features from target user data; According to the preset metric standards, user features are labeled to obtain labeled data; Integrate labeled data into target user profiles of target users.

[0064] In a preferred example, the present application may be further configured as follows: when the extraction module 203 extracts target features from the target user portrait according to business requirements, it is specifically configured to: Determine the target tag corresponding to the business requirement based on the business requirement and the preset correspondence. The preset correspondence is the correspondence between the business requirement and the tag. According to the target label, the target features corresponding to the target label are extracted from the target user portrait.

[0065] In a preferred example, the present application may be further configured as follows: when the grouping module 204 performs grouping of the users to be analyzed based on the target features corresponding to each user to be analyzed and obtains the grouping results, it is specifically configured to: Generate a data set based on the target features corresponding to each user in the user to be analyzed, and mark the access status of each data point in the data set as unvisited; Perform density reachability calculation on each data point in the data set to obtain the clustering results; The density reachability calculation includes: determining whether the target data point is a core point, where the target data point is any data point in the data set whose access status is unvisited; if the target data point is a core point, creating a new cluster, adding the target data point to the created new cluster, and marking the access status of the target data point as visited; and performing cluster expansion on the cluster corresponding to the target data point to obtain the target cluster corresponding to the target data point.

[0066] In a preferred example, the present application may be further configured as follows: when the clustering module 204 performs cluster expansion on the cluster corresponding to the target data point to obtain the target cluster corresponding to the target data point, it is specifically configured to: Expansion step: Determine any data point from the neighborhood of the target data point as the initial data point; determine whether the initial data point is a core point; if the initial data point is a core point, add the initial data point and all data points in the neighborhood of the initial data point to the cluster corresponding to the target data point; recursively expand the cluster corresponding to the target data point until no new data points are added to the cluster corresponding to the target data point; An expansion step is performed on each data point in the neighborhood of the target data point to obtain the target cluster corresponding to the target data point.

[0067] In a preferred example, the present application may be further configured as follows: when the clustering module 204 determines whether the target data point is a core point, it is specifically configured to: Calculate the distance between the target data point and each data point in the data set except the target data point; The area with a distance from the target data point that does not exceed the preset radius parameter is determined as the neighborhood of the target data point; Determine the number of data points in the neighborhood of the target data point based on the distance between the target data point and each data point in the data set except the target data point, and determine whether the number of data points is less than a preset density parameter; If the number of data points is not less than the preset density parameter, the target data point is taken as a core point.

[0068] In a preferred example, the present application may be further configured as follows: the device further includes an optimization module, specifically configured to: Determine the evaluation indicators based on the clustering results, including the silhouette coefficient and classification accuracy index; Cluster optimization is performed based on the silhouette coefficient and classification accuracy index.

[0069] The user grouping device based on user portrait provided in the embodiment of the present application is applicable to the above method embodiment and will not be described in detail here.

[0070] An electronic device is provided in an embodiment of the present application, such as Figure 3 As shown, Figure 3 The electronic device 300 shown includes a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, for example, via a bus 302. Optionally, the electronic device 300 may further include a transceiver 304. It should be noted that in actual applications, the number of transceivers 304 is not limited to one, and the structure of the electronic device 300 does not constitute a limitation on the embodiments of the present application.

[0071] Processor 301 can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 301 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0072] Bus 302 may include a path for transmitting information between the above components. Bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. Bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 3 Only one thick line is used in the diagram, but it does not mean that there is only one bus or one type of bus.

[0073] The memory 303 may be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0074] The memory 303 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the content shown in the embodiment of the user grouping method based on user portraits.

[0075] Figure 3 The electronic device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.

[0076] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding contents of the aforementioned method embodiment.

[0077] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0078] The above are only some of the implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A user grouping method based on user portrait, characterized in that: include: Obtaining user data of a target user, wherein the target user is any user among the users to be analyzed; Constructing a target user profile of the target user according to the user data; Obtaining business requirements, and extracting target features from the target user portrait according to the business requirements; The target feature corresponding to each user among the users to be analyzed is obtained, and the users to be analyzed are grouped according to the target feature corresponding to each user among the users to be analyzed to obtain a grouping result.

2. The user grouping method based on user portrait according to claim 1 is characterized in that: Constructing a target user profile of the target user according to the user data, including: Cleaning and preprocessing the user data to obtain target user data, wherein the user data includes identity information, behavior data, and consumption data of the target user; extracting user features from the target user data; According to a preset metric standard, labeling is performed on the user features to obtain labeled data; The labeled data is integrated into a target user portrait of the target user.

3. The user grouping method based on user portrait according to claim 1 is characterized in that: According to the business requirements, target features are extracted from the target user portrait, including: Determine the target tag corresponding to the business demand according to the business demand and the preset corresponding relationship, wherein the preset corresponding relationship is the corresponding relationship between the business demand and the tag; According to the target tag, a target feature corresponding to the target tag is extracted from the target user portrait.

4. The user grouping method based on user portrait according to claim 1 is characterized in that: The users to be analyzed are grouped according to the target features corresponding to each user in the users to be analyzed to obtain grouping results, including: Generate a data set according to the target feature corresponding to each user in the to-be-analyzed users, and mark the access status of each data point in the data set as unvisited; Perform density reachability calculation on each data point in the data set to obtain a clustering result; Among them, the density reachability calculation includes: judging whether the target data point is a core point, the target data point is any data point in the data set whose access status is unvisited; if the target data point is a core point, creating a new cluster, adding the target data point to the created new cluster, and marking the access status of the target data point as visited; cluster expansion of the cluster corresponding to the target data point to obtain the target cluster corresponding to the target data point.

5. The user grouping method based on user portrait according to claim 4 is characterized in that: Performing cluster expansion on the cluster corresponding to the target data point to obtain a target cluster corresponding to the target data point includes: Extension step: determine any data point from the neighborhood of the target data point as the initial data point; determine whether the initial data point is a core point; if the initial data point is a core point, add the initial data point and each data point in the neighborhood of the initial data point to the cluster corresponding to the target data point; recursively expand the cluster corresponding to the target data point until no new data point is added to the cluster corresponding to the target data point; The expansion step is performed on each data point in the neighborhood of the target data point to obtain a target cluster corresponding to the target data point.

6. The user grouping method based on user portrait according to claim 4 is characterized in that: Determining whether the target data point is a core point includes: Calculating the distance between the target data point and each data point in the data set except the target data point; Determine an area that is within a preset radius parameter from the target data point as a neighborhood of the target data point; Determine the number of data points in the neighborhood of the target data point according to the distance between the target data point and each data point in the data set except the target data point, and determine whether the number of data points is less than a preset density parameter; If the number of data points is not less than the preset density parameter, the target data point is taken as a core point.

7. The user grouping method based on user portrait according to claim 1 is characterized in that: The method further comprises: Determine an evaluation index according to the clustering result, wherein the evaluation index includes a silhouette coefficient and a classification accuracy index; Cluster optimization is performed based on the silhouette coefficient and the classification accuracy index.

8. A user grouping device based on user portrait, characterized in that: include: An acquisition module, used to acquire user data of a target user, where the target user is any user among the users to be analyzed; A construction module, used to construct a target user portrait of the target user according to the user data; An extraction module, used to obtain business requirements and extract target features from the target user portrait according to the business requirements; The grouping module is used to obtain the target feature corresponding to each user in the users to be analyzed, and group the users to be analyzed according to the target feature corresponding to each user in the users to be analyzed to obtain a grouping result.

9. An electronic device, characterized in that: include: at least one processor; Memory; At least one application, wherein the at least one application is stored in a memory and configured to be executed by at least one processor, and the at least one application is configured to: execute the user portrait-based user grouping method described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed in a computer, the computer is caused to execute the user grouping method based on user portrait as described in any one of claims 1 to 7.