Product recommendation method and device

By integrating the business label indicator distinction and sample proportion requirements between clustered clusters into the objective function, the feature weights are automatically learned, which solves the problem of inaccurate user classification in the existing technology and improves the product recommendation effect.

CN118886953APending Publication Date: 2024-11-01JINGDONG ALLIANZ GENERAL INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410871750.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

The existing unsupervised learning methods cannot directly cluster clusters with high distinction in business label indicators when user classification, and cannot control the sample size ratio in the cluster, resulting in inaccurate user classification results and poor product recommendation results.

Method used

By integrating the business label indicator distinction and sample proportion requirements between clustered clusters into the objective function, the feature weights are automatically learned and the user classification model is constructed to ensure that the cluster distinction is high and the sample proportion meets the requirements.

Benefits of technology

It improves the accuracy of user classification results and product recommendation effect, and can more accurately formulate user classification and differentiated operation strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118886953A_ABST
    Figure CN118886953A_ABST
Patent Text Reader

Abstract

The invention discloses a product recommendation method and device, and relates to the technical field of computers. A specific embodiment of the method comprises the steps of obtaining a historical behavior data set of a sampling user, and performing feature extraction on the historical behavior data set to obtain a feature vector set; learning an optimal feature weight combination under the guidance of a predefined objective function, wherein the objective function is constructed by combining the distinction degree between the clustering clusters and the sample proportion penalty factor between the clustering clusters; performing model training based on the optimal feature weight combination and the feature vector set to obtain a user classification model; and classifying the users by using the user classification model, and recommending products to the users according to a user classification result. According to the embodiment, the user classification model can be quickly constructed to obtain the clustering clusters with high service label index distinction degree and the cluster sample proportion meeting the requirement, so that the accuracy of the user classification result is improved, and the product recommendation effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for product recommendation. Background Art

[0002] Fine-grained operations are a sharp sword for the sustainable growth of enterprises. The essence of fine-grained operations lies in good user classification management. Since it is impossible to clearly define the category of each user in advance, the industry often uses unsupervised learning based on user attributes and behavior data to cluster users into different clusters, and then labels each cluster. Subsequently, differentiated operation strategies are formulated based on different user categories, for example, different strategies are used to recommend products to users of different categories.

[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0004] When users are classified through unsupervised learning, it is impossible to directly cluster clusters with high differentiation of business label indicators. In addition, when there are multiple operation goals, it is impossible to control the proportion of the number of samples in the cluster, resulting in inaccurate classification results for users and poor product recommendation effects. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a method and device for product recommendation, which can integrate the discrimination of business label indicators between clusters and the sample ratio requirements between clusters into the objective function. Under the guidance of the objective function, the weights of each feature are automatically learned, so as to quickly build a user classification model to obtain clusters with high discrimination of business label indicators and cluster sample ratios that meet the requirements, thereby improving the accuracy of user classification results and improving product recommendation effects.

[0006] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for product recommendation is provided, comprising:

[0007] Acquire a historical behavior data set of a sampled user, and perform feature extraction on the historical behavior data set to obtain a feature vector set;

[0008] Learning the optimal feature weight combination under the guidance of a predefined objective function, which is constructed by combining the discrimination between clusters and the penalty factor of the sample ratio between clusters;

[0009] Performing model training based on the optimal feature weight combination and the feature vector set to obtain a user classification model;

[0010] The user classification model is used to classify users, and product recommendations are made to users based on the user classification results.

[0011] Optionally, a historical behavior dataset of the sampled user is obtained, and feature extraction is performed on the historical behavior dataset to obtain a feature vector set, including: obtaining a historical behavior dataset of the sampled user, the sampled user is an existing user of the target product, and the historical behavior dataset includes the sampled user's historical purchase behavior data and historical claim behavior data; performing feature processing on the historical behavior dataset to obtain the similarity between products corresponding to each sampled user, a purchase behavior feature vector, and a claim behavior feature vector; and normalizing the similarity between products corresponding to each sampled user, the purchase behavior feature vector, and the claim behavior feature vector to obtain the feature vector set.

[0012] Optionally, feature processing is performed on the historical behavior data set to obtain the similarity between products corresponding to each sampled user, including: based on a time window, obtaining a product list corresponding to each sampled user, and taking the product list corresponding to each sampled user as a subsequence to obtain a product sequence; constructing a sample with a sample label according to each subsequence in the product sequence; feature encoding each sample and inputting it into a neural network to train an embedding model; using the embedding model to obtain a vector representation of each product; based on the vector representation of each product, calculating the similarity between non-target products and target products in the product list corresponding to each sampled user to obtain the similarity between products corresponding to each sampled user.

[0013] Optionally, before constructing a sample with a sample label according to each subsequence in the product sequence, the method further includes: based on a set product retention probability, under-sampling products in the product sequence whose occurrence frequency exceeds a set threshold, so as to correct the product sequence.

