Method for predicting purchase intention of user
By constructing the initial data set and performing data preprocessing and clustering analysis, and combining advanced algorithms to predict user purchase intentions, the shortcomings of traditional prediction methods are solved, and personalized, high-precision and real-time prediction effects are achieved.
Patent Information
- Application Number
- CN202510223919.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-05-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional user purchasing demand forecasting methods have problems such as limited data source and scale, insufficient analysis capabilities, poor real-time performance, lack of personalization and accuracy, and weak automation and scalability, which are difficult to meet complex and multi-dimensional user needs and market changes.
By obtaining the user's basic information and behavior sequences, the initial data set is constructed, and data preprocessing, clustering analysis and product feature extraction strategies are performed, and personalized and high-precision user purchase intention prediction is combined with advanced algorithms.
It realizes real-time, dynamic personalized and high-precision user purchase intention prediction, has stronger automation and scalability capabilities, and can effectively guide enterprises to optimize operations and market strategies.
Smart Images

Figure CN120067763A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of predicting user purchase intention, and specifically to a method for predicting user purchase intention. Background Art
[0002] Predicting user purchase demand can significantly improve the user experience, reduce information overload through personalized recommendations, and quickly meet user needs. At the same time, it helps the platform optimize operational efficiency, including precision marketing, inventory management, and dynamic pricing strategies, thereby reducing costs, increasing conversion rates, and commercial revenues. In addition, demand forecasting can also identify potential customers, reduce user churn, and provide data support for the enterprise's market trend analysis and product optimization, making the enterprise more competitive.
[0003] Compared with big data prediction, traditional prediction methods have limitations in data sources and scale, insufficient analysis capabilities, poor real-time performance, lack of personalization and precision, as well as weak automation and scalability. Traditional methods rely on small samples and simple statistics, making it difficult to reflect complex and multi-dimensional user needs and market changes, and the prediction results are lagging, making it difficult to quickly respond to dynamic environments. At the same time, its analysis method based on group averages is difficult to meet the needs of individual users, resulting in inaccurate recommendations.
[0004] The present invention proposes a method for predicting user purchase intention, which can perform personalized and high-precision prediction in real time and dynamically through multi-dimensional data integration and advanced algorithm support, and has stronger automation and scalability. Summary of the Invention
[0005] The present invention provides a method for predicting user purchase intention, which helps to solve the problems mentioned in the above background art.
[0006] In a first aspect, the present application provides a method for predicting user purchase intention, adopting the following technical solution: The method for predicting user purchase intention includes: S1. Obtain the basic information and behavior sequence of the user to form an initial data set {(u, t, e, p)}, where u represents the user ID, t represents the timestamp, e represents the behavior type, and p represents the product code; S2. Execute a data preprocessing strategy on the initial data set to extract the feature matrix of the initial data set; S3. According to the feature matrix, execute a clustering analysis strategy to divide users into different user groups; Execute a silhouette coefficient classification strategy to obtain all user groups; S4. According to the initial data set, execute a product feature extraction strategy to obtain a product feature matrix; Based on the product feature matrix, execute a product purchase probability prediction strategy to predict the probability of a user purchasing a product; S5. According to the probability of predicting a user's purchase of a product, execute a personalized recommendation strategy to provide product recommendations to the user.
[0007] By obtaining the user's basic information and behavior sequence and forming an initial data set, the browsing, clicking, favoriting, purchasing and other behavior trajectories of the user can be comprehensively recorded. In this process, the introduction of timestamps can provide support for the dynamic analysis of behaviors in the time dimension, while the behavior types and product codes help to refine the user's interest points and consumption preferences. Through the accurate collection of this information, enterprises can understand the user behavior patterns and decision-making paths more deeply, so as to provide data support for business strategy optimization. In the data preprocessing process, steps such as centering the feature matrix, dimensionality reduction and mapping to a new feature subspace not only improve the effectiveness of the data, but also significantly reduce data redundancy and noise. This lays a reliable data foundation for subsequent user group segmentation and purchase intention prediction. Finally, the accurate user behavior insight ability can help enterprises optimize their business processes more efficiently, such as by identifying high-potential users in advance, predicting potential churn risks and optimizing the allocation of marketing resources, so as to improve the overall operation efficiency and profitability.
[0008] Preferably, the data preprocessing strategy is executed on the initial data set to extract the feature matrix of the initial data set, including: The feature matrix where f ij represents the j-th eigenvalue of user u i , n is the number of users, m is the number of features, 1 ≤ i ≤ n, 1 ≤ j ≤ m; Filter the elements in the feature matrix: Represent the feature matrix as X = [X 1 X 2 … X m , where X j represents the j-th eigenvector; Perform data centering on the feature matrix where represents the mean of the j-th eigenvector, Calculate the covariance matrix of the feature matrix (X') T The superscript indicates the transpose of X'; Decompose the covariance matrix, each eigenvector corresponds to an eigenvalue, sort the eigenvalues from largest to smallest, and the eigenvectors corresponding to the first d eigenvalues form a new feature subspace V d = [v 1 v 2 … v d , where v 1 v 2… v d are eigenvectors respectively; Map the feature matrix X to a new feature subspace: Y = X × V d = [X 1 X 2 … X m × [v 1 v 2 … v d = [Y 1 Y 2 … Y d , where the dimension of matrix Y is n × d.
[0009] Preferably, perform a clustering analysis strategy according to the feature matrix to divide users into different user groups, including: Use the K-means clustering algorithm to classify users: Randomly generate k clusters for the feature matrix Y = [Y 1 Y 2 … Y d , and each cluster contains several feature vectors. All clusters are represented as [C 1 C 2 … C k ; For each cluster, calculate the mean of all feature vectors in the cluster, and the result is recorded as the centroid Obtain k centroids For each feature vector in Y = [Y 1 Y 2 … Y d , calculate the distance between the feature vector and each cluster Take the corresponding cluster of the result as the cluster where the feature vector is located; Update the centroid |C j | represents the number of feature vectors in the jth cluster, and C j are all the feature vectors in the cluster.
[0010] Preferably, perform a silhouette coefficient classification strategy to obtain all user groups, including: For any feature vector Y i ; Calculate the average distance from the feature vector to other feature vectors within the cluster: g is the number of elements in the cluster; Obtain the nearest cluster to the feature vector outside the cluster, and calculate the average distance from the feature vector to other feature vectors within the nearest cluster: Calculate the silhouette coefficient: Calculate the overall silhouette coefficient: Obtain the g value corresponding to the minimum overall silhouette coefficient as the number of clusters of the K-means clustering algorithm.
[0011] By classifying users into different groups according to user behavior data and feature matrices using clustering analysis and silhouette coefficient classification strategies, precise user stratification management can be achieved. By customizing services for different groups, such as recommending high-value-added products to high-value users or providing coupon retention measures to potential churn users, enterprises can effectively improve the user experience. The personalized recommendation strategy is based on purchase probability prediction. By analyzing behavioral characteristics such as the number of visits, purchases, and interaction times of products, a product recommendation list that better meets the needs of users is provided. This precise matching can not only meet the diverse consumption needs of users but also enhance the stickiness of users to the platform. The possibility for users to find their desired products in a shorter time is increased, which not only enhances the convenience of platform services but also subtly shapes users' trust and loyalty to the platform.
[0012] Preferably, the execution of the product feature extraction strategy according to the initial data set to obtain the product feature matrix includes: Obtain the initial data set \(\{(u, t, e, p)\}\); Construct the product feature matrix \(P\); For any product with product label \(m\): Calculate the number of visits, purchases, collections, and add-to-cart times of the product; The number of visits \(z\) m \(=\text{Count}(e\) m \(=\text{browse}, p = m)\); The number of purchases \(x\) m \(=\text{Count}(e\) m \(=\text{purchase}, p = m)\); The number of collections \(y\) m \(=\text{Count}(e\) m \(=\text{collection}, p = m)\); The number of add-to-cart times \(w\) m \(=\text{Count}(e\) m \(=\text{add-to-cart}, p = m)\), where \(\text{Count}\) is the counting function; Calculate the most recent user interaction time \(=\text{current time}-\max(t\) m \(|p = m)\); Calculate the average interaction interval time: \(\Delta t\)m = Sum(Time interval) / Number of interactions; Calculate the number of users interacting with product code m: o m = Count(Distinct user IDs | p = m); Calculate the proportion of users likely to purchase a product: K r = o r / Count(u r ); Product feature matrix Where r is the total number of products.
[0013] By constructing the product feature matrix and predicting the user purchase probability, the platform can accurately determine which products have a high likelihood of being purchased, thereby reasonably arranging inventory and supply chain resources to avoid inventory backlogs or out - of - stock issues. In addition, the platform can optimize the allocation of marketing resources based on the prediction results. For example, focus the advertising budget on user groups likely to purchase high - value products. Through this optimized allocation of resources, enterprises can achieve higher returns at lower costs. Moreover, the prediction results can also provide data support for dynamic pricing strategies. For example, for products with strong demand, the price can be appropriately increased to improve profits; while for products with low demand, consumption can be stimulated through time - limited discounts, promotional activities, etc. Based on data - driven precise prediction and optimized resource allocation, enterprises can not only reduce operating costs but also significantly improve market response capabilities and competitiveness.
[0014] Preferably, based on the product feature matrix, execute the product purchase probability prediction strategy to predict the probability of a user purchasing a product, including: Obtain the feature matrix Y; Concatenate the feature matrix Y and the product feature matrix P into a joint feature vector h ij = [Y i || P j ; Predict the probability that user u i purchases product j. The probability formula: Where λ T is the transpose of the weight vector, and σ is the bias term.
[0015] Preferably, based on the product feature matrix, execute the product purchase probability prediction strategy to predict the probability of a user purchasing a product, including: Calculate the loss function: Update λ and σ by gradient; Calculate as the new weight vector; Calculate as the new bias term, where η is the learning rate.
[0016] Preferably, according to the probability of predicting a user's purchase of a product, a personalized recommendation strategy is executed to provide product recommendations to the user, including: For any user: Obtain the probabilities of the predicted purchases of all products by the user, calculate the average value of all the probabilities, and denote it as the average probability; Obtain the products with probabilities greater than the average probability, and recommend products to the user in descending order of probability.
[0017] By obtaining user data in real time and dynamically updating the prediction model, the changing trend of market demand can be accurately grasped. Enterprises can not only better capture short-term market opportunities, but also formulate more forward-looking strategic plans based on long-term data accumulation and analysis. For example, after predicting the demand growth trend of a certain type of product in the future, an enterprise can layout the relevant supply chain or R & D investment in advance to seize the market opportunity. At the same time, the combination of user stratification and product prediction model can also support accurate market segmentation and product positioning strategies. Enterprises can adjust product design and marketing methods according to the preferences of different groups to enhance the overall competitive advantage. This innovative ability based on big data prediction not only enhances the market response ability of enterprises, but also provides a strong guarantee for their long-term development.
[0018] The present invention has the following beneficial effects: 1. For the user purchase intention prediction method, by collecting the basic information and behavior sequences of users to form an initial data set, enterprises can comprehensively record the complete behavior chain of users from browsing, clicking to purchasing. These data not only contain the dynamic changes of behavior time, but also cover the interest preferences and purchase tendencies of users, providing comprehensive support for user behavior analysis. Especially through the construction and optimization of the feature matrix, data preprocessing can effectively remove noise and reduce redundancy to ensure the accuracy of the analysis results.
[0019] 2. For the user purchase intention prediction method, accurate behavior insights can help enterprises identify potential high-value users and predict possible user churn behaviors. Based on this, enterprises can formulate personalized user retention strategies and resource allocation plans, thereby improving the pertinence of marketing and the efficiency of business operations. For example, for different user groups, their main needs can be identified through historical behaviors, and customized product or service solutions can be provided for them. Through data-driven insights, enterprises can not only quickly respond to market changes, but also achieve a closed-loop from user insights to strategy optimization, thereby greatly improving the accuracy and effectiveness of operation decisions.
[0020] 3. The user purchase intention prediction method, based on clustering analysis and silhouette coefficient classification strategy, enables the system to subdivide users into different groups and precisely match services according to the characteristics of each group. For example, new products are recommended to high-frequency users, and coupons are pushed to low-frequency users to retain them, greatly enhancing the pertinence of the user experience. Through the prediction of the probability of product purchase, combining user behavior and product characteristics, the system can accurately screen the products that best match the user's interests and generate a personalized recommendation list, enabling users to quickly find the products they like. Personalized recommendations not only improve the user experience but also enhance the user's trust and stickiness to the platform. By meeting the unique consumption needs of users, the platform can strengthen the perceived value of the service by users and encourage them to use the platform service more frequently. Ultimately, this user-experience-oriented design can bring long-term user loyalty and enhance the platform's brand image in the minds of users.
[0021] 4. The user purchase intention prediction method, which uses user behavior data and product feature matrix to predict the probability of user purchase, can effectively guide enterprises in optimizing the allocation of resources. For example, by predicting product demand, enterprises can adjust the inventory structure to avoid losses caused by inventory backlogs or sales affected by out-of-stock situations. For high-demand products, enterprises can reasonably allocate production and logistics resources to ensure the balance between supply and demand. In addition, in the allocation of marketing resources, the prediction model can guide the budget allocation and precisely target the limited advertising resources at high-potential users, thereby improving the input-output ratio. Optimizing the allocation of resources not only reduces the operating costs of enterprises but also enhances the market response speed. Measures such as dynamically adjusting inventory, optimizing promotion strategies, and precisely allocating resources enable enterprises to gain an advantageous position in the rapidly changing market. Through data-driven decision-making, enterprises have achieved the transformation from resource waste to efficient operation, providing a basis for greater economic benefits.
[0022] 5. The user purchase intention prediction method, by capturing and analyzing the changes in market demand in real time for predicting the user's purchase willingness, provides data support for enterprises to formulate long-term development strategies. By predicting the trend of product demand, enterprises can gain the upper hand in the competition, such as deploying the supply chain in advance, optimizing the product portfolio, or developing new products. In a rapidly changing market environment, this data-based prediction ability can significantly enhance the market adaptability of enterprises.
[0023] 6. The user purchase intention prediction method, combining user stratification and product prediction, can also help enterprises implement more precise market segmentation and positioning strategies. The differences in the purchase needs of different groups are clearly presented through the prediction model, and enterprises can adjust product design, promotion methods, and price strategies based on this data, thereby enhancing the competitiveness of the brand in the segmented market. This market sensitivity and forward-looking layout supported by data provide enterprises with a long-term competitive advantage and also lay a solid foundation for their future expansion and innovation. Description of the Drawings
[0024] Figure 1 This is a schematic diagram of the method flow of the present invention.
[0025] Figure 2 This is a schematic diagram of the probability prediction process of the present invention.
[0026] Figure 3 This is a schematic diagram of the user classification process of the present invention. Specific embodiments
[0027] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0028] Embodiment 1, referring to Figure 1 , S1. Obtain the basic information and behavior sequence of the user to form an initial data set {(u i , t k , e j , p m )}, where u i represents the user ID, t k represents the timestamp, e j represents the behavior type, and p m represents the product code; S2. Execute a data preprocessing strategy on the initial data set to extract the feature matrix X of the initial data set; S3. According to the feature matrix, execute a clustering analysis strategy to divide users into different user groups; Execute a silhouette coefficient classification strategy to obtain all user groups; S4. According to the initial data set, execute a product feature extraction strategy to obtain a product feature matrix; Based on the product feature matrix, execute a product purchase probability prediction strategy to predict the probability of a user purchasing a product; S5. According to the predicted probability of a user purchasing a product, execute a personalized recommendation strategy to provide product recommendations for the user.
[0029] By collecting the basic information and behavior sequence of users, the system can completely record the behavior trajectory of users from browsing, clicking to purchasing, forming a detailed initial data set. These data contain the interaction behaviors of users at different time points, and at the same time reflect their interests and needs for specific products or services. Through the construction and optimization of the feature matrix, the system can effectively remove the noise and redundancy in the data, retain the truly valuable behavior features, and ensure the accuracy and reliability of the analysis results.
[0030] Using these insights, enterprises can more accurately identify user behavior patterns and explore potential business opportunities from them. For example, the system can predict users' future purchase preferences based on their historical behaviors, thus helping enterprises effectively identify high-potential users, key repeat customers, and users who may churn. Enterprises can then formulate targeted marketing strategies, such as providing exclusive offers for high-value users and pushing incentive content for low-active users, so as to achieve refined management of user behaviors.
[0031] Such precise insights enable enterprises to extract core information from complex user behaviors and provide a scientific basis for decision-making in business operations. Whether it is market positioning, product planning, or promotion strategies, they can all rely on these behavioral data for quantitative analysis and optimization, further improving business efficiency and reducing the cost of trial and error.
[0032] Execute a data preprocessing strategy on the initial data set to extract the feature matrix of the initial data set, including: Feature matrix where f ij represents the j-th eigenvalue of user u i , n is the number of users, m is the number of features, 1 ≦ i ≦ n, 1 ≦ j ≦ m; Filter the elements in the feature matrix: Represent the feature matrix as X = [X 1 X 2 … X m , where X j represents the j-th eigenvector; Perform data centering on the feature matrix where represents the mean of the j-th eigenvector, Calculate the covariance matrix of the feature matrix (X') T The superscript indicates the transpose of X'; Decompose the covariance matrix. Each eigenvector corresponds to an eigenvalue. Sort the eigenvalues in descending order, and the eigenvectors corresponding to the top d eigenvalues form a new feature subspace V d = [v 1 v 2 … v d , where v 1 v 2 … v d are eigenvectors respectively; Map the feature matrix X to the new feature subspace: Y = X × V d = [X 1X 2 … X m × [v 1 v 2 … v d = [Y 1 Y 2 … Y d , where the dimension of matrix Y is n × d.
[0033] Use the K-means clustering algorithm to classify users: Randomly generate k clusters from the feature matrix Y = [Y 1 Y 2 … Y d . Each cluster contains several feature vectors, and all the clusters are represented as [C 1 C 2 … C k ; For each cluster, calculate the mean of all the feature vectors in the cluster, and the result is denoted as the centroid Obtain k centroids For each feature vector in Y = [Y 1 Y 2 … Y d , calculate the distance between the feature vector and each cluster Take the corresponding cluster of the result as the cluster where the feature vector is located; Update the centroid |C j | represents the number of feature vectors in the j-th cluster, and C j are all the feature vectors in the cluster.
[0034] Execute the silhouette coefficient classification strategy to obtain all user groups, including: For any feature vector Y i ; Calculate the average distance from the feature vector to other feature vectors within the cluster: Obtain the nearest cluster to the feature vector outside the cluster, and calculate the average distance from the feature vector to other feature vectors within the nearest cluster: Calculate the silhouette coefficient: Calculate the overall silhouette coefficient: Obtain the g value corresponding to the minimum overall silhouette coefficient as the number of clusters of the K-means clustering algorithm.
[0035] In this embodiment, refer to Figure 3 .
[0036] Through cluster analysis and in-depth mining of user behavior characteristics, the system can divide users into multiple segments. Combining with the silhouette coefficient classification strategy, the classification quality can be further optimized, and personalized recommendation and service strategies can be designed for each user group. For example, for high-frequency purchasing users, new products or combined purchase discounts can be preferentially recommended; for occasional consumers, their purchase intention can be stimulated by pushing coupon and discount information. In addition, the system also uses the product feature matrix and purchase probability prediction model to generate a highly customized recommendation list for users. The sorting and display priority of the products browsed by users on the platform will be based on their personal interests and consumption behaviors. This targeted design can effectively shorten the time for users to find their favorite products and increase the purchase conversion rate. At the same time, personalized recommendations also enhance users' stickiness and trust in the platform, thus consolidating user loyalty.
[0037] Personalized services not only enhance users' usage experience but also invisibly build the brand image, making the enterprise more attractive in the highly competitive market. By continuously optimizing service quality and recommendation accuracy, the enterprise can make users feel unique care, forming a virtuous cycle.
[0038] According to the initial data set and the feature matrix, execute the product purchase probability prediction strategy to predict the probability of users purchasing products, including: Obtain the initial data set {(u, t, e, p)}; Construct the product feature matrix P; For any product with product label m: Calculate the number of visits, purchases, collections, and add-to-cart times of the product; The number of visits z m = Count(e m = browse, p = m); The number of purchases x m = Count(e m = purchase, p = m); The number of collections y m = Count(e m = collect, p = m); The number of add-to-cart times w m = Count(e m = add to cart, p = m), where Count is the counting function; Calculate the time of the most recent user interaction = current time - max(t m | p = m); Calculate the average interaction interval time: Δt m= Sum(Time interval) / Number of interactions; Calculate the number of users interacting with product code m: o m = Count(Distinct user IDs | p = m); Calculate the proportion of users likely to purchase a product: K r = o r / Count(u r ); Product feature matrix Where r is the total number of products.
[0039] Based on the initial dataset and the feature matrix, execute the product purchase probability prediction strategy to predict the probability that a user will purchase a product, including: Obtain the feature matrix Y; Concatenate the feature matrix Y and the product feature matrix P into a joint feature vector h ij = [Y i || P j ; Predict the probability that user u i will purchase product j, the probability formula: Where λ T is the transpose of the weight vector and σ is the bias term.
[0040] Based on the initial dataset and the feature matrix, execute the product purchase probability prediction strategy to predict the probability that a user will purchase a product, including: Calculate the loss function: Update λ and σ by gradient; Calculate as the new weight vector; Calculate as the new bias term, where η is the learning rate.
[0041] In this embodiment, refer to Figure 2 .
[0042] Based on user behavior prediction and product purchase probability analysis, the system can help enterprises achieve refined management in resource allocation. Through accurate prediction of high-demand products, enterprises can optimize the inventory structure, avoid inventory backlogs or sales losses caused by out-of-stock situations. At the same time, dynamically adjusting the supply chain according to demand fluctuations can improve the efficiency of logistics distribution and reduce the operating costs of the supply chain.
[0043] In the allocation of marketing resources, the system can optimize the advertising placement strategy based on the predicted results of users' purchase tendencies. For example, prioritize the limited marketing budget for promoting high-potential users or high-conversion products, and adopt lower-cost incentive measures for low-intent users. This not only improves the utilization rate of resources but also significantly enhances the return on investment of advertising.
[0044] This resource optimization ability enables enterprises to quickly respond to market changes, reduce ineffective investments in traditional ways, and form a more efficient operation model. From production, sales to marketing and promotion, each link can be based on data to accurately plan the use of resources, realizing the transformation from extensive operation to refined management.
[0045] According to the predicted probability of users purchasing goods, implement personalized recommendation strategies to provide users with product recommendations, including: for any user: Obtain the predicted probabilities of a user purchasing all products, calculate the average value of all probabilities, and record it as the average probability; Obtain the products with probabilities greater than the average probability, and recommend products to users in descending order of probability.
[0046] The user purchase demand prediction model can not only solve short-term operation problems but also provide strong support for the long-term development strategy of enterprises. By analyzing users' behavior trends and changes in product demands, enterprises can predict the future direction of the market, plan resources in advance, layout the supply chain, and optimize the product structure. For example, when it is predicted that the demand for a certain type of product will increase significantly, the enterprise can increase the production and inventory of this product to gain a head start in the market.
[0047] In addition, based on a detailed analysis of user stratification, enterprises can implement more accurate differential strategies in different market groups. For example, high-consumption groups can be matched with higher-end products or services, while price-sensitive groups can be attracted through discounts and promotions. With such accurate positioning, enterprises can better meet the needs of various customers and expand their market share.
[0048] This big data-based predictive ability not only helps enterprises optimize their current operational efficiency, but also provides a guarantee for them to gain a competitive advantage in the rapidly changing market. By combining user behavior analysis with strategic planning, enterprises can achieve a transformation from passive response to proactive layout, thus maintaining a long-term stable development trend in the fierce competition. It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device.
[0049] The above are only the preferred embodiments of the present invention. It should be pointed out that for those of ordinary skill in the art of this technology, without departing from the technical principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A method for predicting user purchase intention, characterized in that: include: S1. Obtain the user's basic information and behavior sequence to form the initial data set {(u, t, e, p)}, where u represents the user ID, t represents the timestamp, e represents the behavior type, and p represents the product code; S2, executing data preprocessing strategy on the initial data set to extract the feature matrix of the initial data set; S3. Based on the feature matrix, perform cluster analysis strategy to divide users into different user groups; Execute the silhouette coefficient classification strategy to obtain all user groups; S4. Execute the product feature extraction strategy based on the initial data set to obtain the product feature matrix; Based on the product feature matrix, execute the product purchase probability prediction strategy to predict the probability of users purchasing products; S5. Based on the predicted probability of the user purchasing the product, execute a personalized recommendation strategy to provide product recommendations to the user.
2. The method for predicting user purchase intention according to claim 1, characterized in that: The data preprocessing strategy is executed on the initial data set to extract the feature matrix of the initial data set, including: The feature matrix Among them, f ij Represents user u i The j-th eigenvalue of , where n is the number of users, m is the number of features, 1≦i≦n, 1≦j≦m; Filter elements in a feature matrix: The feature matrix is represented as X = [X1 X2 … X m ], where X j represents the jth eigenvector; Perform data centering on the feature matrix in, represents the mean of the jth eigenvector, Calculate the covariance matrix of the feature matrix (X') T The sign represents the transpose of X'; Decompose the covariance matrix, each eigenvector corresponds to an eigenvalue, sort the eigenvalues from large to small, and the eigenvectors corresponding to the first d eigenvalues form a new eigenspace V d =[v1 v2 … v d ], where v1 v2 …v d are the eigenvectors respectively; Map the feature matrix X to a new feature subspace: Y=X×V d =[X1 X2 … X m ]×[v1 v2 … v d ]=[Y1 Y2 … Y d ], where the dimension of matrix Y is n×d.
3. The method for predicting user purchase intention according to claim 2, characterized in that: According to the feature matrix, a cluster analysis strategy is executed to divide users into different user groups, including: Use K-means clustering algorithm to classify users: The feature matrix Y = [Y1 Y2 … Y d ] randomly generates k clusters, each of which contains several eigenvectors, and all clusters are represented as [C1 C2 … C k ]; For each cluster, calculate the mean of all feature vectors in the cluster and record the result as the centroid Get k centroids For Y=[Y1 Y2 … Y d ], calculate the distance between the feature vector and each cluster The cluster corresponding to the result is taken as the cluster where the feature vector belongs; Update centroid |C j | represents the number of eigenvectors in the jth cluster, C j are all the eigenvectors in the cluster.
4. The method for predicting user purchase intention according to claim 3, characterized in that: The execution of the silhouette coefficient classification strategy obtains all user groups, including: For any feature vector Y i ; Calculate the average distance of a feature vector to other feature vectors in its cluster: g is the number of elements in the cluster; Get the nearest cluster to the feature vector, and calculate the average distance from the feature vector to other feature vectors in the nearest cluster: Calculate the silhouette coefficient: Calculate the overall silhouette coefficient: Get the g value corresponding to the minimum overall silhouette coefficient as the number of clusters of the K-means clustering algorithm.
5. The method for predicting user purchase intention according to claim 1, characterized in that: The method of executing a product feature extraction strategy based on the initial data set to obtain a product feature matrix includes: Get the initial data set {(u, t, e, p)}; Construct product feature matrix P; For any product with product number m: Calculate the number of visits, purchases, favorites, and add-to-carts of a product; Number of visits m =Count(e m = browse, p = m); Number of purchases x m =Count(e m = purchase, p = m); Number of collections m =Count(e m =Collection, p=m); Number of purchases w m =Count(e m =Additional purchase, p=m), where Count is the counting function; Calculate the last user interaction time Calculate the average time between interactions: Δt m = Sum (time interval) / number of interactions; Calculate the number of users who interact with product code m: o m =Count(different user IDs|p=m); Calculate the proportion of users who are ready to purchase a product: K r =o r / Count(u r ); Product feature matrix Among them, r is the total number of products.
6. The method for predicting user purchase intention according to claim 5, characterized in that: The method of executing a commodity purchase probability prediction strategy based on the commodity feature matrix to predict the probability of a user purchasing a commodity includes: Get the feature matrix Y; Concatenate the feature matrix Y and the product feature matrix P into a joint feature vector h ij =[Y i ||P j ]; Predict user u i The probability formula for purchasing product j is: Among them, λ T is the transpose of the weight vector and σ is the bias term.
7. The method for predicting user purchase intention according to claim 6, characterized in that: The method of executing a commodity purchase probability prediction strategy based on the commodity feature matrix to predict the probability of a user purchasing a commodity includes: Calculate the loss function: Gradient update λ,σ; calculate as the new weight vector; calculate As a new bias term, where η is the learning rate.
8. The method for predicting user purchase intention according to claim 1, characterized in that: The method of executing a personalized recommendation strategy based on the predicted probability of the user purchasing the product to provide product recommendations to the user includes: For any user: Get the predicted probability of the user purchasing all products, calculate the mean of all probabilities, and record it as the average probability; Get products with a probability greater than the average probability, and recommend products to users in descending order of probability.