A method for analyzing e-commerce user behavior based on data mining
Through the dimensionality reduction of segmented aggregation approximation and symbolic aggregation approximation methods, combined with k-means clustering and graph modeling technology, the problems of insufficient dimensions and poor real-time performance in e-commerce user behavior analysis are solved, and multi-dimensional and dynamic user behavior analysis and precise marketing support are realized.
Patent Information
- Application Number
- CN202510373864.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-03-27
AI Technical Summary
The existing e-commerce user behavior analysis technology has insufficient dimensions, lack of in-depth correlation analysis, low data processing efficiency, poor real-time performance, and cannot fully reflect the user's real behavior patterns and preferences, making it difficult to achieve personalized recommendations and precise marketing.
By collecting user behavior data and preprocessing, the dimensionality reduction is achieved by using segmented aggregation approximation and symbol aggregation approximation methods, the comprehensive user behavior characteristics are extracted in combination with conventional and time series features, the k-means clustering algorithm is used to construct a user behavior association network, and the user behavior pattern is visualized through graph modeling technology.
It realizes multi-dimensional user behavior analysis, captures dynamic changes laws, improves data processing efficiency, reflects user needs in real time, supports personalized recommendations and precise marketing, reveals the internal relationships of the user group, and optimizes the operation strategy of e-commerce platforms.
Smart Images