[0014] Optionally, before learning the optimal feature weight combination under the guidance of a predefined objective function, the method further includes: using a graphic estimation algorithm to determine the number of clusters; and the degree of distinction between the clusters is related to the number of clusters.

[0015] Optionally, learning the optimal feature weight combination under the guidance of a predefined objective function includes: considering the feature weight as a hyperparameter, and calculating the optimal feature weight combination based on a Bayesian optimization algorithm under the guidance of the predefined objective function.

[0016] Optionally, model training is performed based on the optimal feature weight combination and the feature vector set to obtain a user classification model, including: based on the optimal feature weight combination and the feature vector set, using a clustering algorithm to perform model training to obtain a user classification model, and calculating a value label for each cluster cluster as an output of the user classification model.

[0017] According to another aspect of an embodiment of the present invention, a device for product recommendation is provided, including:

[0018] A feature processing module is used to obtain a historical behavior data set of a sampled user, and perform feature extraction on the historical behavior data set to obtain a feature vector set;

[0019] A weight learning module is used to learn the optimal feature weight combination under the guidance of a predefined objective function, wherein the objective function is constructed by combining the discrimination between clusters and the sample ratio penalty factor between clusters;

[0020] A model training module, used for performing model training based on the optimal feature weight combination and the feature vector set to obtain a user classification model;

[0021] The classification recommendation module is used to classify users using the user classification model and recommend products to users based on the user classification results.

[0022] According to another aspect of an embodiment of the present invention, there is provided an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the product recommendation method provided by an embodiment of the present invention.

[0023] According to another aspect of the embodiments of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the product recommendation method provided by the embodiments of the present invention is implemented.

[0024] An embodiment of the above invention has the following advantages or beneficial effects: by obtaining a historical behavior data set of sampled users, feature extraction is performed on the historical behavior data set to obtain a feature vector set; under the guidance of a predefined objective function, the optimal feature weight combination is learned, and the objective function is constructed by combining the discrimination between clusters and the sample ratio penalty factor between clusters; model training is performed based on the optimal feature weight combination and the feature vector set to obtain a user classification model; a technical solution for user classification using the user classification model and product recommendation for users based on the user classification results is provided, by integrating the discrimination of business label indicators between clusters and the sample ratio requirements between clusters into the objective function, and under the guidance of the objective function, each feature weight is automatically learned, thereby quickly constructing a user classification model to obtain a cluster with high discrimination of business label indicators and a cluster sample ratio that meets the requirements, thereby improving the accuracy of user classification results and improving product recommendation effects.

[0025] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0027] Figure 1 is a schematic diagram of main steps of a method for product recommendation according to an embodiment of the present invention;

[0028] Figure 2 is a schematic diagram of a neural network structure selected during embedding model training according to an embodiment of the present invention;

[0029] Figure 3 is a schematic diagram of an elbow diagram of one embodiment of the present invention;

[0030] Figure 4 is a schematic diagram of the training process of a user classification model according to an embodiment of the present invention;

[0031] Figure 5 is a schematic diagram of main modules of a device for product recommendation according to an embodiment of the present invention;

[0032] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0033] Figure 7 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0034] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0035] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution disclosed in the present invention are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.

[0036] The existing unsupervised clustering algorithm sets the weight of each feature to 1, uses the Euclidean distance to measure the dissimilarity between samples, and finally clusters the data set D into K clusters, making the dissimilarity between samples within the cluster as low as possible, while the dissimilarity between samples between clusters as high as possible. Since the original unsupervised clustering algorithm cannot be integrated into business operation indicators, it has the following disadvantages:

[0037] 1. For refined operations based on product dimensions, it is necessary to first classify the user set of the product, then find the user set similar to each user category from all platform users, and then perform refined operations on all platform users, such as cross-marketing for high-value users, adding high-risk users to the blacklist, etc. In this scenario, it is impossible to directly use the evaluation cluster business label indicators as features. Therefore, for the original unsupervised clustering algorithm, it is impossible to directly cluster clusters with high differentiation of business label indicators, resulting in inaccurate clustering effects and inaccurate user classification results;

[0038] 2. Unable to control the ratio of the number of samples in the cluster. For example, insurance products generally have two operational goals: one is to increase the conversion of high-quality users, and the other is to avoid taking advantage of high-risk users. If the original clustering algorithm is used, a high ratio of high-risk cluster users will reduce the company's overall revenue, and a low ratio of high-risk cluster users will increase business risks. Only a reasonable ratio can find a balance between revenue and risk to maximize profits. Therefore, when there are multiple operational goals, it is impossible to control the ratio of the number of samples in the cluster, resulting in inaccurate user classification results and poor product recommendation effects.

[0039] In order to solve the above-mentioned technical problems, the present invention provides a product recommendation method, which can integrate the inter-cluster business label indicator differentiation and the sample ratio requirements between clusters into the objective function under a small-scale data volume without prior assumptions on data distribution. Under the guidance of the objective function, the weights of each feature are automatically learned to quickly build a user classification model, and clusters with high business label indicator differentiation and cluster sample ratios that meet the requirements are obtained, thereby guiding operators to formulate differentiated operation strategies and make differentiated product recommendations.

