Shopping behavior model training method and device, electronic equipment and storage medium
By screening and converting historical shopping behavior data, combined with the correction of the shopping preference difference matrix, the problem of insufficient accuracy and refinement of user shopping intention portraits in the prior art is solved, and higher prediction accuracy and generalization ability are achieved.
Patent Information
- Application Number
- CN202411646620.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art lacks accuracy and refinement in building user shopping intention portraits, and fails to make full use of the rich information in user online behavior, making it difficult to accurately grasp users' shopping preferences and behavior patterns.
By screening the historical shopping behavior data, the shopping intention characteristic parameters of the target user are determined, and these parameters are converted to generate training shopping data. Then, the data are input into the shopping behavior model for fitting training, and a shopping preference difference matrix is generated, and the model is corrected based on this matrix to obtain a trained shopping behavior model.
It improves the prediction accuracy and generalization ability of the model, can more accurately characterize users' shopping intentions, reduce noise interference, ensure that the features have considerable weight during model training, and enhance the model's understanding of users' shopping preferences.
Smart Images

Figure CN119513606A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for training a shopping behavior model. Background Art
[0002] In the current digital age, the analysis of online user shopping intentions is crucial for e-commerce companies. However, traditional methods of profiling user shopping intentions are often limited to simple analysis of user purchase history and browsing behavior. This method ignores the mining of multi-dimensional information such as user behavior data, page browsing details, and transaction records, resulting in a one-sided and insufficiently in-depth portrayal of user shopping intentions.
[0003] Specifically, existing technologies mainly rely on users' purchase records and browsing trajectories, and infer users' shopping preferences by counting and analyzing these data. However, this method fails to fully utilize the rich information in users' online behavior, such as the time users stay on the page, browsing paths, click streams, and transaction record details. This information is of great significance for a comprehensive understanding of users' shopping intentions and potential needs.
[0004] Due to the incomplete mining of user data, existing methods often lack accuracy and refinement when constructing user shopping intention portraits. This makes it difficult for companies to accurately grasp users' shopping preferences and behavior patterns, and thus difficult to provide personalized product recommendations and high-quality service experience. Therefore, it is particularly important to create a portrait method that can comprehensively consider users' multi-dimensional information and accurately portray users' shopping intentions. Summary of the invention
[0005] The present disclosure provides a method, device, electronic device and storage medium for training a shopping behavior model, the main purpose of which is to solve the current problem of being unable to accurately identify user shopping intentions.
[0006] According to a first aspect of the present disclosure, a method for training a shopping behavior model is provided, comprising:
[0007] Performing feature screening on the historical shopping behavior data to determine the shopping intention feature parameters of the target user, and converting the shopping intention feature parameters to obtain shopping data for training;
[0008] Inputting the training shopping data into a shopping behavior model, performing fitting training on the correlation between the training shopping data and the shopping behavior of the target user, and obtaining a first shopping behavior model after fitting training;
[0009] Obtaining secondary parameters of the first shopping behavior model and generating a shopping preference difference matrix;
[0010] The first shopping behavior model is modified based on the shopping preference difference matrix to obtain a trained shopping behavior model.
[0011] In some embodiments, the feature screening of the historical shopping behavior data, determining the shopping intention feature parameters of the target user, and converting the shopping intention feature parameters to obtain training shopping data includes:
[0012] screening the shopping intention characteristic parameters related to shopping intention in the historical shopping behavior data;
[0013] The shopping intention feature parameters are normalized to obtain the training shopping data.
[0014] In some embodiments, the second parameter acquisition of the first shopping behavior model and the generation of a shopping preference difference matrix include:
[0015] Acquire historical portrait data of the target user, and generate a feature quantization parameter matrix about the user's shopping preference according to the historical portrait data;
[0016] Obtain the historical browsing behavior data of the target user, and determine a characteristic data matrix about the user's shopping preference in different time periods based on a time parameter;
[0017] The shopping preference difference matrix is generated by calculation based on the feature quantization parameter matrix and the feature data matrix.
[0018] In some embodiments, the modifying the first shopping behavior model based on the shopping preference difference matrix to obtain a trained shopping behavior model includes:
[0019] Using each parameter in the shopping preference difference matrix as a difference training set, performing correction training on the first shopping behavior model to obtain a plurality of corrected first shopping behavior models;
[0020] Selecting shopping intention-related features as user parameters, and substituting the user parameters into the multiple modified first shopping behavior models to perform user preference prediction, thereby obtaining multiple user preference prediction results;
[0021] Based on the plurality of user preference prediction results and historical browsing record data, the modified first shopping behavior model is trained to obtain the trained shopping behavior model.
[0022] In some embodiments, the training of the modified first shopping behavior model based on the plurality of user preference prediction results and historical browsing record data to obtain the trained shopping behavior model includes:
[0023] Semantically matching the plurality of user preference prediction results with historical browsing record data to identify the similarity of the portraits;
[0024] Selecting the shopping preference difference matrix corresponding to the user preference prediction result with the highest portrait similarity as a benchmark, and calculating the Euclidean distance for the historical browsing record data;
[0025] The historical browsing record data whose Euclidean distance is less than the distance threshold is selected as a secondary training set, and the modified first shopping behavior model is trained to obtain the trained shopping behavior model.
[0026] In some embodiments, the method further comprises:
[0027] Based on the user shopping prediction results generated by the shopping behavior model, the shopping behavior model is evaluated for model performance; and based on the performance evaluation results, the shopping behavior model is optimized.
[0028] In some embodiments, the method further comprises:
[0029] The shopping behavior data of different users are input into the trained shopping behavior model to predict the shopping behavior and obtain user shopping prediction results; a clustering algorithm is called to classify the user shopping prediction results and obtain multiple user classifications.
[0030] According to a second aspect of the present disclosure, a device for training a shopping behavior model is provided, comprising:
[0031] A screening unit, used to perform feature screening on the historical shopping behavior data, determine the shopping intention feature parameters of the target user, and convert the shopping intention feature parameters to obtain shopping data for training;
[0032] A first training unit, configured to input the training shopping data into a shopping behavior model, perform fitting training on the correlation between the training shopping data and the shopping behavior of a target user, and obtain a first shopping behavior model after fitting training;
[0033] A generating unit, used for acquiring secondary parameters of the first shopping behavior model and generating a shopping preference difference matrix;
[0034] The second training unit is used to modify the first shopping behavior model based on the shopping preference difference matrix to obtain a trained shopping behavior model.
[0035] In some embodiments, the screening unit comprises:
[0036] A screening module, used for screening the shopping intention characteristic parameters related to shopping intention in the historical shopping behavior data;
[0037] A processing module is used to normalize the shopping intention feature parameters to obtain the shopping data for training.
[0038] In some embodiments, the generating unit comprises:
[0039] A generation module, used to obtain the historical portrait data of the target user, and generate a feature quantization parameter matrix about the user's shopping preference according to the historical portrait data;
[0040] A determination module, used to obtain the historical browsing behavior data of the target user, and determine a characteristic data matrix about the user's shopping preference in different time periods based on a time parameter;
[0041] A calculation module is used to calculate and generate the shopping preference difference matrix based on the feature quantization parameter matrix and the feature data matrix.
[0042] In some embodiments, the second training unit includes:
[0043] A first training module, configured to use each parameter in the shopping preference difference matrix as a difference training set to perform correction training on the first shopping behavior model to obtain a plurality of corrected first shopping behavior models;
[0044] A prediction module, used for selecting features related to shopping intention as user parameters, and substituting the user parameters into the multiple modified first shopping behavior models to perform user preference prediction, so as to obtain multiple user preference prediction results;
[0045] The second training module is used to train the modified first shopping behavior model based on the multiple user preference prediction results and historical browsing record data to obtain the trained shopping behavior model.
[0046] In some embodiments, the second training module is further configured to:
[0047] Semantically matching the plurality of user preference prediction results with historical browsing record data to identify the similarity of the portraits;
[0048] Selecting the shopping preference difference matrix corresponding to the user preference prediction result with the highest portrait similarity as a benchmark, and calculating the Euclidean distance for the historical browsing record data;
[0049] The historical browsing record data whose Euclidean distance is less than the distance threshold is selected as a secondary training set, and the modified first shopping behavior model is trained to obtain the trained shopping behavior model.
[0050] In some embodiments, the apparatus further comprises:
[0051] The optimization unit is used to perform a model performance evaluation on the shopping behavior model based on the user shopping prediction result generated by the shopping behavior model; and to perform a model optimization on the shopping behavior model based on the performance evaluation result.
[0052] In some embodiments, the apparatus further comprises:
[0053] The classification unit is used to input the shopping behavior data of different users into the trained shopping behavior model to predict the shopping behavior and obtain user shopping prediction results; call the clustering algorithm to classify the user shopping prediction results and obtain multiple user classifications.
[0054] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0055] at least one processor; and
[0056] a memory communicatively connected to the at least one processor; wherein,
[0057] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.
[0058] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.
[0059] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method as described in the first aspect above.
[0060] The present disclosure provides a method, device, electronic device and storage medium for shopping behavior model training, which performs feature screening on historical shopping behavior data, determines the shopping intention feature parameters of the target user, and converts the shopping intention feature parameters to obtain training shopping data; inputs the training shopping data into a shopping behavior model, performs fitting training on the correlation between the training shopping data and the shopping behavior of the target user, and obtains a first shopping behavior model after fitting training; performs secondary parameter acquisition on the first shopping behavior model, and generates a shopping preference difference matrix; and modifies the first shopping behavior model based on the shopping preference difference matrix to obtain a trained shopping behavior model. Compared with the related art, the embodiment of the present disclosure can remove features that are irrelevant or weakly correlated with the shopping intention of the target user through feature screening, and retain strongly correlated features, thereby reducing noise interference during model training and improving the prediction accuracy of the model; it can ensure that different features have equivalent weights during model training to avoid deviations caused by different feature dimensions or value ranges; using screened and converted training shopping data for model training can enable the model to better learn the essential characteristics of the shopping behavior of the target user, thereby improving the generalization ability of the model; secondary parameter acquisition and the generation of a shopping preference difference matrix can further refine the model's understanding of the shopping preferences of the target user; by comparing the differences between the model prediction results and the actual shopping behavior, the user's personalized needs can be identified; and by correcting the model based on the shopping preference difference matrix, the model can be more in line with the actual shopping behavior of the target user.
[0061] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0063] Figure 1 A flowchart of a method for training a shopping behavior model provided in an embodiment of the present disclosure;
[0064] Figure 2 A flowchart of another method for training a shopping behavior model provided in an embodiment of the present disclosure;
[0065] Figure 3 A schematic diagram of the structure of a shopping behavior model training device provided in an embodiment of the present disclosure;
[0066] Figure 4 A schematic diagram of the structure of another shopping behavior model training device provided by an embodiment of the present disclosure;
[0067] Figure 5 A schematic block diagram of an exemplary electronic device provided for an embodiment of the present disclosure. DETAILED DESCRIPTION
[0068] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0069] The following describes the method, device, electronic device and storage medium for shopping behavior model training according to the embodiments of the present disclosure with reference to the accompanying drawings.
[0070] Figure 1 A flowchart of a method for training a shopping behavior model provided in an embodiment of the present disclosure.
[0071] like Figure 1 As shown, the method comprises the following steps:
[0072] Step 101, feature screening is performed on the historical shopping behavior data to determine the shopping intention feature parameters of the target user, and the shopping intention feature parameters are converted to obtain shopping data for training.
[0073] In the embodiments of the present disclosure, when processing historical shopping behavior data, feature parameters closely related to the shopping intention of the target user are carefully selected from the massive amount of raw data through statistical analysis, correlation analysis, machine learning algorithms and other means. These feature parameters may cover multiple dimensions such as the user's purchase frequency, purchase amount, purchase time, category of purchased goods, brand preference, price sensitivity, and responsiveness to promotional activities. Through this step, those features that contribute little to predicting the shopping intention of the target user or have redundant information can be effectively eliminated, thereby ensuring the efficiency and accuracy of subsequent model training.
[0074] Next, a series of conversions are required for the determined shopping intention feature parameters so that they can better adapt to the input requirements of the machine learning model. The conversion process includes but is not limited to data standardization to ensure that different features are comparable in value; data normalization to eliminate the impact of feature dimensions on model training; for categorical features, one-hot encoding or label encoding may be required to convert them into numerical forms that the model can recognize; in addition, it may also involve the processing of missing values, detection and processing of outliers, etc. After these conversion processing steps, the shopping data obtained for training will have higher quality and availability, laying the foundation for subsequent model training.
[0075] Step 102: input the training shopping data into a shopping behavior model, perform fitting training on the correlation between the training shopping data and the shopping behavior of the target user, and obtain a first shopping behavior model after fitting training.
[0076] In the embodiments of the present disclosure, the filtered and converted training shopping data is used as input information and completely imported into the pre-designed shopping behavior model. The shopping behavior model will deeply explore the potential correlation between the training shopping data and the actual shopping behavior of the target user. This correlation may be reflected in the user's purchase preferences, consumption habits, loyalty to specific products or brands, etc., and is the key for the model to understand and predict the user's future shopping intentions.
[0077] During the fitting training process, the model will continuously adjust its internal parameters to minimize the difference between the predicted results and the actual shopping behavior. This process is usually achieved through optimization algorithms such as gradient descent, stochastic gradient descent, and Newton's method. As the number of training iterations increases, the model's predictive ability will gradually increase until it reaches a relatively stable state, at which point the model's performance evaluation indicators (such as accuracy, recall, F1 score, etc.) will tend to be optimal. After a series of rigorous fitting training, an optimized and well-performing first shopping behavior model is finally obtained. This model has been able to effectively capture the user shopping behavior patterns contained in the training data, and can make relatively accurate predictions about the target user's future shopping intentions based on these patterns.
[0078] Step 103: perform secondary parameter acquisition on the first shopping behavior model and generate a shopping preference difference matrix.
[0079] In the embodiments of the present disclosure, after obtaining the first shopping behavior model after preliminary fitting training, in order to further improve its accuracy and generalization ability, it is necessary to obtain the parameters of the model for the second time. By introducing more dimensional data or adopting more advanced algorithm technology, the parameters within the model are adjusted and optimized in a more detailed and in-depth manner. These parameters may involve key elements such as the model's weights, bias terms, and learning rates, and their slight changes may have a significant impact on the performance of the model.
[0080] At the same time, in order to quantify the difference between the model prediction results and the actual shopping behavior, and to make targeted corrections to the model accordingly, a shopping preference difference matrix is generated. Each row of this matrix may represent a specific target user, and each column corresponds to a different shopping intention feature (such as product category, price range, brand preference, etc.). The element values in the matrix reflect the degree of deviation between the user's shopping preferences predicted by the model and the actual shopping behavior. Specifically, a positive value may indicate that the model's prediction of the feature is too optimistic, while a negative value may indicate that the prediction is too pessimistic.
[0081] The generation of the shopping preference difference matrix not only provides an intuitive and quantitative way to evaluate the performance of the model, but also provides a valuable reference for subsequent model correction work. By deeply analyzing this matrix, the weak links in the model prediction can be identified, and the model parameters can be adjusted or new features can be introduced accordingly to narrow the gap between the prediction results and the actual behavior, thereby continuously improving the accuracy and reliability of the model.
[0082] Step 104: modify the first shopping behavior model based on the shopping preference difference matrix to obtain a trained shopping behavior model.
[0083] In the embodiment of the present disclosure, after obtaining the shopping preference difference matrix, the first shopping behavior model after the preliminary fitting training is further corrected and optimized based on the matrix.
[0084] Specifically, by analyzing each item in the shopping preference difference matrix, we can identify significant differences between the model prediction results and actual shopping behavior. These differences may be reflected in certain specific shopping intention characteristics, such as the preference for certain product categories, sensitivity to price ranges, etc. By analyzing these differences, we can better understand where the model is lacking, so as to formulate targeted correction strategies.
[0085] Adjust the model parameters based on the analysis results. This may include adjusting the model weight coefficients, changing the learning rate, introducing regularization terms, and other means. By introducing new features or optimizing existing feature sets, the model's expressiveness and prediction accuracy can be further enhanced. These adjustments are intended to make the model's prediction results closer to actual shopping behavior, thereby reducing the deviation in the shopping preference difference matrix.
[0086] After a series of corrections and optimizations, the model will be trained again and its performance will be re-evaluated. In this process, the above steps may be repeated many times until the deviation between the model's prediction results and the actual shopping behavior reaches an acceptable range, and the model's performance evaluation indicators (such as accuracy, recall, etc.) reach the optimal level. At this point, the model can be considered to have been trained and can be applied to actual shopping intention prediction and personalized recommendation systems.
[0087] The present disclosure provides a method for training a shopping behavior model, which includes performing feature screening on historical shopping behavior data, determining shopping intention feature parameters of the target user, and converting the shopping intention feature parameters to obtain training shopping data; inputting the training shopping data into a shopping behavior model, performing fitting training on the correlation between the training shopping data and the shopping behavior of the target user, and obtaining a first shopping behavior model after fitting training; performing secondary parameter acquisition on the first shopping behavior model, and generating a shopping preference difference matrix; and correcting the first shopping behavior model based on the shopping preference difference matrix to obtain a trained shopping behavior model. Compared with the related art, the embodiment of the present disclosure can remove features that are irrelevant or weakly correlated with the shopping intention of the target user through feature screening, and retain strongly correlated features, thereby reducing noise interference during model training and improving the prediction accuracy of the model; it can ensure that different features have equivalent weights during model training to avoid deviations caused by different feature dimensions or value ranges; using screened and converted training shopping data for model training can enable the model to better learn the essential characteristics of the shopping behavior of the target user, thereby improving the generalization ability of the model; secondary parameter acquisition and the generation of a shopping preference difference matrix can further refine the model's understanding of the shopping preferences of the target user; by comparing the differences between the model prediction results and the actual shopping behavior, the user's personalized needs can be identified; and by correcting the model based on the shopping preference difference matrix, the model can be more in line with the actual shopping behavior of the target user.
[0088] In order to clearly illustrate the embodiments of the present disclosure, this embodiment provides a flowchart of another method for training a shopping behavior model.
[0089] like Figure 2 As shown, the method comprises the following steps:
[0090] Step 201: Filter the shopping intention characteristic parameters related to shopping intention in the historical shopping behavior data.
[0091] Specifically, in step 201, from the massive amount of historical shopping behavior data, statistical methods, machine learning algorithms, business logic analysis and other means are used to carefully select those features that can directly or indirectly reflect the user's shopping intention. These features include the user's historical shopping consumption, purchase frequency, product browsing time, product browsing time range, web page dwell time, product preference keywords, product click-to-purchase conversion rate, active time period, etc.; they may also include the user's preference for different product categories, such as the purchase tendency for electronic products, clothing, household items, etc.; they may also involve the user's sensitivity to specific brands, price ranges, promotional activities, etc.
[0092] During the screening process, it is necessary to ensure that the selected features are not only highly correlated with shopping intentions, but also representative and can fully and accurately reflect the user's shopping behavior and preferences. To this end, it is possible to use, but not limited to, correlation analysis to calculate the correlation coefficient between each feature and shopping intention to determine its importance; feature importance assessment may also be performed to use machine learning algorithms (such as random forests, gradient boosting trees, etc.) to evaluate the contribution of each feature to the model's predictive ability.
[0093] In addition, the stability and interpretability of features also need to be considered. Stability refers to whether the performance of features is consistent in different time periods and different user groups; interpretability refers to whether the features can be understood by business personnel or users, so as to facilitate subsequent model tuning and the formulation of personalized recommendation strategies.
[0094] Step 202: normalize the shopping intention feature parameters to obtain the training shopping data.
[0095] Specifically, in step 202, the core purpose of normalization is to eliminate the deviations between different features due to different dimensions or value ranges. Specifically, for each shopping intention feature parameter, we will map its value range to a unified interval, usually [0,1] or [-1,1], through specific mathematical transformations (such as linear transformation, logarithmic transformation, etc.) according to its value range. In this way, whether it is a numerical feature such as purchase amount and purchase frequency, or a categorical feature such as product category and brand preference (after conversion to numerical form), they can be compared and calculated under the same framework.
[0096] The normalization method involves performing a linear transformation on the data to map it to the interval [0,1];
[0097] The corresponding formula is as follows:
[0098]
[0099] Where x is the original data, M in is the minimum value of the data, M ax is the maximum value of the data, x ′ is the transformed data.
[0100] The benefit of normalization is that it ensures that the model gives equal weight to each feature during training, avoiding uneven weight distribution due to large differences in feature value ranges. At the same time, normalization can also improve the convergence speed of the model, allowing the model to find the optimal solution faster during training.
[0101] Step 203: input the training shopping data into the shopping behavior model, perform fitting training on the correlation between the training shopping data and the shopping behavior of the target user, and obtain a first shopping behavior model after fitting training.
[0102] Step 204, obtaining the historical portrait data of the target user, and generating a feature quantization parameter matrix about the user's shopping preference based on the historical portrait data.
[0103] Specifically, in steps 203 to 204, the training shopping data is input into the pre-built shopping behavior model to start the model fitting training process. The core of this step is to enable the model to gradually learn the potential correlation between the training shopping data and the actual shopping behavior of the target user through complex algorithm logic and iterative calculation.
[0104] In order to better understand the shopping preferences of target users and further improve the prediction accuracy of the model, we also need to obtain historical profile data of target users. Historical profile data usually contains basic information of users, purchase history, browsing history, search behavior and other information, which provides us with rich clues about users' shopping preferences.
[0105] Based on historical profile data, a feature quantification parameter matrix about user shopping preferences can be generated. Each row of this matrix may represent a specific user feature (such as age, gender, region, etc.), and each column corresponds to a different shopping preference feature (such as product category preference, brand preference, price sensitivity, etc.). The element value in the matrix reflects the user's preference for the feature, which can be determined through statistical methods, machine learning algorithms or business logic analysis.
[0106] By constructing such a feature quantification parameter matrix, we can more intuitively understand the shopping preferences of target users and further optimize and adjust the shopping behavior model accordingly. For example, we can adjust the weights of relevant features in the model according to the user's brand preference characteristics to more accurately reflect the user's shopping intentions. At the same time, this matrix can also serve as an important reference for subsequent personalized recommendation systems, helping us provide users with more accurate and personalized product recommendations.
[0107] Step 205: Obtain the historical browsing behavior data of the target user, and determine a feature data matrix about the user's shopping preference in different time periods based on a time parameter.
[0108] Specifically, in step 205, in order to more comprehensively and meticulously understand the shopping preferences of the target user and further improve the prediction capability of the shopping behavior model and the accuracy of personalized recommendations, it is necessary to further obtain the historical browsing behavior data of the target user. Such data usually records the information such as the products, pages, and advertisements that the user has browsed in different time periods.
[0109] After obtaining the historical browsing behavior data, it will be deeply analyzed and processed based on time parameters. Time parameters may include date, hour, day of the week, etc., which can reflect the user's shopping preferences and activity patterns in different time periods. For example, some users may be more active at night or on weekends and show a higher interest in certain categories of goods; while other users may be more inclined to browse and purchase goods on weekdays or in specific time periods.
[0110] Based on these time parameters, the historical browsing behavior data is divided into different time periods, and a feature data matrix about the user's shopping preferences is generated for each time period. Each row of these matrices may represent a specific time period (such as weekday evenings, weekend afternoons, etc.), and each column corresponds to a different shopping preference feature (such as product category, brand, price range, etc.). The element value in the matrix reflects the user's preference for the feature during the time period, which can be determined by statistical methods (such as counting, frequency calculation, etc.) or machine learning algorithms (such as cluster analysis, association rule mining, etc.).
[0111] By constructing such a time-divided feature data matrix, it is possible to more precisely capture the changes in users' shopping preferences in different time periods, and further optimize and adjust the shopping behavior model accordingly. For example, the weights of relevant features in the model can be adjusted based on the user's product browsing history in a specific time period to more accurately reflect the user's shopping intention in that time period. At the same time, these matrices can also serve as an important reference for subsequent personalized recommendation systems.
[0112] Step 206: Calculate and generate the shopping preference difference matrix based on the feature quantization parameter matrix and the feature data matrix.
[0113] Specifically, in step 206, after having the characteristic quantification parameter matrix of the target user's shopping preference and the time-period characteristic data matrix divided based on the time parameter, the shopping preference difference matrix will be generated next. This step aims to quantify the difference between the user's shopping preference in different time periods and the long-term average preference through comparison and analysis, so as to provide more refined guidance for subsequent model optimization and personalized recommendation.
[0114] First, it is necessary to ensure that the feature quantification parameter matrix and the time-division feature data matrix are consistent in feature dimension, that is, the columns of the two matrices should correspond to the same shopping preference features. This requires certain screening and conversion of the features to ensure their comparability.
[0115] Next, for each feature, the difference between the user's actual preference (obtained from the time-divided feature data matrix) and the long-term average preference (obtained from the feature quantification parameter matrix) is calculated in each period. This difference can be measured by simple subtraction, percentage change, or other more complex statistical indicators.
[0116] After calculating the preference differences of all features, we can arrange these differences in the order of time periods and features to construct a two-dimensional shopping preference difference matrix. Each row of this matrix represents a specific time period, and each column corresponds to a shopping preference feature. The element value in the matrix is the preference difference of the user on the feature during the time period.
[0117] Finally, we analyze the shopping preference difference matrix in depth to identify significant changes in users’ shopping preferences over different time periods. These changes may be manifested as a significant increase or decrease in the preference for certain features, or a large fluctuation in the overall shopping preferences of users over certain time periods.
[0118] Step 207: using each parameter in the shopping preference difference matrix as a difference training set, performing correction training on the first shopping behavior model to obtain a plurality of corrected first shopping behavior models.
[0119] Specifically, in step 207, each row (representing a specific time period) or each column (representing a specific shopping preference feature) in the shopping preference difference matrix is regarded as an independent training sample, which contains the preference difference in the time period or the feature. These difference training sets not only reflect the time-varying characteristics of the user's shopping preferences, but also reveal the potential differences in the user's shopping behavior patterns in different situations.
[0120] The first shopping behavior model is trained using these difference training sets. This step may involve, but is not limited to, a variety of machine learning algorithms and techniques, such as gradient descent, stochastic gradient descent, regularization, ensemble learning, etc., to ensure that the model can fully learn and adapt to these new training data. During the correction training process, the model will continuously adjust its internal parameters and structure to minimize the difference between the predicted results and the actual shopping preference difference.
[0121] As the correction training progresses, multiple corrected first shopping behavior models may be obtained. These models may differ in structure and parameters, but what they have in common is that they all better capture the temporal variation characteristics of user shopping preferences and improve the prediction ability accordingly. In order to determine which model performs best, methods such as cross-validation and A / B testing are usually used to evaluate their performance and select the best model for subsequent deployment and application.
[0122] Step 208: Select shopping intention-related features as user parameters, substitute the user parameters into the multiple modified first shopping behavior models respectively to perform user preference prediction, and obtain multiple user preference prediction results.
[0123] Specifically, in step 208, in order to modify the first shopping behavior model to more accurately predict the user's shopping preference, a series of features closely related to shopping intentions are selected and regarded as key user parameters. These features may cover multiple dimensions such as the user's personal information (such as age, gender, occupation, etc.), historical purchase records, browsing behavior, search keywords, social media activities, etc., which together constitute a comprehensive description of the user's shopping intentions.
[0124] Next, we substituted the selected user parameters into the multiple modified shopping behavior models obtained earlier. This step requires independent prediction operations for each model to ensure that the differences in user preferences in different models can be captured. In the process of substituting parameters, we strictly followed the input format and data preprocessing steps required by the model to ensure the accuracy and reliability of the prediction results.
[0125] As the prediction operation progresses, multiple user preference prediction results are gradually obtained. These results not only reflect the user's preference for various products in different time periods, but also reveal the potential changes in the user's shopping behavior patterns in different situations. By comparing and analyzing these prediction results, we can have a deeper understanding of the user's shopping needs and preferences, thereby providing strong support for subsequent personalized recommendations and marketing strategy formulation.
[0126] It is worth noting that since multiple modified shopping behavior models are used for prediction, there may be some differences in the prediction results. This difference is not only due to the structural and parameter differences between the models, but may also be affected by the user parameter input. In order to make full use of these prediction results, ensemble learning, weighted average or voting methods are usually used to comprehensively evaluate the user's shopping preferences and select the best prediction result as the final recommendation basis.
[0127] Step 209: Based on the plurality of user preference prediction results and historical browsing record data, the modified first shopping behavior model is trained to obtain the trained shopping behavior model.
[0128] Step 2091, semantically match the multiple user preference prediction results with the historical browsing record data to identify the portrait similarity.
[0129] Step 2092, selecting the shopping preference difference matrix corresponding to the user preference prediction result with the highest portrait similarity as a benchmark, and calculating the Euclidean distance for the historical browsing record data.
[0130] Step 2093, selecting historical browsing record data whose Euclidean distance is less than a distance threshold as a secondary training set, training the modified first shopping behavior model, and obtaining the trained shopping behavior model.
[0131] Specifically, in step 209, the multiple user preference prediction results obtained previously are deeply compared and matched with the user's historical browsing record data. This comparison is not a simple numerical comparison, but a match based on the semantic level, aiming to capture the intrinsic connection between the user's preferences and their historical behaviors. To achieve this goal, we may use natural language processing (NLP) technology, text mining algorithms or deep learning methods to extract and compare key information and features between the two.
[0132] Specifically, the user's historical browsing record data (such as product titles, descriptions, categories, etc.) is converted into vector representations, and the semantic similarity is calculated with the feature vectors in the user preference prediction results. This calculation may involve but is not limited to multiple algorithms such as cosine similarity, Jaccard similarity, and edit distance to comprehensively evaluate the degree of match between the two. Through this process, we can identify the historical browsing records that are closest to the user's current preferences, and thus score their profile similarity.
[0133] After determining the historical browsing records that best match the user's preferences, we further turn our attention to the shopping preference difference matrix. Specifically, we select the shopping preference difference matrix corresponding to the user preference prediction results with the highest profile similarity as the benchmark matrix. This matrix can reflect the changes in the user's shopping preferences over different time periods.
[0134] Next, we use the Euclidean distance algorithm to calculate the similarity between the historical browsing record data and the benchmark matrix. Euclidean distance is a commonly used distance measurement method that can calculate the straight-line distance between two points in a multidimensional space. By calculating the Euclidean distance between each historical browsing record data and the corresponding feature in the benchmark matrix, we can quantify the similarity between them and filter out the historical browsing record data that is closest to the benchmark matrix.
[0135] According to the calculation results of the Euclidean distance, the historical browsing record data with high similarity to the benchmark matrix (i.e., the Euclidean distance is less than the set threshold) is selected and used as the secondary training set. This training set not only contains the historical behavior data of users in different time periods, but also reflects the changes in users' shopping preferences in the current time period, so it has extremely high training value.
[0136] Substitute this secondary training set into the previously obtained modified first shopping behavior model for further training and optimization. This training process may involve a variety of machine learning algorithms and techniques, such as gradient descent, stochastic gradient descent, regularization, ensemble learning, etc., to ensure that the model can fully learn and adapt to these new training data.
[0137] Through this series of training and optimization steps, we finally get a shopping behavior model that has been deeply trained and finely tuned. This model not only has higher prediction accuracy and robustness, but also can more accurately capture and predict users' shopping preferences and behavior patterns, providing strong support for subsequent personalized recommendations and marketing strategy formulation.
[0138] Furthermore, as an implementable method of the embodiments of the present disclosure, after shopping behavior preference prediction is performed based on the user's shopping behavior data, the prediction results can be used to evaluate the model, which can be done in but not limited to the following ways: performing model performance evaluation on the shopping behavior model based on the user shopping prediction results generated by the shopping behavior model; and performing model optimization on the shopping behavior model based on the performance evaluation results.
[0139] Specifically, a variety of evaluation indicators and methods were used, including but not limited to accuracy, recall, F1 score, AUC value, and mean square error (MSE). These indicators can reflect the prediction performance of the model from different dimensions.
[0140] During the evaluation process, the prediction results are compared with the actual shopping behavior data of users to calculate the specific values of the above evaluation indicators. I then conduct in-depth analysis of these values to identify possible deviations and deficiencies in the model's prediction process. For example, if the model's accuracy is low, check the model's performance when dealing with certain types of products or user groups to determine if there are specific prediction difficulties or sources of error.
[0141] Based on the results of the performance evaluation, the shopping behavior model is further optimized. This optimization process may involve multiple aspects, including but not limited to adjusting the model's parameter settings, improving feature engineering methods, introducing new algorithms or technologies, and increasing training data. Specifically, if the evaluation results show that the model performs poorly in predicting certain specific products or user groups, we will try to increase the training data for these specific scenarios, or adjust the model's parameters to increase its sensitivity to these scenarios. At the same time, the feature engineering method is improved to extract more representative user shopping behavior features, thereby improving the model's prediction accuracy.
[0142] Furthermore, as an implementable manner of the embodiment of the present disclosure, the method based on the shopping behavior model generation further includes:
[0143] The shopping behavior data of different users are input into the trained shopping behavior model to predict the shopping behavior and obtain user shopping prediction results; a clustering algorithm is called to classify the user shopping prediction results and obtain multiple user classifications.
[0144] Specifically, the shopping behavior model may be a statistical RFM model. Using the RFM model to predict shopping behavior includes the following steps:
[0145] Step 1. Obtain the customer's transaction records from the company's transaction database or system, including customer ID, transaction date and transaction amount information.
[0146] Step 2. Calculate the RFM indicator:
[0147] a. Recency:
[0148] Determine the base date: Select a reference date as the base point for analysis. For each customer, calculate the time interval between their most recent transaction and the base date.
[0149] b. Frequency: For each customer, calculate the total number of transactions within a given time window.
[0150] c. Value: For each customer, calculate the total amount spent within a given time window.
[0151] Step 3. Standardize a, b, and c to ensure they are on the same scale, and assign scores to each customer's a, b, and c indicators.
[0152] Step 4. Use the scores to group customers and use the K-means clustering algorithm to divide customers into different groups.
[0153] Step 5. Analyze the characteristics and behaviors of different groups, determine the characteristics and needs of each group, develop marketing strategies and service plans for different groups to improve customer loyalty and profits, monitor and evaluate the model, and adjust and optimize it based on feedback and new data.
[0154] Preferably, the specific steps of the K-means clustering algorithm are as follows:
[0155] (1) Select the number of clusters K, where each cluster can represent a category or group of users’ shopping intentions;
[0156] (2) Randomly select K data points as the initial cluster centers;
[0157] (3) Assign each data point to the nearest cluster center;
[0158] (4) Recalculate the center of each cluster, that is, take the average of all points in the cluster;
[0159] (5) Repeat steps 3 and 4 until the cluster center no longer changes or the predetermined number of iterations is reached;
[0160] formula:
[0161] Input: sample set D = {x1, x2, …, xm};
[0162] The number of clusters k.
[0163] Process: Randomly select k samples from D as the initial cluster centers {u1,u2,…,uk}
[0164] repeat
[0165] Let cluster partition Ci = empty set (i = 1 ~ k)
[0166] forj=1,2,…,mdo
[0167] Calculate the Euclidean distance between sample xj and the center of each initial cluster: dji = ‖xj-ui‖2;
[0168] Determine the cluster label of xj based on the nearest mean vector;
[0169] end for
[0170] for i=1,2,…,kdo
[0171] Calculate the new cluster center of each cluster (the mean of the elements in the cluster);
[0172] end for
[0173] until the mean vector is not updated
[0174] Output: Cluster partition c = {c1, c2, ..., ck}
[0175] By iteratively calculating the distance between data points, assigning them to clusters, and updating cluster centers, user clusters with similar shopping intentions are eventually formed.
[0176] It should be noted that the embodiments of the present disclosure may include multiple steps. For the convenience of description, these steps are numbered, but these numbers do not limit the execution time slots or execution order between the steps; these steps can be implemented in any order, and the embodiments of the present disclosure do not limit this.
[0177] Corresponding to the above-mentioned method for training a shopping behavior model, the present invention also proposes a device for training a shopping behavior model. Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, details not disclosed in the device embodiment can be referred to the above-mentioned method embodiment, and will not be repeated in the present invention.
[0178] Figure 3 A schematic diagram of a shopping behavior model training device provided by an embodiment of the present disclosure, such as Figure 3 As shown, including:
[0179] A screening unit 31 is used to perform feature screening on the historical shopping behavior data, determine the shopping intention feature parameters of the target user, and convert the shopping intention feature parameters to obtain shopping data for training;
[0180] A first training unit 32, configured to input the training shopping data into a shopping behavior model, perform fitting training on the correlation between the training shopping data and the shopping behavior of a target user, and obtain a first shopping behavior model after fitting training;
[0181] A generating unit 33, configured to obtain secondary parameters of the first shopping behavior model and generate a shopping preference difference matrix;
[0182] The second training unit 34 is used to modify the first shopping behavior model based on the shopping preference difference matrix to obtain a trained shopping behavior model.
[0183] The present disclosure provides a device for training a shopping behavior model, which performs feature screening on historical shopping behavior data, determines shopping intention feature parameters of the target user, and converts the shopping intention feature parameters to obtain training shopping data; inputs the training shopping data into a shopping behavior model, performs fitting training on the correlation between the training shopping data and the shopping behavior of the target user, and obtains a first shopping behavior model after fitting training; performs secondary parameter acquisition on the first shopping behavior model, and generates a shopping preference difference matrix; and modifies the first shopping behavior model based on the shopping preference difference matrix to obtain a trained shopping behavior model. Compared with the related art, the embodiment of the present disclosure can remove features that are irrelevant or weakly correlated with the shopping intention of the target user through feature screening, and retain strongly correlated features, thereby reducing noise interference during model training and improving the prediction accuracy of the model; it can ensure that different features have equivalent weights during model training to avoid deviations caused by different feature dimensions or value ranges; using screened and converted training shopping data for model training can enable the model to better learn the essential characteristics of the shopping behavior of the target user, thereby improving the generalization ability of the model; secondary parameter acquisition and the generation of a shopping preference difference matrix can further refine the model's understanding of the shopping preferences of the target user; by comparing the differences between the model prediction results and the actual shopping behavior, the user's personalized needs can be identified; and by correcting the model based on the shopping preference difference matrix, the model can be more in line with the actual shopping behavior of the target user.
[0184] Furthermore, in a possible implementation of this embodiment, as Figure 4 As shown, the screening unit 31 includes:
[0185] A screening module 311 is used to screen the shopping intention characteristic parameters related to shopping intention in the historical shopping behavior data;
[0186] The processing module 312 is used to normalize the shopping intention feature parameters to obtain the training shopping data.
[0187] Furthermore, in a possible implementation of this embodiment, as Figure 4 As shown, the generating unit 33 includes:
[0188] A generating module 331 is used to obtain the historical portrait data of the target user and generate a feature quantization parameter matrix about the user's shopping preference according to the historical portrait data;
[0189] A determination module 332 is used to obtain the historical browsing behavior data of the target user and determine a characteristic data matrix about the user's shopping preference in different time periods based on a time parameter;
[0190] The calculation module 333 is used to calculate and generate the shopping preference difference matrix based on the feature quantization parameter matrix and the feature data matrix.
[0191] Furthermore, in a possible implementation of this embodiment, as Figure 4 As shown, the second training unit 34 includes:
[0192] A first training module 341 is used to use each parameter in the shopping preference difference matrix as a difference training set to perform correction training on the first shopping behavior model to obtain multiple corrected first shopping behavior models;
[0193] A prediction module 342, configured to select features related to shopping intention as user parameters, substitute the user parameters into the multiple modified first shopping behavior models respectively to perform user preference prediction, and obtain multiple user preference prediction results;
[0194] The second training module 343 is used to train the modified first shopping behavior model based on the multiple user preference prediction results and historical browsing record data to obtain the trained shopping behavior model.
[0195] Furthermore, in a possible implementation of this embodiment, the second training module 343 is further configured to:
[0196] Semantically matching the plurality of user preference prediction results with historical browsing record data to identify the similarity of the portraits;
[0197] Selecting the shopping preference difference matrix corresponding to the user preference prediction result with the highest portrait similarity as a benchmark, and calculating the Euclidean distance for the historical browsing record data;
[0198] The historical browsing record data whose Euclidean distance is less than the distance threshold is selected as a secondary training set, and the modified first shopping behavior model is trained to obtain the trained shopping behavior model.
[0199] Furthermore, in a possible implementation of this embodiment, as Figure 4 As shown, the device also includes:
[0200] The optimization unit 35 is used to perform a model performance evaluation on the shopping behavior model based on the user shopping prediction result generated by the shopping behavior model; and perform model optimization on the shopping behavior model based on the performance evaluation result.
[0201] Furthermore, in a possible implementation of this embodiment, as Figure 4 As shown, the device also includes:
[0202] The classification unit 36 is used to input the shopping behavior data of different users into the trained shopping behavior model to predict the shopping behavior and obtain user shopping prediction results; call the clustering algorithm to classify the user shopping prediction results and obtain multiple user classifications.
[0203] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment, and the principle is the same, which is not limited in this embodiment.
[0204] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0205] Figure 5 A schematic block diagram of an example electronic device 400 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0206] like Figure 5 As shown, the device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 402 or a computer program loaded from a storage unit 408 to a RAM (Random Access Memory) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An I / O (Input / Output) interface 405 is also connected to the bus 404.
[0207] A number of components in the device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0208] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above, such as a method for shopping behavior model training. For example, in some embodiments, the method for shopping behavior model training may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the computing unit 401, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to execute the aforementioned shopping behavior model training method in any other appropriate manner (eg, by means of firmware).
[0209] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a special purpose or general purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0210] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0211] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a RAM, a ROM, an EPROM (Electrically Programmable Read-Only-Memory) or a flash memory, an optical fiber, a CD-ROM (Compact Dis sc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0212] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball), through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0213] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.
[0214] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0215] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.
[0216] The various numerical numbers such as first and second involved in the present disclosure are only for the convenience of description and are not used to limit the scope of the embodiments of the present disclosure, but also indicate the order of precedence.
[0217] At least one in the present disclosure may also be described as one or more, and a plurality may be two, three, four or more, which is not limited in the present disclosure. In the embodiments of the present disclosure, for a technical feature, the technical features in the technical feature are distinguished by "first", "second", "third", "A", "B", "C" and "D", etc., and there is no order of precedence or size between the technical features described by the "first", "second", "third", "A", "B", "C" and "D".
[0218] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0219] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for training a shopping behavior model, characterized in that: The method comprises: Performing feature screening on the historical shopping behavior data to determine the shopping intention feature parameters of the target user, and converting the shopping intention feature parameters to obtain shopping data for training; Inputting the training shopping data into a shopping behavior model, performing fitting training on the correlation between the training shopping data and the shopping behavior of the target user, and obtaining a first shopping behavior model after fitting training; Obtaining secondary parameters of the first shopping behavior model and generating a shopping preference difference matrix; The first shopping behavior model is modified based on the shopping preference difference matrix to obtain a trained shopping behavior model.
2. The method according to claim 1, characterized in that The feature screening of the historical shopping behavior data, determining the shopping intention feature parameters of the target user, and converting the shopping intention feature parameters to obtain training shopping data includes: screening the shopping intention characteristic parameters related to shopping intention in the historical shopping behavior data; The shopping intention feature parameters are normalized to obtain the training shopping data.
3. The method according to claim 1, characterized in that The second step of acquiring parameters of the first shopping behavior model and generating a shopping preference difference matrix includes: Acquire historical portrait data of the target user, and generate a feature quantization parameter matrix about the user's shopping preference according to the historical portrait data; Obtain the historical browsing behavior data of the target user, and determine a characteristic data matrix about the user's shopping preference in different time periods based on a time parameter; The shopping preference difference matrix is generated by calculation based on the feature quantization parameter matrix and the feature data matrix.
4. The method according to claim 1, characterized in that The step of modifying the first shopping behavior model based on the shopping preference difference matrix to obtain a trained shopping behavior model includes: Using each parameter in the shopping preference difference matrix as a difference training set, performing correction training on the first shopping behavior model to obtain a plurality of corrected first shopping behavior models; Selecting shopping intention-related features as user parameters, and substituting the user parameters into the multiple modified first shopping behavior models to perform user preference prediction, thereby obtaining multiple user preference prediction results; Based on the plurality of user preference prediction results and historical browsing record data, the modified first shopping behavior model is trained to obtain the trained shopping behavior model.
5. The method according to claim 1, characterized in that: The step of training the modified first shopping behavior model based on the plurality of user preference prediction results and historical browsing record data to obtain the trained shopping behavior model comprises: Semantically matching the plurality of user preference prediction results with historical browsing record data to identify the similarity of the portraits; Selecting the shopping preference difference matrix corresponding to the user preference prediction result with the highest portrait similarity as a benchmark, and calculating the Euclidean distance for the historical browsing record data; The historical browsing record data whose Euclidean distance is less than the distance threshold is selected as a secondary training set, and the modified first shopping behavior model is trained to obtain the trained shopping behavior model.
6. The method according to claim 1, characterized in that The method further comprises: Based on the user shopping prediction results generated by the shopping behavior model, the shopping behavior model is evaluated for model performance; and based on the performance evaluation results, the shopping behavior model is optimized.
7. The method according to claim 1, characterized in that The method further comprises: The shopping behavior data of different users are input into the trained shopping behavior model to predict the shopping behavior and obtain user shopping prediction results; a clustering algorithm is called to classify the user shopping prediction results and obtain multiple user classifications.
8. A device for training a shopping behavior model, characterized in that: The device comprises: A screening unit, used to perform feature screening on the historical shopping behavior data, determine the shopping intention feature parameters of the target user, and convert the shopping intention feature parameters to obtain shopping data for training; A first training unit, configured to input the training shopping data into a shopping behavior model, perform fitting training on the correlation between the training shopping data and the shopping behavior of a target user, and obtain a first shopping behavior model after fitting training; A generating unit, used for acquiring secondary parameters of the first shopping behavior model and generating a shopping preference difference matrix; The second training unit is used to modify the first shopping behavior model based on the shopping preference difference matrix to obtain a trained shopping behavior model.
9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.
11. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.