Figure CN119887267B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of e-commerce, and in particular to an e-commerce user behavior analysis method based on data mining. Background Art
[0002] With the booming e-commerce industry, e-commerce platforms have accumulated massive amounts of user behavior data. This data covers a wide range of user behaviors on the platforms, including browsing, interactions, purchases, feedback, and social interactions. This data contains crucial information about user habits, preferences, and potential needs, making it extremely valuable for e-commerce platforms to implement personalized recommendations, precision marketing, and optimize user experience. However, existing user behavior analysis technologies face numerous challenges in processing this data, making it difficult to fully leverage its value.
[0003] Currently, most e-commerce platforms' user behavior analysis methods primarily focus on basic user information and simple purchasing behaviors. For example, analyzing user value solely through metrics like purchase frequency and purchase amount overlooks behavioral characteristics during browsing, interaction, and social interactions. This single-dimensional analysis fails to fully reflect users' true behavior patterns and preferences, significantly reducing the effectiveness of personalized recommendations and precision marketing. Furthermore, existing technologies fail to fully exploit the time series characteristics of user behavior data and fail to capture the dynamic changes in user behavior, further limiting the depth and accuracy of analysis.
[0004] In addition to the problem of insufficient analytical dimensions, existing technologies also suffer from a lack of deep correlation analysis. Most current methods view user behavior in isolation, failing to effectively construct a correlation network between user behaviors and revealing the inherent relationships between user groups. For example, they are unable to identify similarities or differences between different user groups, making it difficult to achieve accurate user group segmentation and behavior prediction. Furthermore, existing technologies are often inefficient when processing large-scale data and have difficulty reflecting changes in user behavior in real time. This lack of real-time performance makes it difficult for e-commerce platforms to capture users' immediate needs and behavioral changes, making it difficult to achieve dynamic personalized recommendations and precision marketing.
[0005] In response to the above problems, the present invention provides an e-commerce user behavior analysis method based on data mining. Summary of the Invention
[0006] The purpose of this invention is to solve the problems of insufficient analysis dimensions, lack of deep correlation analysis, low data processing efficiency and poor real-time performance in the existing technology, and to propose an e-commerce user behavior analysis method based on data mining.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: a method for analyzing e-commerce user behavior based on data mining, comprising the following steps:
[0008] Step S1, collecting user behavior data through the e-commerce platform and pre-processing the data;
[0009] Step S2, using a segmented aggregation approximation method to perform dimensionality reduction on the pre-processed user behavior data;
[0010] Step S3: converting the dimensionality-reduced data into a symbolic sequence based on a symbolic aggregation approximation method to extract typical behavior patterns that reflect user behavior patterns;
[0011] Step S4, combining conventional behavioral characteristic indicators and behavioral characteristics based on time series to extract comprehensive behavioral characteristics of the user;
[0012] Step S5: performing cluster analysis on the typical behavior patterns of users based on the k-means clustering algorithm to divide the users into different behavior groups;
[0013] Step S6: Based on the cluster analysis results, construct a user behavior association network based on the graph data;
[0014] Step S7: Visualize the relationships between user features using graph modeling technology to reveal the relationships between user behavior patterns.
[0015] Furthermore, in step S1, the following sub-steps are also included:
[0016] S1-1, user behavior data collected through the e-commerce platform, said user behavior data including user basic information, user browsing behavior, user interaction behavior, user purchasing behavior, user feedback behavior, user social behavior, user session information, user device and network information;
[0017] S1-2, clean the collected user behavior data to remove duplicate data, outliers and missing values;
[0018] S1-3: Standardize the data and convert it into standardized data with a mean of 0 and a standard deviation of 1. The specific formula is: ,in, is the normalized data point, is the original data point, is the mean of the data, is the standard deviation of the data.
[0019] Furthermore, in step S2, the following sub-steps are also included:
[0020] S2-1, split the pre-processed user behavior data into subsequences of equal length, with a data length of n and a number of segments of w. The length of each segment is ;
[0021] S2-2, calculate the mean of each subsequence and replace all data points of the subsequence with the mean of the subsequence. The specific formula is: ,in, is the mean value of the jth segment, is the pth normalized data point, n represents the length of the original data, w represents the number of segments, j represents the index of the subsequence, and p represents the index of the data point;
[0022] S2-3, reconstruct the data sequence after dimensionality reduction to form user behavior data after dimensionality reduction. The length of the data after dimensionality reduction is m, where m=w.
[0023] Furthermore, in step S3, the following sub-steps are also included:
[0024] S3-1, according to the data sequence after dimensionality reduction, select a symbolic interval based on data distribution to map the data into symbols, and the symbolic interval based on data distribution uses the quantile division interval of Gaussian distribution to divide the data into There are equal probability intervals, each interval corresponds to a symbol, and the interval splitting point is determined according to the Gaussian distribution table , where o=1, 2, 3, ..., ;
[0025] S3-2, convert each data point into a corresponding symbol to form a symbolized sequence. The symbolization process is as follows: ,in, is a symbolized sequence, if means if, is the data point after dimensionality reduction, Represents the number of equally probable intervals, a, b, z are symbols in the symbol set, used to represent different intervals of data points after dimensionality reduction;
[0026] S3-3, count the occurrence frequencies of symbolic sequences, and extract the symbolic sequence with the highest occurrence frequency as the typical behavior pattern.
[0027] Furthermore, in step S4, the following sub-steps are also included:
[0028] S4-1, determining regular behavior characteristic indicators, which include user login frequency, average browsing time, purchase frequency, shopping cart addition frequency, favorites frequency, click-through rate, conversion rate, user retention rate, average user purchase amount, user comment frequency, and user sharing frequency;
[0029] S4-2, determining behavioral characteristics based on the time series, wherein the behavioral characteristics based on the time series include binning entropy, time series complexity invariant distance, nonlinear measurement of the time series, mean absolute value change, autocorrelation of the time series, mutual information of the time series, periodicity of the time series, stationarity of the time series, long-term dependence of the time series, and fractal dimension of the time series;
[0030] S4-3, normalize the conventional behavioral characteristic indicators and the behavioral characteristics based on time series. The specific formula is: , where f is the original eigenvalue, and are the minimum and maximum values of the feature, respectively. is the normalized eigenvalue;
[0031] S4-4, determine the assigned weight of each feature, multiply the normalized feature by the weight to form the user's comprehensive behavior feature vector. The specific formula is: ,in, is the normalized eigenvector, represents the normalized eigenvalue of each feature, H represents the weight vector assigned to each feature, represents the assigned weight of each feature, represents element-wise multiplication, is the user's comprehensive behavioral feature vector, N represents the number of normalized feature vectors and assigned weights, and the number is the same.
[0032] Furthermore, in step S5, the following sub-steps are also included:
[0033] S5-1, initialize the cluster center of the k-means clustering algorithm and randomly select k data points as the initial cluster center;
[0034] S5-2, calculate the distance between each user behavior pattern and the cluster center, and assign the user to the nearest cluster center. The distance formula is: , where d() represents the distance function used to calculate the Euclidean distance between two vectors, e represents the index of the user behavior pattern, and g represents the index of the cluster center. represents the behavior pattern of the e-th user, represents the g-th cluster center, R is the feature dimension, and r represents the index of the feature dimension;
[0035] S5-3, update the cluster center to the mean of all user behavior patterns assigned to the cluster. The specific formula is: ,in, is the g-th cluster, is the updated cluster center;
[0036] S5-4, repeat steps S5-2 and S5-3 until the cluster center no longer changes or reaches a preset number of iterations, where the preset number of iterations includes a fixed number of iterations, a dynamically adjusted number of iterations, and a number of iterations based on a time limit.
[0037] Furthermore, in step S6, the following sub-steps are also included:
[0038] S6-1, according to the cluster analysis results, each user is assigned to a cluster center to form different user groups;
[0039] S6-2, define the similarity measure between user groups by calculating the distance between them. The specific formula is: ,in, express and The similarity measure of and are two user groups, similarity() represents the similarity measurement function, is the cluster center and The distance between and is the corresponding cluster center, d() represents the distance function, is the maximum possible distance to the cluster center;
[0040] S6-3, based on similarity measurement, construct a graph structure of user behavior association network, where nodes represent user groups and edges represent similarities between user groups;
[0041] S6-4, define the weights between nodes. The weights represent the strength of association between user groups. The weight calculation formula is: ,in, is the weight between node E and node G;
[0042] S6-5, use the Louvain algorithm to analyze the community structure in the user behavior association network and reveal the intrinsic relationships between user groups, including interaction relationships, social relationships, preference relationships, behavior pattern relationships, regional relationships, time relationships, consumption level relationships, user loyalty relationships and user activity relationships.
[0043] Furthermore, in step S7, the following sub-steps are also included:
[0044] S7-1, using graph modeling tools to visualize the user behavior association network, wherein the graph modeling tools include Graphviz, Gephi, Cytoscape, D3.js and NetworkX;
[0045] S7-2, generating a visualization chart based on the graph structure of the user behavior association network to display the relationship between user groups, wherein the visualization chart includes nodes, edges, and weights;
[0046] S7-3, using visual elements to distinguish different user groups and relationship strengths, wherein the visual elements include color, size and shape;
[0047] S7-4: Analyze the relationship between user behavior patterns through visual charts to identify user groups and behavior patterns. The relationship between user behavior patterns includes similarity relationship, correlation relationship, sequential relationship, causal relationship, community structure relationship, and frequency relationship.
[0048] The beneficial effects brought about by the technical solution provided by the present invention include at least:
[0049] The present invention collects user behavior data through an e-commerce platform and pre-processes the data; uses a segmented aggregation approximation method to reduce the dimensionality of the pre-processed user behavior data; converts the reduced dimensionality data into a symbolic sequence based on a symbolic aggregation approximation method, and extracts typical behavior patterns that reflect the laws of user behavior; extracts the comprehensive behavior characteristics of users by combining conventional behavior feature indicators and behavior features based on time series; performs cluster analysis on the typical behavior patterns of users based on the k-means clustering algorithm, and divides users into different behavior groups; based on the clustering analysis results, constructs a user behavior association network based on graph data; and uses graph modeling technology to visualize the relationships between user features and reveal the relationships between user behavior patterns.
[0050] This invention not only analyzes users' basic information and purchasing behavior, but also comprehensively covers multi-dimensional data such as users' browsing behavior, interactive behavior, and social behavior. By introducing time series features, it can capture the dynamic changes in user behavior, thereby more comprehensively and accurately reflecting users' real behavior patterns and preferences.
[0051] The present invention performs dimensionality reduction processing on data through segmented aggregation approximation and symbolic aggregation approximation methods, which significantly improves data processing efficiency and can reflect changes in user behavior in real time, enabling e-commerce platforms to capture users' immediate needs in a timely manner and provide timely support for personalized recommendations and precision marketing.
[0052] This invention builds a user behavior association network, uses graph algorithms to analyze community structure, and reveals the intrinsic relationships between user groups. It can not only achieve accurate user group division, but also predict user behavior trends, providing strong support for the operational decisions of e-commerce platforms.
[0053] The present invention uses visualization technology to intuitively display the relationship between user behavior patterns, making it easier for e-commerce platform operators to quickly understand and apply analysis results, improving decision-making efficiency and enabling operators to more effectively optimize platform operation strategies. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0055] Figure 1 A flow chart of a method provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0056] To further illustrate the technical means and effectiveness of the present invention in achieving its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the specific implementation, structure, features, and effectiveness of a data mining-based e-commerce user behavior analysis method proposed by the present invention. In the following description, different references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
[0057] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0058] The following examples are for illustrative purposes only and are not intended to limit the scope of the present invention.
[0059] The following describes in detail a specific solution of an e-commerce user behavior analysis method based on data mining provided by the present invention with reference to the accompanying drawings.
[0060] Example
[0061] See also Figure 1 , which shows a method flow chart of an e-commerce user behavior analysis method based on data mining provided by one embodiment of the present invention, the method comprising the following steps:
[0062] Step S1: Collect user behavior data through the e-commerce platform and pre-process the data;
[0063] Wherein, step S1 further includes the following sub-steps:
[0064] S1-1, user behavior data collected through the e-commerce platform, said user behavior data including user basic information, user browsing behavior, user interaction behavior, user purchasing behavior, user feedback behavior, user social behavior, user session information, user device and network information;
[0065] S1-2, clean the collected user behavior data to remove duplicate data, outliers and missing values;
[0066] S1-3: Standardize the data and convert it into standardized data with a mean of 0 and a standard deviation of 1. The specific formula is: ,in, is the normalized data point, is the original data point, is the mean of the data, is the standard deviation of the data.
[0067] It should be noted that user basic information includes user ID (unique identifier), registration time, user gender, user age, user geographic location (city, country), user occupation, and user device type (mobile phone, computer).
[0068] User browsing behavior includes the URL of the browsed page, browsing time (timestamps of entering and leaving the page), page dwell time, browsing path (the navigation path of the user on the website), browsing depth (the number of pages visited by the user), and browsing frequency (the number of times the user visits the website within a certain period of time).
[0069] User interaction behaviors include click behavior (clicking on ads, buttons, links), scrolling behavior (the depth and frequency of page scrolling), hovering behavior (the time the mouse hovers over an element), search behavior (search keywords entered by users), collection behavior (products or pages collected by users), and sharing behavior (content shared by users on social media).
[0070] User purchasing behavior includes the ID of the purchased product, purchase time, purchase amount, purchase quantity, purchase frequency (the number of times the user purchases within a certain period of time), purchase conversion rate (the ratio from browsing to purchase), and purchase path (the path the user takes from entering the website to completing the purchase).
[0071] User feedback behavior includes user evaluations (product evaluations, service evaluations), user comments (user comments on product pages or communities), user complaints (problems or dissatisfaction reported by users), and user satisfaction survey results.
[0072] User social behavior includes the user's social interactions on the platform (likes, comments, shares), other users or brands the user follows, community activities the user participates in, and the user's behavior on social networks (forwards, likes).
[0073] User session information includes session ID (unique identifier), session start and end time, session duration, and behavior sequence within the session (all behaviors of the user in one session).
[0074] User device and network information includes the type of device used by the user (mobile phone, tablet, computer), the type of browser used by the user (Chrome, Firefox), the type of network connection used by the user (Wi-Fi, 4G), and the user's IP address (for geographic location analysis).
[0075] Duplicate data: Identical or highly similar records, including complete duplicates (records with identical fields) and partial duplicates (records with identical key fields). For complete duplicates, delete the duplicate records and retain only one. For partial duplicates, choose to retain one record or merge the records based on business needs.
[0076] Outliers: Data points that significantly deviate from the normal range, including statistical outliers (data points that exceed the mean ± 3 times the standard deviation) and business logic-based outliers (data points that do not conform to business logic). For statistical outliers, data points outside the normal range are eliminated by calculating the mean and standard deviation. For business logic-based outliers, illogical data points are corrected or deleted according to business rules.
[0077] Missing values: This refers to situations where some fields in a dataset have no values, including completely missing values (a field has no value at all) and partially missing values (some fields have values, but key fields are missing). For completely missing values, directly delete the missing records. For partially missing values, choose to fill the missing values (using the mean, median, or mode) or delete the records based on business needs.
[0078] Standardization is a common data preprocessing method used to convert data into standardized data with a mean of 0 and a standard deviation of 1. It can eliminate the dimensional differences between different features and make the data comparable. Different features may have different dimensions. Standardization can eliminate these dimensional differences and make all features have the same scale, which is convenient for comparison and analysis.
[0079] Step S2: Using the segmented aggregation approximation method to perform dimensionality reduction on the pre-processed user behavior data;
[0080] Wherein, in step S2, the following sub-steps are also included:
[0081] S2-1, split the pre-processed user behavior data into subsequences of equal length, with a data length of n and a number of segments of w. The length of each segment is ;
[0082] S2-2, calculate the mean of each subsequence and replace all data points of the subsequence with the mean of the subsequence. The specific formula is: ,in, is the mean value of the jth segment, is the pth normalized data point, n represents the length of the original data, w represents the number of segments, j represents the index of the subsequence, and p represents the index of the data point;
[0083] S2-3, reconstruct the data sequence after dimensionality reduction to form user behavior data after dimensionality reduction. The length of the data after dimensionality reduction is m, where m=w.
[0084] It should be noted that the segmented aggregation approximation method is a technology used to reduce the dimensionality of time series data. The core idea is to divide the time series into multiple subsequences of equal length and use the mean of each subsequence to approximate the data of the subsequence. This can effectively reduce the dimension of the data while retaining the overall trend characteristics of the time series.
[0085] The main purpose of dimensionality reduction is to reduce the dimension of the data while retaining the key features of the data. It can reduce computational complexity: the length of the data sequence after dimensionality reduction is significantly reduced, thereby reducing the computational complexity of subsequent analysis; it can eliminate noise: by aggregating the data points of the subsequence, local fluctuations can be smoothed out and the impact of noise can be reduced; it can retain trend characteristics: replacing the original data points with the mean of the subsequence can retain the overall trend of the time series, facilitating subsequent analysis.
[0086] Data length n: indicates the total length of the pre-processed user behavior data; segment number w: indicates how many equal-length subsequences the data is divided into; the length of each segment Represents the length of each subsequence, ensuring that each subsequence contains the same number of data points.
[0087] Represents the mean of the j-th subsequence, which is used to replace all data points of the subsequence. It represents the pth normalized data point. By calculating the mean of all data points in each subsequence, multiple data points in each subsequence are simplified to one mean, thereby achieving data dimensionality reduction.
[0088] Reconstruction process: the mean of each subsequence As the data points after dimensionality reduction, a new data sequence is formed, and the mean of each subsequence represents the overall trend of the subsequence, thereby reducing the dimension of the data.
[0089] In the segmented aggregation approximation method, the length of the data sequence after dimensionality reduction is m, where m=w. This is because each subsequence is replaced by a mean, and the number of subsequences is equal to the number of segments w. Therefore, the length of the data sequence after dimensionality reduction is equal to the number of segments w.
[0090] Step S3: converting the dimensionality-reduced data into a symbolic sequence based on a symbolic aggregation approximation method to extract typical behavior patterns that reflect user behavior patterns;
[0091] Wherein, in step S3, the following sub-steps are also included:
[0092] S3-1, according to the data sequence after dimensionality reduction, select a symbolic interval based on data distribution to map the data into symbols, and the symbolic interval based on data distribution uses the quantile division interval of Gaussian distribution to divide the data into There are equal probability intervals, each interval corresponds to a symbol, and the interval splitting point is determined according to the Gaussian distribution table , where o=1, 2, 3, ..., ;
[0093] S3-2, convert each data point into a corresponding symbol to form a symbolized sequence. The symbolization process is as follows: ,in, is a symbolized sequence, if means if, is the data point after dimensionality reduction, Represents the number of equally probable intervals, a, b, z are symbols in the symbol set, used to represent different intervals of data points after dimensionality reduction;
[0094] S3-3, count the occurrence frequencies of symbolic sequences, and extract the symbolic sequence with the highest occurrence frequency as the typical behavior pattern.
[0095] It should be noted that symbolic intervals are used to map the reduced-dimensional data to symbolic intervals. These intervals are usually determined based on the distribution characteristics of the data (Gaussian distribution).
[0096] Quantile of Gaussian distribution: Use the quantile of Gaussian distribution to divide the interval to ensure that each interval contains data points with equal probability; if the symbol set size is α, then α-1 interval splitting points are determined according to the Gaussian distribution table , where o=1, 2, 3, ..., .
[0097] The Gaussian distribution is as follows:
[0098] when =3: =0.43, =0.43, No numerical value, No numerical value, No numerical value;
[0099] when =4: =−0.67, =0, =0.67, No numerical value, No numerical value;
[0100] when =5: =−0.84, =−0.25, =0.25, =0.84, No numerical value;
[0101] when =6: =−0.97, =−0.43, =0, =0.43, =0.97.
[0102] Symbolization process: Each data point after dimensionality reduction Mapping to symbols in a symbol set , the specific mapping rules are based on the interval splitting point Sure.
[0103] Symbol set: It is a set of symbols used to represent the interval to which a data point belongs, such as {a, b,…, z}.
[0104] Symbols in the symbol set: a, b, …, z are symbols in the symbol set, which are used to represent different intervals of data points after dimensionality reduction, and each symbol corresponds to an interval.
[0105] In the symbolic aggregation approximation method, a Gaussian distribution table is used to determine the splitting points of the symbolized intervals. The splitting points divide the data into intervals of equal probability, each corresponding to a symbol. The Gaussian distribution table provides the cumulative distribution function (CDF) values of the standard normal distribution (mean 0 and standard deviation 1), which are used to determine the quantiles of the data.
[0106] Statistical frequency: Count the frequency of occurrence of each symbolized sequence in the data.
[0107] Typical behavior pattern: The symbolic sequence with the highest frequency of occurrence is selected as the typical behavior pattern. The typical behavior pattern reflects the regularity of user behavior.
[0108] Step S4: extracting comprehensive behavioral features of the user by combining conventional behavioral feature indicators and behavioral features based on time series;
[0109] Wherein, in step S4, the following sub-steps are also included:
[0110] S4-1, determining regular behavior characteristic indicators, which include user login frequency, average browsing time, purchase frequency, shopping cart addition frequency, favorites frequency, click-through rate, conversion rate, user retention rate, average user purchase amount, user comment frequency, and user sharing frequency;
[0111] S4-2, determining behavioral characteristics based on the time series, wherein the behavioral characteristics based on the time series include binning entropy, time series complexity invariant distance, nonlinear measurement of the time series, mean absolute value change, autocorrelation of the time series, mutual information of the time series, periodicity of the time series, stationarity of the time series, long-term dependence of the time series, and fractal dimension of the time series;
[0112] S4-3, normalize the conventional behavioral characteristic indicators and the behavioral characteristics based on time series. The specific formula is: , where f is the original eigenvalue, and are the minimum and maximum values of the feature, respectively. is the normalized eigenvalue;
[0113] S4-4, determine the assigned weight of each feature, multiply the normalized feature by the weight to form the user's comprehensive behavior feature vector. The specific formula is: ,in, is the normalized eigenvector, represents the normalized eigenvalue of each feature, H represents the weight vector assigned to each feature, represents the assigned weight of each feature, represents element-wise multiplication, is the user's comprehensive behavioral feature vector, N represents the number of normalized feature vectors and assigned weights, and the number is the same.
[0114] It should be noted that conventional behavioral characteristic indicators refer to quantitative indicators that can reflect user behavior patterns and characteristics. They are calculated based on user behavior data and play an important role in user behavior analysis, user profiling, personalized recommendations and precision marketing.
[0115] User login frequency: the number of times a user logs into the system within a certain period of time; average browsing time: the average length of time a user stays on a page each time they browse; purchase frequency: the number of times a user completes a purchase within a certain period of time; shopping cart addition frequency: the number of times a user adds an item to the shopping cart; favorite frequency: the number of times a user adds an item to their favorites; click-through rate: the ratio of the number of clicks on page elements (such as ads, product links) by users to the number of page displays; conversion rate: the ratio of the number of times a user completes a purchase to the number of times a page is visited; user retention rate: the proportion of users who continue to use the platform within a certain period of time; user activity: the frequency of active user behaviors (browsing, clicking, commenting) on the platform; average user purchase amount: the average amount of each purchase made by a user; user purchase category diversity: the number of categories of products purchased by users; user comment frequency: the number of times a user posts comments on the platform; user sharing frequency: the number of times a user shares products or pages on social media.
[0116] Time series-based behavioral features refer to extracting features that can reflect user behavior patterns and regularities by analyzing the time series characteristics of user behavior data. They take into account changes and trends in the time dimension and can reveal the dynamics and periodicity of user behavior.
[0117] Binning entropy: measures the entropy of the probability distribution of time series data after binning, reflecting the complexity and randomness of the data; Time series complexity invariant distance: measures the complexity of time series data, reflecting the volatility and peaks and valleys of the data; Nonlinear measurement of time series: measures the nonlinear characteristics of time series data, including autocorrelation and mutual information; Mean absolute value change: measures the average change amplitude of time series data, reflecting the volatility of data; Autocorrelation of time series: measures the correlation between time series data at different time points; Mutual information of time series: measures the degree of information sharing between two time series; Periodicity of time series: measures the periodic characteristics of time series data, including period length and period strength; Stationarity of time series: measures the stationarity of time series data, including whether the mean and variance change over time; Long-term dependence of time series: measures the long-term dependence of time series data; Fractal dimension of time series: measures the fractal characteristics of time series data, including box dimension and Kolmogorov dimension.
[0118] Normalization: Convert the eigenvalue f to a normalized value , so that its range is between [0,1]. Normalization can eliminate the dimensional differences between different features, make the features comparable, and improve the accuracy of subsequent analysis.
[0119] Assign weights: Assign a weight to each feature based on its importance. The weight vector H represents the weight of each feature.
[0120] Comprehensive behavioral feature vector: By normalizing the feature vector Multiply element-by-element with the weight vector H to form the user's comprehensive behavior feature vector ,The comprehensive behavioral feature vector can reflect the user’s behavioral ,characteristics more comprehensively.
[0121] Step S5: performing cluster analysis on the typical behavior patterns of users based on the k-means clustering algorithm to divide the users into different behavior groups;
[0122] Wherein, in step S5, the following sub-steps are also included:
[0123] S5-1, initialize the cluster center of the k-means clustering algorithm and randomly select k data points as the initial cluster center;
[0124] S5-2, calculate the distance between each user behavior pattern and the cluster center, and assign the user to the nearest cluster center. The distance formula is: , where d() represents the distance function used to calculate the Euclidean distance between two vectors, e represents the index of the user behavior pattern, and g represents the index of the cluster center. represents the behavior pattern of the e-th user, represents the g-th cluster center, R is the feature dimension, and r represents the index of the feature dimension;
[0125] S5-3, update the cluster center to the mean of all user behavior patterns assigned to the cluster. The specific formula is: ,in, is the g-th cluster, is the updated cluster center;
[0126] S5-4, repeat steps S5-2 and S5-3 until the cluster center no longer changes or reaches a preset number of iterations, where the preset number of iterations includes a fixed number of iterations, a dynamically adjusted number of iterations, and a number of iterations based on a time limit.
[0127] It should be noted that the k-means clustering algorithm is a classic unsupervised learning algorithm that is used to divide a data set into k different clusters. Through iterative optimization, the data points are assigned to the nearest cluster center and the cluster center is continuously updated until the convergence condition or the preset number of iterations is reached.
[0128] The algorithm steps of the k-means clustering algorithm include:
[0129] 1. Initialize cluster centers: Randomly select k data points as initial cluster centers.
[0130] 2. Assign data points to the nearest cluster center: For each data point, calculate the distance (Euclidean distance) between it and each cluster center and assign the data point to the nearest cluster center; this step forms the initial cluster.
[0131] 3. Update the cluster center: For each cluster, calculate the mean of all data points assigned to the cluster and use the mean as the new cluster center; this step ensures that the cluster center can better represent the data points in the cluster.
[0132] 4. Repeated allocation and updating: Repeat steps 2 and 3 until the cluster center no longer changes or the preset number of iterations is reached. The algorithm stops when the change in the cluster center is less than a certain threshold (0.01) or when a fixed number of iterations is reached.
[0133] 5. Output clustering results: Finally, output the cluster to which each data point belongs and the center of each cluster.
[0134] Fixed number of iterations: A fixed positive integer is preset as the number of iterations, such as 10, 20, or 50. The advantage is that it is simple and easy to implement and is suitable for scenarios with limited computing resources or high real-time requirements. The disadvantage is that it may not guarantee complete convergence of the algorithm, especially when the data complexity is high.
[0135] Dynamically adjust the number of iterations: Dynamically adjust the number of iterations according to the rate of change of the cluster center or the convergence speed. When the change of the cluster center is less than a certain threshold (0.01), the algorithm is considered to have converged and the iteration stops. The advantage is that it can more flexibly adapt to the complexity of different data sets and ensure that the algorithm achieves a good convergence effect within a reasonable time. The disadvantage is that additional computing resources are required to monitor the rate of change of the cluster center, which is relatively complex to implement.
[0136] Iterations based on a time limit: Complete as many iterations as possible within a certain time period (1 hour or 24 hours), and stop iterations when the time is up. The advantage is that it is suitable for scenarios with high real-time requirements and ensures that the algorithm completes the calculation within a limited time. The disadvantage is that it may not guarantee complete convergence of the algorithm, especially when the data volume is large or the data complexity is high.
[0137] Step S6: Based on the cluster analysis results, construct a user behavior association network based on the graph data;
[0138] Wherein, in step S6, the following sub-steps are also included:
[0139] S6-1, according to the cluster analysis results, each user is assigned to a cluster center to form different user groups;
[0140] S6-2, define the similarity measure between user groups by calculating the distance between them. The specific formula is: ,in, express and The similarity measure of and are two user groups, similarity() represents the similarity measurement function, is the cluster center and The distance between and is the corresponding cluster center, d() represents the distance function, is the maximum possible distance to the cluster center;
[0141] S6-3, based on similarity measurement, construct a graph structure of user behavior association network, where nodes represent user groups and edges represent similarities between user groups;
[0142] S6-4, define the weights between nodes. The weights represent the strength of association between user groups. The weight calculation formula is: ,in, is the weight between node E and node G;
[0143] S6-5, use the Louvain algorithm to analyze the community structure in the user behavior association network and reveal the intrinsic relationships between user groups, including interaction relationships, social relationships, preference relationships, behavior pattern relationships, regional relationships, time relationships, consumption level relationships, user loyalty relationships and user activity relationships.
[0144] It should be noted that the cluster analysis results: through the k-means clustering algorithm, each user is assigned to a cluster center to form different user groups.
[0145] User groups: Each cluster center represents a user group that has similar behavior patterns.
[0146] Similarity metric: The similarity metric is defined by calculating the distance between the cluster centers of two user groups. The smaller the distance, the higher the similarity.
[0147] Distance function: Use Euclidean distance to calculate the distance between cluster centers.
[0148] Normalization: By dividing the distance by the maximum possible distance, the similarity measure is normalized to between [0,1] to facilitate subsequent analysis.
[0149] Graph structure: A user behavior association network is a graph in which nodes represent user groups and edges represent similarities between user groups.
[0150] Edge weight: The edge weight represents the similarity measure between user groups. The higher the weight, the more similar the two user groups are. The weight directly uses the value of the similarity measurement function to ensure that the weight can reflect the similarity between user groups.
[0151] The Louvain algorithm is an efficient algorithm for community detection. It identifies the community structure in the network by optimizing the modularity of the network and can quickly discover dense subgraphs (i.e., communities) in the graph.
[0152] The core of the Louvain algorithm is to detect community structure by optimizing modularity. Modularity is an indicator to measure the quality of community structure in a network. It reflects whether the connections between nodes in the network tend to cluster together more than random connections. The higher the modularity value, the more obvious the community structure.
[0153] The specific steps of Louvain algorithm are:
[0154] 1. Initialization: Initialize each node as an independent community.
[0155] 2. Local optimization: For each node, calculate the change in modularity after moving it to an adjacent community; if the modularity increases after moving, move the node to an adjacent community; repeat the above process until the modularity cannot be further increased by moving the node.
[0156] 3. Construct a hierarchical graph: Treat each community as a node and construct a new hierarchical graph. In the new graph, the edge weights between nodes represent the connection strength between communities in the original graph.
[0157] 4. Repeat optimization: Repeat the local optimization steps on the new hierarchical graph to further optimize the modularity; repeat the process of building the hierarchical graph and optimizing the modularity until the modularity no longer increases.
[0158] 5. Output community structure: The final output community structure is obtained through gradual optimization of the above steps and can reflect the community distribution in the network.
[0159] Interaction relationships: By analyzing direct or indirect interactions between users, social connections or behavioral associations between users can be revealed.
[0160] Social relations: By analyzing the social connections between users, the social network structure between users can be revealed.
[0161] Preference relationship: By analyzing the similarity of users' preferences for goods or services, user groups with similar preferences can be identified.
[0162] Behavioral pattern relationship: By analyzing the similarity of users' behavioral patterns on the platform, we can reveal users' behavioral habits and preferences.
[0163] Geographical relationships: By analyzing the geographic location similarities between users, user groups with geographical connections can be identified.
[0164] Temporal relationship: By analyzing the temporal similarity of user behaviors, we can identify user groups that are active in the same time period.
[0165] Consumption level relationship: By analyzing the similarities in user consumption amounts or consumption frequencies, user groups at different consumption levels can be identified.
[0166] User loyalty relationships: By analyzing the similarities in users’ loyalty to a platform or brand, we can identify user groups with high and low loyalty.
[0167] User activity relationship: By analyzing the similarity of users' activity on the platform, we can identify high-activity and low-activity user groups.
[0168] Step S7: Visualize the relationships between user features using graph modeling technology to reveal the relationships between user behavior patterns.
[0169] Wherein, in step S7, the following sub-steps are also included:
[0170] S7-1, using graph modeling tools to visualize the user behavior association network, wherein the graph modeling tools include Graphviz, Gephi, Cytoscape, D3.js and NetworkX;
[0171] S7-2, generating a visualization chart based on the graph structure of the user behavior association network to display the relationship between user groups, wherein the visualization chart includes nodes, edges, and weights;
[0172] S7-3, using visual elements to distinguish different user groups and relationship strengths, wherein the visual elements include color, size and shape;
[0173] S7-4: Analyze the relationship between user behavior patterns through visual charts to identify user groups and behavior patterns. The relationship between user behavior patterns includes similarity relationship, correlation relationship, sequential relationship, causal relationship, community structure relationship, and frequency relationship.
[0174] It should be noted that graph modeling tools include Cytoscape: suitable for the analysis of biological networks and social networks, supporting multiple data formats and plug-ins; Gephi: suitable for the visualization and analysis of large-scale network data, providing rich layout and analysis functions; Graphviz: suitable for generating high-quality graphical output, supporting multiple layout algorithms; D3.js: suitable for creating interactive and dynamic visualization web applications, supporting multiple graph types; NetworkX: suitable for graph analysis and visualization in Python environment, supporting rich graph algorithms.
[0175] Graph structure: The graph structure of the user behavior association network consists of nodes (user groups) and edges (similarities between user groups).
[0176] Visualization chart: The generated visualization chart includes nodes, edges, and weights, where nodes represent user groups; edges represent the similarity or association strength between user groups; and weights represent the strength of edges, which are represented by the thickness or color of the edges.
[0177] Visual elements include color: different colors represent different user groups or relationship strengths; size: the size of the node or edge represents the size of the user group or the strength of the relationship; shape: different shapes represent different user groups or behavior patterns.
[0178] The relationships between user behavior patterns include similarity relationships: measured by calculating the distance or similarity coefficient between behavior patterns; correlation relationships: indicating that one behavior pattern may affect or cause another behavior pattern; sequential relationships: indicating the temporal order of user behavior; causal relationships: indicating that one behavior pattern may be caused by another behavior pattern; community structure relationships: the intrinsic connections and clustering between user groups identified by community detection algorithms; frequency relationships: certain behavior patterns appear more frequently, while other behavior patterns appear less frequently.
[0179] In this way, an e-commerce user behavior analysis method based on data mining can accurately identify the behavioral characteristics of user groups, provide strong support for personalized recommendations and precision marketing of e-commerce platforms, and have significant economic and social benefits.
[0180] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A method for analyzing e-commerce user behavior based on data mining, characterized in that: The method includes: Step S1, collecting user behavior data through the e-commerce platform and pre-processing the data; Step S2, using a segmented aggregation approximation method to perform dimensionality reduction on the pre-processed user behavior data; Step S3: converting the dimensionality-reduced data into a symbolic sequence based on a symbolic aggregation approximation method to extract typical behavior patterns that reflect user behavior patterns; Step S4, combining conventional behavioral characteristic indicators and behavioral characteristics based on time series to extract comprehensive behavioral characteristics of the user; Step S5: performing cluster analysis on the typical behavior patterns of users based on the k-means clustering algorithm to divide the users into different behavior groups; Step S6: Based on the cluster analysis results, construct a user behavior association network based on the graph data; Step S7: Visualize the relationships between user features using graph modeling technology to reveal the relationships between user behavior patterns. Wherein, in step S2, the following sub-steps are also included: S2-1, split the pre-processed user behavior data into subsequences of equal length, with a data length of n and a number of segments of w. The length of each segment is ; S2-2, calculate the mean of each subsequence and replace all data points of the subsequence with the mean of the subsequence. The specific formula is: ,in, is the mean value of the jth segment, is the pth normalized data point, n represents the length of the original data, w represents the number of segments, j represents the index of the subsequence, and p represents the index of the data point; S2-3, reconstruct the data sequence after dimensionality reduction to form user behavior data after dimensionality reduction. The length of the data after dimensionality reduction is m, where m=w; Wherein, in step S3, the following sub-steps are also included: S3-1, according to the data sequence after dimensionality reduction, select the symbolic interval based on the data distribution to map the data into symbols, the symbolic interval based on the data distribution uses the quantile division interval of the Gaussian distribution to divide the data into There are equal probability intervals, each interval corresponds to a symbol, and the interval splitting point is determined according to the Gaussian distribution table , where o=1, 2, 3, ..., ; S3-2, convert each data point into a corresponding symbol to form a symbolized sequence. The symbolization process is as follows: ,in, is a symbolized sequence, if means if, is the data point after dimensionality reduction, Represents the number of equally probable intervals, a, b, z are symbols in the symbol set, used to represent different intervals of data points after dimensionality reduction; S3-3, count the occurrence frequencies of symbolic sequences and extract the symbolic sequences with the highest occurrence frequencies as typical behavior patterns; Wherein, in step S5, the following sub-steps are also included: S5-1, initialize the cluster center of the k-means clustering algorithm and randomly select k data points as the initial cluster center; S5-2, calculate the distance between each user behavior pattern and the cluster center, and assign the user to the nearest cluster center. The distance formula is: , where d() represents the distance function used to calculate the Euclidean distance between two vectors, e represents the index of the user behavior pattern, and g represents the index of the cluster center. represents the behavior pattern of the e-th user, represents the g-th cluster center, R is the feature dimension, and r represents the index of the feature dimension; S5-3, update the cluster center to the mean of all user behavior patterns assigned to the cluster. The specific formula is: ,in, is the g-th cluster, is the updated cluster center; S5-4, repeating steps S5-2 and S5-3 until the cluster center no longer changes or a preset number of iterations is reached, where the preset number of iterations includes a fixed number of iterations, a dynamically adjusted number of iterations, and a number of iterations based on a time limit; Wherein, in step S6, the following sub-steps are also included: S6-1, according to the cluster analysis results, each user is assigned to a cluster center to form different user groups; S6-2, define the similarity measure between user groups by calculating the distance between them. The specific formula is: ,in, express and The similarity measure of and are two user groups, similarity() represents the similarity measurement function, is the cluster center and The distance between and is the corresponding cluster center, d() represents the distance function, is the maximum possible distance to the cluster center; S6-3, based on similarity measurement, construct a graph structure of user behavior association network, where nodes represent user groups and edges represent similarities between user groups; S6-4, define the weights between nodes. The weights represent the strength of association between user groups. The weight calculation formula is: ,in, is the weight between node E and node G; S6-5, use the Louvain algorithm to analyze the community structure in the user behavior association network and reveal the intrinsic relationships between user groups, including interaction relationships, social relationships, preference relationships, behavior pattern relationships, regional relationships, time relationships, consumption level relationships, user loyalty relationships and user activity relationships.
2. The e-commerce user behavior analysis method based on data mining according to claim 1, characterized in that: Wherein, step S1 further includes the following sub-steps: S1-1, user behavior data collected through the e-commerce platform, said user behavior data including user basic information, user browsing behavior, user interaction behavior, user purchasing behavior, user feedback behavior, user social behavior, user session information, user device and network information; S1-2, clean the collected user behavior data to remove duplicate data, outliers and missing values; S1-3: Standardize the data and convert it into standardized data with a mean of 0 and a standard deviation of 1. The specific formula is: ,in, is the normalized data point, is the original data point, is the mean of the data, is the standard deviation of the data.
3. The e-commerce user behavior analysis method based on data mining according to claim 1, characterized in that: Wherein, in step S4, the following sub-steps are also included: S4-1, determining regular behavior characteristic indicators, which include user login frequency, average browsing time, purchase frequency, shopping cart addition frequency, favorites frequency, click-through rate, conversion rate, user retention rate, average user purchase amount, user comment frequency, and user sharing frequency; S4-2, determining behavioral characteristics based on the time series, wherein the behavioral characteristics based on the time series include binning entropy, time series complexity invariant distance, nonlinear measurement of the time series, mean absolute value change, autocorrelation of the time series, mutual information of the time series, periodicity of the time series, stationarity of the time series, long-term dependence of the time series, and fractal dimension of the time series; S4-3, normalize the conventional behavioral characteristic indicators and the behavioral characteristics based on time series. The specific formula is: , where f is the original eigenvalue, and are the minimum and maximum values of the feature, respectively. is the normalized eigenvalue; S4-4, determine the assigned weight of each feature, multiply the normalized feature by the weight to form the user's comprehensive behavior feature vector. The specific formula is: ,in, is the normalized eigenvector, represents the normalized eigenvalue of each feature, H represents the weight vector assigned to each feature, represents the assigned weight of each feature, represents element-wise multiplication, is the user's comprehensive behavioral feature vector, N represents the number of normalized feature vectors and assigned weights, and the number is the same.
4. The method for analyzing e-commerce user behavior based on data mining according to claim 1, wherein: Wherein, in step S7, the following sub-steps are also included: S7-1, using graph modeling tools to visualize the user behavior association network, wherein the graph modeling tools include Graphviz, Gephi, Cytoscape, D3.js and NetworkX; S7-2, generating a visualization chart based on the graph structure of the user behavior association network to display the relationship between user groups, wherein the visualization chart includes nodes, edges, and weights; S7-3, using visual elements to distinguish different user groups and relationship strengths, wherein the visual elements include color, size and shape; S7-4: Analyze the relationship between user behavior patterns through visual charts to identify user groups and behavior patterns. The relationship between user behavior patterns includes similarity relationship, correlation relationship, sequential relationship, causal relationship, community structure relationship, and frequency relationship.
Citation Information
Patent Citations
Electronic commerce user portrait construction method based on big data
CN118485464A
User portrait intelligent analysis system and method based on data visualization
CN119691245A