[0040] Figure 1 FIG. 1 is a schematic diagram of the main steps of the product recommendation method according to an embodiment of the present invention. Figure 1 As shown, the product recommendation method of the embodiment of the present invention mainly includes the following steps S101 to S104.

[0041] Step S101: Obtain a historical behavior data set of sampled users, and extract features from the historical behavior data set to obtain a feature vector set. The sampled users refer to existing users who have purchased the target product.

[0042] According to one embodiment of the present invention, a historical behavior dataset of a sampled user is obtained, and feature extraction is performed on the historical behavior dataset to obtain a feature vector set, which may specifically include: obtaining a historical behavior dataset of a sampled user, wherein the sampled user is an existing user of a target product, and the historical behavior dataset includes historical purchase behavior data and historical claim behavior data of the sampled user; performing feature processing on the historical behavior dataset to obtain the similarity between products corresponding to each sampled user, a purchase behavior feature vector, and a claim behavior feature vector; and normalizing the similarity between products corresponding to each sampled user, the purchase behavior feature vector, and the claim behavior feature vector to obtain the feature vector set.

[0043] According to one embodiment of the present invention, the historical purchase behavior data, historical claim behavior data and other information of existing users of a certain product can be obtained as a historical behavior data set of sampled users. Among them, the historical purchase behavior data can reflect the user's interests and potential purchasing intentions, including but not limited to the last 10 products purchased by the user, the number of products purchased in the past year, and the average number of products purchased in the past three years. The historical claim behavior data reflects the user's potential risks, including but not limited to the number of claims made by the user in the past year, the average number of claims in the past three years, the claim amount in the past year, and the average claim amount in the past three years. It should be pointed out that in order to prevent feature crossing (feature crossing is a common and very important situation in feature engineering: the training data set incorrectly contains future information.), the construction deadline of the historical purchase behavior data and the historical claim behavior data is the time point of purchasing the product.

[0044] After obtaining the historical behavior dataset of the sampled users, feature extraction is performed on the historical behavior dataset to obtain a feature vector set. Specifically, feature processing is performed on the historical behavior dataset to obtain the similarity between products corresponding to each sampled user, the purchase behavior feature vector, and the claim behavior feature vector; the similarity between products corresponding to each sampled user, the purchase behavior feature vector, and the claim behavior feature vector are normalized to obtain a feature vector set.

[0045] According to an embodiment of the present invention, feature processing is performed on the historical behavior data set to obtain the similarity between products corresponding to each sampled user, which may specifically include: based on a time window, obtaining a product list corresponding to each sampled user, and taking the product list corresponding to each sampled user as a subsequence to obtain a product sequence; constructing a sample with a sample label according to each subsequence in the product sequence; feature encoding each sample and inputting it into a neural network to train an embedding model; using the embedding model to obtain a vector representation of each product; and based on the vector representation of each product, calculating the similarity between non-target products and target products in the product list corresponding to each sampled user to obtain the similarity between products corresponding to each sampled user.

[0046] Specifically, when sampling product sequences based on time windows, for example: the time window size is set to half a year, assuming that the current time is September 8, 2023, then March 9, 2023 to September 8, 2023 is used as a time window, and the product list purchased by user A is: [Product 1, Product 2, Product 3], and the product list purchased by user B is: [Product 2, Product 5, Product 1], and between September 8, 2023 and March 9, 2023, the product list purchased by user C is: [Product 1, Product 4, Product 6, Product 5], then the product list corresponding to each sampled user is taken as a subsequence, and the final product sequence is: [[Product 1, Product 2, Product 3], [Product 2, Product 5, Product 1], [Product 1, Product 4, Product 6, Product 5]].

[0047] For the subsequences in the product sequence, the skip-gram (graph embedding algorithm) method is used to find the positive sample pairs. From the products in the non-positive sample pairs in the product library, 5-20 products are randomly selected to construct negative sample pairs. Taking the subsequence [product 2, product 5, product 1] as an example, the constructed sample pairs are shown in Table 1 below.

[0048] Table 1

[0049] Input product Output products Tag value Product 2 Product 5 1 Product 2 Product 7 0 Product 2 Product 6 0 Product 2 Product 4 0 Product 2 Product 8 0 Product 2 Product 9 0 Product 2 Product 1 1 … … … Product 5 Product 2 1 … … … Product 5 Product 1 1 … … … Product 1 Product 2 1 … … … Product 1 Product 5 1 … … …

[0050] After that, each sample can be feature encoded and input into the neural network to train the embedding model.

[0051] Figure 2 is a schematic diagram of a neural network structure selected during embedding model training in one embodiment of the present invention. When training the embedding model, specifically, the input product and the output product can be one-hot encoded (single-hot encoding) respectively, corresponding to x1 and x2 respectively, and input into Figure 2In the neural network shown, the solid line represents full connection, and the cross entropy loss function is used. The training goal is to minimize the cross entropy loss. The calculation process is as follows:

[0052] m1=W1 T *x1, where W1 is the embedding matrix, T represents the transposition operation of the embedding matrix W1, and the initial value of W1 is obtained by random initialization, and the random initialization method is generally the Xavier initialization method. The vector m1 is the vector representation of the product x1;

[0053] m2=W2 T *x2, where W2 is the Context matrix, which is generated based on the product sequence when the sample is generated. T represents the transposition operation of the context matrix W2, and the vector m2 is the vector representation of product x2. For example, for the product sequence [product 2, product 5, product 1], the context matrix corresponding to product 1 is constructed by taking "product 5, product 2" as the context;

[0054] m3=W3 T *[m1,m2], where [] is a vector concatenation operation, where a vector concatenation operation refers to a vector connection operation, such as a vector concatenation operation;

[0055] o=W4 T *m3, o represents label, W3 and W4 are the weight vectors of the hidden layers of the network, and have no specific physical meaning.

[0056] Through the above embedding model training process, when the training converges, the embedding matrix W1 can be obtained.

[0057] Then, when using the embedding model to obtain the vector representation of each product, specifically, for a product i, first obtain the one-hot encoding x of product i i , then calculate n i =W1 T *x i , n i That is the vector representation of product i.

[0058] After obtaining the vector representation of each product, the similarity between the non-target products and the target products in the product list corresponding to each sampled user can be calculated according to the similarity algorithm (such as cosine similarity) to obtain the similarity between the products corresponding to each sampled user. If the number of non-target products is large, the similarity between only the 10 products recently purchased by the sampled user and the target product can be calculated.

[0059] Finally, the similarity between products corresponding to each sampled user, the purchase behavior feature vector, and the claim behavior feature vector are normalized to obtain a feature vector set. Among them, the purchase behavior feature vector can be directly extracted from the historical purchase behavior data of the sampled user, and the claim behavior feature vector can be directly extracted from the historical claim behavior data of the sampled user. By normalizing the feature vector, the influence of the feature dimension can be removed, making the model training results more accurate.

[0060] According to another embodiment of the present invention, before constructing a sample with a sample label according to each subsequence in the product sequence, it may also include: based on the set product retention probability, under-sampling the products in the product sequence whose frequency of appearance exceeds a set threshold, so as to correct the product sequence. This step is to reduce the sampling probability of high-frequency products. For high-frequency products, such as product 1, if the embedding model is directly trained without under-sampling, product 1 will be similar to most products. Therefore, under-sampling can be performed based on the product retention probability P. When P(product 1) = 0.8, it means that 80% of product 1 will be retained. The retention probability P of product i 产品i The calculation formula is as follows:

[0061]

[0062] Where: C i represents the frequency of product i appearing in the product sequence, and C represents the total number of products in the product sequence. In this way, the similarity calculation results between products can be made more accurate by reducing the sampling probability of high-frequency products.

[0063] Step S102: Learn the optimal feature weight combination under the guidance of a predefined objective function, wherein the objective function is constructed by combining the discrimination between clusters and the penalty factor for the sample ratio between clusters. In conjunction with the embodiment of the present invention, the objective function corresponds to two optimization goals: maximizing the discrimination between clusters and controlling the sample ratio of high-risk clusters. Accordingly, the present invention constructs the objective function by combining the discrimination between clusters and the penalty factor for the sample ratio between clusters.

[0064] According to one embodiment of the present invention, learning the optimal feature weight combination under the guidance of a predefined objective function may specifically include: considering the feature weight as a hyperparameter, and calculating the optimal feature weight combination based on a Bayesian optimization algorithm under the guidance of the predefined objective function.

[0065] Moreover, before learning the optimal feature weight combination under the guidance of a predefined objective function, it may also include: using a graphical estimation algorithm to determine the number of clustering clusters; and the degree of distinction between the clustering clusters is related to the number of clustering clusters. In an embodiment of the present invention, the number of clustering clusters k (k>=2) can be determined using the elbow rule. For the unsupervised clustering model Kmeans, the number of clusters k is a hyperparameter, and the number of clusters k is usually determined with the help of the elbow rule. Specifically, k is increased by 1 each time, and the corresponding SSE index is calculated. When the k value is less than the true number of clusters, the SSE value will decrease significantly for every increase of k by 1; when the k value is greater than the true number of clusters, the change in the SSE value will not be so obvious for every increase of k by 1. Therefore, the k value at the turning point is the number of true clusters, similar to the position of the elbow. When determining the number of clustering clusters, an elbow diagram will be displayed to assist the user in determining the number of clusters k. Figure 3 Schematic diagram of an elbow diagram of an embodiment of the present invention. Figure 3 As shown in the figure, when the k value is 4, it means that the number of clusters corresponding to the elbow graph is 4.

[0066] According to an embodiment of the present invention, the user classification system supports custom objective functions and feature weight search spaces. The user needs to set the upper and lower boundaries of the feature weight search space, such as setting the search boundary of the number of products purchased in the past year to [-1,1]. The user classification system supports custom objective functions based on business indicators. Specifically, there are two optimization goals: maximizing the distinction between clusters and controlling the sample ratio of high-risk clusters. The process of defining the objective function is as follows:

[0067] 1. Define the calculation formula for the payout ratio of each cluster: Among them, PR is the payout ratio, ∑P i is the intra-cluster compensation sum, ∑EE i is the earned premium within the cluster and;

[0068] 2. Define the calculation formula for each cluster’s purchase intention: Among them, L is the purchase intention index, C i is the number of times each user in the cluster purchases the product, N is the number of users in the cluster, and the sigmoid function form is: The value range of L is [0.5,1), and x is any real number;

[0069] 3. Define the value label of each cluster: label = (1-PR)*L. The larger the label value, the greater the value of the cluster.

[0070] 4. The pseudo code for defining the inter-cluster discrimination is as follows, where S is the inter-cluster discrimination index, i is the cluster index, label iis the value label of the i-th cluster, label0 is the value label of the 0-th cluster. init←max(init,label i ) This step is to ensure that the value increases gradually with the increase of cluster number, so the 0th cluster represents a high-risk cluster:

[0071] S←0

[0072] init←label0

[0073] For i←1to k;

[0074] S←S+label i- init

[0075] init←max(init,label i );

[0076] In the above pseudocode, the symbol "←" usually represents an assignment operation, which means assigning the value of the expression on the right side of the symbol to the variable on the left side of the symbol;

[0077] 5. Define the penalty factor for the proportion of high-risk cluster samples: The abs function represents the absolute value, N0 represents the number of samples in the 0th cluster, ∑N i represents the total number of samples, r is the proportion of high-risk cluster samples set based on business operation indicators;

[0078] 6. The inter-cluster discrimination and the penalty factor of the high-risk cluster sample ratio are combined into the final objective function: T = S-σ. The purpose of iterative optimization is to obtain the optimal feature weight combination when maximizing T.

[0079] When learning the optimal feature weight combination under the guidance of a predefined objective function, the feature weights are regarded as hyperparameters. Based on the Bayesian optimization algorithm, the optimal set of feature weights is selected under the guidance of the objective function. The Bayesian optimization algorithm can effectively use the prior information of the searched points to determine the next search point, so the search efficiency is higher than that of grid search and random search. The Bayesian optimization algorithm is implemented in an iterative manner based on sequential model optimization (SMBO), which includes two core parts. One is the prior function (PF), which uses the prior information of the searched sample points to fit the mean and variance of the objective function at other points, that is, the posterior probability distribution of the objective function. The other is the acquisition function (AC), which is constructed using the mean and variance of the objective function value. The acquisition function value represents the degree to which the point is worth exploring. The extreme point of the acquisition function is selected as the next search point. The specific implementation process of SMBO is as follows:

[0080] 1. Customize the number of randomly generated initial sampling points to form a set H, set H = [(x1,f(x1)),(x2,f(x2)),…,(x k ,f(x k ))], where x i is a set of feature weight combinations, f(x i ) is the objective function value to be optimized, i = 1, 2, …, k;

[0081] 2. Fit the posterior probability model M based on the data set H. This step is to use the prior function to model the objective function to be optimized, obtain the posterior probability distribution p(y|x) of the objective function, and determine the fluctuation range of the objective function value. The prior function of the embodiment of the present invention adopts the tree structure Parzen estimation method (Tree Parzen Estimator, TPE). In each experiment, for each hyperparameter, TPE fits a Gaussian mixture model l(x) for the hyperparameter related to the optimal target value, and fits another Gaussian mixture model g(x) for the remaining hyperparameters, where the objective function value y corresponding to a certain γ quantile of the objective function value is * To partition l(x) and g(x), γ can be customized by the user f(x i ) is the objective function value to be optimized, and y* represents the objective function value corresponding to the γ quantile;

[0082] 3. Construct the acquisition function S based on the posterior probability distribution of the target function, and take the extreme point x of the acquisition function S as * As the next search point. In the embodiment of the present invention, the acquisition function S is Expected Improvement (EI, selecting the point with the maximum expected improvement as the next search point). After the posterior probability model M is introduced, the L-BFGS optimization algorithm is used to solve the extreme point x of l(x) / g(x) * As the next search point;

[0083] 4. Find x * The corresponding objective function value f(x * ), and output (x * ,f(x * ));

[0084] 5. (x * ,f(x * )) is added to the historical search set H;

[0085] 6. If the maximum number of iterations is reached, the iteration ends and f(x * ) is the largest, which is the optimal feature weight combination.

[0086] Step S103: Performing model training based on the optimal feature weight combination and the feature vector set to obtain a user classification model.

[0087] In an embodiment of the present invention, the user classification model is obtained by performing model training based on the optimal feature weight combination and the feature vector set, which may specifically include: based on the optimal feature weight combination and the feature vector set, using a clustering algorithm to perform model training to obtain the user classification model, and calculating the value label of each cluster cluster as the output of the user classification model. Among them, when training the user classification model, the clustering algorithms that can be used include Kmeans, DBSCAN (Density-Based Spatial Clustering of Applications with Noise, a more representative density-based clustering algorithm), etc., which are not limited by the present invention.

[0088] Specifically, based on the optimal feature weight combination χ and the training set after feature engineering (i.e., the similarity between the products corresponding to each sampled user, the purchase behavior feature vector and the claim behavior feature vector are normalized to obtain a feature vector set), a Kmeans clustering algorithm based on Euclidean distance is used to build a user classification model. And the value label of each cluster is calculated. The calculation formula of the value label can refer to the calculation method in step S102 (calculated according to the formula label = (1-PR) * L). Finally, according to the order of value from high to low, the clusters are named group A, group B, group C, ..., group N.

[0089] Step S104: Use the user classification model to classify users, and make product recommendations to users based on the user classification results. After the user classification model is trained, feature processing can be performed on each user to be classified based on the historical behavior data set of the user to be classified to obtain a corresponding feature vector set, and then the feature vector set of the user to be classified is input into the user stratification model to obtain classification information corresponding to the user to be classified, and the classification information is obtained based on the classification results output from the user classification model. In an embodiment of the present invention, the users to be classified are, for example, all users except the sampled users who purchased the target product. The input of the user classification model (the feature vector set of the user to be classified) can be obtained based on the feature processing method in step S101, and then the user classification model is used to obtain the cluster to which each user to be classified belongs.

[0090] Finally, after obtaining the clusters to which the users to be classified belong, differentiated business strategies and product recommendation strategies can be provided for users of different clusters. Taking five cluster groups A to E as an example, the following are included but not limited to:

[0091] 1. Configure the high-risk group A users as a blacklist into the company's risk control system to reduce business risks;

[0092] 2. For medium-value user groups B and C, since they purchase relatively few of our products, we can mainly use telephone marketing to popularize product knowledge to users, thereby promoting conversion;

[0093] 3. For high-value user groups D and E, since they are already loyal users of the company, you can let them experience the product first by giving them gifts, and then make return calls to promote conversion.

[0094] Figure 4 FIG. 1 is a schematic diagram of the training process of a user classification model according to an embodiment of the present invention. Figure 4 As shown, in one embodiment of the present invention, the training process of the user classification model mainly includes the following steps:

[0095] Step A: Obtain the historical behavior dataset of existing users of the target product, including historical purchase behavior, historical claims behavior and other information. Historical purchase behavior information can reflect the user's interests and potential purchasing intentions, including but not limited to the last 10 products purchased by the user, the number of products purchased in the past year, and the average number of products purchased in the past three years. Historical claims behavior reflects the user's potential risks, including but not limited to the number of claims made by the user in the past year, the average number of claims in the past three years, the claim amount in the past year, and the average claim amount in the past three years. It should be pointed out that in order to prevent feature crossing, the deadline for constructing historical purchase behavior and historical claims behavior information is the time point of purchasing the product;

[0096] Step B: Extract features from the historical behavior data set to obtain a feature vector set. The feature vector set includes the similarity between products corresponding to each sampled user, the purchase behavior feature vector, and the claim behavior feature vector;

[0097] Step C: Use the elbow rule to determine the number of clusters k, where k>=2;

[0098] Step D: Define the objective function and feature weight search space. Construct the objective function by combining the discrimination between clusters and the penalty factor for the sample ratio between clusters; set the upper and lower boundaries of the feature weight search space, for example, the search boundary of the feature of the number of products purchased in the past year is set to [-1,1];

[0099] Step E: Learn the optimal feature weight combination under the guidance of the objective function. The user stratification system regards the feature weight as a hyperparameter and selects the optimal set of feature weights based on the Bayesian optimization algorithm under the guidance of the objective function;

[0100] Step F: Construct a user classification model based on the optimal feature weight combination and feature vector set. For example, the Kmeans algorithm based on Euclidean distance can be used to construct the user classification model. In addition, the value label of each cluster is calculated, and the clusters are named group A, group B, group C, ..., group N;

[0101] Step G: Develop differentiated product recommendation strategies for users in each cluster.

[0102] Figure 5 FIG. 1 is a schematic diagram of the main modules of the device for product recommendation according to an embodiment of the present invention. Figure 5 As shown, the product recommendation device 500 of the embodiment of the present invention mainly includes a feature processing module 501, a weight learning module 502, a model training module 503 and a classification recommendation module 504.

[0103] A feature processing module 501 is used to obtain a historical behavior data set of a sampled user, and perform feature extraction on the historical behavior data set to obtain a feature vector set;

[0104] A weight learning module 502 is used to learn the optimal feature weight combination under the guidance of a predefined objective function, wherein the objective function is constructed by combining the discrimination between clusters and the sample ratio penalty factor between clusters;

[0105] A model training module 503 is used to perform model training based on the optimal feature weight combination and the feature vector set to obtain a user classification model;

[0106] The classification recommendation module 504 is used to classify users using the user classification model and recommend products to users based on the user classification results.

[0107] According to one embodiment of the present invention, the feature processing module 501 can also be used to: obtain a historical behavior data set of a sampled user, wherein the sampled user is an existing user of the target product, and the historical behavior data set includes the historical purchase behavior data and historical claim behavior data of the sampled user; perform feature processing on the historical behavior data set to obtain the similarity between products corresponding to each sampled user, the purchase behavior feature vector, and the claim behavior feature vector; and perform normalization processing on the similarity between products corresponding to each sampled user, the purchase behavior feature vector, and the claim behavior feature vector to obtain the feature vector set.

[0108] According to another embodiment of the present invention, the feature processing module 501 can also be used to: based on the time window, obtain the product list corresponding to each sampled user, and take the product list corresponding to each sampled user as a subsequence to obtain a product sequence; construct a sample with a sample label according to each subsequence in the product sequence; perform feature encoding on each sample and input it into the neural network to train the embedding model; use the embedding model to obtain a vector representation of each product; based on the vector representation of each product, calculate the similarity between the non-target product and the target product in the product list corresponding to each sampled user to obtain the similarity between the products corresponding to each sampled user.

[0109] According to another embodiment of the present invention, the feature processing module 501 may also be used for: before constructing a sample with a sample label according to each subsequence in the product sequence, based on a set product retention probability, under-sampling the products whose occurrence frequency in the product sequence exceeds a set threshold, so as to correct the product sequence.

[0110] According to another embodiment of the present invention, the product recommendation device 500 may further include a module for determining the number of clusters (not shown in the figure), which is used to: determine the number of clusters using a graphical estimation algorithm before learning the optimal feature weight combination under the guidance of a predefined objective function; and the degree of distinction between the clusters is related to the number of clusters.

[0111] According to another embodiment of the present invention, the weight learning module 502 may also be used to: regard the feature weights as hyperparameters, and calculate the optimal feature weight combination based on the Bayesian optimization algorithm under the guidance of a predefined objective function.

[0112] According to another embodiment of the present invention, the model training module 503 can also be used to: based on the optimal feature weight combination and the feature vector set, use a clustering algorithm to perform model training to obtain a user classification model, and calculate the value label of each cluster cluster as the output of the user classification model.

[0113] According to the technical solution of the embodiment of the present invention, by obtaining the historical behavior data set of sampled users, feature extraction is performed on the historical behavior data set to obtain a feature vector set; under the guidance of a predefined objective function, the optimal feature weight combination is learned, and the objective function is constructed by combining the discrimination between clusters and the sample ratio penalty factor between clusters; model training is performed based on the optimal feature weight combination and the feature vector set to obtain a user classification model; the user classification model is used to classify users, and a technical solution for product recommendations to users based on the user classification results is provided, by integrating the discrimination of business label indicators between clusters and the sample ratio requirements between clusters into the objective function, and under the guidance of the objective function, each feature weight is automatically learned, so as to quickly construct a user classification model to obtain clusters with high discrimination of business label indicators and cluster sample ratios that meet the requirements, thereby improving the accuracy of user classification results and improving product recommendation effects.

[0114] Figure 6 An exemplary system architecture 600 is shown to which the method for product recommendation or the apparatus for product recommendation according to an embodiment of the present invention may be applied.

[0115] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, 603, network 604 and server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0116] Users can use terminal devices 601, 602, and 603 to interact with server 605 through network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0117] The terminal devices 601 , 602 , and 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.

[0118] Server 605 may be a server that provides various services, such as a backend management server that supports shopping websites browsed by users using terminal devices 601, 602, and 603 (for example only). The backend management server may obtain a historical behavior data set of sampled users for data such as received product recommendation requests, extract features from the historical behavior data set to obtain a feature vector set; learn the optimal feature weight combination under the guidance of a predefined objective function, the objective function is constructed by combining the discrimination between clusters and the sample ratio penalty factor between clusters; perform model training based on the optimal feature weight combination and the feature vector set to obtain a user classification model; use the user classification model to classify users, and perform product recommendations and other processing on users based on the user classification results, and feed back the processing results (such as recommended products, user classification results - for example only) to the terminal device.

[0119] It should be noted that the product recommendation method provided in the embodiment of the present invention is generally executed by the server 605 , and accordingly, the product recommendation device is generally set in the server 605 .

[0120] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0121] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device or a server suitable for implementing an embodiment of the present invention. Figure 7 The terminal device or server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0122] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0123] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0124] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.

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

[0126] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0127] The units or modules involved in the embodiments of the present invention may be implemented in software or hardware. The units or modules described may also be provided in a processor. For example, they may be described as follows: a processor includes a feature processing module, a weight learning module, a model training module, and a classification recommendation module. The names of these units or modules do not, in some cases, constitute limitations on the units or modules themselves. For example, a classification recommendation module may also be described as "a module for classifying users using the user classification model and recommending products to users based on the user classification results."

[0128] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: obtaining a historical behavior data set of sampled users, extracting features from the historical behavior data set to obtain a feature vector set; learning the optimal feature weight combination under the guidance of a predefined objective function, the objective function is constructed by combining the discrimination between clusters and the sample ratio penalty factor between clusters; training a model based on the optimal feature weight combination and the feature vector set to obtain a user classification model; using the user classification model to classify users, and recommending products to users based on the user classification results.

[0129] According to the technical solution of the embodiment of the present invention, by obtaining the historical behavior data set of sampled users, feature extraction is performed on the historical behavior data set to obtain a feature vector set; under the guidance of a predefined objective function, the optimal feature weight combination is learned, and the objective function is constructed by combining the discrimination between clusters and the sample ratio penalty factor between clusters; model training is performed based on the optimal feature weight combination and the feature vector set to obtain a user classification model; the user classification model is used to classify users, and a technical solution for product recommendations to users based on the user classification results is provided, by integrating the discrimination of business label indicators between clusters and the sample ratio requirements between clusters into the objective function, and under the guidance of the objective function, each feature weight is automatically learned, so as to quickly construct a user classification model to obtain clusters with high discrimination of business label indicators and cluster sample ratios that meet the requirements, thereby improving the accuracy of user classification results and improving product recommendation effects.

[0130] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for product recommendation, characterized in that: include: Acquire a historical behavior data set of a sampled user, and perform feature extraction on the historical behavior data set to obtain a feature vector set; Learning the optimal feature weight combination under the guidance of a predefined objective function, which is constructed by combining the discrimination between clusters and the penalty factor of the sample ratio between clusters; Performing model training based on the optimal feature weight combination and the feature vector set to obtain a user classification model; The user classification model is used to classify users, and product recommendations are made to users based on the user classification results.

2. The method according to claim 1, characterized in that Obtaining a historical behavior data set of a sampled user, and performing feature extraction on the historical behavior data set to obtain a feature vector set, including: Acquire a historical behavior data set of a sampled user, where the sampled user is an existing user of the target product, and the historical behavior data set includes historical purchase behavior data and historical claim behavior data of the sampled user; Performing feature processing on the historical behavior data set to obtain the similarity between products corresponding to each sampled user, a purchase behavior feature vector, and a claim behavior feature vector; The similarity between products corresponding to each sampled user, the purchase behavior feature vector and the claim behavior feature vector are normalized to obtain the feature vector set.

3. The method according to claim 2, characterized in that Perform feature processing on the historical behavior data set to obtain the similarity between products corresponding to each sampled user, including: Based on the time window, obtain a product list corresponding to each sampled user, and use the product list corresponding to each sampled user as a subsequence to obtain a product sequence; According to each subsequence in the product sequence, construct a sample with a sample label; Each sample is feature encoded and then input into the neural network to train the embedding model; Using the embedding model to obtain a vector representation of each product; Based on the vector representation of each product, the similarity between the non-target product and the target product in the product list corresponding to each sampled user is calculated to obtain the similarity between the products corresponding to each sampled user.

4. The method according to claim 3, characterized in that Before constructing a sample with a sample label according to each subsequence in the product sequence, the method further includes: Based on the set product retention probability, under-sampling processing is performed on products in the product sequence whose occurrence frequency exceeds a set threshold, so as to correct the product sequence.

5. The method according to claim 1, characterized in that Before learning the optimal feature weight combination under the guidance of a predefined objective function, it also includes: Use a graphical estimation algorithm to determine the number of clusters; Furthermore, the degree of distinction between the clusters is related to the number of the clusters.

6. The method according to claim 1, characterized in that Learn the optimal feature weight combination under the guidance of a predefined objective function, including: The feature weights are regarded as hyperparameters, and the optimal feature weight combination is calculated based on the Bayesian optimization algorithm under the guidance of the predefined objective function.

7. The method according to claim 1, characterized in that Performing model training based on the optimal feature weight combination and the feature vector set to obtain a user classification model includes: Based on the optimal feature weight combination and the feature vector set, a clustering algorithm is used to perform model training to obtain a user classification model, and a value label of each cluster is calculated as an output of the user classification model.

8. A device for product recommendation, characterized in that: include: A feature processing module is used to obtain a historical behavior data set of a sampled user, and perform feature extraction on the historical behavior data set to obtain a feature vector set; A weight learning module is used to learn the optimal feature weight combination under the guidance of a predefined objective function, wherein the objective function is constructed by combining the discrimination between clusters and the sample ratio penalty factor between clusters; A model training module, used for performing model training based on the optimal feature weight combination and the feature vector set to obtain a user classification model; The classification recommendation module is used to classify users using the user classification model and recommend products to users based on the user classification results.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.